From 81b285a79e2576b4be793cc332a1bc6b9dadb527 Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Wed, 12 Mar 2014 21:47:13 +0100 Subject: [PATCH] Fix horrible filescanner bug I introduced with the Spotify commit --- src/filescanner.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/filescanner.c b/src/filescanner.c index b90f1cc0..1cdc16e0 100644 --- a/src/filescanner.c +++ b/src/filescanner.c @@ -472,7 +472,10 @@ filescanner_process_media(char *path, time_t mtime, off_t size, int type, struct ret = mfi->artist && mfi->album && mfi->title; } else - ret = -1; + { + DPRINTF(E_LOG, L_SCAN, "Unknown scan type for %s, this error should not occur\n", path); + ret = -1; + } if (ret < 0) { @@ -699,7 +702,7 @@ process_directory(char *path, int flags) } /* Check if compilation and/or podcast directory */ - type = 0; + type = F_SCAN_TYPE_FILE; if (check_speciallib(path, "compilations")) type |= F_SCAN_TYPE_COMPILATION; if (check_speciallib(path, "podcasts")) @@ -1174,7 +1177,7 @@ process_inotify_file(struct watch_info *wi, char *path, struct inotify_event *ie } } - type = 0; + type = F_SCAN_TYPE_FILE; if (check_speciallib(path, "compilations")) type |= F_SCAN_TYPE_COMPILATION; if (check_speciallib(path, "podcasts"))