Bug 133164 - Random album mode loops on multi-disk albums
Summary: Random album mode loops on multi-disk albums
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4-SVN
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 131418 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-29 05:15 UTC by Andrew Wang
Modified: 2007-10-09 07:08 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Proposed patch (1.31 KB, patch)
2007-07-11 03:12 UTC, Christoph Watzl
Details
(Supposedly) working version of the patch. (1.26 KB, patch)
2007-07-11 20:19 UTC, Christoph Watzl
Details
Working version of the patch (2.95 KB, patch)
2007-09-02 20:18 UTC, Siavosh Benabbas
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Wang 2006-08-29 05:15:46 UTC
Version:           1.4.1-r3 (using KDE KDE 3.5.4)
Installed from:    Gentoo Packages
Compiler:          gcc 4.1.1 -march=pentium4 -O2 -fomit-frame-pointer -momit-leaf-frame-pointer -pipe -frename-registers
OS:                Linux

I have an 2 disk album. In Random Album mode, it'll jump from track 1 of disk 1 to track 1 of disk 2, and then vice versa over and over again. The Playlist browser is smart enough to sort it correctly (all of disk one followed by all two), but the playback order doesn't recognize it as well.

How to reproduce:
- Turn on random album mode
- Tag your each CD of your 2-cd album with the "Disk Number" tag appropriately, and label the tracks from 1-10 and 1-10 (or something like that)
- Load up a 2 cd album, watch how it's displayed properly (1-10 followed by 1-10)
- Watch as it goes back and forth between the two Track 1's
Comment 1 Neil Skrypuch 2006-10-01 06:56:46 UTC
I can confirm this bug in 1.4.3.
Comment 2 Kevin Funk 2007-02-08 18:49:38 UTC
*** Bug 131418 has been marked as a duplicate of this bug. ***
Comment 3 Tijben 2007-05-02 01:29:04 UTC
I can also confirm this bug in 1.4.5.
Comment 4 Sven Müller 2007-07-01 12:29:06 UTC
Bug is still available in 1.4.6

But in my case it doesn't depend on a 2 CD Album. 

When I have e.g. only 2 or some more Songs that belong to one album, it also happens sometimes, that these Songs are played again and again. 
Comment 5 Sven Müller 2007-07-05 18:36:05 UTC
More specified:
The endless loop occures if you play the playlist in album random order and you play a couple of songs of one artist where the songs don't have an album entry.
Comment 6 Christoph Watzl 2007-07-11 03:12:16 UTC
Created attachment 21118 [details]
Proposed patch

I've investigated on this bug and found a fix. The problem was that with tracks
with duplicate track numbers within one album *), only one was added to the
list of tracks to play. 

*) The totality of tracks with a blank album name count as one album ;-)
Comment 7 Christoph Watzl 2007-07-11 20:19:52 UTC
Created attachment 21123 [details]
(Supposedly) working version of the patch.

Sorry, I just realized that I messed up when creating the diff.
To apply the patch, copy to you Amarok source folder and run `patch -p0 <
playlistitem.cpp.diff`.
Comment 8 Seb Ruiz 2007-07-15 11:24:24 UTC
Cristoph - I tried to apply the patch and it did not compile - did you test it? I presume it was just a typo and you removed one of the lines by accident.

I'm not going to commit this until you fix up the patch and have convinced me that you have tested the patch and it works :).

Once you've done that, no problems!
Comment 9 Christoph Watzl 2007-07-15 21:06:46 UTC
Hm, I must have messed with using diff, curiously, though, it seemed to work for me...  Please be patient with me, this is my first patch :-/
I'll fix and re-test it when I have access to my own computer again with the sources on it, which will probably be tomorrow evening.
Comment 10 Christoph Watzl 2007-07-15 21:08:53 UTC
Argh and yet another typo in the above comment ... where's the "edit"-button anyway? ;-)
Comment 11 Mark Kretschmann 2007-07-15 21:10:39 UTC
On 15 Jul 2007 19:06:46 -0000, Christoph Watzl
<christoph.watzl@gmail.com> wrote:
> Hm, I must have messed with using diff, curiously, though, it seemed to work for me...  Please be patient with me, this is my first patch :-/
> I'll fix and re-test it when I have access to my own computer again with the sources on it, which will probably be tomorrow evening.


Christian, from my experience it often works best to use "svn diff".
Never had problems with that.
Comment 12 Mark Kretschmann 2007-07-15 21:11:37 UTC
Sorry, I meant to write Christoph.
Comment 13 Siavosh Benabbas 2007-09-02 20:18:08 UTC
Created attachment 21533 [details]
Working version of the patch

I think the last proposed path is wrong; It doesn't change the
PlayListItem:prevInAlbum and PlayListItem:prevInAlbum and it doesn't check that
the disc numbers are the same when comparing the track numbers.
Note that (DiscNumber => 2, Track => 1) should be after (DiscNumber => 1, Track
2).
I am attaching a modified patch that I have tested (both going forward and
backwards, with previous track, in the playlist). This is against 1.4.7.
Comment 14 Seb Ruiz 2007-10-09 07:08:54 UTC
SVN commit 723237 by seb:

Fix random album mode with compilations. Patch thanks to Siavosh Benabbas. Sorry it took so long, I've been away.
BUG: 133164
CCMAIL: sbenabas@gmail.com
CCMAIL: amarok@kde.org


 M  +16 -4     playlistitem.cpp  


WebSVN link: http://websvn.kde.org/?view=rev&revision=723237