From 7b94a4fabdd6a5636e5ead94085699bdd5cf0a7f Mon Sep 17 00:00:00 2001 From: Alex Shnitman Date: Wed, 26 Jan 2022 08:25:53 +0200 Subject: change default path of queue persistence files (closes #110) --- app/ytdl.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app') 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): -- cgit