mirror of
https://github.com/owntone/owntone-server.git
synced 2025-04-01 18:21:31 -04:00
scan for new plugin path when not specified in config
This commit is contained in:
parent
06a107f116
commit
effab02bc1
24
src/main.c
24
src/main.c
@ -411,7 +411,7 @@ int main(int argc, char *argv[]) {
|
|||||||
io_init();
|
io_init();
|
||||||
io_set_errhandler(main_io_errhandler);
|
io_set_errhandler(main_io_errhandler);
|
||||||
ws_set_errhandler(main_ws_errhandler);
|
ws_set_errhandler(main_ws_errhandler);
|
||||||
|
|
||||||
/* read the configfile, if specified, otherwise
|
/* read the configfile, if specified, otherwise
|
||||||
* try defaults */
|
* try defaults */
|
||||||
config.stats.start_time=start_time=(int)time(NULL);
|
config.stats.start_time=start_time=(int)time(NULL);
|
||||||
@ -458,14 +458,14 @@ int main(int argc, char *argv[]) {
|
|||||||
}
|
}
|
||||||
free(plugindir);
|
free(plugindir);
|
||||||
} else {
|
} else {
|
||||||
if((!load_plugin_dir("/usr/lib/firefly")) &&
|
if((!load_plugin_dir("/usr/lib/firefly/plugins")) &&
|
||||||
(!load_plugin_dir("/usr/lib/mt-daapd")) &&
|
(!load_plugin_dir("/usr/lib/mt-daapd/plugins")) &&
|
||||||
(!load_plugin_dir("/usr/share/firefly/plugins")) &&
|
(!load_plugin_dir("/lib/mt-daapd/plugins")) &&
|
||||||
(!load_plugin_dir("/usr/share/mt-daapd/plugins")) &&
|
(!load_plugin_dir("/lib/mt-daapd/plugins")) &&
|
||||||
(!load_plugin_dir("/usr/local/share/firefly/plugins")) &&
|
(!load_plugin_dir("/usr/local/lib/mt-daapd/plugins")) &&
|
||||||
(!load_plugin_dir("/usr/local/share/mt-daapd/plugins")) &&
|
(!load_plugin_dir("/usr/local/lib/mt-daapd/plugins")) &&
|
||||||
(!load_plugin_dir("/opt/share/firefly/plugins")) &&
|
(!load_plugin_dir("/opt/lib/firefly/plugins")) &&
|
||||||
(!load_plugin_dir("/opt/share/mt-daapd/plugins")) &&
|
(!load_plugin_dir("/opt/lib/mt-daapd/plugins")) &&
|
||||||
(!load_plugin_dir("plugins/.libs"))) {
|
(!load_plugin_dir("plugins/.libs"))) {
|
||||||
DPRINTF(E_FATAL,L_MAIN,"plugins/plugin_dir not specified\n");
|
DPRINTF(E_FATAL,L_MAIN,"plugins/plugin_dir not specified\n");
|
||||||
}
|
}
|
||||||
@ -524,7 +524,7 @@ int main(int argc, char *argv[]) {
|
|||||||
if(db_init(reload)) {
|
if(db_init(reload)) {
|
||||||
DPRINTF(E_FATAL,L_MAIN|L_DB,"Error in db_init: %s\n",strerror(errno));
|
DPRINTF(E_FATAL,L_MAIN|L_DB,"Error in db_init: %s\n",strerror(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
err=db_get_song_count(&perr,&song_count);
|
err=db_get_song_count(&perr,&song_count);
|
||||||
if(err != DB_E_SUCCESS) {
|
if(err != DB_E_SUCCESS) {
|
||||||
DPRINTF(E_FATAL,L_MISC,"Error getting song count: %s\n",perr);
|
DPRINTF(E_FATAL,L_MISC,"Error getting song count: %s\n",perr);
|
||||||
@ -532,7 +532,7 @@ int main(int argc, char *argv[]) {
|
|||||||
/* do a full reload if the db is empty */
|
/* do a full reload if the db is empty */
|
||||||
if(!song_count)
|
if(!song_count)
|
||||||
reload = 1;
|
reload = 1;
|
||||||
|
|
||||||
if(conf_get_array("general","mp3_dir",&mp3_dir_array)) {
|
if(conf_get_array("general","mp3_dir",&mp3_dir_array)) {
|
||||||
if((!skip_initial) || (reload)) {
|
if((!skip_initial) || (reload)) {
|
||||||
DPRINTF(E_LOG,L_MAIN|L_SCAN,"Starting mp3 scan\n");
|
DPRINTF(E_LOG,L_MAIN|L_SCAN,"Starting mp3 scan\n");
|
||||||
@ -571,7 +571,7 @@ int main(int argc, char *argv[]) {
|
|||||||
/* listen or pthread error */
|
/* listen or pthread error */
|
||||||
DPRINTF(E_FATAL,L_MAIN|L_WS,"Error starting web server\n");
|
DPRINTF(E_FATAL,L_MAIN|L_WS,"Error starting web server\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
ws_registerhandler(config.server, "/",main_handler,main_auth,
|
ws_registerhandler(config.server, "/",main_handler,main_auth,
|
||||||
0,1);
|
0,1);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user