Skip to content

Commit acdbe8c

Browse files
committed
Fix crash when rescanning network tracks
1 parent be22b13 commit acdbe8c

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ Changelog
44

55
### Unreleased version
66

7+
- **Fixed** Crash when rescanning network tracks
78
- **Fixed** Crashes when using the Russian localization
89
- **Fixed** Another crash related to the bottom bar
910
- **Fixed** Playing M4B files

src/tauon/t_modules/t_main.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41627,18 +41627,27 @@ def upload_to_lrclib( upload: dict[ str, str | float ] ) -> bool:
4162741627
tauon.g_tc_notify.show()
4162841628

4162941629
if tauon.to_scan:
41630+
network_warn: bool = False
4163041631
while tauon.to_scan:
4163141632
track = tauon.to_scan[0]
4163241633
star = tauon.star_store.full_get(track)
4163341634
tauon.star_store.remove(track)
41634-
pctl.master_library[track] = tauon.tag_scan(pctl.master_library[track])
41635+
rescanned_track = tauon.tag_scan(pctl.master_library[track])
41636+
if rescanned_track is None:
41637+
del tauon.to_scan[0]
41638+
gui.update += 1
41639+
network_warn = True
41640+
continue
41641+
pctl.master_library[track] = recsanned_track
4163541642
tauon.star_store.merge(track, star)
4163641643
tauon.lastfm.sync_pull_love(pctl.master_library[track])
4163741644
del tauon.to_scan[0]
4163841645
gui.update += 1
4163941646
gui.album_artist_dict.clear()
4164041647
pctl.notify_change()
4164141648
gui.pl_update += 1
41649+
if network_warn:
41650+
tauon.show_message(_("Some tracks could not be rescanned"), _("Rescanning network tracks is unsupported, please reimport your playlist instead."))
4164241651

4164341652
if tauon.loaderCommandReady is True:
4164441653
for order in tauon.load_orders:

0 commit comments

Comments
 (0)