From 1e37e63b6798d009dd1c9f4ea91897e8bcef6be5 Mon Sep 17 00:00:00 2001 From: DaKheera47 Date: Wed, 15 Oct 2025 12:00:22 +0100 Subject: [PATCH] filename shows correctly in downloading view too --- app/ytdl.py | 10 +++++++--- ui/src/app/app.component.ts | 1 + 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/app/ytdl.py b/app/ytdl.py index 66369b9..1cd64d1 100644 --- a/app/ytdl.py +++ b/app/ytdl.py @@ -49,9 +49,11 @@ class DownloadInfo: self.size = None self.timestamp = time.time_ns() self.error = error - self.entry = entry - self.playlist_item_limit = playlist_item_limit - + self.entry = entry + self.playlist_item_limit = playlist_item_limit + if self.custom_name: + self.title = self.custom_name + class Download: manager = None @@ -345,6 +347,7 @@ class DownloadQueue: log.info(f'Custom name conflict for download {dl.url} at {dldirectory} name "{custom_name}"') return conflict output = f'{custom_name}.%(ext)s' + dl.title = custom_name else: output = self.config.OUTPUT_TEMPLATE if len(dl.custom_name_prefix) == 0 else f'{dl.custom_name_prefix}.{self.config.OUTPUT_TEMPLATE}' output_chapter = self.config.OUTPUT_TEMPLATE_CHAPTER @@ -541,6 +544,7 @@ class DownloadQueue: return {'status': 'error', 'msg': f'rename failed: {exc}'} info.filename = target_relative + info.title = os.path.splitext(target_basename)[0] self.done.put(download) asyncio.create_task(self.notifier.renamed(info)) log.info(f"Rename successful for download {id}: {current_basename} -> {target_basename}") diff --git a/ui/src/app/app.component.ts b/ui/src/app/app.component.ts index 0671020..0f523d2 100644 --- a/ui/src/app/app.component.ts +++ b/ui/src/app/app.component.ts @@ -416,6 +416,7 @@ export class AppComponent implements AfterViewInit { if (status.status === 'ok') { if (status.filename) { download.filename = status.filename; + download.title = this.getFilenameStem(status.filename); } this.cancelRename(key); } else {