Send MusicBrainz IDs in ListenBrainz submissions
-
Thanks for the release! Everything looks to be working correctly after a full collection rescan.
-
Hmm. After a few hours of continuous usage, strawberry seems to stop submitting "listen completed" events to musicbrainz. "now playing" still submits correctly, but musicbrainz never sees the current listen get completed. All listens before this point worked correctly, both with the now playing and completed events. I don't know at exactly what point this stopped working - the only thing I remember doing out of the ordinary recently is changing to a new playlist and changing the order of playing songs with the "queue to play next" feature.
I haven't observed this behavior before (previously using 1.0.15). This is a pretty weird bug so I'm not 100% convinced it's strawberry's fault, but it seems unlikely it's something wrong with listenbrainz. Let me know if there's any debug information I can provide that would help with this.
-
@tybug
I see no issues looking back at my own history (My listenbrainz profile: https://listenbrainz.org/user/jonaskvinge/), but I don't have musicbrainz tags.
If you are on Linux you should be able to see some debug output about scrobbles by starting Strawberry on the terminal. -
I'm seeing the following logs, all for the same song:
12:52:42.558 ERROR OVHLyricsProvider:110 OVHLyrics: "Error transferring https://api.lyrics.ovh/v1/GHOST DATA/Femme Fatale - server replied: Gateway Time-out (499)" 12:52:42.558 ERROR OVHLyricsProvider:110 OVHLyrics: "Failed to parse json data: illegal value" 12:52:56.569 ERROR ListenBrainzScrobbler:728 ListenBrainz: "artist_mbids MBID format invalid. (400)" 12:53:26.554 ERROR ListenBrainzScrobbler:728 ListenBrainz: "artist_mbids MBID format invalid. (400)" 12:53:56.555 ERROR ListenBrainzScrobbler:728 ListenBrainz: "artist_mbids MBID format invalid. (400)" 12:54:26.556 ERROR ListenBrainzScrobbler:728 ListenBrainz: "artist_mbids MBID format invalid. (400)" 12:54:56.557 ERROR ListenBrainzScrobbler:728 ListenBrainz: "artist_mbids MBID format invalid. (400)" 12:55:26.554 ERROR ListenBrainzScrobbler:728 ListenBrainz: "artist_mbids MBID format invalid. (400)" 12:55:56.537 ERROR ListenBrainzScrobbler:728 ListenBrainz: "artist_mbids MBID format invalid. (400)" 12:56:26.498 ERROR ListenBrainzScrobbler:728 ListenBrainz: "Server stopped accepting new streams before this stream was established (205)" 12:56:26.498 WARN unknown stream 53 finished with error: "Server stopped accepting new streams before this stream was established"
This is a song that previously submitted to listenbrainz fine.
If it helps, here's sql output of the tags for this song:
> select url, acoustid_id TEXT, acoustid_fingerprint TEXT, musicbrainz_album_artist_id TEXT, musicbrainz_artist_id TEXT, musicbrainz_original_artist_id TEXT, musicbrainz_album_id TEXT, musicbrainz_original_album_id TEXT, musicbrainz_recording_id TEXT, musicbrainz_track_id TEXT, musicbrainz_disc_id TEXT, musicbrainz_release_group_id TEXT, musicbrainz_work_id TEXT from songs WHERE url LIKE "%Femme%"; file:///Users/tybug/Desktop/Liam/Music/GHOST%20DATA/Void%20Walker/05.%20Femme%20Fatale.mp3|63a921d1-9747-4cb2-8463-3533e3953359||2ea8cbd8-f8d3-4d5e-ab62-f2f74a5b27db|2ea8cbd8-f8d3-4d5e-ab62-f2f74a5b27db||5bd19aec-9ad3-4c56-96b9-b5466a13b966||53ada774-a765-4a02-9c1f-a53793264df0|14b5cd60-97d1-438a-9549-c6aca612e72c||a4c48116-924a-49b3-ac8f-68dde72849aa|
The mp3 in question: https://drive.google.com/file/d/1SCmTzsvHN8acEd5PZ32Mfkv804dpRP94/view.
Similar behavior for all other songs.
-
@tybug
Does the musicbrainz entries in~/.cache/strawberry/strawberry/listenbrainzscrobbler.cache
look correct?
Close strawberry and delete that file and see if it starts scrobbling again. -
@jonas the scrobbles in that file look correct, yes. As in, they look like the scrobbles I would have expected to be submitted but weren't.
Scrobbles submit correctly again after deleting that file.
-
Strawberry sends multiple scrobbles in batches, I'm guessing the problem is that one of the songs has an invalid artist mbid, so it's rejected, but never cleared from the cache, since the batch was rejected, so Strawberry will just re-send the same batch and it's rejected each time because one of the songs with incorrect artist mbid.
-
@jonas The very first scrobble in the cache had the following artist id:
2ea8cbd8-f8d3-4d5e-ab62-f2f74a5b27db/529c0669-8994-4356-92f0-048fec6d8dd1
I'm guessing the slash (multiple artists?) is where things are getting tripped up.
{ "album": "Void Walker", "albumartist": "GHOST DATA", "artist": "GHOST DATA feat. AL!CE", "grouping": "", "length_nanosec": 248544000000, "musicbrainz_album_artist_id": "2ea8cbd8-f8d3-4d5e-ab62-f2f74a5b27db", "musicbrainz_album_id": "5bd19aec-9ad3-4c56-96b9-b5466a13b966", "musicbrainz_artist_id": "2ea8cbd8-f8d3-4d5e-ab62-f2f74a5b27db/529c0669-8994-4356-92f0-048fec6d8dd1", "musicbrainz_disc_id": "", "musicbrainz_original_album_id": "", "musicbrainz_original_artist_id": "", "musicbrainz_recording_id": "1ef0fcfe-7874-494a-b543-f22d319f5548", "musicbrainz_release_group_id": "a4c48116-924a-49b3-ac8f-68dde72849aa", "musicbrainz_track_id": "5cd38819-afd5-426e-80ff-e39562fbf946", "musicbrainz_work_id": "", "timestamp": 1681536583, "title": "Full Bodied", "track": 6 },
-
I have to think about what to do in this case, because it's not possible to know what song / artist mbid is rejected based on the response from musicbrainz, and dropping the whole cache will drop all scrobbles currently in the cache.
-
I am a little surprised that the listenbrainz api is rejecting the artist id here (if indeed that is what's happening). This is the canonical artist id from musicbrainz picard, so it's not really an "incorrect" id:
I'm not familiar with the listenbrainz api, but I would hope (perhaps naively) that it handles artist ids in the same form as given in picard.
-
@tybug
It is sent as an array, but It could be the entries with a slash needs to be spitted by the slash, and sent as two different entries. I can experiment with it. -
I can confirm that splitting the mbid's by slash and appending them individually to the Json array works. Fixed now (https://github.com/strawberrymusicplayer/strawberry/commit/d9c4720a3ee776dde2701eac21fd0b51ae50a78a).