RFC on playlist redesign

Maximilian Kossick mkossick at gmx.de
Mon Apr 9 10:34:37 CEST 2007


On Monday 09 April 2007, Ian Monroe wrote:
> For those that haven't heard, Leo and I were accepted for Google
> Summer of Code. Leo is doing web services, I'm doing a playlist
> redesign.
>
> I put a brief outline on what I was thinking to do for the playlist
> redesign on the wiki:
> http://amarok.kde.org/wiki/Playlist_Redesign
>
> I'll copy and paste the relevant part:
> ==Playlist Refactor==
> *PlaylistModel - a simple class containing a list of tracks, currently
> playing track. Mostly there to be manipulated by the Controller, as
> well as other parts of Amarok that might want to add to the playlist.
> *PlaylistWidget - displays the playlist. We could have more then one
> type of widget for the playlist and swap between them, if only for
> experimentation.
> *PlaylistController - Maybe 'controller' isn't quite the right term.
> Basically it decides what to do when a track ends, so it should be an
> EngineObserver. An abstract class.
> **StandardPlay - play the next track. stop at the end of the playlist.
> **RandomMode - the various random modes. I think all the various
> random modes could be in one class.

This looks like the perfect use case for the GoF strategy pattern. While 
putting all the random modes in one class might be faster to implement, we 
should try very hard to avoid the if-else hell that Playlist::playNextTrack 
is now.

And StandardMode could be just an implementation of the strategy which isn't 
very random.

> **DyanmicPlaylist - removes tracks from the beginning, adds new tracks
> according to user rules at the end
>
> Now I know a few people have over the last couple of years planned on
> doing a playlist refactor. So I know some of you must have different
> or more fleshed-out ideas. I'm curious!
>
> Thanks,
> Ian Monroe
> _______________________________________________
> Amarok-devel mailing list
> Amarok-devel at kde.org
> https://mail.kde.org/mailman/listinfo/amarok-devel


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/amarok-devel/attachments/20070409/b62260cd/attachment.pgp 


More information about the Amarok-devel mailing list