Summary: | Amarok playlist filtering does not filter non-rated songs when "rating" is included in search preferences | ||
---|---|---|---|
Product: | [Applications] amarok | Reporter: | Kevin Guertin <kevin.guertin> |
Component: | Playlist | Assignee: | Amarok Developers <amarok-bugs-dist> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | default_357-line, kevin.guertin, nhn, teo |
Priority: | NOR | ||
Version: | 2.3.1 | ||
Target Milestone: | 2.3.2 | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: |
Description
Kevin Guertin
2010-06-01 01:07:22 UTC
Please search for duplicates before submitting a report. *** This bug has been marked as a duplicate of bug 193537 *** This is NOT a duplicate of 193537. Read the report and look at the linked video. Wow... I think I finally found what's wrong after all these months... The playlist filtering breaks if you tell it to also search "Rating" in "Search Preferences". It does not filter out non-rated songs when you have it selected. All rated songs are filtered out. Still a bug. I've updated the summary of this bug to reflect this. Indeed, sorry for the confusion. Confirmed. Just ran into this on 2.3.1. The Ratings filter should be disabled until this is fixed. This bug should be solved for 2.3.2 by the following commit: commit 2d34e2593e97ce796fd17b193fcb8736b003d6b4 Author: Nikhil Marathe <nsm.nikhil@gmail.com> Date: Wed Jul 7 18:15:49 2010 +0530 Ensure that the search term is numeric when searching by rating. diff --git a/src/playlist/proxymodels/ProxyBase.cpp b/src/playlist/proxymodels/ProxyBase.cpp index 314b7e0..b6ff53a 100644 --- a/src/playlist/proxymodels/ProxyBase.cpp +++ b/src/playlist/proxymodels/ProxyBase.cpp @@ -323,9 +323,13 @@ ProxyBase::rowMatch( int sourceModelRow, const QString &searchTerm, int searchFi ) return true; - if( searchFields & MatchRating && - track->rating() == QString( searchTerm ).remove( "rating:" ).toInt() ) - return true; + if( searchFields & MatchRating ) + { + bool ok; + int rating = QString( searchTerm ).remove( "rating:" ).toInt( &ok ); + if( ok && ( track->rating() == rating ) ) + return true; + } return false; } Great news! Can't wait to test it out. :) Thanks! :) |