diff options
author | James Woglom <j@wogloms.net> | 2022-09-19 15:00:26 -0400 |
---|---|---|
committer | James Woglom <j@wogloms.net> | 2022-09-19 15:00:26 -0400 |
commit | 202813b9edf26ee269ef808f86f1bc646782d7a9 (patch) | |
tree | 76aeeac124bc35f63199b05522819dcb6c7c86f5 | |
parent | remove unneeded stylePreprocessorOptions (diff) | |
download | metube-202813b9edf26ee269ef808f86f1bc646782d7a9.tar.gz metube-202813b9edf26ee269ef808f86f1bc646782d7a9.tar.bz2 metube-202813b9edf26ee269ef808f86f1bc646782d7a9.zip |
CREATE_DIRS -> CREATE_CUSTOM_DIRS
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | app/main.py | 4 | ||||
-rw-r--r-- | app/ytdl.py | 4 | ||||
-rw-r--r-- | ui/src/app/app.component.ts | 2 |
4 files changed, 6 insertions, 6 deletions
@@ -37,7 +37,7 @@ Certain values can be set via environment variables, using the `-e` parameter on * __DOWNLOAD_DIR__: path to where the downloads will be saved. Defaults to `/downloads` in the docker image, and `.` otherwise.
* __AUDIO_DOWNLOAD_DIR__: path to where audio-only downloads will be saved, if you wish to separate them from the video downloads. Defaults to the value of `DOWNLOAD_DIR`.
* __CUSTOM_DIRS__: whether to enable downloading videos into custom directories within the __DOWNLOAD_DIR__ (or __AUDIO_DOWNLOAD_DIR__). When enabled, a drop-down appears next to the Add button to specify the download directory. Defaults to `true`.
-* __CREATE_DIRS__: whether to support automatically creating directories within the __DOWNLOAD_DIR__ (or __AUDIO_DOWNLOAD_DIR__) if they do not exist. When enabled, the download directory selector becomes supports free-text input, and the specified directory will be created recursively. Defaults to `false`.
+* __CREATE_CUSTOM_DIRS__: whether to support automatically creating directories within the __DOWNLOAD_DIR__ (or __AUDIO_DOWNLOAD_DIR__) if they do not exist. When enabled, the download directory selector becomes supports free-text input, and the specified directory will be created recursively. Defaults to `false`.
* __STATE_DIR__: path to where the queue persistence files will be saved. Defaults to `/downloads/.metube` in the docker image, and `.` otherwise.
* __URL_PREFIX__: base path for the web server (for use when hosting behind a reverse proxy). Defaults to `/`.
* __OUTPUT_TEMPLATE__: the template for the filenames of the downloaded videos, formatted according to [this spec](https://github.com/yt-dlp/yt-dlp/blob/master/README.md#output-template). Defaults to `%(title)s.%(ext)s`.
diff --git a/app/main.py b/app/main.py index d70d360..27fc2b7 100644 --- a/app/main.py +++ b/app/main.py @@ -18,12 +18,12 @@ class Config: 'DOWNLOAD_DIR': '.',
'AUDIO_DOWNLOAD_DIR': '%%DOWNLOAD_DIR',
'CUSTOM_DIRS': 'true',
- 'CREATE_DIRS': 'false',
+ 'CREATE_CUSTOM_DIRS': 'true',
'STATE_DIR': '.',
'URL_PREFIX': '',
'OUTPUT_TEMPLATE': '%(title)s.%(ext)s',
'OUTPUT_TEMPLATE_CHAPTER': '%(title)s - %(section_number)s %(section_title)s.%(ext)s',
- 'YTDL_OPTIONS': '{}'
+ 'YTDL_OPTIONS': '{}',
}
def __init__(self):
diff --git a/app/ytdl.py b/app/ytdl.py index b7a0f41..fd1c27f 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -237,8 +237,8 @@ class DownloadQueue: if not dldirectory.startswith(base_directory):
return {'status': 'error', 'msg': f'Folder "{folder}" must resolve inside the base download directory "{base_directory}"'}
if not os.path.isdir(dldirectory):
- if self.config.CREATE_DIRS != 'true':
- return {'status': 'error', 'msg': f'Folder "{folder}" for download does not exist inside base directory "{base_directory}", and CREATE_DIRS is not true in the configuration.'}
+ if self.config.CREATE_CUSTOM_DIRS != 'true':
+ return {'status': 'error', 'msg': f'Folder "{folder}" for download does not exist inside base directory "{base_directory}", and CREATE_CUSTOM_DIRS is not true in the configuration.'}
os.makedirs(dldirectory, exist_ok=True)
else:
dldirectory = base_directory
diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 97ff020..eae1ba9 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -86,7 +86,7 @@ export class AppComponent implements AfterViewInit { } allowCustomDir() { - return this.downloads.configuration['CREATE_DIRS'] == 'true'; + return this.downloads.configuration['CREATE_CUSTOM_DIRS'] == 'true'; } isAudioType() { |