Bug 210296 - "Albums by..." plasmoid does not refresh after track details have been altered
Summary: "Albums by..." plasmoid does not refresh after track details have been altered
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 2.3-GIT
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-12 10:52 UTC by S. Burmeister
Modified: 2010-03-15 14:01 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description S. Burmeister 2009-10-12 10:52:09 UTC
Version:           2.3-GIT (using KDE 4.3.1)
OS:                Linux
Installed from:    SuSE RPMs

If one plays a song amarok shows other albums by that artist in the plasmoid. If one right clicks a song in that plasmoid, in my case it was a single song, i.e. not a sub-item of an album-item, one can edit its details.

I changed the album string and saved, the plasmoid did not update and right-click > edit track details did not work anymore on that track, while it did on others. Maybe because it tried to access the "old" information.

I used todays git. If you tell me what the equivalent of svn info is, I can post the exact revision.
Comment 1 Myriam Schweingruber 2009-10-12 11:13:07 UTC
There is no such thing as 2.3-git :) We still are in the 2.2 branch. You should choose and set the version above in the bug header.

To know which version you have, 'git log' lists the latest commits. The one on top is your version. Quit the command with q. Also, 'man git' helps a lot...

As for the Album applet, I'm not sure that it's a suitable way to edit data...
Comment 2 Nikolaj Hald Nielsen 2010-03-15 14:01:40 UTC
commit e12cea4824d1e173311a0ff6fecea879943ea9c0
Author: Nikolaj Hald Nielsen <nhn@kde.org>
Date:   Mon Mar 15 13:59:34 2010 +0100

    Fix CurrentEngine not updating list of albums by same artist if the artist of the currently playing album is edited.
    
    ChangeLog++
    
    BUG: 210296

diff --git a/ChangeLog b/ChangeLog
index 7374e7b..3cec1b9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -21,6 +21,8 @@ VERSION 2.3.1-Beta 1
        some MySQL versions. (BR 225052)
 
   BUGFIXES:
+     * Fixed Albums applet not getting updated if the artist of the currently 
+       playing track was edited. (BR 210296)
      * Fixed bad window title for the details edit dialog in the playlist layout 
        editor. (BR 227912)
      * Fixed wrong track getting dragged from The Playlist when sorting and/or
diff --git a/src/context/engines/current/CurrentEngine.cpp b/src/context/engines/current/CurrentEngine.cpp
index ecd5f23..475e606 100644
--- a/src/context/engines/current/CurrentEngine.cpp
+++ b/src/context/engines/current/CurrentEngine.cpp
@@ -237,6 +237,8 @@ CurrentEngine::metadataChanged( Meta::TrackPtr track )
 {
     QVariantMap trackInfo = Meta::Field::mapFromTrack( track );
     setData( "current", "current", trackInfo );
+    if( m_requested[ "albums" ] )
+        update();
 }
 
 void