Deleting tracks from the model

Ian Monroe ian.monroe at gmail.com
Mon Feb 16 18:26:55 CET 2009


On Mon, Feb 16, 2009 at 3:34 AM, Bart Cerneels <bart.cerneels at kde.org> wrote:
> On Sun, Feb 15, 2009 at 9:33 PM, Maximilian Kossick
> <maximilian.kossick at googlemail.com> wrote:
>> On Sun, Feb 15, 2009 at 4:13 PM, Ian Monroe <ian.monroe at gmail.com> wrote:
>>> On Sun, Feb 15, 2009 at 8:01 AM, Casey Link <unnamedrambler at gmail.com> wrote:
>>>> Hey Devs,
>>>>
>>>> So, deletion is finally implemented for the local collection, however
>>>> the tracks are not removed from the Collection Tree View/Model until a
>>>> rescan is performed. Does anyone have an idea about how to go about
>>>> removing the tracks from the model?
>>>
>>> Just off the top of my head: run the SQL to delete it from the
>>> collection database and then reset the view.
>>
>> Which is what should be happening already. I agree with Ian, just
>> delete them from the database and emit updated(). If that doesn't do
>> the trick there's a bug that has to be fixed.
>>
>
> We are being pretty inefficient this way, certainly for large
> collections. Isn't there a way to delete the individual item from db
> and update only the affected row in the model/view?
>
> And at the moment the Collection tree still collapses when updated.
> Very annoying in combination with this topic, but a bug that has to be
> fixed regardless.

For me it collapses whether or not there was anything to update. Very
annoying. I traced out the code a couple weeks ago, its all pretty
complicated.

But yea its entirely possible for the model to be more specific about
what is being changed, and probably isn't that hard in the case of
deleted tracks.


More information about the Amarok-devel mailing list