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:
Julien BLACHE
2010-03-06 18:56:30 +01:00
parent 88dde32fc7
commit 224ef48137
4 changed files with 79 additions and 9 deletions

View File

@@ -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();