diff options
author | Erazor2 <jeromewhweb@gmail.com> | 2022-01-17 18:47:32 +0000 |
---|---|---|
committer | Erazor2 <jeromewhweb@gmail.com> | 2022-01-17 18:47:32 +0000 |
commit | 1ebf1da076a993be60734d7019ae9a8d98b8c97a (patch) | |
tree | ff17132506347f9c01e2d003176355f19706b64b /app | |
parent | Updated Readme (diff) | |
download | metube-1ebf1da076a993be60734d7019ae9a8d98b8c97a.tar.gz metube-1ebf1da076a993be60734d7019ae9a8d98b8c97a.tar.bz2 metube-1ebf1da076a993be60734d7019ae9a8d98b8c97a.zip |
Added Env-Var for State-Directory
Diffstat (limited to 'app')
-rw-r--r-- | app/main.py | 1 | ||||
-rw-r--r-- | app/ytdl.py | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/app/main.py b/app/main.py index f901afc..5d59958 100644 --- a/app/main.py +++ b/app/main.py @@ -16,6 +16,7 @@ class Config: _DEFAULTS = {
'DOWNLOAD_DIR': '.',
'AUDIO_DOWNLOAD_DIR': '%%DOWNLOAD_DIR',
+ 'STATE_DIR': '.',
'URL_PREFIX': '',
'OUTPUT_TEMPLATE': '%(title)s.%(ext)s',
'YTDL_OPTIONS': '{}',
diff --git a/app/ytdl.py b/app/ytdl.py index c91e4fc..c77347e 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -184,8 +184,8 @@ class DownloadQueue: def __init__(self, config, notifier):
self.config = config
self.notifier = notifier
- self.queue = PersistentQueue('/queue/queue')
- self.done = PersistentQueue('/queue/done', True)
+ self.queue = PersistentQueue(self.config.STATE_DIR + '/queue')
+ self.done = PersistentQueue(self.config.STATE_DIR + '/completed', True)
self.initialized = False
self.imported = False
|