diff options
author | Alex Shnitman <alexta69@gmail.com> | 2022-01-26 08:25:53 +0200 |
---|---|---|
committer | Alex Shnitman <alexta69@gmail.com> | 2022-01-26 08:25:53 +0200 |
commit | 7b94a4fabdd6a5636e5ead94085699bdd5cf0a7f (patch) | |
tree | 29675e1b1b1cca22bc8fe0bf531347853b0941b4 /app | |
parent | use LTS node version (diff) | |
download | metube-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.py | 5 |
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):
|