[mythtv] [PATCH] Playlist feature UI tweaking

Kevin Kuphal kuphal at dls.net
Thu Jan 27 11:58:14 EST 2005


Chris Pinkham wrote:

>>            i = (int)(1.0 * playList.count() * rand() / (RAND_MAX + 1.0));
>>            it = playList.at(i);
>>    
>>
>Won't this always play the list in random order in playSelected?  The reason
>for the temporary randomList in doPlayListRandom(), was because sometimes
>you want to specify the playback order and sometimes you want random order.
>If the problem is the reference copy, maybe the solution is to just make
>a loop copying randomList to playList in doPlayListRandom rather than just
>setting playList = randomList.
>
I thought about the same thing after I posted that and what I've done is 
make a playSelectedPlaylist function that takes a boolean to do random 
or not.  If it is random it does the above and if not, it just walks up 
the playlist from the beginning leaving i = 0 to zero all the time and 
dropping the played items from the playlist after each play so that the 
playList.at(0) changes each iteration through.  The playlist Play and 
Shuffle buttons call new doPlayList and doPlayListRandom which call the 
playSelectedPlaylist with the boolean as false or true respectively.

I think it should work but I'll test it tonight.

Kevin


More information about the mythtv-dev mailing list