From 4591d3867bb9a188f7ceaa0e3764f47ee500d46e Mon Sep 17 00:00:00 2001 From: tcely Date: Wed, 19 Feb 2025 21:37:55 -0500 Subject: [PATCH] Ask for formats that might not work and test them --- tubesync/sync/youtube.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tubesync/sync/youtube.py b/tubesync/sync/youtube.py index 8842423f..5d0cf19e 100644 --- a/tubesync/sync/youtube.py +++ b/tubesync/sync/youtube.py @@ -85,6 +85,7 @@ def get_channel_image_info(url): 'simulate': True, 'logger': log, 'extract_flat': True, # Change to False to get detailed info + 'check_formats': False, }) with yt_dlp.YoutubeDL(opts) as y: @@ -143,7 +144,11 @@ def get_media_info(url): 'simulate': True, 'logger': log, 'extract_flat': True, - 'extractor_args': {'youtubetab': {'approximate_date': ['true']}}, + 'check_formats': True, + 'extractor_args': { + 'youtube': {'formats': ['missing_pot']}, + 'youtubetab': {'approximate_date': ['true']}, + }, }) response = {} with yt_dlp.YoutubeDL(opts) as y: @@ -248,7 +253,7 @@ def download_media( 'writeautomaticsub': auto_subtitles, 'subtitleslangs': sub_langs.split(','), 'writethumbnail': embed_thumbnail, - 'check_formats': False, + 'check_formats': None, 'overwrites': None, 'sleep_interval': 10 + int(settings.DOWNLOAD_MEDIA_DELAY / 20), 'max_sleep_interval': settings.DOWNLOAD_MEDIA_DELAY,