Fix buy list label to update on filter
This commit is contained in:
1 parent
5066b0b5e9
commit
38131fb653
2 files changed
+20
-3
No files matched your search
+17
-2
@@ -1,8 +1,23 @@
|
||||
Songs not in your library - Amazon search links:
|
||||
|
||||
Danny Gokey - I Got You
|
||||
https://www.amazon.com/s?k=Danny%20Gokey%20I%20Got%20You&i=digital-music
|
||||
|
||||
Danny Gokey - I Got You
|
||||
https://www.amazon.com/s?k=Danny%20%20Gokey%20I%20%20Got%20%20You&i=digital-music
|
||||
|
||||
Have For You Colton Dixon - The Love I
|
||||
https://www.amazon.com/s?k=Have%20%20For%20%20You%20Colton%20%20Dixon%20The%20%20Love%20%20I%20&i=digital-music
|
||||
|
||||
Done Tasha Layton - Look What You've
|
||||
https://www.amazon.com/s?k=Done%20Tasha%20%20Layton%20Look%20%20What%20%20You%27ve%20&i=digital-music
|
||||
|
||||
Cochren & Co. - Who Can
|
||||
https://www.amazon.com/s?k=Cochren%20%26%20%20Co.%20Who%20%20Can&i=digital-music
|
||||
|
||||
Matthew West - All In
|
||||
https://www.amazon.com/s?k=Matthew%20%20West%20All%20%20In&i=digital-music
|
||||
Have For You Colton Dixon - The Love I
|
||||
https://www.amazon.com/s?k=Have%20%20For%20%20You%20Colton%20%20Dixon%20The%20%20Love%20%20I%20&i=digital-music
|
||||
|
||||
Done Tasha Layton - Look What You've
|
||||
https://www.amazon.com/s?k=Done%20Tasha%20%20Layton%20Look%20%20What%20%20You%27ve%20&i=digital-music
|
||||
|
||||
+3
-1
@@ -504,8 +504,9 @@ class MainWindow(QMainWindow):
|
||||
|
||||
# List widget
|
||||
self.buy_list_widget = QListWidget()
|
||||
self.buy_list_label = QLabel(f"Found {len(songs)} songs to buy:")
|
||||
layout.addWidget(self.buy_list_label)
|
||||
self.populate_buy_list(songs)
|
||||
layout.addWidget(QLabel(f"Found {len(songs)} songs to buy:"))
|
||||
layout.addWidget(self.buy_list_widget)
|
||||
|
||||
# Buttons
|
||||
@@ -535,6 +536,7 @@ class MainWindow(QMainWindow):
|
||||
def populate_buy_list(self, songs):
|
||||
"""Populate the buy list widget"""
|
||||
self.buy_list_widget.clear()
|
||||
self.buy_list_label.setText(f"Found {len(songs)} songs to buy:")
|
||||
for artist_title, url in songs:
|
||||
item = QListWidgetItem(artist_title)
|
||||
item.setData(1, url) # Store URL in item data
|
||||
|
||||
Reference in new issue
Block a user