From 3adc4eb0625cfafd90e8b650156cc81a783e508e Mon Sep 17 00:00:00 2001 From: arabcoders Date: Mon, 25 Aug 2025 18:48:36 +0300 Subject: [PATCH] Sometimes yt-dlp doesn't provide playlist_count, so we need to have fallback. Fixes #384 --- app/library/DownloadQueue.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/library/DownloadQueue.py b/app/library/DownloadQueue.py index f3cf740f..77fc7f8b 100644 --- a/app/library/DownloadQueue.py +++ b/app/library/DownloadQueue.py @@ -307,7 +307,9 @@ class DownloadQueue(metaclass=Singleton): LOG.info(f"Processing '{entry.get('id')}: {entry.get('title')} ({len(entries)})' Playlist.") - playlistCount = int(entry.get("playlist_count", len(entries))) + playlistCount = entry.get("playlist_count") + playlistCount = int(playlistCount) if playlistCount else len(entries) + results = [] playlist_keys = {