<?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>305576</bug_id>
          
          <creation_ts>2012-08-22 08:07:03 +0000</creation_ts>
          <short_desc>Last.FM &quot;Ban&quot; &amp; &quot;Skip&quot; buttons don&apos;t show up for Last.fm streams recreated on startup</short_desc>
          <delta_ts>2012-12-17 21:20:08 +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.6.0</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>normal</bug_severity>
          <target_milestone>2.7</target_milestone>
          <dependson>311733</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter>alex</reporter>
          <assigned_to name="Amarok Bugs">amarok-bugs-null</assigned_to>
          <cc>matej</cc>
    
    <cc>sam</cc>
          
          <cf_commitlink>http://commits.kde.org/amarok/40c45b77418a92b7b5489dfbb8941cfe73655a42</cf_commitlink>
          <cf_versionfixedin>2.7</cf_versionfixedin>
          <cf_sentryurl></cf_sentryurl>
          <votes>0</votes>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1289854</commentid>
    <comment_count>0</comment_count>
    <who name="">alex</who>
    <bug_when>2012-08-22 08:07:03 +0000</bug_when>
    <thetext>Since I&apos;ve upgraded to Amarok 2.6.0, the Last.FM &quot;Ban&quot; and &quot;Skip&quot; buttons have lost their functionality ... clicking them simply does nothing. The third &quot;Love&quot; button, however, does still function as expected.

I&apos;ve started Amarok via `amarok --debug` and this is what I get when I hit &quot;Love&quot;:

amarok: BEGIN: void LastFmService::love() 
amarok:   BEGIN: void ScrobblerAdapter::loveTrack(Meta::TrackPtr) 
amarok:     BEGIN: void ScrobblerAdapter::copyTrackMetadata(lastfm::MutableTrack&amp;, Meta::TrackPtr) 
amarok:       [lastfm] scrobbleComposer:  false 
amarok:     END__: void ScrobblerAdapter::copyTrackMetadata(lastfm::MutableTrack&amp;, Meta::TrackPtr) [Took: 0s] 
amarok:   END__: void ScrobblerAdapter::loveTrack(Meta::TrackPtr) [Took: 0s] 
amarok: END__: void LastFmService::love() [Took: 0s] 

However when I hit &quot;Ban&quot; or &quot;Skip&quot; there is 100% nothing added to the console.

Reproducible: Always

Steps to Reproduce:
1. Play a Last.FM tag
2. Click the &quot;Skip&quot; button
3.
Actual Results:  
100% nothing happens

Expected Results:  
It should skip to the next song that Last.FM will provide</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1291475</commentid>
    <comment_count>1</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2012-08-24 21:27:08 +0000</bug_when>
    <thetext>(In reply to comment #0)
&gt; Since I&apos;ve upgraded to Amarok 2.6.0, the Last.FM &quot;Ban&quot; and &quot;Skip&quot; buttons
&gt; have lost their functionality ... clicking them simply does nothing. The
&gt; third &quot;Love&quot; button, however, does still function as expected.

What &quot;third&quot;? Please describe precisely what buttons work and what do not.

&gt; I&apos;ve started Amarok via `amarok --debug` and this is what I get when I hit
&gt; &quot;Love&quot;:
&gt; 
&gt; amarok: BEGIN: void LastFmService::love() 
&gt; amarok:   BEGIN: void ScrobblerAdapter::loveTrack(Meta::TrackPtr) 
&gt; amarok:     BEGIN: void
&gt; ScrobblerAdapter::copyTrackMetadata(lastfm::MutableTrack&amp;, Meta::TrackPtr) 
&gt; amarok:       [lastfm] scrobbleComposer:  false 
&gt; amarok:     END__: void
&gt; ScrobblerAdapter::copyTrackMetadata(lastfm::MutableTrack&amp;, Meta::TrackPtr)
&gt; [Took: 0s] 
&gt; amarok:   END__: void ScrobblerAdapter::loveTrack(Meta::TrackPtr) [Took: 0s] 
&gt; amarok: END__: void LastFmService::love() [Took: 0s] 
&gt; 
&gt; However when I hit &quot;Ban&quot; or &quot;Skip&quot; there is 100% nothing added to the
&gt; console.

Alex, just because the methods don&apos;t emit debugging information doesn&apos;t mean they do nothing. Banning a track using Ctrl+B works for me, although there&apos;s no feedback, but the track shows up in my list of banned tracks (not visible in Last.fm page AFAICS, but can be seen in http://ws.audioscrobbler.com/2.0/?method=user.getbannedtracks&amp;user=YOUR_LAST_FM_USERNAME&amp;api_key=b25b959554ed76058ac220b7b2e0a026 )

The situation with the &quot;Skip&quot; action is a bit worse, because Last.fm removed the method from the API and further restricted the radio API - you cannot for example play the tracks in different order or even re-start listening a to track (making pause impossible), see [1].

[1] http://www.last.fm/api/radio

So, I&apos;ll fix this by removing the &quot;Skip&quot; button. Additionally, the Ban action will have user feedback - the code is already there in my statsyncing GSoC branch.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1291502</commentid>
    <comment_count>2</comment_count>
    <who name="">alex</who>
    <bug_when>2012-08-25 07:14:39 +0000</bug_when>
    <thetext>(In reply to comment #1)
&gt; What &quot;third&quot;? Please describe precisely what buttons work and what do not.

I&apos;m not too sure why I said &quot;third&quot;, simply meant the &quot;Love&quot; button on the main toolbar. The only button that works for me is &quot;Love&quot;.

&gt; Alex, just because the methods don&apos;t emit debugging information doesn&apos;t mean
&gt; they do nothing. Banning a track using Ctrl+B works for me, although there&apos;s
&gt; no feedback, but the track shows up in my list of banned tracks (not visible
&gt; in Last.fm page AFAICS, but can be seen in
&gt; http://ws.audioscrobbler.com/2.0/?method=user.
&gt; getbannedtracks&amp;user=YOUR_LAST_FM_USERNAME&amp;api_key=b25b959554ed76058ac220b7b2
&gt; e0a026 )

I&apos;ve just tried to confirm if clicking &quot;Ban&quot; updates that XML file (for my username), however unless that feed does not get updated often then the &quot;Ban&quot; button has also lost its functionality. You can also view your banned tracks via http://www.last.fm/user/USERNAME/library/banned, it&apos;s not linked from anywhere though.

&gt; The situation with the &quot;Skip&quot; action is a bit worse, because Last.fm removed
&gt; the method from the API and further restricted the radio API - you cannot
&gt; for example play the tracks in different order or even re-start listening a
&gt; to track (making pause impossible), see [1].
&gt; 
&gt; [1] http://www.last.fm/api/radio

That would explain it then! Also when clicking on &quot;Ban&quot; it used to &quot;Ban&quot; it and then skip to the next track too, sounds like they&apos;ve removed some useful functionality from their API here ... looks like I&apos;ll be changing service.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1291588</commentid>
    <comment_count>3</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2012-08-25 14:13:23 +0000</bug_when>
    <thetext>Git commit d11827eaa102743e72f05138f22acfb78898d0fb by Matěj Laitl.
Committed on 25/08/2012 at 15:17.
Pushed by laitl into branch &apos;master&apos;.

Remove Last.fm Skip button for streams

Last.fm API no longer supports it, don&apos;t confuse users.
FIXED-IN: 2.7

M  +1    -0    ChangeLog
M  +0    -5    src/MainWindow.cpp
M  +0    -1    src/MainWindow.h
M  +0    -13   src/services/lastfm/LastFmService.cpp
M  +0    -1    src/services/lastfm/LastFmService.h
M  +0    -11   src/services/lastfm/ScrobblerAdapter.cpp
M  +0    -1    src/services/lastfm/ScrobblerAdapter.h
M  +0    -16   src/services/lastfm/meta/LastFmMeta.cpp
M  +0    -3    src/services/lastfm/meta/LastFmMeta.h
M  +0    -11   src/services/lastfm/meta/MultiPlayableCapabilityImpl_p.h

http://commits.kde.org/amarok/d11827eaa102743e72f05138f22acfb78898d0fb</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1291593</commentid>
    <comment_count>4</comment_count>
    <who name="">alex</who>
    <bug_when>2012-08-25 14:28:45 +0000</bug_when>
    <thetext>Is there any way that you could fake the &quot;Skip&quot; button? For example, right now if I don&apos;t like a track I can &quot;Skip&quot; it by double-clicking on the Last.FM tag that I have added to my playlist, which I&apos;m assuming just stops and then plays the tag again - resulting in a new song.

Maybe that&apos;s against their ToS, though.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298020</commentid>
    <comment_count>5</comment_count>
    <who name="">alex</who>
    <bug_when>2012-09-17 15:03:30 +0000</bug_when>
    <thetext>Matěj, I&apos;ve just re-added a few Last.FM tags that I had in my playlist, and to my surprise the Last.FM &quot;Skip&quot; buttons are now working. Are you able to confirm this original behaviour? If so, may need to revert that commit!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298026</commentid>
    <comment_count>6</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2012-09-17 15:26:29 +0000</bug_when>
    <thetext>(In reply to comment #5)
&gt; Matěj, I&apos;ve just re-added a few Last.FM tags that I had in my playlist, and
&gt; to my surprise the Last.FM &quot;Skip&quot; buttons are now working. Are you able to
&gt; confirm this original behaviour? If so, may need to revert that commit!

Hmm, so they work sometimes and sometimes not? See [1], it is not clear whether advancing to the next track is valid or not.

[1] http://www.last.fm/api/radio</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298033</commentid>
    <comment_count>7</comment_count>
    <who name="">alex</who>
    <bug_when>2012-09-17 15:34:14 +0000</bug_when>
    <thetext>The tags that I have in my playlist, which have been in there for months, do not allow me to skip track. However, the newer tags that I&apos;ve just added do let me skip. 

I&apos;ve also just added a duplicate tag, e.g. &quot;acoustic&quot;, just to see if it was an issue with that certain tag, but that now works as well.

I don&apos;t know much about the Last.FM API, however after looking at their example response I would assume it is perfectly valid, you just advance to the next track in the order and it should allow it.

If there is any config file that I can provide you which may give you some clues as to why my older tags in the playlist do not work, let me know.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298039</commentid>
    <comment_count>8</comment_count>
    <who name="">alex</who>
    <bug_when>2012-09-17 15:43:56 +0000</bug_when>
    <thetext>A ha, ok I have found out how to replicate this 100% now.

1) Add a new Last.FM tag, e.g. &quot;acoustic&quot;
2) Start playing the acoustic tag from the playlist
3) Click the &quot;Skip&quot; button
4) Track will skip to the next one
5) Close and reopen Amarok
6) Repeat steps 2 &amp; 3
7) Track will *not* skip</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1298041</commentid>
    <comment_count>9</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2012-09-17 15:47:59 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; A ha, ok I have found out how to replicate this 100% now.
&gt; 
&gt; 1) Add a new Last.FM tag, e.g. &quot;acoustic&quot;
&gt; 2) Start playing the acoustic tag from the playlist
&gt; 3) Click the &quot;Skip&quot; button
&gt; 4) Track will skip to the next one
&gt; 5) Close and reopen Amarok
&gt; 6) Repeat steps 2 &amp; 3
&gt; 7) Track will *not* skip

Okay, it boils down to Last.fm tracks not being properly recreated at startup..</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1324454</commentid>
    <comment_count>10</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2012-12-17 18:48:40 +0000</bug_when>
    <thetext>Git commit 143c96f6782f2206a9b47736bd4cfed214d0483c by Matěj Laitl.
Committed on 17/12/2012 at 19:46.
Pushed by laitl into branch &apos;master&apos;.

LastFmService: fix track recreation on startup

...and add a warning to ServiceBase so that we know quicker next time.

BUGFIXES:
 * Fix Last.fm streams not being correctly recreated on startup.
FIXED-IN: 2.7

M  +1    -0    ChangeLog
M  +7    -3    src/services/ServiceBase.cpp
M  +5    -3    src/services/lastfm/LastFmService.cpp
M  +0    -1    src/services/lastfm/meta/LastFmMeta.cpp

http://commits.kde.org/amarok/143c96f6782f2206a9b47736bd4cfed214d0483c</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1324460</commentid>
    <comment_count>11</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2012-12-17 19:29:02 +0000</bug_when>
    <thetext>Oh, I&apos;ve fixed the re-creation, but the buttons don&apos;t show up for re-created tracks. Let&apos;s see.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1324497</commentid>
    <comment_count>12</comment_count>
    <who name="Matěj Laitl">matej</who>
    <bug_when>2012-12-17 21:20:08 +0000</bug_when>
    <thetext>Git commit 40c45b77418a92b7b5489dfbb8941cfe73655a42 by Matěj Laitl.
Committed on 17/12/2012 at 22:11.
Pushed by laitl into branch &apos;master&apos;.

MetaProxy, LastFmMeta: finally fix Last.fm track recreation

QObjects and threads don&apos;t go well together, hopefully I&apos;ll win.
FIXED-IN: 2.7

M  +22   -9    src/core-impl/meta/proxy/MetaProxy.cpp
M  +21   -28   src/core-impl/meta/proxy/MetaProxyWorker.cpp
M  +34   -24   src/core-impl/meta/proxy/MetaProxyWorker.h
M  +24   -6    src/services/lastfm/meta/LastFmMeta.cpp

http://commits.kde.org/amarok/40c45b77418a92b7b5489dfbb8941cfe73655a42</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>