refactor: move music db into a separated file.

IMPORTANT NOTE:
The default database path has changed. It was database.db, but
now they ARE settings.db and music.db.

Database migration will detect music table in settings.db, and
move it out of settings.db.

To update from old version, you need to
 1. if you use your own db path settings in the command
    line or in configuration.ini, you don't have to change
    anything;
 1. or,if you use default database path, rename database.db
    into settings.db.
This commit is contained in:
Terry Geng
2020-05-13 10:43:40 +08:00
parent 4c27bb28a1
commit 40ea744e7f
7 changed files with 161 additions and 111 deletions

View File

@ -115,6 +115,7 @@ class MusicCache(dict):
self.log.debug("library: music save into database: %s" % item.format_debug_string())
self.db.insert_music(item.to_dict())
self.db.manage_special_tags()
self.dir_lock.release()