Complete rate-limiter coverage for all background yt-dlp calls
- fetch_playlist_videos now uses _meta_run (background playlist indexing) - fetch_channel_links now uses _meta_run (dead code, future-proofed) - _upsert_video_from_yt accepts polite= flag; background enrichment passes polite=True - Only intentional user-facing one-shot calls (download_subs_only, fetch_video_comments, polite=False metadata) bypass the lock Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -435,7 +435,7 @@ def fetch_playlist_videos(playlist_id: str, max_videos: int = 200) -> list[dict]
|
||||
]
|
||||
if max_videos > 0:
|
||||
args += ["--playlist-end", str(max_videos)]
|
||||
stdout, _, code = _run(args, timeout=120)
|
||||
stdout, _, code = _meta_run(args, timeout=120)
|
||||
|
||||
videos = []
|
||||
for line in stdout.splitlines():
|
||||
@@ -503,7 +503,7 @@ def fetch_channel_links(channel_id: str) -> list[str]:
|
||||
url = f"https://www.youtube.com/{channel_id}/about"
|
||||
else:
|
||||
url = f"https://www.youtube.com/channel/{channel_id}/about"
|
||||
stdout, _, code = _run([
|
||||
stdout, _, code = _meta_run([
|
||||
"yt-dlp",
|
||||
url,
|
||||
"--dump-json",
|
||||
|
||||
Reference in New Issue
Block a user