Some of you may remember my last effort but it was script based and meant you had to jump through a few hoops to set it up. This is a dedicated component which should be a bit easier…
The readme explains everything (I think).
Some of you may remember my last effort but it was script based and meant you had to jump through a few hoops to set it up. This is a dedicated component which should be a bit easier…
The readme explains everything (I think).
Thanks a lot. As far as I can tell this is working very well, including the MBID submission. I’m not a foobar2000 user, though, so I just gave it a quick test
This seems to be working great, thanks for your work.
How about submitting the time zone of the os with the rest of the data?
I believe the api will allow you to put custom fields in the additional_info section and it will be saved in the database.
Thanks for trying it out guys.
@dns_server, not really sure how I’d workout the timezone but I could send a localised date/time string in the usual foobar2000 format (YYYY-MM-DD HH::MM:SS)
edit: just tested it out and it works fine. Obviously the field name isn’t fixed - that could be changed.
3 posts were split to a new topic: Client identifiers in listen data
Is there a way in foobar2000 to also get the timezone offset? That is, can you format the string as YYYY-MM-DD HH::MM:SS+ZZ
? This would make it easier to get the offset by reading the +ZZ or -ZZ instead of subtracting local_time from listened_at.
Looking at your example code, I have a few comments:
That has nothing to do with me. It’s very much part of the ListenBrainz server setup.
As for the rounding error, foobar2000 usually deals in windows file time stamps and I used methods from the foobar2000 SDK to work with them…
// number of 100-nanosecond intervals since January 1, 1601 UTC.
uint64_t now = pfc::fileTimeNow();
// windows to unix timestamp converter (number of seconds since Jan 1, 1970 UTC)
uint64_t unix_ts = pfc::fileTimeWtoU(now);
// windows timestamp to local date string
pfc::string8_fast str = format_filetimestamp(now);
Clearly there is a difference in how they’re rounded so next time I’ll use the unix timestamp as a base and convert that back to windows timestamp losing all the nanosecond precision and then the date strings should line up.
Using it now, it works fine for me
Thanks !!
Ah, sorry. I thought it was something that you added to the payload, but I see that you’re showing the contents of the API output of the LB server, which adds it (based on listened_at
) and outputs it in addition to the other fields.
v1.1.0-Beta.1 has been released.
CHG: Now requires foobar2000 v1.5 Beta 18 or later. This is because it now
uses the fb2k http client which respects the main networking preferences.
It uses new functionality that is not available in earlier versions.
NEW: Add caching support which will retry failed submissions at a later time.
Not guaranteed to be bulletproof. I would like some feedback from testers
please!!
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)
v1.1.0-Beta.2
is out
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.
v1.1.0
is out.
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…
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
You can get my final versions of all fb2k components here…
So currently it seems like the foo_listenbrainz2 source code has been lost Has anybody here a fork? I would love to help restoring this project.
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.
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.
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.