mopidy / mopidy-local

Mopidy extension for playing music from your local music archive
https://mopidy.com/ext/local/
Apache License 2.0
62 stars 26 forks source link

Maintain DB Integrity During Local Scan #17

Open tkem opened 10 years ago

tkem commented 10 years ago

Currently, unreferenced albums and artists are deleted in SQLiteLibrary.close(), so these may still show up after an SQLiteLibrary.flush(). Therefore, cleanup code should be moved to triggers.

tkem commented 10 years ago

It may also make sense to wrap library actions which involve multiple SQL queries (e.g. the new browsing implementation with seperate queries for albums and tracks) in explicit transactions.

tkem commented 10 years ago

May be more of an issue now that it is recommended to set scan_flush_threshold to a lower value.