mirror of
https://github.com/alexta69/metube.git
synced 2025-04-05 05:07:37 +03:00
Added support for yt-dlp 'temp' path
- Added support for yt-dlp emp path - Formatted with Black - Updated README to reflect new TEMP_DIR setting; linted - Modified Dockerfile to strip carriage return characters from docker-entrypoint.sh script to fix building the image on Windows - Added example docker-compose.yml config
This commit is contained in:
parent
17d668a2dd
commit
ccff77647c
6 changed files with 220 additions and 113 deletions
|
@ -17,6 +17,7 @@ class Config:
|
|||
_DEFAULTS = {
|
||||
'DOWNLOAD_DIR': '.',
|
||||
'AUDIO_DOWNLOAD_DIR': '%%DOWNLOAD_DIR',
|
||||
'TEMP_DIR': '%%DOWNLOAD_DIR',
|
||||
'DOWNLOAD_DIRS_INDEXABLE': 'false',
|
||||
'CUSTOM_DIRS': 'true',
|
||||
'CREATE_CUSTOM_DIRS': 'true',
|
||||
|
@ -138,13 +139,13 @@ def get_custom_dirs():
|
|||
dirs = list(filter(None, map(convert, path.glob('**'))))
|
||||
|
||||
return dirs
|
||||
|
||||
|
||||
download_dir = recursive_dirs(config.DOWNLOAD_DIR)
|
||||
|
||||
audio_download_dir = download_dir
|
||||
if config.DOWNLOAD_DIR != config.AUDIO_DOWNLOAD_DIR:
|
||||
audio_download_dir = recursive_dirs(config.AUDIO_DOWNLOAD_DIR)
|
||||
|
||||
|
||||
return {
|
||||
"download_dir": download_dir,
|
||||
"audio_download_dir": audio_download_dir
|
||||
|
@ -192,4 +193,5 @@ app.on_response_prepare.append(on_prepare)
|
|||
|
||||
if __name__ == '__main__':
|
||||
logging.basicConfig(level=logging.DEBUG)
|
||||
log.info(f"Listening on {config.HOST}:{config.PORT}")
|
||||
web.run_app(app, host=config.HOST, port=config.PORT, reuse_port=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue