MythMusic Library Update
March 1, 2010 MythTV No CommentsClearing or resetting the database in MythMusic is not a feature that is available from the user interface. If you run into troubles with your library or database, there is no function to reset, clear or recover the database. MythMusic is a plugin for MythTV that plays….music. It stores your music library in a database and users can update the library by doing a scan through the Utilities/Setup > Music Tools > Scan for New Music menu. I ran into problems when I moved my music collection from its custom location (/home/username/music) back to the default location (/var/lib/mythtv/music).
The library was showing some strange behaviour (such as displaying tracks that were no longer in the library), and there is no way in MythMusic to delete tracks from the library. The only way to update the library is through the “Scan for New Music” menu. After much Googling, I eventually learned that new files are apparently detected when doing a scan by comparing the timestamp on the music files to those already in the database. So, to update the database, I thought I would just set the timestamp of all the files in my Music Library to “now”.
Of course, there is a brief command in Linux to achieve such a thing, (recursively “touching” files with the current time) which I found on another blog to be;
find . -print0 | xargs -r0 touch
After running that command (which took less than a second for 30GB in more than 5000 tracks) and choosing the “Scan For New Music” option in MythTV, my library had been updated and the glitches were gone.






