From 82470b51684bb5cdd491bcc60023fdc2b326998d Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Wed, 28 Dec 2016 22:53:00 +0100 Subject: [PATCH] [filescanner] Ignore spotify/lastfm/remote during startup, they can give DB deadlocks - see https://www.raspberrypi.org/forums/viewtopic.php?p=1087137#p1087137 --- src/filescanner.c | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/filescanner.c b/src/filescanner.c index 76f33b50..7ebd55ce 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -849,22 +849,31 @@ process_file(char *file, time_t mtime, off_t size, int type, int flags, int dir_ break; case FILE_CTRL_REMOTE: - remote_pairing_read_pin(file); + if (flags & F_SCAN_BULK) + DPRINTF(E_LOG, L_SCAN, "Bulk scan will ignore '%s' (to process, add it after startup)\n", file); + else + remote_pairing_read_pin(file); break; case FILE_CTRL_LASTFM: #ifdef LASTFM - lastfm_login(file); + if (flags & F_SCAN_BULK) + DPRINTF(E_LOG, L_SCAN, "Bulk scan will ignore '%s' (to process, add it after startup)\n", file); + else + lastfm_login(file); #else - DPRINTF(E_LOG, L_SCAN, "Detected LastFM file, but this version was built without LastFM support\n"); + DPRINTF(E_LOG, L_SCAN, "Found '%s', but this version was built without LastFM support\n", file); #endif break; case FILE_CTRL_SPOTIFY: #ifdef HAVE_SPOTIFY_H - spotify_login(file); + if (flags & F_SCAN_BULK) + DPRINTF(E_LOG, L_SCAN, "Bulk scan will ignore '%s' (to process, add it after startup)\n", file); + else + spotify_login(file); #else - DPRINTF(E_LOG, L_SCAN, "Detected Spotify file, but this version was built without Spotify support\n"); + DPRINTF(E_LOG, L_SCAN, "Found '%s', but this version was built without Spotify support\n", file); #endif break;