aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorAlex Shnitman <alexta69@gmail.com>2021-12-15 19:57:06 +0200
committerAlex Shnitman <alexta69@gmail.com>2021-12-15 19:57:06 +0200
commit4bd54939eba7ae92a6aa8a2a499cb8b744c35fb8 (patch)
treec89a82e106406082b49741f40021269e3dc947e7 /app
parentMerge pull request #88 from kleest/pr-download-link (diff)
downloadmetube-4bd54939eba7ae92a6aa8a2a499cb8b744c35fb8.tar.gz
metube-4bd54939eba7ae92a6aa8a2a499cb8b744c35fb8.tar.bz2
metube-4bd54939eba7ae92a6aa8a2a499cb8b744c35fb8.zip
fix download link (closes #89)
Diffstat (limited to 'app')
-rw-r--r--app/ytdl.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/ytdl.py b/app/ytdl.py
index 4d92e3f..e873d32 100644
--- a/app/ytdl.py
+++ b/app/ytdl.py
@@ -53,6 +53,7 @@ class Download:
def put_status(st):
self.status_queue.put({k: v for k, v in st.items() if k in (
'tmpfilename',
+ 'filename',
'status',
'msg',
'total_bytes',
@@ -119,7 +120,7 @@ class Download:
return
self.tmpfilename = status.get('tmpfilename')
if 'filename' in status:
- self.info.filename = os.path.relpath(status.get('filename'))
+ self.info.filename = os.path.relpath(status.get('filename'), self.download_dir)
self.info.status = status['status']
self.info.msg = status.get('msg')
if 'downloaded_bytes' in status:
bgstack15