Re: [Rhythmbox-devel] force database/entry tag refresh



On Fri, 2011-12-16 at 07:01 +1000, Lachlan wrote:
> Because i play around a lot with my files and tags i've found that
> some times rhythmdb values are out of sync with the actual tag of the
> file.
> 
> When does rhythmbox check file tags? only on import?
> When you update the file tags within rhythmbox does it update tags immediately?

Rhythmbox /should/ read and update tags in the following situations:

      * When adding a file to the database for the first time.
      * When (re-)starting Rhythmbox, the modification time of every
        single file is checked and compared. If any files have been
        modified, their tags are updated in the database.
      * At runtime, Rhythmbox monitors all of the files it knows about
        for modifications (on Linux, this is via inotify). When a file
        is changed at runtime, Rhythmbox will update the tags in the
        database.

As such, there isn't really any need to have a manual rescan; simply
restarting Rhythmbox is sufficient to check all the files for changes.

I have occasionally seen bugs in Linux's file notification support, or
alternatively misconfiguration, that cause the runtime detection to fail
on some files. Restarting Rhythmbox should be enough to detect the
changes in this case.

One thing to watch out for: Some tools that update file tags don't
change the modification time of the files. Since Rhythmbox checks the
modification time to know if a file has been changed, it might not see
the updated file if this happens. Check your tool configuration, or just
"touch" the files afterwards.

> One option is i should update tags when i update entries. At the
> moment I'm using eyed3 to verify/update tags to v2.4.
> 
> It would be better to use whatever rhythmbox does to update tags but i
> haven't looked into that yet.

Rhythmbox's built-in tag writing support is via GStreamer. I don't know
of any standalone tools that update tags this way, but that shouldn't
really cause any issues.

-- 
Calvin Walton <calvin walton kepstin ca>
Homepage: http://www.kepstin.ca/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]