mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-21 12:36:36 +00:00
Fix an internal server error
This commit is contained in:
parent
1f0169ae4b
commit
0d73519946
@ -495,8 +495,9 @@ class MediaThumbView(DetailView):
|
||||
|
||||
def get(self, request, *args, **kwargs):
|
||||
media = self.get_object()
|
||||
if media.thumb:
|
||||
thumb = open(media.thumb.path, 'rb').read()
|
||||
if media.thumb_file_exists:
|
||||
thumb_path = pathlib.Path(media.thumb.path)
|
||||
thumb = thumb_path.read_bytes()
|
||||
content_type = 'image/jpeg'
|
||||
else:
|
||||
# No thumbnail on disk, return a blank 1x1 gif
|
||||
|
Loading…
Reference in New Issue
Block a user