Publish 0.2.3

This commit is contained in:
unknown
2025-12-19 03:48:32 +01:00
parent 9a64fa8b39
commit 2f15e1fbf3
3 changed files with 10 additions and 4 deletions

View File

@@ -59,8 +59,6 @@ def download_album(album):
localized variant (e.g. '陳奕迅'). By letting download_track fill these placeholders localized variant (e.g. '陳奕迅'). By letting download_track fill these placeholders
after fetching each track's locale-aware metadata, filenames are now consistent. after fetching each track's locale-aware metadata, filenames are now consistent.
""" """
# Still fetch once so we trigger an API call early (may warm caches) but we no longer
# inject these values into the template; track-level localized metadata will be used.
get_album_name(album) get_album_name(album)
tracks = get_album_tracks(album) tracks = get_album_tracks(album)

View File

@@ -391,7 +391,11 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba
except Exception: except Exception:
total = total total = total
if cur and total: if cur and total:
prog_prefix = f'({cur}/{total}) ' try:
cur_display = str(int(str(cur)))
except Exception:
cur_display = str(cur)
prog_prefix = f'({cur_display}/{total}) '
elif mode in ('playlist', 'extplaylist'): elif mode in ('playlist', 'extplaylist'):
cur = extra_keys.get('playlist_num') cur = extra_keys.get('playlist_num')
total = extra_keys.get('playlist_total') total = extra_keys.get('playlist_total')
@@ -413,7 +417,11 @@ def download_track(mode: str, track_id: str, extra_keys=None, disable_progressba
except Exception: except Exception:
total = total total = total
if cur and total: if cur and total:
prog_prefix = f'({cur}/{total}) ' try:
cur_display = str(int(str(cur)))
except Exception:
cur_display = str(cur)
prog_prefix = f'({cur_display}/{total}) '
Printer.print( Printer.print(
PrintChannel.PROGRESS_INFO, PrintChannel.PROGRESS_INFO,