mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-10-28 14:31:15 +00:00
fix: index error on empty recents update
This commit is contained in:
1 parent
f0cb09d4ff
commit
78224d17b8
1 file changed
+4
-1
@@ -37,12 +37,15 @@ class RecentlyPlayed(HomepageRoutine):
|
|||||||
)
|
)
|
||||||
|
|
||||||
item = items[0]
|
item = items[0]
|
||||||
|
try:
|
||||||
store_entry = HomepageStore.entries[self.store_key].items[
|
store_entry = HomepageStore.entries[self.store_key].items[
|
||||||
self.userids[0]
|
self.userids[0]
|
||||||
][0]
|
][0]
|
||||||
|
except IndexError:
|
||||||
|
store_entry = None
|
||||||
|
|
||||||
if (
|
if (
|
||||||
item["type"] + item["hash"]
|
store_entry and item["type"] + item["hash"]
|
||||||
== store_entry["type"] + store_entry["hash"]
|
== store_entry["type"] + store_entry["hash"]
|
||||||
):
|
):
|
||||||
# If the item is the same as the one in the store
|
# If the item is the same as the one in the store
|
||||||
|
|||||||
Reference in new issue
Block a user