Changes in directorties w/ music files

Jeff Mitchell kde-dev at emailgoeshere.com
Wed Aug 27 23:24:08 UTC 2008


Chris Joelly wrote:
> Hello,
> 
> i use Amarok for almost 3 years now but one thing annoys me very much:

Chris,

You seem to hit on a few separate issues here.  The first:

> how can i tell amarok how often it should scan a filesystem for changes
> in new music, changes in id3 tags and so on. i have a rather big
> directory structure in which my files resides, and amarok is scanning
> almost every minute for new files, somtimes there are only a few seconds
> between two scans. 
> i think that once a hour or probably once a day should be sufficient for 
> amarok to look for new or changed content. sure, i could trigger scanning 
> of my music archive manually, but iirc amarok doesn't scan my fs that 
> often about 3 years ago ...

I've only recently heard reports of some bug or regression that causes
Amarok to repeatedly scan over and over for some period of time.  I
haven't seen it myself, so I haven't figured out what causes it.  You
may be hitting this issue.  I believe what seems to be happening (except
that I don't think it *should* be happening) is that if a scan is
running and the incremental scan gets triggered, instead of the
incremental scan being ignored, it is queued up and runs after the
original one.  So until those all finish running it seems to run over
and over.

The normal incremental scan period is 60 seconds.  The reason it is so
constant is so that Amarok picks up on changes (file additions and
removals) quickly.  Since if nothing has changed the scan simply
performs a few stats on a few directories, it's not usually an issue.
You can of course turn the incremental scan off.

> amarok version: 1.4.10 on debian lenny, but this behaviour is there
> since months, maybe more than a year.
> 
> and if i change id3 tags of mp3 files through amarok, why does amarok
> not display this changes e.g. in the folder browser or context tab and
> why is amarok not always able to preview cd covers when selecting the
> folder the album and the cover image resides? sometimes i have to leave
> amarok and restart it so that it displays the cd cover i defined for an
> album.
> 
> amarok scans excessivly through my directory structure, but many times
> it doesn't 'see' any changes...

So, when performing an incremental scan, the collection scanner looks at
mtimes of directories, not files.  There is solid reasoning behind this:
performing stats on hundreds of thousands of files could be very
resource intensive.  Performing them on the directories defined in your
collection is far less taxing.  What this means however is that you'll
see changes in files only in directories where the mtime of the
directory has changed.  Normally, this means, file additions, deletions,
or moves (renames).  If there is a directory where you have performed
metadata changes outside of Amarok, you can force Amarok to rescan those
files either by performing a full scan, or by running "touch" on that
directory (or by creating a file with touch and then deleting it, or
some other operation that causes the directory's contents to change).

--Jeff



More information about the Amarok mailing list