mirror of
https://github.com/krateng/maloja.git
synced 2023-08-10 21:12:55 +03:00
Store album name
This commit is contained in:
parent
97fc38f919
commit
c1493255b7
@ -54,7 +54,7 @@ class Listenbrainz(APIHandler):
|
|||||||
for listen in payload:
|
for listen in payload:
|
||||||
try:
|
try:
|
||||||
metadata = listen["track_metadata"]
|
metadata = listen["track_metadata"]
|
||||||
artiststr, titlestr = metadata["artist_name"], metadata["track_name"]
|
artiststr, titlestr, albumstr = metadata["artist_name"], metadata["track_name"], metadata["release_name"]
|
||||||
additional = metadata.get("additional_info",{})
|
additional = metadata.get("additional_info",{})
|
||||||
try:
|
try:
|
||||||
timestamp = int(listen["listened_at"])
|
timestamp = int(listen["listened_at"])
|
||||||
@ -74,6 +74,7 @@ class Listenbrainz(APIHandler):
|
|||||||
self.scrobble({
|
self.scrobble({
|
||||||
'track_artists':[artiststr],
|
'track_artists':[artiststr],
|
||||||
'track_title':titlestr,
|
'track_title':titlestr,
|
||||||
|
'album_name':albumstr,
|
||||||
'scrobble_time':timestamp,
|
'scrobble_time':timestamp,
|
||||||
**extrafields
|
**extrafields
|
||||||
},client=client)
|
},client=client)
|
||||||
|
Loading…
Reference in New Issue
Block a user