extragear/multimedia/amarok/src

Casey Link unnamedrambler at gmail.com
Wed Oct 15 23:21:48 CEST 2008


On Wed, Oct 15, 2008 at 5:13 PM, Seb Ruiz <ruiz at kde.org> wrote:
> 2008/10/16 Soren Harward <stharward at gmail.com>:
>> SVN commit 871785 by stharward:
>>
>> Load Service-associated tracks properly on startup
>>
>> If the playlist is saved with tracks from a Service in it (eg, tracks
>> from Magnatune) when Amarok is closed, we want those tracks to be
>> properly reloaded when Amarok restarts.  This means that the
>> ServicePluginManager has to be loaded before PlaylistModel reloads the
>> tracks, so that ServicePluginManager can register as a TrackProvider for
>> service-related tracks.  This patch forces ServicePluginManager to be
>> loaded before tracks are restored into the playlist.
>
> Excuse me if I am being presumptuous by not actually reading this
> patch or by being ignorant in the services area, but... ;)
>
> I recall that during Akademy Casey was working on getting service
> tracks in the playlist to load using a MetaProxy, which would
> automatically update the Playlist track when the required meta
> information was available. The idea was to lazy load the services as
> required after application startup, as they may be blocking and/or
> severely penalise startup times.
>
> Has this workflow changed?
>
> Thanks for clarification,
> Seb


Not exactly.

The workflow is still the same, however Soren's new playlist code
broke an earlier step a step in the workflow that comes before what I
was working (and still am) at Akademy.

The workflow goes like this:

(1) Amarok Start ->
(2) Service initiation started (in a separate thread) ->
(3) Playlist Loads the previous session's playlist  by calling trackForUrl ->
(4) the service Factory catches the trackForUrl Request and returns a
MetaProxy::Track->
(5) All Services finish loading ->
(6) the _real_ trackForUrl is called ->
(7) The MetaProxy::Track is updated with the real information

I'm responsible for steps 4 - 7.  Soren broke 2 by putting 3 before 2,
this patch fixes that.

/me hopes that was clear

Casey


More information about the Amarok-devel mailing list