mirror of
https://github.com/Dvorinka/swingmusic-extended.git
synced 2026-06-03 20:13:02 +00:00
add logs
This commit is contained in:
@@ -36,17 +36,20 @@ class RecentlyPlayed(HomepageRoutine):
|
|||||||
limit=self.ITEM_LIMIT, userid=self.userids[0], _entries=[last_entry]
|
limit=self.ITEM_LIMIT, userid=self.userids[0], _entries=[last_entry]
|
||||||
)
|
)
|
||||||
|
|
||||||
item = items[0]
|
|
||||||
try:
|
try:
|
||||||
|
item = items[0]
|
||||||
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:
|
except IndexError:
|
||||||
store_entry = None
|
store_entry = None
|
||||||
|
item = None
|
||||||
|
|
||||||
if (
|
if (
|
||||||
store_entry and item["type"] + item["hash"]
|
store_entry
|
||||||
== store_entry["type"] + store_entry["hash"]
|
and item
|
||||||
|
and store_entry["type"] + store_entry["hash"]
|
||||||
|
== item["type"] + item["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
|
||||||
# only update the timestamp
|
# only update the timestamp
|
||||||
|
|||||||
@@ -70,7 +70,11 @@ class LastFmPlugin(Plugin):
|
|||||||
"albumArtist": track.albumartists[0]["name"],
|
"albumArtist": track.albumartists[0]["name"],
|
||||||
}
|
}
|
||||||
|
|
||||||
|
print("scrobble data:", data)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
self.post(data)
|
res = self.post(data)
|
||||||
|
print("scrobble response:", res.text)
|
||||||
|
print("scrobble response json:", res.json())
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print("scrobble error", e)
|
print("scrobble error", e)
|
||||||
|
|||||||
Reference in New Issue
Block a user