Bug 222129 - Problem with "search Playlist" and "Track Progression:Random Tracks"
Summary: Problem with "search Playlist" and "Track Progression:Random Tracks"
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 2.3-GIT
Platform: openSUSE Linux
: NOR normal
Target Milestone: 2.3.0
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-01-10 22:18 UTC by God666
Modified: 2010-03-17 16:04 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description God666 2010-01-10 22:18:35 UTC
There is a problem with Amarok if you search the playlist while using Track Progression: Random Tracks.

1: I am using the Track Progression: Random Option and then search the playlist so that only a few of the songs get shown. (I have over 2000 songs in the playlist and let me show only say 20). If now one song ends and some random song from the (by search) restricted playlist should start then instead amarok stops and also won't start again when you press the play buttom. 

2: Furthermore, if you search for some songs (always assuming random  track progression) and then start one of the songs Amarok will again stop after the song finishes and also won't start again by pressing the play buttom.

3: Also if you restrict your playlist by searching for some songs and then switch from random track progression to normal mode and then again to random tracks. If you now derestrict your playlist by erasing the search so that now all the songs should be played again, then Amarok still only plays songs which where found in the previous search.

So I think the problem is that if you use random track progression then amarok makes a random playlist which he doesn't update if you alter your playlist using the search option. This would certainly explain the third problem, but also the first and second Problem: Amarok tries to use his not updated list, but because the songs he wants to play are not on the playlist he won't play them and simply stops. 

This solution is also supported by the following observation: If you restrict your playlist, say 100 items, by using the the search to say 20 items and repeatedly press forward then sometimes amarok skips to some new song and sometimes he doesn't. If the problem is a playlist which doesn't get updated if it is restricted this explains easily the observation: Amarok skips to the next song only if the new song which he wants to play is on the restricted playlist and otherwise continues with the song he plays because he can't jump to the new song.

Furthermore some point for the wishlist (I use the search playlist often): In the former Amarok version you could use commands like OR in the search to get for example the albums from two bands. It would be nice to have it back. Furthermore in former versions if you shutted amarok down and then restarted again he knew your last search and you got the same playlist as before you shutted it down. Now the search is empty. It would be nice if amarok also remembers the last search after restarting.
Comment 1 Teo Mrnjavac 2010-01-10 23:43:52 UTC
I'm currently working on some playlist stuff that should fix several issues similar to this one, I'll keep your report in mind while testing.

Also in the future please file one report per issue rather than condensing multiple issues in one report. This would make it easier for us to triage and work on them independently.
Comment 2 Alex Richardson 2010-01-13 12:07:07 UTC
I can confirm this bug with amarok 2.2.2 from openSuSE repositories. It seems random playback uses the full playlist and not the filtered one, so you only sometimes get a next song.
Comment 3 Nikolaj Hald Nielsen 2010-03-17 16:04:48 UTC
commit ca11abf622c59ef3d0ec06eca38970e75b95855d
Author: Nanno Langstraat <langstr@gmail.com>
Date:   Tue Mar 16 17:01:37 2010 +0100

    Playlist navigators: refactor based on the new 'NonlinearTrackNavigator' and 'AlbumNavigator'.
    
    Benefits:
      - This is the proper fix for BUG 229226 / 222129.
    
      - Fixes the bug reported in http://mail.kde.org/pipermail/amarok-devel/2010-March/006649.html
    
      - Back/forward in history now works well for all navigators.
    
      - History doesn't get deleted when end of playlist is reached.
    
      - RandomTrackNavigator: no longer a chance of repeating recent tracks when end of
        playlist is crossed.
    
      - Get rid of huge swathes of (near-)duplicated code.
    
      - Uses standard Qt signals, opening the way to getting rid of the redundant (and
        thereby bug-causing) 'insertedIds' signal and its friends.