filename shows correctly in downloading view too
This commit is contained in:
parent
3d74f9b53b
commit
1e37e63b67
2 changed files with 8 additions and 3 deletions
10
app/ytdl.py
10
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}")
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Reference in a new issue