mirror of
https://github.com/owntone/owntone-server.git
synced 2025-02-04 10:26:02 -05:00
[filescanner] Remove rebuilding of persistent ids (artist, album)
The hash is not portable, therefor this removes the ability to build the database on a different machine than the one running forked-daapd. It also removes the clearing of the groups table and replaces it with a cleanup call (removes unreferenced entries from the groups table).
This commit is contained in:
parent
3d3c27190b
commit
f5fe1e665a
@ -1221,13 +1221,18 @@ bulk_scan(int flags)
|
||||
}
|
||||
else
|
||||
{
|
||||
db_transaction_begin();
|
||||
/* Protect spotify from the imminent purge if rescanning */
|
||||
db_file_ping_bymatch("spotify:", 0);
|
||||
db_pl_ping_bymatch("spotify:", 0);
|
||||
|
||||
DPRINTF(E_DBG, L_SCAN, "Purging old database content\n");
|
||||
db_purge_cruft(start);
|
||||
db_groups_cleanup();
|
||||
db_queue_cleanup();
|
||||
|
||||
db_transaction_end();
|
||||
|
||||
cache_artwork_purge_cruft(start);
|
||||
|
||||
DPRINTF(E_LOG, L_SCAN, "Bulk library scan completed in %.f sec\n", difftime(end, start));
|
||||
@ -1278,14 +1283,6 @@ 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);
|
||||
}
|
||||
|
||||
// Only clear the queue if enabled (default) in config
|
||||
clear_queue_on_stop_disabled = cfg_getbool(cfg_getsec(cfg, "mpd"), "clear_queue_on_stop_disable");
|
||||
if (!clear_queue_on_stop_disabled)
|
||||
@ -1299,13 +1296,6 @@ filescanner(void *arg)
|
||||
}
|
||||
}
|
||||
|
||||
/* Recompute all songartistids and 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_songartistid();
|
||||
db_files_update_songalbumid();
|
||||
|
||||
if (cfg_getbool(cfg_getsec(cfg, "library"), "filescan_disable"))
|
||||
bulk_scan(F_SCAN_BULK | F_SCAN_FAST);
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user