Reply To: itunes xml file processing


@js wrote:

Another question (or set of questions) about ratings . . .

My ideal setup would be for my Mac w/ iTunes to act as a staging area, where I import songs and rate them. I would then have a script to sync new stuff from my “local” iTunes library to the firefly library on a separate machine (which I don’t want iTunes to touch or even know about), and also copy the itunes xml file over to get processed by firefly.

If I then:
1)delete some of the files from my Mac, (and thus their metadata is deleted from the xml file),
2) copy the xml file to firefly (because there may be new or changed ratings)
3) rescan the library

Will the songs which I deleted from my iTunes library have their ratings deleted in the firefly database?

No. The iTunes data is used to update the data in the database if it exists. So if there is no reference in the iTunes database, then it won’t update the song — so it will stay the way it was.

Now, if you were to touch the file, it would overwrite the data (with blank rating).

Does the database actually get deleted and rebuilt when you run a scan? Or just updated with new songs in the library and new metadata from the iTunes xml file? Does the behavior differ on a scan vs. a ‘full scan’?

A regular scan just checks for changed files. If it finds one, it scans it and wipes out the existing database entry (if any) with a new entry. Any files that haven’t changed, it doesn’t touch metadata for.

A full scan, though, deletes the whole song database and starts from scratch, just like the first time it was run.

What’s the difference between a regular scan and a full scan anyways (i.e., the two buttons on the web interface)? Which is run when mt-daapd is started?


When it’s started, it does a regular scan unless the db schema was updated and it calls for a full scan, or if the songs table is empty (like from an initial startup).

Hope this helps.

— Ron