Compare commits
2 Commits
2026.02.08
...
copilot/fi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c6b28477f9 | ||
|
|
49fba670af |
26
app/ytdl.py
26
app/ytdl.py
@@ -446,18 +446,20 @@ 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 = 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
|
output_chapter = self.config.OUTPUT_TEMPLATE_CHAPTER
|
||||||
entry = getattr(dl, 'entry', None)
|
entry = getattr(dl, 'entry', None)
|
||||||
if entry is not None and 'playlist' in entry and entry['playlist'] is not None:
|
# Only use playlist/channel templates if CUSTOM_DIRS is enabled
|
||||||
if len(self.config.OUTPUT_TEMPLATE_PLAYLIST):
|
if self.config.CUSTOM_DIRS:
|
||||||
output = self.config.OUTPUT_TEMPLATE_PLAYLIST
|
if entry is not None and 'playlist' in entry and entry['playlist'] is not None:
|
||||||
for property, value in entry.items():
|
if len(self.config.OUTPUT_TEMPLATE_PLAYLIST):
|
||||||
if property.startswith("playlist"):
|
output = self.config.OUTPUT_TEMPLATE_PLAYLIST
|
||||||
output = output.replace(f"%({property})s", str(value))
|
for property, value in entry.items():
|
||||||
if entry is not None and 'channel' in entry and entry['channel'] is not None:
|
if property.startswith("playlist"):
|
||||||
if len(self.config.OUTPUT_TEMPLATE_CHANNEL):
|
output = output.replace(f"%({property})s", str(value))
|
||||||
output = self.config.OUTPUT_TEMPLATE_CHANNEL
|
if entry is not None and 'channel' in entry and entry['channel'] is not None:
|
||||||
for property, value in entry.items():
|
if len(self.config.OUTPUT_TEMPLATE_CHANNEL):
|
||||||
if property.startswith("channel"):
|
output = self.config.OUTPUT_TEMPLATE_CHANNEL
|
||||||
output = output.replace(f"%({property})s", str(value))
|
for property, value in entry.items():
|
||||||
|
if property.startswith("channel"):
|
||||||
|
output = output.replace(f"%({property})s", str(value))
|
||||||
ytdl_options = dict(self.config.YTDL_OPTIONS)
|
ytdl_options = dict(self.config.YTDL_OPTIONS)
|
||||||
playlist_item_limit = getattr(dl, 'playlist_item_limit', 0)
|
playlist_item_limit = getattr(dl, 'playlist_item_limit', 0)
|
||||||
if playlist_item_limit > 0:
|
if playlist_item_limit > 0:
|
||||||
|
|||||||
Reference in New Issue
Block a user