Bug 252790 - Collection Browser won't show artist names for various artists tracks
Summary: Collection Browser won't show artist names for various artists tracks
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Collection Browser (show other bugs)
Version: 2.3.2
Platform: Arch Linux Linux
: NOR wishlist
Target Milestone: 2.4.0
Assignee: Peter C. Ndikuwera
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-29 20:17 UTC by Johannes Koßler
Modified: 2010-10-02 11:19 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.4


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Koßler 2010-09-29 20:17:54 UTC
Version:           2.3.2 (using KDE 4.5.1) 
OS:                Linux

In the Various Artists section of the collection browser (in Artist/Album mode), you have no way to see the tracks' artists.

Reproducible: Always

Steps to Reproduce:
Open the collection browser, set it to Artist/Album mode and open a album entry in the "Various Artists" section.

Actual Results:  
You see tracks in the format "<track number> - <title>" — with no way to see the artist.

Expected Results:  
You should see tracks in the format "<track number> - <artist> - <title>".
Comment 1 Myriam Schweingruber 2010-09-30 09:14:37 UTC

*** This bug has been marked as a duplicate of bug 208876 ***
Comment 2 Johannes Koßler 2010-09-30 16:59:14 UTC
I don't think that's the same bug at all. Bug 208876 is about the Albums applet not showing certain artist names (the applet normally shows them for compilations). This bug is about the Collection Browser (i.e. the sidebar) not showing any artist names (that's why this is a wish). This is not about the Albums applet.
Comment 3 Myriam Schweingruber 2010-09-30 19:51:37 UTC
It is exactly the same bug, see this comment https://bugs.kde.org/show_bug.cgi?id=208876#c2
Comment 4 Peter C. Ndikuwera 2010-09-30 20:42:58 UTC
This isn't a duplicate. I'm posting a fix for this to the review board.
Comment 5 Peter C. Ndikuwera 2010-10-02 07:15:15 UTC
commit b813a0ed840f5fb12af6cca2faea147d52606902
Author: Peter C. Ndikuwera <pndiku@gmail.com>
Date:   Sat Oct 2 08:12:19 2010 +0300

    Collection Browser should show artist names for compilations
    
    BUG: 252790

diff --git a/src/browsers/CollectionTreeItem.cpp b/src/browsers/CollectionTreeItem.cpp
index 10fb1fc..b390900 100644
--- a/src/browsers/CollectionTreeItem.cpp
+++ b/src/browsers/CollectionTreeItem.cpp
@@ -158,6 +158,11 @@ CollectionTreeItem::data( int role ) const
             Meta::TrackPtr track = Meta::TrackPtr::dynamicCast( m_data );
             QString name = track ? track->fixedName() : m_data->fixedName();
 
+            if ( track && track->album()->isCompilation() )
+            {
+                name.prepend( QString("%1 - ").arg(track->artist()->prettyName()) );
+            }
+
             if( AmarokConfig::showTrackNumbers() && track )
             {
                 int trackNum = track->trackNumber();