mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-10 05:59:45 -05:00
Make album groups persistent
Store groups (only album groups supported at the moment) in the DB, so their ids are persistent for the duration of the forked-daapd session. Those ids are used to, among other things, retrieve artwork, so we must provide ourselves some persistence here. This brings us to schema version 8.
This commit is contained in:
@@ -697,8 +697,17 @@ filescanner(void *arg)
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
ret = db_groups_clear();
|
||||
if (ret < 0)
|
||||
{
|
||||
DPRINTF(E_LOG, L_SCAN, "Error: could not clear old groups from DB\n");
|
||||
|
||||
pthread_exit(NULL);
|
||||
}
|
||||
|
||||
/* Recompute all songalbumids, in case the SQLite DB got transferred
|
||||
* to a different host; the hash is not portable.
|
||||
* It will also rebuild the groups we just cleared.
|
||||
*/
|
||||
db_files_update_songalbumid();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user