diff options
| author | Robert Honz <exislow+github@gmail.com> | 2025-06-30 08:39:33 +0200 |
|---|---|---|
| committer | Robert Honz <exislow+github@gmail.com> | 2025-06-30 08:39:33 +0200 |
| commit | 98f5230ccd9fb484244e2106f6ea6b6f6339b74e (patch) | |
| tree | 1cbd0a598d3a1749003ad62f3fc9e81db8551c69 /tidal_dl_ng | |
| parent | 09b611361c7f63ad8930c59bc65fa5eda3746997 (diff) | |
| download | tidal-dl-ng-98f5230ccd9fb484244e2106f6ea6b6f6339b74e.tar.gz | |
🛠️ Favorites won't getting duplicated after user hits the list reload button. Fixes #409
Diffstat (limited to 'tidal_dl_ng')
| -rw-r--r-- | tidal_dl_ng/gui.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tidal_dl_ng/gui.py b/tidal_dl_ng/gui.py index 4c6a1da..d35ca3f 100644 --- a/tidal_dl_ng/gui.py +++ b/tidal_dl_ng/gui.py @@ -371,6 +371,10 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): set_user_list_media(twi_child, item) twi_child.setText(2, info) + # Remove all children from favorites to avoid duplication + for i in reversed(range(twi_favorites.childCount())): + twi_favorites.removeChild(twi_favorites.child(i)) + # Populate static favorites for key, favorite in FAVORITES.items(): twi_child = QtWidgets.QTreeWidgetItem(twi_favorites) @@ -1196,6 +1200,7 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): def button_reload_status(self, status: bool): button_text: str = "Reloading..." + if status: button_text = "Reload" |
