mirror of
https://github.com/anatolykopyl/youtube-cdl.git
synced 2026-03-26 12:55:11 +00:00
🐛 Fixed a download status display bug on Windows
Fixed a bug on Windows where the full path was displayed instead of only the filename
This commit is contained in:
8
main.py
8
main.py
@@ -65,8 +65,12 @@ c = Console()
|
|||||||
|
|
||||||
|
|
||||||
def prg_hook(d):
|
def prg_hook(d):
|
||||||
_filename = d['filename'].replace(
|
_filedir = os.path.join(output_dir, ch['title'])+'/'
|
||||||
os.path.join(output_dir, ch['title'])+'/', '')
|
if platform.system() == 'Windows':
|
||||||
|
_filedir = _filedir.replace('/', '\\')
|
||||||
|
|
||||||
|
_filename = d['filename'].replace(_filedir, '')
|
||||||
|
|
||||||
if d['status'] == 'finished':
|
if d['status'] == 'finished':
|
||||||
sys.stdout.write("\033[F")
|
sys.stdout.write("\033[F")
|
||||||
sys.stdout.write("\033[K")
|
sys.stdout.write("\033[K")
|
||||||
|
|||||||
Reference in New Issue
Block a user