aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/main.py1
-rw-r--r--app/ytdl.py4
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
bgstack15