Fix: Respect CUSTOM_DIRS setting to prevent folder creation
When CUSTOM_DIRS is false, do not use OUTPUT_TEMPLATE_PLAYLIST or OUTPUT_TEMPLATE_CHANNEL which contain folder paths. This prevents automatic creation of folders for playlist/channel downloads when users have explicitly disabled custom directories. Co-authored-by: alexta69 <7450369+alexta69@users.noreply.github.com>
This commit is contained in:
@@ -446,6 +446,8 @@ 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)
|
||||||
|
# Only use playlist/channel templates if CUSTOM_DIRS is enabled
|
||||||
|
if self.config.CUSTOM_DIRS:
|
||||||
if entry is not None and 'playlist' in entry and entry['playlist'] is not None:
|
if entry is not None and 'playlist' in entry and entry['playlist'] is not None:
|
||||||
if len(self.config.OUTPUT_TEMPLATE_PLAYLIST):
|
if len(self.config.OUTPUT_TEMPLATE_PLAYLIST):
|
||||||
output = self.config.OUTPUT_TEMPLATE_PLAYLIST
|
output = self.config.OUTPUT_TEMPLATE_PLAYLIST
|
||||||
|
|||||||
Reference in New Issue
Block a user