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
Support custom scrobblers #37
Comments
|
The page you linked says "Currently, we're implementing the Audioscrobbler API." and Audioscrobbler API = Last.fm API. |
|
"Currently, we're implementing the Audioscrobbler API." means it's already been implemented and is for the most part identical, so there shouldn't be any backend changes to reflect the switch between Librefm and Lastfm |
|
👍 I would appreciate libre.fm support also |
|
I tried modifying the plugin to use libre.fm instead (to see if it worked). I could authenticate but now on every page the icon in the URL bar informs me that the song could not be identified. When I click the icon the track is filled in but the artist is blank. Any ideas what this might indicate? Here's my experimental change: treyhunner/web-scrobbler@97331d8 |
|
@treyhunner It's been a while since this issue was created, but we're finally getting somewhere. I am reworking the core of the extension and definitely plan on supporting multiple scrobbling services. And it will be even easier with Libre.fm supporting Audioscrobbler API |
|
@david-sabata I tryed to do like @treyhunner but doesn't worked, any solutions by now ? |
|
@Shuunen Does the Libre.fm really implement the same API as Last.fm? It seems that the track didn't pass the validation (asking the L.FM if it is valid). |
src: http://musicmachinery.com/2009/04/24/librefm-whats-the-point/ A bit old but probably still relevant. |
|
AFAIK there is no hardcoded url other than this https://github.com/david-sabata/web-scrobbler/blob/master/core/background/services/lastfm.js#L19 |
|
I'll give it a shot and will report back... |
|
It's not working with the above changes. I had to modify the callback for the auth too which went off and successfully set the token within the storage. However the problem then came with scrobbling:
Receiving the following <lfm status="failed">
<error code="6">Invalid parameters - Your request is missing a required parameter</error>
</lfm>Here is the src code for the Libre.fm update method: |
|
I was looking at Simple Last.fm Scrobbler (https://github.com/tgwizard/sls) wich scrobble to Last.fm and Libre.fm (I use it on my android phone) and I saw that in the code : LASTFM(
0x01, "Last.fm", "http://post.audioscrobbler.com/?hs=true", "",
"https://www.last.fm/join", "http://www.last.fm/user/%1"), //
LIBREFM(
0x02, "Libre.fm", "http://turtle.libre.fm/?hs=true", "librefm",
"http://libre.fm/", "http://libre.fm/user/%1");So maybe it would work with "turtle.libre.fm" ? |
|
By looking at the php code of libre fm api : And what you sent : That should work, only artist , track and sk are required acording to function comments, and only artist and track according to the code inside : if (!isset($_POST['artist']) || !isset($_POST['track'])) {
report_failure(LFM_INVALID_PARAMS);
} |
|
Got it working :) Proof: https://libre.fm/user/inversechi Had to change one line based on looking through the libre.fm src http_request.send($.param(params));Branch: https://github.com/inverse/web-scrobbler/tree/libre-fm |
|
Nice, gonna try this :) |
|
Not 100% sure since in the stat's nothing is showing up. But no errors or anything else. Perhaps they take time. Ahhh Noticed something already. I guess to do with the same issue as mentioned above with param encoding. I'll fix this and update the branch. Good luck and thanks for the pointer of the turtle domain - interesting to see how they've worked on just mirroring the API to make all existing code easy to port/use :) |
|
I tested your changes @inverse and it works well for updating the "now playing track", here the request to libre.fm : and the response : <?xml version="1.0"?>
<lfm status="ok">
<nowplaying>
<track corrected="0">Planet Munderscore</track>
<artist corrected="0">Glen Porter</artist>
<album corrected="0"/>
<albumArtist corrected="0"/>
<ignoredMessage code="0"/>
</nowplaying>
</lfm>But, the scrobble for the same track don't work : here the response : <?xml version="1.0"?>
<lfm status="failed">
<error code="6">Invalid parameters - Your request is missing a required parameter</error>
</lfm> |
|
@Shuunen Sorry about that - I realised that after I said it worked. I pushed a small change to fix the scrobbling part. It was the same as the update fiix involving using jQuery's param function. |
|
@inverse don't be sorry, thank you a lot for helping |
|
I can tell you that it won't be in the next release - This was just a proof of concept that shows that there isn't much work required to 'switch' last.fm for libre.fm. I don't know the direction that @david-sabata plans on taking alternative scrobbling but the way I envision it would be allow multiple scrobblers to be registered and pushed too. This would require a lot of work from both setting up accounts and pushing. |
|
A switch (Last/Libre) will be simpler to develop for a first release, then a multiple scrobbling settings in the future. @inverse your fix works well now :) |
|
I'd like to go for multiple "connected accounts". It's good that Libre.fm has the same API, but that won't be the case for possible other services. Introducing a simple switch to hot fix would most likely mean the switch will stay there forever and I'd like to have more generic solution :) |
|
+1 for Generic solution over switch |
|
+1 too :) I thought switch to simplify development but sure the generic solution is way more elegant :) Thanks guys for your work :) |
|
Anyone working on this? I'd be glad to help get this in! strongly implies +1 |
|
I have a proof of concept in a branch. It's way out of date but feel free to pick it up and work on it: https://github.com/inverse/web-scrobbler/tree/libre-fm Perhaps speak with @david-sabata first if he has any ideas of where to take this though. |
|
Yes saw that. Works well! I'll look into the generic solution proposed before. Multi-account scrobbling sounds cool. |
|
Thanks a lot for the branch @inverse. I just tested and it worked wonderfully. |
|
+1 I will try to help on this if I can. Any support for dual scrobbling? |
|
Working on a new version of this: master...inverse:multi-scrobble |
|
Any updates to this? |
|
Still WIP @Avamander |
|
Added initial support for Libre.fm and multiple scrobbling services. |
|
Ping here when it's uploaded to chrome webstore. |
|
@eternal-sorrow: ping. |
|
Custom scrobblers are stilll a long way off but feasible. |
|
works fine, thanks |
Allow users to input a 3rd party scrobbler, like FOSS scrobbler libre.fm
The text was updated successfully, but these errors were encountered: