directory mode on settings
This commit is contained in:
1 parent
0fafca037c
commit
279a01f9bc
1 file changed
+9
@@ -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: *
|
||||||
|
|||||||
Reference in new issue
Block a user