Schnouki / spop

A Spotify client running as a daemon, similar to mpd.
GNU General Public License v3.0
248 stars 17 forks source link

Broken scrobble to lastfm #20

Open frodeaa opened 10 years ago

frodeaa commented 10 years ago

The track that is playing is shown in the lastfm profile page, but is not "persisted" when the next track in queue is played.

plugins = notify;scrobble;

[scrobble]
# API endpoint of the scrobbling service you're using.
# - Last.FM: http://post.audioscrobbler.com:80/
# - Libre.FM: http://turtle.libre.fm/
api_endpoint = http://post.audioscrobbler.com:80/
username = xxxx
password = xxxxx
Schnouki commented 10 years ago

Hmmm, it seems to work for me. Tracks as maked as "now playing" when they start to play, and they are scrobbled after the playback is stopped if 2 conditions are met:

Could you please send me some debug logs when you reproduce that issue? (You should just hide the value of the "&s=" that is send to last.fm). Here's an example of a valid log where the track was correctly submitted: http://ix.io/bcw

frodeaa commented 10 years ago

Here is the log

2014-03-22 17:32:06 [DBG ] [ice:18] Received command: play 1
2014-03-22 17:32:06 [DBG ] Command: [play] with 1 parameter(s)
2014-03-22 17:32:06 [DBG ] Setting playlist 0x9793f0 as queue.
2014-03-22 17:32:06 [DBG ] Already stopped: nothing to do.
2014-03-22 17:32:06 [DBG ] Playing track 0.
2014-03-22 17:32:06 [DBG ] Loading track.
2014-03-22 17:32:06 [DBG ] scrobble: Preparing a "now playing" request.
2014-03-22 17:32:06 [DBG ] scrobble: Entering the "now playing" handler.
2014-03-22 17:32:06 [DBG ] scrobble: Sending "Now playing" request for "Henry's Funeral Shoe - Don't Lose The Rhythm"
> POST /np_1.2 HTTP/1.1
> Soup-Debug-Timestamp: 1395505926
> Soup-Debug: SoupSessionAsync 1 (0x864120), SoupMessage 2 (0x86e220), SoupSocket 2 (0x8ce980)
> Host: post.audioscrobbler.com
> Content-Type: application/x-www-form-urlencoded
> Connection: Keep-Alive
>
> s=<token>&a=Henry%27s+Funeral+Shoe&t=Don%27t+Lose+The+Rhythm&b=Never+Give+Up+On+Your+Hallucinations&l=190&n=&m=

xcb_connection_has_error() returned true
< HTTP/1.1 200 OK
< Soup-Debug-Timestamp: 1395505926
< Soup-Debug: SoupMessage 2 (0x86e220)
< Date: Sat, 22 Mar 2014 16:32:19 GMT
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Type: text/plain;charset=ISO-8859-1
< Transfer-Encoding: chunked
< Server: Jetty(8.1.11.v20130520)
<
< OK

2014-03-22 17:32:06 [DBG ] scrobble: Marking track "Henry's Funeral Shoe - Don't Lose The Rhythm" as submitted.
2014-03-22 17:32:15 [SPTF] 16:32:15.656 E [ap:4172] ChannelError(0, 1, playlist)
2014-03-22 17:32:55 [SPTF] 16:32:55.730 E [ap:4172] ChannelError(0, 1, playlist)
2014-03-22 17:34:10 [SPTF] 16:34:10.844 E [ap:4172] ChannelError(0, 1, playlist)
2014-03-22 17:35:15 [DBG ] End of track.
2014-03-22 17:35:15 [DBG ] Got next_track event.
2014-03-22 17:35:15 [DBG ] Switching to next track.
2014-03-22 17:35:15 [DBG ] Stopping playback.
2014-03-22 17:35:15 [DBG ] Unloading track.
2014-03-22 17:35:15 [DBG ] scrobble: Preparring a scrobbling request.
2014-03-22 17:35:15 [DBG ] scrobble: Entering the scrobbling handler.
2014-03-22 17:35:15 [DBG ] Switching to track 1.
2014-03-22 17:35:15 [DBG ] Playing track 1.
2014-03-22 17:35:15 [DBG ] Loading track.
2014-03-22 17:35:15 [DBG ] scrobble: Cleaning an item: "Henry's Funeral Shoe - Don't Lose The Rhythm".
2014-03-22 17:35:15 [DBG ] scrobble: Preparing a "now playing" request.
2014-03-22 17:35:15 [DBG ] scrobble: Entering the "now playing" handler.
2014-03-22 17:35:15 [DBG ] scrobble: Sending "Now playing" request for "Henry's Funeral Shoe - Dog Scratched Ear"
2014-03-22 17:35:15 [SPTF] 16:35:15.856 I [social_presence.cpp:135] Presence: A track was played
> POST /np_1.2 HTTP/1.1
> Soup-Debug-Timestamp: 1395506115
> Soup-Debug: SoupSessionAsync 1 (0x864120), SoupMessage 3 (0x86e300), SoupSocket 3 (0x8cea40)
> Host: post.audioscrobbler.com
> Content-Type: application/x-www-form-urlencoded
> Connection: Keep-Alive
>
> s=<token>&a=Henry%27s+Funeral+Shoe&t=Dog+Scratched+Ear&b=Donkey+Jacket&l=274&n=&m=

< HTTP/1.1 200 OK
< Soup-Debug-Timestamp: 1395506115
< Soup-Debug: SoupMessage 3 (0x86e300)
< Date: Sat, 22 Mar 2014 16:35:29 GMT
< Pragma: no-cache
< Cache-Control: no-cache
< Content-Type: text/plain;charset=ISO-8859-1
< Transfer-Encoding: chunked
< Server: Jetty(8.1.11.v20130520)
<
< OK

2014-03-22 17:35:15 [DBG ] scrobble: Marking track "Henry's Funeral Shoe - Dog Scratched Ear" as submitted.
2014-03-22 17:36:30 [SPTF] 16:36:30.952 E [ap:4172] ChannelError(0, 1, playlist)

2014-03-22 17:39:49 [DBG ] End of track.
2014-03-22 17:39:49 [DBG ] Got next_track event.
2014-03-22 17:39:49 [DBG ] Switching to next track.
2014-03-22 17:39:49 [DBG ] Stopping playback.
2014-03-22 17:39:49 [DBG ] Unloading track.