[Amarok] 366dbe7 Fix SqlTrack playcount semantics towards LastFM/FM

Maximilian Kossick maximilian.kossick at googlemail.com
Wed Mar 24 16:51:10 CET 2010


On Wed, Mar 24, 2010 at 4:45 PM, Jeff Mitchell <mitchell at kde.org> wrote:
> On 3/24/2010 11:40 AM, Maximilian Kossick wrote:
>> Yes, the other place would be StatisticsProvider.
>>
>>
>> If it does not know about the lenght of the track yet, it needs to be
>> added (ideally by just delegating the call from Track to
>> StatisticsProvider instead of just forwarding it)
>
> By delegating do you mean moving finishedPlaying out of Track and into
> StatisticsProvider (which may impact other cleanup processes and may
> cause issues for e.g. proxycollection)? Or removing playcount logic from
> finishedPlaying, and follow up finishedPlaying with e.g. an
> updateStatistics call (containing the length of the track and the played
> fraction)? Or...?

No, I mean changing StatisticsProvider::played( double ) to played(
double, Meta::TrackPtr )

and using the track in played() to decide whether the statistics have
to be updated. You can just pass the length of the track to
StatisticsProvider::played(), but I like the other solution better


More information about the Amarok-devel mailing list