Bug 136791 - "favourite tracks by" and statistics broken
Summary: "favourite tracks by" and statistics broken
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.4
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-03 21:00 UTC by Christian Loosli
Modified: 2006-11-03 23:44 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 Christian Loosli 2006-11-03 21:00:24 UTC
Version:           1.4.4 (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
Compiler:          gcc  i686-pc-linux-gnu-4.1.1 sane CFlags
OS:                Linux

After updating to amarok 1.4.4 the
"favourite tracks by" part in the
sidebar disappeared, even when it was
activated. When I checked the statistics
"favourite tracks" and "most played tracks"
showed an empty list instead of tracks, while 
the other statistics worked well. 

I tried rebuilding the collection, deleting
~/.kde/share/apps/amarok  and the amarok 
configuration file, nothing helped. 

The problem does not occur with 1.4.3, 
after downgrading everything works fine again. 

The System is a recent gentoo System, 
CFlags are sane, gcc version is 
mentioned above, useflags should not matter. 

Charset is ISO-8859-15, but I don't think 
that this causes any problems. 

You can ask for further information 
by sending me an email, thanks in 
advance for solving this bug.
Comment 1 Seb Ruiz 2006-11-03 22:41:09 UTC
yes, i can confirm
Comment 2 Alexandre Oliveira 2006-11-03 23:43:58 UTC
SVN commit 601627 by aoliveira:

Favorites on Context Browser and Statistics panel was broken for sqlite
BUG: 136791


 M  +3 -3      contextbrowser.cpp  
 M  +2 -2      statistics.cpp  


--- trunk/extragear/multimedia/amarok/src/contextbrowser.cpp #601626:601627
@@ -2272,7 +2272,7 @@
     qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
     qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valScore );
     qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating );
-    qb.excludeFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "1", QueryBuilder::modeLess );
+    qb.addNumericFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "0", QueryBuilder::modeGreater );
     qb.addMatch( QueryBuilder::tabSong, QueryBuilder::valArtistID, QString::number( artist_id ) );
     qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valForFavoriteSorting(), true );
     qb.setLimit( 0, 10 );
@@ -2890,7 +2890,7 @@
     const bool cached = !lyrics.isEmpty() && !EngineController::engine()->isStream();
     QString title  = EngineController::instance()->bundle().title();
     QString artist = EngineController::instance()->bundle().artist();
-    
+
     if( title.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
         title = title.remove(" (PREVIEW: buy it at www.magnatune.com)");
     if( artist.contains("PREVIEW: buy it at www.magnatune.com", true) >= 1 )
@@ -3372,7 +3372,7 @@
         {
             tmpWikiStr = EngineController::instance()->bundle().prettyTitle();
         }
-        
+
         //Hack to make wiki searches work with magnatune preview tracks
         if (tmpWikiStr.contains( "PREVIEW: buy it at www.magnatune.com" ) >= 1 ) {
             tmpWikiStr = tmpWikiStr.remove(" (PREVIEW: buy it at www.magnatune.com)" );
--- trunk/extragear/multimedia/amarok/src/statistics.cpp #601626:601627
@@ -336,7 +336,7 @@
         qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
         qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valScore );
         qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valRating );
-        qb.excludeFilter( QueryBuilder::tabStats, QueryBuilder::valForFavoriteSorting(), "1", QueryBuilder::modeLess );
+        qb.addNumericFilter( QueryBuilder::tabStats, QueryBuilder::valForFavoriteSorting(), "0", QueryBuilder::modeGreater );
         qb.setGoogleFilter( QueryBuilder::tabSong | QueryBuilder::tabArtist, m_filter );
         qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valForFavoriteSorting(), true );
         qb.setLimit( 0, 50 );
@@ -370,7 +370,7 @@
         qb.addReturnValue( QueryBuilder::tabArtist, QueryBuilder::valName );
         qb.addReturnValue( QueryBuilder::tabSong, QueryBuilder::valURL );
         qb.addReturnValue( QueryBuilder::tabStats, QueryBuilder::valPlayCounter );
-        qb.excludeFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "1", QueryBuilder::modeLess );
+        qb.addNumericFilter( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, "0", QueryBuilder::modeGreater );
         qb.setGoogleFilter( QueryBuilder::tabSong | QueryBuilder::tabArtist, m_filter );
         qb.sortBy( QueryBuilder::tabStats, QueryBuilder::valPlayCounter, true );
         qb.setLimit( 0, 50 );