newgiin / cloudplayer-scrobbler

Chrome plugin for scrobbling from Google Play (music.google.com)
52 stars 15 forks source link

Support custom scrobblers #32

Open ijanos opened 8 years ago

ijanos commented 8 years ago

Please provide a way in the options page to set a custom scrobbler api endpoint.

newgiin commented 8 years ago

You mean like scrobble to something other than last.fm? Does it have an identical API? I'm not likely to implement it myself, but if you're up to it, you can try changing this file to point to something else: https://github.com/newgiin/cloudplayer-scrobbler/blob/0e000304f07d123fb533db67247e43d561d00950/js/lastfm.js

ijanos commented 8 years ago

Yeah there are API identical alternative implementations, most prominently Libre.FM

What I am asking for is basically a text input box on the options page where I can change the value the API_ROOT variable.

burkemw3 commented 5 years ago

A challenge with custom API endpoints is the chrome extension permissions ([ref][https://developer.chrome.com/extensions/xhr#requesting-permission]). I wouldn't be excited about this extension requesting permissions to all domains.

Supporting the default libre.fm end point is probably feasible (I think https://turtle.libre.fm instead of ws.audioscrobbler.com).

Libre.fm docs do have an interesting workaround: use your hosts file to point *.audioscrobbler.com to turtle.libre.fm.

burkemw3 commented 5 years ago

Looks like chrome supports requesting permissions during run-time docs. It looks possible to make http://*/ an optional permissions and request access to specific end points as needed. So, my last message probably isn't much of a challenge.