aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Shnitman <alexta69@gmail.com>2022-01-26 08:25:53 +0200
committerAlex Shnitman <alexta69@gmail.com>2022-01-26 08:25:53 +0200
commit7b94a4fabdd6a5636e5ead94085699bdd5cf0a7f (patch)
tree29675e1b1b1cca22bc8fe0bf531347853b0941b4 /app
parentuse LTS node version (diff)
downloadmetube-7b94a4fabdd6a5636e5ead94085699bdd5cf0a7f.tar.gz
metube-7b94a4fabdd6a5636e5ead94085699bdd5cf0a7f.tar.bz2
metube-7b94a4fabdd6a5636e5ead94085699bdd5cf0a7f.zip
change default path of queue persistence files (closes #110)
Diffstat (limited to 'app')
-rw-r--r--app/ytdl.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/ytdl.py b/app/ytdl.py
index deb745c..6e406b0 100644
--- a/app/ytdl.py
+++ b/app/ytdl.py
@@ -136,9 +136,12 @@ class Download:
class PersistentQueue:
def __init__(self, path):
- self.path = path
+ pdir = os.path.dirname(path)
+ if not os.path.isdir(pdir):
+ os.mkdir(pdir)
with shelve.open(path, 'c'):
pass
+ self.path = path
self.dict = OrderedDict()
def load(self):
bgstack15