From 942628f914748e8edf066019dbd3bbddbee9fa8f Mon Sep 17 00:00:00 2001 From: ejurgensen Date: Sat, 8 Feb 2020 10:53:59 +0100 Subject: [PATCH] [library] Check for all scanning methods in library_init() --- src/library.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/library.c b/src/library.c index f04fa0d9..515ece84 100644 --- a/src/library.c +++ b/src/library.c @@ -747,16 +747,16 @@ library_init(void) for (i = 0; sources[i]; i++) { if (!sources[i]->init) - { - DPRINTF(E_LOG, L_LIB, "BUG: library source '%s' has no init()\n", sources[i]->name); - return -1; - } + { + DPRINTF(E_FATAL, L_LIB, "BUG: library source '%s' has no init()\n", sources[i]->name); + return -1; + } - if (!sources[i]->metarescan) - { - DPRINTF(E_LOG, L_LIB, "BUG: library source '%s' has no metarescan()\n", sources[i]->name); - return -1; - } + if (!sources[i]->initscan || !sources[i]->rescan || !sources[i]->metarescan || !sources[i]->fullrescan) + { + DPRINTF(E_FATAL, L_LIB, "BUG: library source '%s' is missing a scanning method\n", sources[i]->name); + return -1; + } ret = sources[i]->init(); if (ret < 0)