Bug 241430

Summary: Collection browser cannot distinguish tracks with same names in merged view
Product: [Applications] amarok Reporter: msched
Component: Collection BrowserAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED WAITINGFORINFO    
Severity: minor CC: amihere007, antti.poikela, davech, jjelbrujo, maddiemadan, mitchell
Priority: NOR    
Version: 2.6-git   
Target Milestone: ---   
Platform: Ubuntu   
OS: Linux   
Latest Commit: Version Fixed In: 2.8
Sentry Crash Report:

Description msched 2010-06-11 15:32:08 UTC
Version:           2.3.1 (using KDE 4.4.2) 
OS:                Linux

When an album has two tracks with identical track titles, it only appears once, without track index.

Reproducible: Always

Steps to Reproduce:
Create an album (FLAC format, not testet with other file formats). Create two tracks with the same title but different track indexes.

Actual Results:  
Collection browser shows only one of the two tracks, doesn't show (either) track index. Track can be dragged to playlist, not visible which of the two files is played. The tag editor for this collection entry behaves like editing *one* track (no prev/next buttons) and shows all tags except track index.

Expected Results:  
Two tracks with same title but different index should be treated the same way as two tracks with different titles.
Comment 1 Myriam Schweingruber 2010-06-23 13:22:42 UTC
*** Bug 242585 has been marked as a duplicate of this bug. ***
Comment 2 Myriam Schweingruber 2010-06-23 13:23:12 UTC
*** Bug 242434 has been marked as a duplicate of this bug. ***
Comment 3 Myriam Schweingruber 2010-06-23 13:23:33 UTC
Confirmed by duplicates.
Comment 4 Jeff Mitchell 2010-07-01 22:32:40 UTC
I tried this with MP3s and have no such problem, with current Amarok Git. I literally copied a file and gave it a different file name (changing only the track number) and changed the track number in the tag. Everything worked as expected. Does this only affect FLAC?
Comment 5 msched 2010-07-01 22:52:00 UTC
Just tested, happens with MP3s as well (2.3.1).
Comment 6 Jeff Mitchell 2010-07-02 15:48:23 UTC
Please provide a link where I can download files showing this behavior. You can email the link to me privately if you wish (but please do not email me the files). I can't reproduce it here, and if I can't reproduce it there's not much chance I can solve it.
Comment 7 msched 2010-07-02 18:39:03 UTC
Here you go:

http://marian.musgit.com/temp/amarok_241430/file1.ogg
http://marian.musgit.com/temp/amarok_241430/file2.ogg

Both files are identical, it's the KDE login sound with modified tags.

Tags are:

Artist: Demo Artist
Album: Demo Album
Title: Demo Track
Track: 1 (file1), 2 (file2)

Bug seems to be format independent, but if you like, I can also produce MP3 of FLAC demos.
Comment 8 Jeff Mitchell 2010-07-02 19:47:33 UTC
I downloaded these tracks to an otherwise empty folder, and started Amarok, which scanned that folder (as it's part of my collection).

Both tracks appear, I can add each to the playlist, and both are playable.
Comment 9 Petr Zmek 2010-07-02 20:52:37 UTC
Hi,

you can download the songs this bug is reproducible with from http://amihere.shacknet.nu/dokumenty/songs.tar.gz. They are the songs I mentioned in the bug https://bugs.kde.org/show_bug.cgi?id=242434. All of them are mp3 with the same coding.

Petr
Comment 10 msched 2010-07-04 02:55:49 UTC
Interestingly, I just noticed that while the collection browser still refuses to show two tracks, even after updating & rescanning the collection, the "Recently added albums" widget actually separates the two tracks correctly.
Comment 11 Jeff Mitchell 2010-07-04 15:30:47 UTC
Have you tried closing Amarok and reopening it after scanning?

There are lots of collection browser caching problems.
Comment 12 msched 2010-07-04 15:42:41 UTC
I restart Amarok every day, and I've noticed this bug for week (i.e. restarts did nothing to change the listing of albums with this problem). I did restart Amarok immediately after the rescan, too. In fact, when adding the tracks to the collection, I had to restart Amarok a few times until they would show up at all - I don't normally have this problem when ripping CDs directly to my collection directories, those are recognised correctly.

(On a side note, I regret trying the rescan - it trashed all the cover art that hadn't yet been copied to the file system by copycover)
Comment 13 Jeff Mitchell 2010-07-04 17:58:53 UTC
Using the songs in Comment #9, they all show up perfectly well for me.

Can you guys give details of what distribution you're using? This might be some distro-specific problem.
Comment 14 Petr Zmek 2010-07-04 18:05:39 UTC
Hi,

I use Fedora 12 x86_64, KDE 4.5 RC1. If you need more info (libraries versions, etc., I have not idea what you can need), write me. 

Petr
Comment 15 msched 2010-07-04 23:01:09 UTC
Kubuntu Lucid Lynx, i386 version, with Amarok 2.3.1 and KDE SC 4.4.4 both fetched from the Kubuntu Backports PPA.
Comment 16 Myriam Schweingruber 2010-07-04 23:48:56 UTC
Not a Kubuntu problem, it works perfectly well here, all tracks from comment #9 show correctly, using Kubuntu 10.04 with KDE SC 4.5 RC 1, Amarok 2.3.1-git
Comment 17 Myriam Schweingruber 2010-07-10 20:08:01 UTC
Thank you for the feedback.
Comment 18 Antti Poikela 2010-08-17 19:36:33 UTC
I can reproduce this (both with files from #9 and with my own files) when using external MySQL database. I wasn't able to reproduce when not using MySQL.

Steps to reproduce:
1. Enable external MySQL database in configuration
2. In the configuration, set the collection so that it includes the test files
3. Select "Fully Rescan Entire Collection"

As a result, the media sources contains tracks in the way described in the bug report.
Comment 19 Jeff Mitchell 2010-08-17 20:26:15 UTC
(In reply to comment #18)
> I can reproduce this (both with files from #9 and with my own files) when using
> external MySQL database. I wasn't able to reproduce when not using MySQL.
> 
> Steps to reproduce:
> 1. Enable external MySQL database in configuration
> 2. In the configuration, set the collection so that it includes the test files
> 3. Select "Fully Rescan Entire Collection"
> 
> As a result, the media sources contains tracks in the way described in the bug
> report.

I just tried this again with a fully empty (dropped and recreated) external database. I have one folder selected in the collection, which contains only the file1.ogg and file2.ogg files from above. 

When the files are scanned in, they show up under Demo Artist, Demo Album, and as "1 - Demo Track" and "2 - Demo Track".
Comment 20 Antti Poikela 2010-08-17 22:07:53 UTC
Upon further investigation I found out that the "Merged View" option in Media Sources panel causes this behaviour for me.

If I turn the merged view off, all tracks are displayed independently (no rescan needed or anything). When turning merged view back on, the tracks are merged into one entry.

I can use the player without the merged view, so this is no longer an issue for me. However, unless I am mistaken, this is not the intended behaviour even when the merged view is enabled.
Comment 21 msched 2010-09-08 00:12:21 UTC
Good catch. I can confirm the problem only occurs in merged view mode. Not a huge problem anymore for me, though it would be nice to see it fixed; I like using merged view as it removes the useless "header bars" for empty devices from my collection pane.
Comment 22 Myriam Schweingruber 2010-09-08 13:51:03 UTC
So this is not a database issue, but a display problem in the collection browser. Adapted title and component.
Comment 23 Myriam Schweingruber 2011-10-11 11:17:11 UTC
Is this report still valid with Amarok 2.4.3 or the current git version?
Comment 24 Myriam Schweingruber 2011-11-07 12:12:11 UTC
Still reproducible.
Comment 25 Mayank Madan 2012-11-30 13:42:38 UTC
Still reproducible in v2.6.0-421-gf66a306
Comment 26 Myriam Schweingruber 2013-04-11 09:05:47 UTC
Is this still valid with Amarok 2.7 or current git? There has been quite some code changes since 2.6
Comment 27 Myriam Schweingruber 2013-05-22 11:19:48 UTC
Any news on this? Please test with Amarok 2.7.1 and provide feedback ASAP.
Comment 28 Myriam Schweingruber 2013-07-21 23:21:55 UTC
I can't reproduce this at all with Amarok v2.7.90-53-gbf655f7

Most likely fixed as a side-product of other work in the local collection code
Comment 29 Dave 2015-11-06 10:29:32 UTC
This is still reproducible in 2.8.0
Comment 30 Myriam Schweingruber 2015-11-06 13:43:02 UTC
Please test with Amarok 2.9 beta
Comment 31 Dave 2015-11-06 22:41:56 UTC
I misread the original comment. The problem I am having is with different files with the same artist and title but no track number or album name being merged. Maybe this should be another bug