[mythtv-users] How to clean up your music database

Johan Reinalda johan at global.thunderbird.edu
Wed Jun 22 18:04:54 UTC 2005

yesterday I posted a query on how to fix a dropped musicmetadata table.

I had accidentally deleted the musicmetadata (drop table musicmetadata;) 
instead of deleting the entries (delete from musicmetadata;)  I then found 
that the table was not being recreated, as expected.

After looking through the checkdb.cpp source of mythmusic today, I found 
that upon starting, mythmusic looks for the schema number in the 'settings' 
table in the MusicDBSchemaVer  value. As this still existed in the above 
scenario, the table was not re-created.

Stopping the backend, then deleting this value, and restarting things 
cleaned everything up and caused my music to be reinserted into the 

So for future reference, to cause a complete clean re-read of your music if 
you accidentally dropped the musicmetadata table:

#stop the mythbackend first
#then on the mythconverg database run the following:

DELETE FROM settings WHERE value='MusicDBSchemaVer';
INSERT INTO settings (value, data, hostname) VALUES ('MusicDBSchemaVer', '', 

#and to force clean it, run this next:
DROP TABLE musicmetadata;

Restart backend, and run mythmusic.

I hope this helps someone out there...


More information about the mythtv-users mailing list