Copy updated thumbnail next to media

This commit is contained in:
tcely 2025-05-01 03:25:36 -04:00 committed by GitHub
parent 83a505a170
commit ca9fbd7168
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -555,6 +555,16 @@ def download_media_thumbnail(media_id, url):
)
i = image_file = None
log.info(f'Saved thumbnail for: {media} from: {url}')
# After media is downloaded, copy the updated thumbnail.
copy_thumbnail = (
media.downloaded and
media.source.copy_thumbnails and
media.thumb_file_exists
)
if copy_thumbnail:
log.info(f'Copying media thumbnail from: {media.thumb.path} '
f'to: {media.thumbpath}')
copyfile(media.thumb.path, media.thumbpath)
return True