From a62b64c3eee61fdf75462cd289f20371d8bd7945 Mon Sep 17 00:00:00 2001 From: tcely Date: Wed, 9 Apr 2025 02:42:30 -0400 Subject: [PATCH] Adjust FS tasks Move thumbnail download from NET to FS. It does use the network, but not with `yt_dlp` and not in a way that YouTube cares about. --- tubesync/sync/tasks.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tubesync/sync/tasks.py b/tubesync/sync/tasks.py index f3daf876..0358a6ce 100644 --- a/tubesync/sync/tasks.py +++ b/tubesync/sync/tasks.py @@ -479,7 +479,7 @@ def download_media_metadata(media_id): f'{source} / {media}: {media_id}') -@background(schedule=dict(priority=15, run_at=10), queue=Val(TaskQueue.NET), remove_existing_tasks=True) +@background(schedule=dict(priority=10, run_at=10), queue=Val(TaskQueue.FS), remove_existing_tasks=True) def download_media_thumbnail(media_id, url): ''' Downloads an image from a URL and save it as a local thumbnail attached to a @@ -654,7 +654,7 @@ def rescan_media_server(mediaserver_id): mediaserver.update() -@background(schedule=dict(priority=25, run_at=600), queue=Val(TaskQueue.FS), remove_existing_tasks=True) +@background(schedule=dict(priority=30, run_at=600), queue=Val(TaskQueue.FS), remove_existing_tasks=True) def save_all_media_for_source(source_id): ''' Iterates all media items linked to a source and saves them to