Bug 260973

Summary: JJ: Inconsisten view of the track numbering in collection browser and playlist
Product: [Applications] amarok Reporter: Ravi Arora <ra.ravi.rav>
Component: generalAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: minor CC: bhargav.1191
Priority: NOR Keywords: junior-jobs
Version: 2.3.90   
Target Milestone: 2.4.0   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.4.1
Attachments: Collection browser showing track number with dots
Playlist showing track numbers with dashes

Description Ravi Arora 2010-12-22 14:00:15 UTC
Created attachment 55158 [details]
Collection browser showing track number with dots

Version:           2.3.90 (2.4 beta 1) (using KDE 4.5.85) 
OS:                Linux

The track numbers in collection browser are shown with a dot e.g. '1.' , but in the playlist they are shown with a dash as '1 - ' .

This inconsistency looks a bad.

Reproducible: Always

Steps to Reproduce:
Add some tracks with track number in ID tags. Add these to collection. Then add these to playlist.

Actual Results:  
As in details.

Expected Results:  
In both the cases the track number should be followed by a dot or a dash at the same time.

It will be great if Amarok allows to use custom fields for collection, playlist and OSD. e.g.

%t - title
%a - Album name
%n - Track number

<just an example>
Comment 1 Ravi Arora 2010-12-22 14:01:04 UTC
Created attachment 55159 [details]
Playlist showing track numbers with dashes
Comment 2 Myriam Schweingruber 2010-12-22 16:45:17 UTC
It should be consistent indeed. Marking this as Junior Job.
Comment 3 Bhargav Mangipudi 2011-01-15 15:40:31 UTC
Have submitted a patch to reviewboard at http://git.reviewboard.kde.org/r/100394/ for making the display consistent.
Comment 4 Mark Kretschmann 2011-01-16 10:25:44 UTC
commit 9207a402b7a62f1e76cd8717afe55806f3c2406e
branch master
Author: Mark Kretschmann <kretschmann@kde.org>
Date:   Sun Jan 16 10:22:29 2011 +0100

    Fix minor inconsistency in the Collection view.
    
    Patch by Bhargav Mangipudi <bhargav.1191@gmail.com>.
    
    BUG: 260973

diff --git a/ChangeLog b/ChangeLog
index 70b34aa..c13d326 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,8 @@ VERSION 2.4.1
   CHANGES:
 
   BUGFIXES:
+    * Fixed minor inconsistency in the Collection view. Patch by 
+      Bhargav Mangipudi <bhargav.1191@gmail.com>. (BR 260973)
     * Fixed potential crash with the Similar Artists applet. Thanks to 
       Tuomas Nurmi <tuomas@norsumanageri.org> for the patch. (BR 263145)
     * Fixed 'Scale Font' option in OSD options for OSD preview widget.
diff --git a/src/browsers/CollectionTreeItemModelBase.cpp b/src/browsers/CollectionTreeItemModelBase.cpp
index 7e76866..4124cad 100644
--- a/src/browsers/CollectionTreeItemModelBase.cpp
+++ b/src/browsers/CollectionTreeItemModelBase.cpp
@@ -230,7 +230,7 @@ CollectionTreeItemModelBase::dataForItem( CollectionTreeItem *item, int role, in
                 {
                     int trackNum = track->trackNumber();
                     if( trackNum > 0 )
-                        name.prepend( QString("%1. ").arg(trackNum) );
+                        name.prepend( QString("%1 - ").arg(trackNum) );
                 }
 
                 // Check empty after track logic and before album logic