Framework for Playlists

Bart Cerneels bart.cerneels at gmail.com
Thu Aug 16 14:40:53 CEST 2007


Hi all

I've been pondering how to properly manage Meta::Playlists within
Amarok and I'm conflicted.

Most Playlists will contain Meta::Tracks that come from a Collection,
and those Playlists should be provided by the Collection.
When mediadevices are implemented as Collections (that is the plan
right), they will deliver the Playlists populated with tracks in it's
own Collection.
Dynamic and smart Playlists will not be created by a Collection but
will use Tracks from the available Collections.
These points suggest that adding Playlists to the Collection Framework
is a good idea. It seems to me there are technical hurdles though.
Everything in a collection is tight together using Tracks, there is no
way of going straight from Artist to Albums for instance, you have to
use a Track. So unless we add a Meta::PlaylistList to every Track
there is no easy way of querying for Playlists. There are other
problems to, like PodcastEpisodes and Streams showing up in the
CollectionBrowser unless they are specifically excluded.

Another way might be a PlaylistManager where portable devices,
internal functions, scripts, etc register Playlists they create. These
Playlists don't have to be tight to a Collection at all (but they have
to be able to use them) and so those Tracks won't pollute the
CollectionBrowser. I guess creating a PlaylistProvider abstract base
class is the way to do this, looks an awful lot like Collection
though.

I'm undecided about the best solution but I believe the #2 will be the
easiest to implement.

I'm sure you guys have ideas about this, let me hear them.

Stecchino


More information about the Amarok-devel mailing list