Design overview: PlaylistManager

Bart Cerneels bart.cerneels at kde.org
Sun Apr 26 13:56:34 CEST 2009


On Sun, Apr 26, 2009 at 1:26 PM, Bart Cerneels <bart.cerneels at kde.org> wrote:
> This is an overview of the
> PlaylistManager/Meta::Playlist/Synchronization in Amarok as a
> preparation for the Amarok DevSprint in Berlin, May 1.
>
> Classes (function):
> - Meta::Playlist (abstract base of all playlists)
> - PlaylistManager (Facility for managing PlaylistProviders registered
> by other parts of the application, plugins or scripts)
> - PlaylistProvider (abstract base that gives playlists, description
> and friendlyname for once playlist category)
>
> Related classes in browsers/playlistbrowser not covered in this overview
> - PodcastCategory/PodcastModel
> - PlaylistCategory/UserPlaylistModel
> - PlaylistsInGroupsProxy
> ...
>
> Next mail: functional overview
>
> Bart
>

Functional overview:

*PlaylistManager

During startup, plugin loading or script execution a PlaylistProvider
gets initialized and registered with the PlaylistManager.
During registration a Provider gets assigned to a certain playlist Category.
There are a number of Categories defined:
enum PlaylistCategory
        {
            CurrentPlaylist = 1,
            UserPlaylist,
            PodcastChannel,
            Dynamic,
            SmartPlaylist,
            Custom
        };
CurrentPlaylist: (unused) gives access to the current list of tracks
in The Playlist.

UserPlaylist: manually created by the user in Amarok, his iPod, on
Ampache, Last.fm, ...

PodcastChannel: An auto-updating playlist based on an rss feed.
PodcastEpisodes are derived from Meta::Track

Dynamic & SmartPlaylist: (unused) all the auto-generated playlists
based on statistics, recommendations, ... i.e. Biases

Custom: (unused) offset in the enum used for dynamically registered classes.

Each Category has a translated user-friendly name to identify the type
of playlist.
Using "int PlaylistManager::registerCustomCategory( const QString
&name )" new Categories can be created by scripts and plugins.

*PlaylistProvider

-> next mail


More information about the Amarok-devel mailing list