Bug 125612

Summary: OSD displays "cached" rating insted of actual rating
Product: [Applications] amarok Reporter: dipnlik <dipnlik>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: martenseemann
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: Patch that keeps OSD rating always up to date...

Description dipnlik 2006-04-15 00:55:04 UTC
Version:            (using KDE KDE 3.5.2)
Installed from:    Ubuntu Packages

amarok's OSD always shows the rating the song had when it started playing. If I change the rating of the current song then use a keyboard shortcut to open the OSD again, it doesn't show the new rating.
Comment 1 Mark Kretschmann 2006-09-15 16:54:17 UTC
I've just heard the same from another user, so I'm confirming the report.
Comment 2 Tuomas Nurmi 2006-10-27 22:01:39 UTC
Created attachment 18291 [details]
Patch that keeps OSD rating always up to date...
Comment 3 Alexandre Oliveira 2006-10-27 22:16:59 UTC
SVN commit 599605 by aoliveira:

OSD wouldn't always show up-to-date ratings. Patch by Tuomas Nurmi <tnurmi@edu.kauhajoki.fi>. 
BUG: 125612


 M  +2 -0      ChangeLog  
 M  +1 -0      src/app.cpp  
 M  +2 -0      src/enginecontroller.h  


--- trunk/extragear/multimedia/amarok/ChangeLog #599604:599605
@@ -9,6 +9,8 @@
   CHANGES:
 
   BUGFIXES:
+    * OSD wouldn't always show up-to-date ratings. Patch by Tuomas Nurmi
+      <tnurmi@edu.kauhajoki.fi>. (BR 125612)
 
 VERSION 1.4.4
   FEATURES:
--- trunk/extragear/multimedia/amarok/src/app.cpp #599604:599605
@@ -1165,6 +1165,7 @@
         const QString path = EngineController::instance()->playingURL().path();
         CollectionDB::instance()->setSongRating( path, n, true );
         const int rating = CollectionDB::instance()->getSongRating( path );
+        EngineController::instance()->updateBundleRating( rating );
         Amarok::OSD::instance()->OSDWidget::ratingChanged( rating );
     }
     else if( PlaylistWindow::self()->isReallyShown() && Playlist::instance()->qscrollview()->hasFocus() )
--- trunk/extragear/multimedia/amarok/src/enginecontroller.h #599604:599605
@@ -60,6 +60,8 @@
     void restoreSession();
     void endSession();
 
+    void updateBundleRating( const int rating ) { m_bundle.setRating(rating); } //Can't update metabundle rating from bundle(), d'oh
+
     //xx000, xx100, xx200, so at most will be 200ms delay before time displays are updated
     static const int MAIN_TIMER = 300;
 
Comment 4 Alexandre Oliveira 2006-11-08 15:47:00 UTC
*** Bug 132636 has been marked as a duplicate of this bug. ***