Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Album name not associated correctly when using audioscrobbler_legacy API #345

Open
m7a opened this issue Mar 24, 2024 · 0 comments
Open

Comments

@m7a
Copy link

m7a commented Mar 24, 2024

Hello,

I had setup Maloja together with mpdscribble and the following config for mpdscribble:

verbose  = 1
host     = 172.17.0.1
port     = 6600

[maloja]
url      = http://127.0.0.1:42010/apis/audioscrobbler_legacy/
username = u
password = ...
journal  = /data/programs/music2/supplementary/mpd/maloja.journal

This caused tracks to be scrobbled correctly, but associated Albums (despite being sent in b parameters) would not appear in the GUI. After a cursory glance at the source code it seems that this is due to the usage of album_name over album_title. When applying the following patch, the issue went away for me:

diff --git a/maloja/apis/audioscrobbler_legacy.py b/maloja/apis/audioscrobbler_legacy.py
index 7f03123..857a1a1 100644
--- a/maloja/apis/audioscrobbler_legacy.py
+++ b/maloja/apis/audioscrobbler_legacy.py
@@ -91,7 +91,7 @@ class AudioscrobblerLegacy(APIHandler):
 				'scrobble_time':timestamp,
 			}
 			if album_key in keys:
-				scrobble['album_name'] = keys[album_key]
+				scrobble['album_title'] = keys[album_key]
 			if length_key in keys:
 				scrobble['track_length'] = keys[length_key]
 

Would it make sense to include this change in the upstream Maloja source? If yes, feel free to copy it. If a PR helps (maybe overkill for one line 😄), I am of course also happy to provide that.

Thank you very much for this helpful tool and kind regards
Linux-Fan, Ma_Sys.ma (@m7a)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant