summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Jesús Alejo Sillero <juanjesusalejosillero@gmail.com>2025-04-26 01:15:45 +0200
committerGitHub <noreply@github.com>2025-04-26 01:15:45 +0200
commitcee11e6ebd92d74d8606f4343b472d8ff6784955 (patch)
tree26e8d37cdf5d168b183f3d5170f796e09200664b
parentd9ab28d8840c8616d11f5610a78a02b90fb7e696 (diff)
downloadtidal-dl-ng-cee11e6ebd92d74d8606f4343b472d8ff6784955.tar.gz
Fix: Prevent UnboundLocalError in on_populate_tree_lists
- Added a safeguard to skip items in `user_lists` that do not match expected types (`UserPlaylist`, `Playlist`, or `Mix`). - Ensured `twi_child` is only accessed when properly initialized. - This prevents crashes during GUI interaction when unexpected data is encountered.
-rw-r--r--tidal_dl_ng/gui.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tidal_dl_ng/gui.py b/tidal_dl_ng/gui.py
index 870b658..5ec0b13 100644
--- a/tidal_dl_ng/gui.py
+++ b/tidal_dl_ng/gui.py
@@ -360,6 +360,8 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow):
twi_child = QtWidgets.QTreeWidgetItem(twi_mixes)
name: str = item.title
info: str = item.sub_title
+ else:
+ continue
twi_child.setText(0, name)
set_user_list_media(twi_child, item)