From ca9fbd7168ef0bbf9ffc013a3f5d9c66799f8bc6 Mon Sep 17 00:00:00 2001 From: tcely Date: Thu, 1 May 2025 03:25:36 -0400 Subject: [PATCH] Copy updated thumbnail next to media --- tubesync/sync/tasks.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tubesync/sync/tasks.py b/tubesync/sync/tasks.py index efd03152..81dd4b5d 100644 --- a/tubesync/sync/tasks.py +++ b/tubesync/sync/tasks.py @@ -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