diff --git a/app/lib/recipes/recents.py b/app/lib/recipes/recents.py index 1a5ed760..a42083bb 100644 --- a/app/lib/recipes/recents.py +++ b/app/lib/recipes/recents.py @@ -36,17 +36,20 @@ class RecentlyPlayed(HomepageRoutine): limit=self.ITEM_LIMIT, userid=self.userids[0], _entries=[last_entry] ) - item = items[0] try: + item = items[0] store_entry = HomepageStore.entries[self.store_key].items[ self.userids[0] ][0] except IndexError: store_entry = None + item = None if ( - store_entry and item["type"] + item["hash"] - == store_entry["type"] + store_entry["hash"] + store_entry + 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 # only update the timestamp diff --git a/app/plugins/lastfm.py b/app/plugins/lastfm.py index 9db8be76..1c4587a4 100644 --- a/app/plugins/lastfm.py +++ b/app/plugins/lastfm.py @@ -70,7 +70,11 @@ class LastFmPlugin(Plugin): "albumArtist": track.albumartists[0]["name"], } + print("scrobble data:", data) + try: - self.post(data) + res = self.post(data) + print("scrobble response:", res.text) + print("scrobble response json:", res.json()) except Exception as e: print("scrobble error", e)