From 76bdb376c36b41a6b97ea4e9bce98012578d116f Mon Sep 17 00:00:00 2001 From: Alex Shnitman Date: Sun, 8 Feb 2026 18:11:56 +0200 Subject: [PATCH] cont. fix channel / playlist detection logic (closes #894) --- app/ytdl.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/ytdl.py b/app/ytdl.py index c166e59..5325713 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -446,13 +446,13 @@ class DownloadQueue: output = self.config.OUTPUT_TEMPLATE if len(dl.custom_name_prefix) == 0 else f'{dl.custom_name_prefix}.{self.config.OUTPUT_TEMPLATE}' output_chapter = self.config.OUTPUT_TEMPLATE_CHAPTER entry = getattr(dl, 'entry', None) - if entry is not None and 'playlist_index' in entry: + if entry is not None and entry.get('playlist_index') is not None: if len(self.config.OUTPUT_TEMPLATE_PLAYLIST): output = self.config.OUTPUT_TEMPLATE_PLAYLIST for property, value in entry.items(): if property.startswith("playlist"): output = output.replace(f"%({property})s", str(value)) - if entry is not None and 'channel_index' in entry: + if entry is not None and entry.get('channel_index') is not None: if len(self.config.OUTPUT_TEMPLATE_CHANNEL): output = self.config.OUTPUT_TEMPLATE_CHANNEL for property, value in entry.items():