mihaiolteanu / vuiet

The music player and explorer for Emacs
https://mihaiolteanu.me/vuiet
GNU General Public License v3.0
278 stars 15 forks source link

Invalid method signature supplied error after vuiet-play-track #24

Closed giorgian closed 4 years ago

giorgian commented 4 years ago

I don't know if I should submit this to lastfm.el instead: after vuiet-play-track (after playback is started), I get:

Debugger entered--Lisp error: (error "Invalid method signature supplied")
  signal(error ("Invalid method signature supplied"))
  error("Invalid method signature supplied")
  lastfm--parse-response("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<lfm status=\"failed\">\n  <error code=\"13\">Invalid method signature supplied</error>\n</lfm>\n" ("lfm"))
  lastfm-track-scrobble("Megadeth" "Symphony of Destruction" "1586700587")
  vuiet--scrobble-track(#s(vuiet-track :artist "Megadeth" :name "Symphony of Destruction"))
  apply(vuiet--scrobble-track #s(vuiet-track :artist "Megadeth" :name "Symphony of Destruction"))
  timer-event-handler([t 24211 8490 703688 nil vuiet--scrobble-track (#s(vuiet-track :artist "Megadeth" :name "Symphony of Destruction")) nil 0])
mihaiolteanu commented 4 years ago

Yes, indeed, this might be an error. I assume you did not generate your SK key (following the steps here), right?

What you can do for now, is to disable the scrobbling in your Emacs init file,

(setf vuiet-scrobble-enabled nil)

Not everyone wants that, and it's enabled by default. But it also needs the SK key to actually be able to scrobble your track back to last.fm. I think the sane approach here is to disable it by default, and whoever wants it, can enable it.

Thanks for bringing this up!

giorgian commented 4 years ago

Hi, I did set my API key, and in fact I can see artist description, for instance. (setf vuiet-scrobble-enable nil) didn't seem to fix the problem.

mihaiolteanu commented 4 years ago
You take a mortal man
And put him in control
...

Nice tunes... Anyway, that should fix your problem. lastfm-track-scrobble is only called when vuiet-scrobble-enable is set to t. I'm sure you've started a new playlist after setting it to nil, right?

I did set my API key

That's different than the SK. The SK is the one where vuiet opens a last.fm page asking you to grant permission to it.

Let me know if you don't manage to fix it.

giorgian commented 4 years ago

Of course you're right, I didn't pay attention to the difference between shared secret and secret key. Now That I set the SK, it doesn't give the error anymore.

Thank you. And thank you for this project!