[mythtv] mythmusic ID3 tag changes not updating database

Eskil Heyn Olsen myth at eskil.org
Wed Sep 14 17:49:36 UTC 2005


On Tue, 2005-09-13 at 21:41 +1200, Robin Gilks wrote:

> I changed the ID3 tags in an album, rescanned and no changes. To get the
> changes to appear (after about 10 tries), I had to remove the album, scan
> so that it was removed completely and then put the directory back and
> rescan a second time.

It's a behaviour I've noticed as well, got annoyed with, and confirmed
from looking at the code that that's what it'll do.

The scan algorithm is essentially;

1. have map M that maps from filename to a number.
2. recurse through filesystem and add M[file] = InFileSystem.
3. traverse db and for each file in db
   if M[file] == InFileSystem remove from M (*)
   if M[file] isn't set, add M[file] = InDB.
4. traverse M, and 
   for each M[file] == InFileSystem, add to DB
   for each M[file] == InDB remove from DB.

Basically, if there's a file but it's not in the DB, add it, if it's in
the DB but there's not file, remove it, if there's a file and it's in
the DB (the one marked with *), do nothing.

>From looking at it, it seems like it shouldn't be too much work to add
code at (*) that'll read the meta data and update the DB entry. It could
just easily slow down the scan a lot.

eskil
---



More information about the mythtv-dev mailing list