Bug 249857

Summary: Albums with multiple disks not listed correctly (Ampache collection)
Product: [Applications] amarok Reporter: Matteo Agostinelli <agostinelli>
Component: Services/AmpacheAssignee: Amarok Developers <amarok-bugs-dist>
Status: RESOLVED FIXED    
Severity: normal CC: maps, msched, nhn
Priority: NOR    
Version: 2.5.0   
Target Milestone: 2.6   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In: 2.8
Sentry Crash Report:
Attachments: Screenshot of the problem

Description Matteo Agostinelli 2010-09-02 11:12:49 UTC
Version:           2.3.1 (using KDE 4.5.0) 
OS:                Linux

Albums that have multiple disks are not listed correctly in the collection browser when using a remote Ampache collection.

In my case I have an album which is divided in 3 disks. All the files have the same 'Album' tag, but have different 'Disk' tag. Here are a couple of tags to better show the situation:

TIT2 (Title/songname/content description): Easy
TPE1 (Lead performer(s)/Soloist(s)): Joanna Newsom
TALB (Album/Movie/Show title): Have One On Me
TCON (Content type): Folk (80)
TRCK (Track number/Position in set): 1/6
TPOS (Part of a set): 1/3

TIT2 (Title/songname/content description): On A Good Day
TPE1 (Lead performer(s)/Soloist(s)): Joanna Newsom
TALB (Album/Movie/Show title): Have One On Me
TCON (Content type): Folk (80)
TRCK (Track number/Position in set): 1/6
TPOS (Part of a set): 2/3

The problem is that in my collection browser I get only one disk repeated 3 times so it is impossible to get the other 2. In this particular case, I get disk 2 repeated three times under the author.

Reproducible: Always

Steps to Reproduce:
Add an album which is divided in multiple disks to an Ampache collection.

Actual Results:  
Only one disk is visible in the collection browser

Expected Results:  
All the disks should be present in the collection
Comment 1 Bernd Helm 2010-11-30 17:09:40 UTC
Created attachment 53898 [details]
Screenshot of the problem

as you can see on the screenshot, there are two albums called "Videodrom". these two albums repesent 2 disks.
on expanding, both albums get the content of the disk you expand first. guess it get cached by album name some way, so on the 2nd expand, the title list is NOT fetched from ampache.
Comment 2 Bernd Helm 2010-11-30 17:10:39 UTC
problem still present in lastes 2.4-GIT
Comment 3 Matteo Agostinelli 2011-06-09 13:59:52 UTC
Still present in 2.4.1
Comment 4 Bernd Helm 2011-06-09 15:19:50 UTC
(In reply to comment #3)
> Still present in 2.4.1

i can confirm. that is the most annoying bug in the ampache plugin, please fix!
Comment 5 msched 2012-01-31 22:18:03 UTC
Still not fixed in 2.5.0.
Comment 6 Ralf Engels 2013-01-29 13:39:19 UTC
Git commit 9ccf60b4862d645d2de87dfaf3e10e806e8efa72 by Ralf Engels.
Committed on 28/01/2013 at 19:57.
Pushed by rengels into branch 'master'.

Refactoring Ampache service

Eliminate duplicate code
Handle rating, year, disc number
Handle multiple Ampache albums mapping to one Amarok album
FIXED-IN: 2.8

M  +20   -0    src/services/ampache/AmpacheMeta.cpp
M  +31   -0    src/services/ampache/AmpacheMeta.h
M  +2    -0    src/services/ampache/AmpacheService.cpp
M  +393  -280  src/services/ampache/AmpacheServiceQueryMaker.cpp
M  +17   -12   src/services/ampache/AmpacheServiceQueryMaker.h

http://commits.kde.org/amarok/9ccf60b4862d645d2de87dfaf3e10e806e8efa72