Compare commits
1 Commits
d240612183
...
8003fbfa62
| Author | SHA1 | Date | |
|---|---|---|---|
| 8003fbfa62 |
@ -91,16 +91,19 @@ class ListenBrainz(callbacks.Plugin):
|
||||
except Exception as e:
|
||||
irc.error(f"An unexpected error occurred: {e}", Raise=True)
|
||||
return
|
||||
|
||||
|
||||
total_tracks = payload.get("total_recording_count", "N/A")
|
||||
recordings = payload.get("recordings", [])
|
||||
|
||||
if not recordings:
|
||||
irc.reply(f"{user} has no recorded tracks.")
|
||||
return
|
||||
|
||||
top_tracks = recordings[:3]
|
||||
|
||||
header = f"{user}'s Top {len(top_tracks)} Tracks (Total unique tracks: {total_tracks:,}):"
|
||||
irc.reply(header)
|
||||
|
||||
for i, track in enumerate(top_tracks):
|
||||
rank = i + 1
|
||||
artist = track.get("artist_name", "Unknown Artist")
|
||||
@ -137,7 +140,7 @@ class ListenBrainz(callbacks.Plugin):
|
||||
irc.reply(f"{user} has no recorded releases.")
|
||||
return
|
||||
|
||||
top_releases = releases[:DISPLAY_LIMIT]
|
||||
top_releases = releases[:3]
|
||||
|
||||
header = f"{user}'s Top {len(top_releases)} Releases (Total unique releases: {total_albums:,}):"
|
||||
irc.reply(header)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user