Bug 164156 - Amarok does not submit tracks to Last.fm when listening to Last.fm radio
Summary: Amarok does not submit tracks to Last.fm when listening to Last.fm radio
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Internet Services (show other bugs)
Version: 2.0-SVN
Platform: Compiled Sources Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 169554 169760 (view as bug list)
Depends on: 169554
Blocks:
  Show dependency treegraph
 
Reported: 2008-06-15 17:28 UTC by Edward Hades
Modified: 2009-12-09 11:28 UTC (History)
10 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Edward Hades 2008-06-15 17:28:47 UTC
Version:           2.0-SVN (using Devel)
Installed from:    Compiled sources
Compiler:          GCC 4.1.2 
OS:                Linux

As of revision 820697 amarok fails to submit tracks to last.fm

The problem probably started 6 days ago, or between that and now. (Nightrose)

With svn r820677 it seems it scrobbles local tracks, but not lastfm radio tracks. (grundleborg)
Comment 1 Mark Kretschmann 2008-07-10 12:02:20 UTC
Works again for me. Was probably a server issue or so.
Comment 2 Kevin Funk 2008-07-10 15:54:47 UTC
Can't confirm, Amarok 2 still doesnt scrobble last.fm radio tracks! On last.fm you can see what you are playing right now, but tracks you _have played_ dont pop up. With Amarok 1 it works fine.
Markey, please check again.
Comment 3 Seb Ruiz 2008-07-11 00:49:06 UTC
i can confirm this behaviour too.
Comment 4 Casey Link 2008-07-11 07:44:46 UTC
If you listen to last.fm radio tracks via the last.fm website.. they do not get scrobbled to your profile. I am guessing this is a recent "feature" change.

I'll pop into #audioscrobbler and ask a dev.
Comment 5 Casey Link 2008-07-13 17:04:25 UTC
I was wrong :\ Radio tracks should still be scrobbled.

Here's some debug output.. nothing seems wrong on first glance.

BEGIN: void ScrobblerManager::scrobble(TrackInfo)                                                                                                                            
  "The Rocket Summer – Do You Feel"                                                                                                                                          
amarok:       [lastfm] Wrote 1 tracks to "/home/ramblurr/.kde4/share/apps/amarok/outp0ur_submissions.xml"                                                                    
  BEGIN: void ScrobblerManager::scrobble(const ScrobbleCache&)                                                                                                               
    "outp0ur"                                                                                                                                                                
    BEGIN: int Scrobbler::submit(const ScrobbleCache&)                                                                                                                       
      "The Rocket Summer – Do You Feel"                                                                                                                                      
      BEGIN: void ScrobblerPostRequest::request(const QByteArray&)                                                                                                           
        "[id:"                                                                                                                                                               
        "0"                                                                                                                                                                  
        "93"                                                                                                                                                                 
        "s=24444538ea4842f3b64dc7f37bb66263&a[0]=The%20Rocket%20Summer&t[0]=Do%20You%20Feel&i[0]=1215960783&o[0]=L&r[0]=&l[0]=161&b[0]=Do%20You%20Feel&n[0]=&m[0]="          
amarok:       [lastfm] POST: "s=24444538ea4842f3b64dc7f37bb66263&a[0]=The%20Rocket%20Summer&t[0]=Do%20You%20Feel&i[0]=1215960783&o[0]=L&r[0]=&l[0]=161&b[0]=Do%20You%20Feel&n[0]=&m[0]="                                                                                                                                                                  
      END:   void ScrobblerPostRequest::request(const QByteArray&) [elapsed: 0 ms]                                                                                           
    END:   int Scrobbler::submit(const ScrobbleCache&) [elapsed: 0 ms]                                                                                                       
amarok:       [lastfm] statusChanged: statusCode= 2                                                                                                                          
  END:   void ScrobblerManager::scrobble(const ScrobbleCache&) [elapsed: 0 ms]                                                                                               
END:   void ScrobblerManager::scrobble(TrackInfo) [elapsed: 1 ms]                                                       


amarok: [lastfm] POST: "s=24444538ea4842f3b64dc7f37bb66263&a=mewithoutYou&t=Seven%20Sisters&b=Catch%20for%20Us%20the%20Foxes&l=227&n=&m="                                    
amarok: [lastfm] onNowPlayingReturn: [id: 0 ] "OK"                                                                                                                           
BEGIN: void Scrobbler::onSubmissionReturn(const QString&)                                                                                                                    
  "[id:"                                                                                                                                                                     
  "0"                                                                                                                                                                        
  "]"                                                                                                                                                                        
  "OK"                                                                                                                                                                       
  BEGIN: void ScrobblerManager::onScrobbled(const QList<TrackInfo>&)                                                                                                         
    "1"                                                                                                                                                                      
    "tracks were successfully scrobbled"                                                                                                                                     
amarok: [lastfm] 1 toremove count: 1                                                                                                                                         
amarok: [lastfm] Removing "The Rocket Summer – Do You Feel"                                                                                                                  
amarok: [lastfm] 0                                                                                                                                                           
amarok: [lastfm] "/home/ramblurr/.kde4/share/apps/amarok/outp0ur_submissions.xml" is now empty                                                                               
  END:   void ScrobblerManager::onScrobbled(const QList<TrackInfo>&) [elapsed: 1 ms]                                                                                         
END:   void Scrobbler::onSubmissionReturn(const QString&) [elapsed: 1 ms]  
Comment 6 Mark Kretschmann 2008-07-29 08:49:34 UTC
Any news on this?
Comment 7 Mark Kretschmann 2008-07-29 09:06:32 UTC
I've just tested this with current Amarok 2 trunk, and the result is (as Kevin said):

1) Works fine for local tracks.
2) Also works for Last.fm radio, but _only_ for the currently playing track. Former played tracks are not listed on the Last.fm site.

Very odd...

Can anyone verify if this works correctly with the official last.fm player?
Comment 8 Mark Kretschmann 2008-07-30 14:33:07 UTC
SVN commit 839619 by markey:

Submit tracks to Last.fm correctly when playing Last.fm Radio.

BUG: 164156


 M  +3 -1      ChangeLog  
 M  +8 -0      src/browsers/servicebrowser/lastfm/ScrobblerAdapter.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=839619
Comment 9 Kevin Funk 2008-08-13 17:54:17 UTC
Unfortunately, this isnt fixed. I get this in my console output:
BEGIN: void Scrobbler::onSubmissionReturn(const QString&)
  "[id:"
  "0"
  "]"
  "FAILED Plugin bug: Not all request variables are set - Invalid Rating and Source combination"
amarok: [lastfm] Scrobbler HTTP error: 0
amarok: [lastfm] Scrobbler hard failure. Retrying in 30 seconds.
END:   void Scrobbler::onSubmissionReturn(const QString&) [elapsed: 1 ms]

(I have about 50 songs in the queue which are about to be send).
Tried to delete *submissions.xml a few times, didnt help either.
Confirmed by leinir and eean.
Comment 10 Rémy CLOUARD 2008-08-21 16:32:01 UTC
got it too with the same output

Apparently setting a track to "love track" is the cause of this.
Comment 11 Rémy CLOUARD 2008-08-21 17:01:59 UTC
apparently this markup is causing the problems :  <userActionFlags>2</userActionFlags>

if it's set to 0 that means no action, the track is submitted correctly

but if it's set to 1 (the user skips the track) or 2 (the user loves the track)
lastfm seems not to know how to handle it and prevents the submission.
Comment 12 Kevin Funk 2008-08-25 21:34:29 UTC
*** Bug 169760 has been marked as a duplicate of this bug. ***
Comment 13 Kevin Funk 2008-08-25 21:46:01 UTC
Can confirm that, tracked it down to loving tracks, too. Now we need someone who fixes it :)
Comment 14 Leo Franchi 2008-08-27 22:20:49 UTC
works fine for me when scrobbling loved local tracks.

i think the issue here is when you try to submit tracks that you have loved/skipped/banned and are also from last.fm radio. 
Comment 15 Leo Franchi 2008-08-27 22:26:21 UTC
ok, tracked it down to use not including the " the 5-digit Last.fm recommendation " , and the "key must be appended to this source ID to prove the validity of the submission (for example, "o[0]=L1b48a")." (from the API docs.)

as we're using a now-ancient version of the official last.fm client code, we need to update that, and that depends on mxcl giving us the new modularized code that last.fm developed.
Comment 16 Leo Franchi 2008-08-28 17:15:15 UTC
*** Bug 169554 has been marked as a duplicate of this bug. ***
Comment 17 Mark Kretschmann 2008-09-30 20:10:41 UTC
Some news: We're in the process of switching the a new last.fm library, which might well solve this issue. But we're going to do this only after Beta2 is released, as we do not want to risk regressions.

Bear with us :)
Comment 18 Johannes Engel 2008-10-29 11:54:47 UTC
Since Beta 3 is not far, any progress on this?
Comment 19 Lydia Pintscher 2008-10-29 12:00:06 UTC
Likely delayed until after beta 3. Stay tuned.
Comment 20 Leo Franchi 2008-10-30 02:24:34 UTC
SVN commit 877693 by lfranchi:

new last.fm code for the last.fm service. basically, this replaces our old last.fm code drop from the 1.4 client with the  new modular liblastfm from max at last.fm. currently the library is included here in-source, and we are compiling it as a lib and linking to it internally. as soon as they can, last.fm will release it as liblastfm, and amarok will depend on it. for now, and 2.0, this will stay in-source. note that i include a FindLibLastFm.cmake that is not being used, as soon as we switch to the external lib we can just switch to searching for the external lib w/ no hassle.

NOTE: *please* test. i've tried to stress it as much as i can, but i can't think of all the edge cases. break it!

this should fix a number of bugs with the old client. there is 1 bug that i know of with this code, and i have email max.

BUG: 164156
BUG: 157296
BUG: 155197
BUG: 154904
BUG: 170816