Bug 237831

Summary: organize files: option to ignore "The" ignores "The", does not ignore "the"
Product: [Applications] amarok Reporter: Vasilis Vasaitis <vvasaitis>
Component: Collections/LocalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: matej, ralf-engels, unnamedrambler
Priority: NOR    
Version: 2.3.0.90   
Target Milestone: 2.3.2   
Platform: Debian testing   
OS: Linux   
Latest Commit: Version Fixed In: 2.3.2

Description Vasilis Vasaitis 2010-05-16 15:49:30 UTC
Version:           2.3.1beta1 (using KDE 4.4.3)
OS:                Linux
Installed from:    Debian testing/unstable Packages

I'm using the Organize Files dialog to move my music files around, and I've enabled the "Ignore 'The' in artist names" option. However, while it works file for artist names that begin with "The", it does nothing for artist names that begin with "the", i.e., it's case-sensitive.
Comment 1 Casey Link 2010-05-29 20:39:13 UTC
Thanks for the bug report :)

fix coming soon
Comment 2 Casey Link 2010-05-30 06:40:22 UTC
commit 364d900271289fc9d579c8cc65d4f2e87e3cbe90
Author: Casey Link <unnamedrambler@gmail.com>
Date:   Sat May 29 13:41:08 2010 -0500

    fix case sensitivity of "Ignore 'The'" option in the organize dialog.
    
    BUG: 237831

diff --git a/ChangeLog b/ChangeLog
index 0a43a33..e80a6a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -25,6 +25,8 @@ VERSION 2.3.2-Beta 1
       Patch by Richard Longland <rlongland@hotmail.com>.
 
   BUGFIXES:
+    * The "Ignore 'The'" option in the organize files dialog is now case
+      insensitive. (BR 237831)
     * Filenames with dots (.) and other special RegEx characters will now be
       parsed correctly when guessing tags from a filename. (BR 225743)
     * Align track details dialog's labels to the right as per KDE4's HIG.
diff --git a/src/dialogs/OrganizeCollectionDialog.cpp b/src/dialogs/OrganizeCollectionDialog.cpp
index f699bd6..ffebbbb 100644
--- a/src/dialogs/OrganizeCollectionDialog.cpp
+++ b/src/dialogs/OrganizeCollectionDialog.cpp
@@ -155,12 +155,12 @@ OrganizeCollectionDialog::buildDestination( const QString &format, const Meta::T
     args["theartist"] = cleanPath( artist );
     args["thealbumartist"] = cleanPath( albumartist );
 
-    if( ui->ignoreTheCheck->isChecked() && artist.startsWith( "The " ) )
+    if( ui->ignoreTheCheck->isChecked() && artist.startsWith( "The ", Qt::CaseInsensitive ) )
         Amarok::manipulateThe( artist, true );
 
     artist = cleanPath( artist );
 
-    if( ui->ignoreTheCheck->isChecked() && albumartist.startsWith( "The " ) )
+    if( ui->ignoreTheCheck->isChecked() && albumartist.startsWith( "The ", Qt::CaseInsensitive ) )
         Amarok::manipulateThe( albumartist, true );
 
     albumartist = cleanPath( albumartist );