mirror of
https://github.com/owntone/owntone-server.git
synced 2025-01-14 08:15:02 -05:00
[library] Check for all scanning methods in library_init()
This commit is contained in:
parent
c5340e350f
commit
942628f914
@ -747,16 +747,16 @@ library_init(void)
|
|||||||
for (i = 0; sources[i]; i++)
|
for (i = 0; sources[i]; i++)
|
||||||
{
|
{
|
||||||
if (!sources[i]->init)
|
if (!sources[i]->init)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_LIB, "BUG: library source '%s' has no init()\n", sources[i]->name);
|
DPRINTF(E_FATAL, L_LIB, "BUG: library source '%s' has no init()\n", sources[i]->name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!sources[i]->metarescan)
|
if (!sources[i]->initscan || !sources[i]->rescan || !sources[i]->metarescan || !sources[i]->fullrescan)
|
||||||
{
|
{
|
||||||
DPRINTF(E_LOG, L_LIB, "BUG: library source '%s' has no metarescan()\n", sources[i]->name);
|
DPRINTF(E_FATAL, L_LIB, "BUG: library source '%s' is missing a scanning method\n", sources[i]->name);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
ret = sources[i]->init();
|
ret = sources[i]->init();
|
||||||
if (ret < 0)
|
if (ret < 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user