Bug 128405 - random album mode acts funny when albumless tracks are played
Summary: random album mode acts funny when albumless tracks are played
Status: RESOLVED UNMAINTAINED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.5
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 132895 138656 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-06-01 03:14 UTC by Simon80
Modified: 2009-03-19 20:40 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Adds indexInAlbum to class PlaylistItem to prevent track scrolling. (2.01 KB, patch)
2006-10-04 05:36 UTC, William Poetra Yoga Hadisoeseno
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Simon80 2006-06-01 03:14:06 UTC
Version:           1.4.0 (using KDE 3.5.2, Gentoo)
Compiler:          Target: i686-pc-linux-gnu
OS:                Linux (i686) release 2.6.16-gentoo-r7

I have some tracks in my playlist that have the same artist, and no album tag.  When one of these is played while in random album mode, amarok will each track in the group after the one that was played, loop back to the first track in the group, and repeat this cycle perpetually.  If there is only one albumless track with a certain artist tag, then this will not happen when that track is played.
Comment 1 Neil Skrypuch 2006-10-01 07:03:48 UTC
I can confirm this bug in 1.4.3. If Amarok stumbles upon >1 albumless tracks by the same artist in random album order, it will keep looping over those tracks forever.
Comment 2 Philip Rodrigues 2006-10-01 12:06:25 UTC
*** Bug 132895 has been marked as a duplicate of this bug. ***
Comment 3 Philip Rodrigues 2006-10-01 12:07:43 UTC
See 132895 for a bit more analysis and a possible patch. I think the same happens when the album has no track numbers
Comment 4 William Poetra Yoga Hadisoeseno 2006-10-04 05:33:35 UTC
Actually, it happens not when the album string is empty, but when the tracks have no tracknumbers. You can confirm this by printing the current album list in playNextTrack(), which will show something like this:

1. track1-title
2. track2-title
3. track3-title
4. track4-title

then if you wait for about 5 secs before pressing "Next", or waiting for the whole track to finish playing, you'll get:

1. track2-title
2. track3-title
3. track4-title
4. track1-title

and so on. This means that: The tracks _scroll_ and amaroK perpetually thinks it's playing the 1st track on the album, so it just loops there. The scrolling is caused by the code
    m_album->tracks.removeRef( this );
in decrementTotals(), and then
    m_album->tracks.append( this );
in incrementTotals().

But if you quickly & repeatedly press the "Next" button, amaroK will go through the album just as expected. I'm  not sure, but I think this is because there's not been enough time for the track to get removed from the list and then added again, as in decrementTotals() and incrementTotals().

Anyway, I have a fix now. This is a kludge, but since I'm not that familiar with amaroK, I hope the developers would try to find another way to fix it (if my patch is considered good then please accept it ^_^)
Comment 5 William Poetra Yoga Hadisoeseno 2006-10-04 05:36:11 UTC
Created attachment 18004 [details]
Adds indexInAlbum to class PlaylistItem to prevent track scrolling.

This is a kludge, but at least it works.
Comment 6 Philip Rodrigues 2006-12-11 22:57:28 UTC
*** Bug 138656 has been marked as a duplicate of this bug. ***
Comment 7 Ron Eggler 2006-12-12 02:43:13 UTC
confirm this bug in  1.4-SVN-0611301953. it's time for this patch(or anoth one) find its way in the Amarok code, isn't it?
*Patch not applied yet*
Comment 8 barsoap 2007-06-29 16:52:49 UTC
Just wanted to remind you guys of this one, looking at the dates it seems to have escaped your attention.
Comment 9 rwxr-xr-x 2007-11-20 16:38:50 UTC
Yeah, this bug is still in the latest SVN. It annoys me to no end because I have a lot of mp3s from http://ocremix.org (which also happens to be their album name) but with no track numbers, of course. Every time random album mode hits one of those it gets stuck in a cycle.
Comment 10 Myriam Schweingruber 2009-03-19 20:40:03 UTC
We are sorry, but Amarok 1.x is not maintained anymore