directory mode on settings

This commit is contained in:
tcely authored and GitHub committed 2024-12-09 14:06:35 -05:00
1 parent 0fafca037c
commit 279a01f9bc
1 file changed
+9
+9
View File
@@ -112,6 +112,15 @@ DOWNLOAD_VIDEO_DIR = 'video'
DOWNLOAD_AUDIO_DIR = 'audio' DOWNLOAD_AUDIO_DIR = 'audio'
SASS_PROCESSOR_ROOT = STATIC_ROOT SASS_PROCESSOR_ROOT = STATIC_ROOT
directory_mode = os.getenv("TUBESYNC_DIRECTORY_MODE", "default")
if directory_mode == 'flat':
DOWNLOAD_VIDEO_DIR = '.'
DOWNLOAD_AUDIO_DIR = '.'
elif directory_mode.startswith("custom:"):
custom_value = directory_mode.split(":")[1]
if str(',') in custom_value:
DOWNLOAD_AUDIO_DIR, DOWNLOAD_VIDEO_DIR = custom_value.split(',')
ROBOTS = ''' ROBOTS = '''
User-agent: * User-agent: *