generic architecture for playlists

Bart Cerneels bart.cerneels at kde.org
Sun Jun 15 20:20:08 CEST 2008


Hi Max and other devs,

On Sun, Jun 15, 2008 at 3:45 PM, Maximilian Kossick
<maximilian.kossick at googlemail.com> wrote:
> Hi,
> after friday's discussion on playlists I sat down and wrote a patch
> that is my vision on how we should handle playlists in A2.
Thanks, we were kind of running in circles around each other and
splitting into tangents all the time.

> Couple of points:
> -Bart's playlistprovider does for playlists what collection does for
> tracks. it represents a source of playlists, think ipod or
> sqlplaylists (no need for a playlist querymaker though. there won't be
> thousands of playlists, so just load all of them at once)

> -playlists can be organised in folders. to avoid having to special
> case this for each playlistprovider, all playlistproviders will return
> playlistitems(which are the nodes in a tree). playlistitem should make
> it pretty easy to write a treemodel for playlists, or adapt the
> existing one.
Do you mean the grouping support Nikolaj has implemented now? i.e.
folders within a Category?

> -playlistitems can belong to categories, which allows playlistbrowser
> to organise them properly
I guess by categories you mean: UserPlaylist, Dynamic, Smart, ... But
yet you decided to remove the PlaylistCategory Enum in PlaylistManager
for the standard types. I meant to use this Enum for all things that
are in the PlaylistBrowser by default, for which Amarok has C++ code
for. A new Category can be added by scripts or plugins if they do not
fit the default Categories.

Is there some other way you wanted to implement that?

>
> open issues:
> -podcasts: at the moment, playlistitems leaves can be either
> playlists, smartplaylist or dynamicplaylists (also the last do not
> actually exist yet). i'm not yet sure how to best fit podcasts into
> this design yet.
PodcastChannel is a playlist and can be leave of playlistitem.

>
> i'll have to leave soon, and I still haven't been able to set up a
> development enviroment on my macbook, so here is a patch with the
> current work. hopefully somebody else will be able to finish it
> (mainly make amarok compile and adapt it to the new classes). it
> should be pretty painless to adapt the existing sqlPlaylist stuff to
> work with the new classes.

Thanks for the effort.
>
> feel free to send me an email if there are any questions/comments about it.
>
> cheers, max

Bart


More information about the Amarok-devel mailing list