Bug 211249 - [Patch] Searching on Local Music, title:... does not work
Summary: [Patch] Searching on Local Music, title:... does not work
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collection Browser (show other bugs)
Version: 2.2.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: 2.2.2
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-10-20 21:01 UTC by Roberto Bertolusso
Modified: 2009-11-12 07:26 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch to solve the bug (1.34 KB, patch)
2009-10-26 14:03 UTC, Roberto Bertolusso
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Roberto Bertolusso 2009-10-20 21:01:17 UTC
Version:           2.2 (using KDE 4.3.2)
Compiler:          gcc version 4.4.2 (Gentoo 4.4.2 p1.0) 
OS:                Linux
Installed from:    Gentoo Packages

While artist:... (or -artist:...) and genre:... seem to work properly,
if in your search you use title:..., (for example: title:fiorentino 
or event title:"fiorentino") it shows an empty result.
After reporting on the IRC channel, I've got a response suggesting that
"probably just a spelling error somewhere in the source
titel instead of title"
Comment 1 Myriam Schweingruber 2009-10-21 14:26:33 UTC
BTW, you don't have to subscribe to the bugs you report, since the reporter is subscribed by default.
Comment 2 Roberto Bertolusso 2009-10-24 19:19:24 UTC
I think I have solved it. A whole section for dealing with title was missing from CollectionTreeItemModelBase.cpp. If the following chunk of code is inserted say at line 547 (from Amarok 2.2.0 source code), it fixes it. I really don't know how should I report it, so sorry if this is not the correct way

*** Follows code to be added at line 547 ****
                else if ( lcField.compare( "title", Qt::CaseInsensitive ) == 0|| lcField.compare( i18n( "title" ), Qt::CaseInsensitive ) == 0 )
                {
                    if ( ( validFilters & QueryMaker::TitleFilter ) == 0 ) continue;
                    ADD_OR_EXCLUDE_FILTER( Meta::valTitle, elem.text, false, false );
                }
*** Ends added code ***
Comment 3 Myriam Schweingruber 2009-10-24 23:33:44 UTC
Maximilian, could you have a look at this, please?
Comment 4 Kevin Funk 2009-10-26 08:39:46 UTC
@RB: FYI, you should use `git diff` to get a patch out of your working tree. It's more readable.
Comment 5 Mark Kretschmann 2009-10-26 08:58:16 UTC
Even better: Make a "merge request" on Gitorious:

  http://gitorious.org/amarok/amarok/merge_requests/new
Comment 6 Roberto Bertolusso 2009-10-26 14:03:34 UTC
Created attachment 37846 [details]
Proposed patch to solve the bug

This patch should address this issue. It is in response to comment #4, using 'git diff'. About comment #5 I have requested an account at gitorious, and waiting for the confirmation link
Comment 7 Mark Kretschmann 2009-11-02 13:52:03 UTC
Roberto, could you please send us a Merge Request on Gitorious instead? This
makes it much easier for us to keep track of patches, and it allows you to
refine the patch further if there are problems with it.

Please see here:

http://gitorious.org/amarok/amarok/merge_requests
Comment 8 Roberto Bertolusso 2009-11-02 14:44:36 UTC
It is already there (ID #1920), with status "verifying" and waiting due to string freeze.
Comment 9 Mark Kretschmann 2009-11-12 07:26:24 UTC
Merged. Thanks Roberto.


commit 026697891ec2d8a895c077d2c851d3d36619719b
Merge: cec5ea8 6bd9594
Author: Mark Kretschmann <kretschmann@kde.org>
Date:   Thu Nov 12 07:09:32 2009 +0100

    Merge commit 'refs/merge-requests/1920' of git://gitorious.org/amarok/amarok