Deleting tracks from the model

Bart Cerneels bart.cerneels at kde.org
Mon Feb 16 10:34:15 CET 2009


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.

Bart


More information about the Amarok-devel mailing list