Version: SVN (using KDE 4.1.3) Installed from: Ubuntu Packages Services such as Ampache, MP3tunes, and scriptable service like BBC and NPR do not correctly handle artists names that begin with "The" "The Doobie Brothers" should be up under D not T
*** Bug 177801 has been marked as a duplicate of this bug. ***
*** Bug 191063 has been marked as a duplicate of this bug. ***
My bug has been marked as duplicate, but I described something different (perhaps it is related implemention-wise): When I drag songs from the collection browser or the file list to the playlist, the sorting is wired and unpredictable. It is even a difference whether I drag a folder to the list or browse into that folder and drag all of the files. And I get a different playlist whether I drag the header of my collection or select all artists and drag them - and neither of the two playlists are sorted by artist, album or whatever.
(In reply to comment #3) Well, then you should be a tad more clear in your report, as you are mixing in at least three different things. Please, report one item per bug only, else it's getting too complicated. What about dotted lists? Might be clearer than one single paragraph. Just my 2 cents...
It's hard to know what is related and what not (so, what should get into a separate report) without knowing the source. Besides, I have no real clue what happens, just that it is strange (so the summary line is basically everything which is sure). I'll try to clarify in the other report.
Any news on this?
Changing target
commit 24da2657f2f339a09bdc26e8c9a615349bb8f627 Author: Maximilian Kossick <maximilian.kossick@googlemail.com> AuthorDate: Fri Dec 25 22:24:56 2009 +0100 Commit: Maximilian Kossick <maximilian.kossick@googlemail.com> CommitDate: Thu Jan 7 09:04:05 2010 +0100 correctly sort artists starting with 'The' in services as well. BUG: 176670 diff --git a/src/collection/sqlcollection/SqlMeta.cpp b/src/collection/sqlcollection/SqlMeta.cpp index 768d933..044ef97 100644 --- a/src/collection/sqlcollection/SqlMeta.cpp +++ b/src/collection/sqlcollection/SqlMeta.cpp @@ -988,21 +988,6 @@ SqlArtist::albums() return AlbumList(); } -QString -SqlArtist::sortableName() const -{ - if ( m_modifiedName.isEmpty() && !m_name.isEmpty() ) { - if ( m_name.startsWith( "the ", Qt::CaseInsensitive ) ) { - QString begin = m_name.left( 3 ); - m_modifiedName = QString( "%1, %2" ).arg( m_name, begin ); - m_modifiedName = m_modifiedName.mid( 4 ); - } - else - m_modifiedName = m_name; - } - return m_modifiedName; -} - bool SqlArtist::hasCapabilityInterface( Meta::Capability::Type type ) const { diff --git a/src/collection/sqlcollection/SqlMeta.h b/src/collection/sqlcollection/SqlMeta.h index f19315d..7a3a2a0 100644 --- a/src/collection/sqlcollection/SqlMeta.h +++ b/src/collection/sqlcollection/SqlMeta.h @@ -223,7 +223,6 @@ class SqlArtist : public Meta::Artist virtual QString name() const { return m_name; } virtual QString prettyName() const { return m_name; } //change if necessary - virtual QString sortableName() const; void updateData( SqlCollection* collection, int id, const QString &name ); @@ -247,7 +246,6 @@ class SqlArtist : public Meta::Artist ArtistCapabilityDelegate *m_delegate; QString m_name; int m_id; - mutable QString m_modifiedName; bool m_tracksLoaded; Meta::TrackList m_tracks; bool m_albumsLoaded; diff --git a/src/meta/Meta.cpp b/src/meta/Meta.cpp index 98b4c50..765ea1b 100644 --- a/src/meta/Meta.cpp +++ b/src/meta/Meta.cpp @@ -381,6 +381,21 @@ Meta::Artist::operator==( const Meta::Artist &artist ) const return dynamic_cast<const void*>( this ) == dynamic_cast<const void*>( &artist ); } +QString +Meta::Artist::sortableName() const +{ + if ( m_sortableName.isEmpty() && !name().isEmpty() ) { + if ( name().startsWith( "the ", Qt::CaseInsensitive ) ) { + QString begin = name().left( 3 ); + m_sortableName = QString( "%1, %2" ).arg( name(), begin ); + m_sortableName = m_sortableName.mid( 4 ); + } + else + m_sortableName = name(); + } + return m_sortableName; +} + //Meta::Album void diff --git a/src/meta/Meta.h b/src/meta/Meta.h index 4d18aa3..0937263 100644 --- a/src/meta/Meta.h +++ b/src/meta/Meta.h @@ -306,8 +306,13 @@ namespace Meta virtual bool operator==( const Meta::Artist &artist ) const; + virtual QString sortableName() const; + protected: virtual void notifyObservers() const; + + private: + mutable QString m_sortableName; }; class AMAROK_EXPORT Album : public MetaBase