recognizing changes in files
Mark Kretschmann
kretschmann at kde.org
Thu Jan 1 13:48:26 UTC 2009
On Thu, Jan 1, 2009 at 2:39 PM, Dr. Diesel <dr.diesel at gmail.com> wrote:
>>>> Amarok detects collection changes by detecting changed directory
>>>> "mtime" values. To get a certain directory rescanned (if it doesn't
>>>> happen automatically), just "touch" (Unix command) the parent
>>>> directory, and then click "Update Collection".
>>>
>>> AFAIK mtime (modify time) of a directory is only changed if a file is
>>> added or removed. If file content changed none of the parent
>>> directory's times are changed (At least on my system). Only file times
>>> are changed.
>>
>> Yes, our system isn't perfect, but "good enough" for most common
>> cases. We haven't changed the system from Amarok 1; it's basically
>> still working the same way in Amarok 2, because it worked out pretty
>> well for most users.
>>
>> Ideally we would track the mtime of each file in the collection, but
>> this would simply have too much impact on performance.
>
> Agreed. Given that nothing is ever static and there is more than one
> way for changes to happen without being "noticed", how about a super
> low speed collection crawler?
Well, in the future we might simply let Strigi/Nepomuk do the actual
scanning. These are new KDE 4 components for desktop file scanning,
similar to Beagle.
In fact we already have an experimental "Nepomuk Collection", which
was implemented as a SoC project by Daniel Winter. Currently this
isn't really usable yet, but maybe one day it might become a viable
option.
--
Mark Kretschmann
Amarok Developer
www.kde.org - amarok.kde.org
More information about the Amarok
mailing list