<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.kde.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugs.kde.org/"
          
          maintainer="sysadmin@kde.org"
>

    <bug>
          <bug_id>320219</bug_id>
          
          <creation_ts>2013-05-24 15:00:28 +0000</creation_ts>
          <short_desc>last.fm scrobbles show as &quot;now playing&quot; but not actually scrobbled</short_desc>
          <delta_ts>2013-09-14 23:22:00 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>2</classification_id>
          <classification>Applications</classification>
          <product>amarok</product>
          <component>Services/Last.fm</component>
          <version>2.7.1</version>
          <rep_platform>Arch Linux</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>NOR</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>2.8</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Daniel Cohen">analoguecolour</reporter>
          <assigned_to name="Amarok Bugs">amarok-bugs-null</assigned_to>
          <cc>bugs.kde.org</cc>
    
    <cc>bugzilla</cc>
    
    <cc>kdebugs</cc>
    
    <cc>luigiwalser</cc>
    
    <cc>matej</cc>
    
    <cc>sam</cc>
          
          <cf_commitlink>http://commits.kde.org/amarok/c534a8d964b680cda6dc894e0b81f400556d2a4e</cf_commitlink>
          <cf_versionfixedin>2.8</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>1</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1370812</commentid>
    <comment_count>0</comment_count>
    <who name="Daniel Cohen">analoguecolour</who>
    <bug_when>2013-05-24 15:00:28 +0000</bug_when>
    <thetext>Scrobbling in last.fm shows up on profile page as &quot;now playing&quot;, but when the next song starts playing it replaces the previous - so no song is actually scrobbled.

Some of the time after a random amount of time the whole slew of songs will appear (but not always).

It&apos;s definitely a liblastfm/amarok problem and not lastfm itself because it works just fine in other players.

Reproducible: Always

Steps to Reproduce:
1. scrobble song 1
2. scrobble song 2

Actual Results:  
song 1 is not in play history

Expected Results:  
song 1 should be in play history</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1370822</commentid>
    <comment_count>1</comment_count>
    <who name="David Walser">luigiwalser</who>
    <bug_when>2013-05-24 15:26:09 +0000</bug_when>
    <thetext>I can confirm this and I have more information.

I can reproduce this with Amarok 2.7.0 and 2.7.1, but the problem does depend on the liblastfm version.  With liblastfm 1.0.6 and prior versions, this works fine.  This bug occurs when you update to liblastfm 1.0.7.

I looked at the diff between 1.0.6 and 1.0.7 and it appears most of the changes involve proxy support, and I do have http_proxy environment variables set, I haven&apos;t tested without those.

I reported this to the upstream liblastfm developer (Michael Coffey a.k.a. eartle), and he had this to say of the changes in 1.0.7:
&quot;I expect this is because we&apos;ve separated cache() and submit(). When you call cache() we add the track to a list of scrobbles and store it to file so that it persists between sessions. submit() will actually submit the scrobbles in the cache to Last.fm. Up to version 1.0.6 we were calling submit() inside cache() so we always tried to submit as soon as you had cached a track. We now rely on the user calling submit() separately so you can cache tracks as soon as they hit the scrobble point, but then wait until the track finishes to submit the scrobble.

I realise that this is a behaviour break from early versions of the 1.x.x library, but it was to fix a display bug on the website and I was hoping it wouldn&apos;t affect too many people. This is however reverting to the 0.x.x behaviour of the library. &quot;</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1370852</commentid>
    <comment_count>2</comment_count>
    <who name="Mark Kretschmann">kretschmann</who>
    <bug_when>2013-05-24 17:22:29 +0000</bug_when>
    <thetext>@David: Big thanks for the information. We&apos;re going to fix it.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1370961</commentid>
    <comment_count>3</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-05-25 09:02:25 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; I reported this to the upstream liblastfm developer (Michael Coffey a.k.a.
&gt; eartle), and he had this to say of the changes in 1.0.7:
&gt; &quot;I expect this is because we&apos;ve separated cache() and submit(). When you
&gt; call cache() we add the track to a list of scrobbles and store it to file so
&gt; that it persists between sessions. submit() will actually submit the
&gt; scrobbles in the cache to Last.fm. Up to version 1.0.6 we were calling
&gt; submit() inside cache() so we always tried to submit as soon as you had
&gt; cached a track. We now rely on the user calling submit() separately so you
&gt; can cache tracks as soon as they hit the scrobble point, but then wait until
&gt; the track finishes to submit the scrobble.

Oh I see, I&apos;ll adapt Amarok code to call submit explicitly, no problem, however it will only be available starting with Amarok 2.8 (or git users).

Can you please point me to where you&apos;ve reported this to upstream?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1370977</commentid>
    <comment_count>4</comment_count>
    <who name="David Walser">luigiwalser</who>
    <bug_when>2013-05-25 10:14:19 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Oh I see, I&apos;ll adapt Amarok code to call submit explicitly, no problem,
&gt; however it will only be available starting with Amarok 2.8 (or git users).

Yes of course, but please post a link to the git commit here in this bug.

&gt; Can you please point me to where you&apos;ve reported this to upstream?

I e-mailed him at michaelc@last.fm</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1371011</commentid>
    <comment_count>5</comment_count>
    <who name="Daniel Cohen">analoguecolour</who>
    <bug_when>2013-05-25 12:43:22 +0000</bug_when>
    <thetext>So is the current workaround to downgrade to 1.0.6 until amarok 2.8 is released?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1371114</commentid>
    <comment_count>6</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-05-25 18:46:16 +0000</bug_when>
    <thetext>Git commit c534a8d964b680cda6dc894e0b81f400556d2a4e by Matěj Laitl.
Committed on 25/05/2013 at 20:39.
Pushed by laitl into branch &apos;master&apos;.

ScrobblerAdapter: call submit() explicitly

BUGFIXES:
 * Prevent Last.fm scrobbles not being submitted until restart due to
   change in liblastfm 1.0.7.

Thanks to David Walser for debugging this with liblastfm author Michael
Coffey.

Work-around for Amarok &lt;= 2.7.1 is to use liblastfm &lt;= 1.0.6.
FIXED-IN: 2.8
CCMAIL: Michael Coffey &lt;michaelc@last.fm&gt;

M  +2    -0    ChangeLog
M  +2    -1    src/services/lastfm/ScrobblerAdapter.cpp

http://commits.kde.org/amarok/c534a8d964b680cda6dc894e0b81f400556d2a4e</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1371469</commentid>
    <comment_count>7</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-05-27 09:26:40 +0000</bug_when>
    <thetext>*** Bug 320340 has been marked as a duplicate of this bug. ***</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397333</commentid>
    <comment_count>8</comment_count>
    <who name="Daniel Duris">kdebugs</who>
    <bug_when>2013-09-14 21:53:48 +0000</bug_when>
    <thetext>Hello,

this bug reappares in Amarok 2.8.0 on Precise. Song is shown as &quot;now playing&quot;, but never gets to the recently played list.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397334</commentid>
    <comment_count>9</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-09-14 21:57:32 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; Hello,
&gt; 
&gt; this bug reappares in Amarok 2.8.0 on Precise. Song is shown as &quot;now
&gt; playing&quot;, but never gets to the recently played list.

Oh, really? Note that the Last.fm site may have lags or caching problems, please give it up to one day to show the play, also please check the http://www.last.fm/user/&lt;username&gt;/tracks in addition to the profile page.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397335</commentid>
    <comment_count>10</comment_count>
    <who name="Daniel Duris">kdebugs</who>
    <bug_when>2013-09-14 22:05:37 +0000</bug_when>
    <thetext>Yes, really, please stop patronizing. Tracks were displaying correctly yesterday, after some KDE update (Amarok etc.), this problem has appeared.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397336</commentid>
    <comment_count>11</comment_count>
    <who name="David Walser">luigiwalser</who>
    <bug_when>2013-09-14 22:06:34 +0000</bug_when>
    <thetext>This bug has not reappeared.  I don&apos;t use Ubuntu, but I am running Amarok 2.8.0 with the latest liblastfm (1.0.8) and it works fine.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397338</commentid>
    <comment_count>12</comment_count>
    <who name="Daniel Duris">kdebugs</who>
    <bug_when>2013-09-14 22:09:11 +0000</bug_when>
    <thetext>Well, so? Maybe the problem is on Ubuntu (12.04)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397339</commentid>
    <comment_count>13</comment_count>
    <who name="David Walser">luigiwalser</who>
    <bug_when>2013-09-14 22:11:26 +0000</bug_when>
    <thetext>So, this bug does not exist upstream.  It has definitively been fixed.  If an Ubuntu update broke something, please report it to them.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397340</commentid>
    <comment_count>14</comment_count>
    <who name="Daniel Duris">kdebugs</who>
    <bug_when>2013-09-14 22:13:42 +0000</bug_when>
    <thetext>OK, will do.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397341</commentid>
    <comment_count>15</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2013-09-14 22:15:01 +0000</bug_when>
    <thetext>Some useful info can be gained from Amarok running amarok from console as: amarok --debug --nofork    (it prints the message set to last.fm and the response, watch it after and of track playback). You may also tap Amarok communication with last.fm servers using Wireshark.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1397349</commentid>
    <comment_count>16</comment_count>
    <who name="Janet">bugzilla</who>
    <bug_when>2013-09-14 23:22:00 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; Hello,
&gt; 
&gt; this bug reappares in Amarok 2.8.0 on Precise. Song is shown as &quot;now
&gt; playing&quot;, but never gets to the recently played list.

You have installed Amarok via the backports PPA? The backports PPA does not contain liblastfm1, so I guess it is a mismatch between a current Amarok version and an old liblastfm.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>