A proper foobar2000 submission component

Tags: #<Tag:0x00007fe315314908>

If anyone is using the Beta from the post above, I realise it’s spitting out some ugly html source in the Console due to the ListenBrainz downtime at the moment. It will fixed in the next version where it’s much tidier…

Opening track for playback: "E:\Music\Albums\AAC\My Brightest Diamond\A Million And One\10. White Noise.m4a"
ListenBrainz 2: HTTP/1.1 503 Service Temporarily Unavailable
ListenBrainz 2: The cache now contains 9 listen(s)
Opening track for playback: "E:\Music\Albums\FLAC\Massive Attack\Protection\01. Protection.flac"
ListenBrainz 2: HTTP/1.1 503 Service Temporarily Unavailable
ListenBrainz 2: The cache now contains 10 listen(s)
2 Likes

v1.1.0-Beta.2 is out

https://github.com/marc2k3/foo_listenbrainz2/releases

CHG: Improve the way errors are reported when ListenBrainz is down.
CHG: Send more additional tags. See the main readme for a full list.

I’m a bit more confident about the caching feature given that it was put to the test by ListenBrainz being down yesterday. It worked exactly as I’d hoped. It’s easy enough to test servers not being reachable but dealing with the response of a placeholder page helped me improve things.

3 Likes

v1.1.0 is out.

https://github.com/marc2k3/foo_listenbrainz2/releases

I’ve added the daftest feature that I’ll never use and nobody asked for but you can now set a query to skip submitting tracks. You’d only do this if you were secretly ashamed of something you were listening to and didn’t want to share it with the world. It uses the foobar2000 query syntax documented here…

https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Query_syntax

You’ll find the option in the Preferences… :stuck_out_tongue:

8 Likes

It looks like the repo for the component is inaccessible. Was it moved somewhere?

Strange, it just had a new release a few days back, see the thread at


@marc2k3 will know more

1 Like

You can get my final versions of all fb2k components here…

https://hydrogenaud.io/index.php?topic=118824.0

3 Likes

So currently it seems like the foo_listenbrainz2 source code has been lost :frowning: Has anybody here a fork? I would love to help restoring this project.

2 Likes

I have preserved the latest source code I could find for foo_listenbrainz2 at https://github.com/phw/foo_listenbrainz2 and set up automatic builds.

As this is based on the 1.0.0 release it lacks the newer features listed above, most important I think the offline caching. Hence I’d recommend everybody to use the binary release available at https://hydrogenaud.io/index.php?topic=118824.0

But it would be a shame to leave this component for dead and loose the source code completely. I’d love to see development for this component revived, but I’m personally neither an active foobar2000 user nor much of a Windows developer. Also I’m pretty occupied by other projects. So for the moment this repository is more there for preservation, but if someone wants to take this up please let me know. Or just submit some pull requests with missing features.

@marc2k3 I have also updated your README file to fit this new repository and code version better, as you suggested in the other thread. Let me know if you would like to see some changes.

1 Like

Just a small typo in the readme regarding versions. You dabbled with v1.2.0 before going back to 1.0.1. My last release was v1.1.0.

1 Like

If anyone is taking requests, foo_scrobble has an option to enable/disable submission right from the Playback menu. I’d like that very much. :smile:

That’s easy enough to do. I’ll get it done sometime over the weekend.

1 Like

Done.

https://github.com/marc2k3/foo_listenbrainz2/releases

3 Likes

Thank you! I’ll check it out. Something else I’ve noticed. When I play MP3s, Listenbrainz does not create a link to the recording, as it does for ogg vorbis files. Is the plugin pulling the ID3v2 UFID value for this?

Reference:
https://picard-docs.musicbrainz.org/en/technical/tag_mapping.html#id38

I had an interesting result with the new menu option. After installing then restarting fb2k, I played one track, and it was submitted as expected. Then I stopped, unchecked the menu, and started playing another track. Reloading the ListenBrainz page showed the song as “Playing now”. It was never submitted as a final play, however. Nothing mentioned in the Console.

foobar2000 has never supported reading UFID tags and I make this very clear in the readme to anyone who can be bothered to actually read it.

https://github.com/marc2k3/foo_listenbrainz2/blob/develop/README.md

As for now playing submissions when the preference is disabled, simply not possible. The logic is there for anyone to see in the source code.

My apologies. When I had read that, I didn’t connect it to recording IDs, so it didn’t sink in. I was already considering a Picard script and changes to my own tagging tools to duplicate the value in another tag. I will pursue that more.

I agree, it doesn’t seem possible with the current code. I don’t recall the exact point I stopped playback. It may have moved to the next song first, and then playing now stuck there. I don’t see anything in the API to clear a previous playing_now call, either. I may try to address that.

Thanks.

Great job with the listenbrainz2 component @marc2k3. I only have one complaint, it doesn’t scrobble split artists. As I’m sure you know, with foobar2000, you can split artists, but your component doesn’t seem to recognize the split values tagging.

1 Like

Sending the first value only has always been intentional as per the readme…

If artist/work MBIDs are multi-value, all values are sent. For any other multi-value tags, only the first value is sent.

If you want multiple values to be sent, I guess I could send them comma separated as a single string as this seems to the most common pattern used for spotify.

2 Likes

Yeah exactly, separate them by comma. For example, if I tag a song in foobar2000, like 2Pac;Outlawz - Hit 'Em Up, foobar2000 translates this to 2Pac, Outlawz - Hit 'Em Up, and that’s how foo_scrobble scrobbles it to Last.fm too, as you can see here:

However, scrobbling this same track with foo_listenbrainz2, on ListenBrainz, it just scrobbles it as 2Pac - Hit 'Em Up. This is inconsistent with not only my Last.fm scrooble history (through the Windows version of foobar2000), but also inconsistent with how Simple Last.fm Scrobbler (SLS) on Android reads and scrobbles the same tracks from the Android version of foobar2000. Point is, it would be so much easier to not having to edit all the tracks I’ve scrobbled ti ListenBrainz (not that it’s possible to edit scrobbles on ListenBrainz right now, but at some point I’m going to have to delete my entire scrobble history here, and import it from Last.fm).

Anyway, would be great if you could fix this minor inconsistency. I guess you could make it optional to scrobble multiple/split artists for those who like me, prefer it that way.