thom4parisot / webextension-fip

Minimalistic WebExtension to listen to FIP Radio, the best eclectic radio station (for Firefox, Chrome, Opera and Edge)
https://chrome.google.com/webstore/detail/fnhlecpfnocgmmmghkjcipmhdpmpddii
MIT License
34 stars 10 forks source link

last.fm scrobbling not working? #106

Open timtomch opened 4 years ago

timtomch commented 4 years ago

Hi there and first of all, merci beaucoup for developing this amazing little plugin! Love FIP and I've been waiting for a way to integrate it better in my music consumption :)

However, one of the features I was really looking forward to was scrobbling on last.fm, however I don't seem to get it to work. I'm using the Firefox (v83.0 / 64 bit) plugin on macOS (10.14.6). I'm able to successfully authenticate with last.fm from the extension settings, the plug in shows up on the list of approved apps on last.fm but no scrobbles are appearing. I tried disabling and re-enabling, nothing! Any idea what I could do to troubleshoot?

thom4parisot commented 4 years ago

You're bienvenue 👍

I can reproduce the problem, so it's clearly not on your side.

I can't tell when I will fix it, but that's a bug to clear.

timtomch commented 3 years ago

Bonjour @oncletom I would be interested in trying to help debug this issue, as I'm learning Node. I was able to successfully build the extension locally and load it in Chrome and Firefox. However, I think the last.fm API isn't loading for some reason. The last.fm options aren't showing up on the extension settings popup. Any hints? Happy to chat on a different channel (en français :) if you prefer.

Cheers.

skjerns commented 3 years ago

any chance to fix this? would be awesome!!

thom4parisot commented 3 years ago

Hi both of you, and sorry @timtomch, I totally skipped your proposal, which I love so thank you!

There is something implicit and undocumented to make it work on a development machine: set 2 two environment variables LAST_FM_KEY and LAST_FM_SECRET. When available in development mode, the interface shows up Last.fm related stuff:

https://github.com/oncletom/webextension-fip/blob/812d03e794e349b8c74e729c0cbe9106dfaea1a0/src/lib/lastfm.js#L57-L59

The Last.fm Key and Secrets are provided once when you create a Last.fm Dev account. I'm not sure a callback URL is required, as it's set by the extension to match with the internal extension URL:

https://github.com/oncletom/webextension-fip/blob/812d03e794e349b8c74e729c0cbe9106dfaea1a0/src/options/scrobbling-controller.js#L32-L38