From 6120551cf579ac65ecc0c522b8cb9d5585a9f024 Mon Sep 17 00:00:00 2001 From: whatdoineed2do/Ray Date: Thu, 6 Feb 2020 18:08:46 +0000 Subject: [PATCH 1/2] [spotify/library] add missing metarescan --- src/spotify_webapi.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/spotify_webapi.c b/src/spotify_webapi.c index 82d68315..07160b70 100644 --- a/src/spotify_webapi.c +++ b/src/spotify_webapi.c @@ -1965,6 +1965,7 @@ struct library_source spotifyscanner = .init = spotifywebapi_init, .deinit = spotifywebapi_deinit, .rescan = rescan, + .metarescan = rescan, .initscan = initscan, .fullrescan = fullrescan, .queue_add = queue_add, From a1a49b9497bd934c81b00b4320f34ef13c30659f Mon Sep 17 00:00:00 2001 From: whatdoineed2do/Ray Date: Thu, 6 Feb 2020 19:36:24 +0000 Subject: [PATCH 2/2] [library] validate mandatory methods for source or die --- src/library.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/library.c b/src/library.c index ca5b9b83..f04fa0d9 100644 --- a/src/library.c +++ b/src/library.c @@ -747,7 +747,16 @@ library_init(void) for (i = 0; sources[i]; i++) { if (!sources[i]->init) - continue; + { + DPRINTF(E_LOG, 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; + } ret = sources[i]->init(); if (ret < 0)