mirror of
https://github.com/meeb/tubesync.git
synced 2025-06-25 14:36:34 +00:00
Copy updated thumbnail next to media
This commit is contained in:
parent
83a505a170
commit
ca9fbd7168
@ -555,6 +555,16 @@ def download_media_thumbnail(media_id, url):
|
|||||||
)
|
)
|
||||||
i = image_file = None
|
i = image_file = None
|
||||||
log.info(f'Saved thumbnail for: {media} from: {url}')
|
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
|
return True
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user