mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-08 21:24:57 -05:00
Oops... last batch of stuff that was in -pre1, but not tagged as such
This commit is contained in:
@@ -95,6 +95,7 @@ CONFIGELEMENT config_elements[] = {
|
||||
#endif
|
||||
{ 1,1,0,CONFIG_TYPE_STRING,"servername",(void*)&config.servername,config_emit_string },
|
||||
{ 1,0,0,CONFIG_TYPE_INT,"rescan_interval",(void*)&config.rescan_interval,config_emit_int },
|
||||
{ 1,0,0,CONFIG_TYPE_INT,"process_m3u",(void*)&config.rescan_interval,config_emit_int },
|
||||
{ 1,0,0,CONFIG_TYPE_STRING,"playlist",(void*)&config.playlist,config_emit_string },
|
||||
{ 1,0,0,CONFIG_TYPE_STRING,"extensions",(void*)&config.extensions,config_emit_string },
|
||||
{ 1,0,0,CONFIG_TYPE_STRING,"password",(void*)&config.readpassword, config_emit_string },
|
||||
@@ -169,6 +170,7 @@ int config_read(char *file) {
|
||||
config.artfilename=NULL;
|
||||
config.logfile=NULL;
|
||||
config.rescan_interval=0;
|
||||
config.process_m3u=0;
|
||||
|
||||
/* DWB: use alloced space so it can be freed without errors */
|
||||
config.extensions=strdup(".mp3");
|
||||
@@ -312,6 +314,7 @@ int config_write(WS_CONNINFO *pwsc) {
|
||||
fprintf(configfile,"extensions\t%s\n",ws_getvar(pwsc,"extensions"));
|
||||
fprintf(configfile,"db_dir\t\t%s\n",ws_getvar(pwsc,"db_dir"));
|
||||
fprintf(configfile,"rescan_interval\t%s\n",ws_getvar(pwsc,"rescan_interval"));
|
||||
fprintf(configfile,"process_m3u\t%s\n",ws_getvar(pwsc,"process_m3u"));
|
||||
|
||||
fclose(configfile);
|
||||
return 0;
|
||||
|
||||
@@ -38,6 +38,7 @@ typedef struct tag_config {
|
||||
char *web_root;
|
||||
int port;
|
||||
int rescan_interval;
|
||||
int process_m3u;
|
||||
char *adminpassword;
|
||||
char *readpassword;
|
||||
char *mp3dir;
|
||||
|
||||
@@ -366,7 +366,8 @@ int scan_path(char *path) {
|
||||
} else {
|
||||
/* process the file */
|
||||
if(strlen(pde->d_name) > 4) {
|
||||
if(strcasecmp(".m3u",(char*)&pde->d_name[strlen(pde->d_name) - 4]) == 0) {
|
||||
if((strcasecmp(".m3u",(char*)&pde->d_name[strlen(pde->d_name) - 4]) == 0) &&
|
||||
config.process_m3u){
|
||||
/* we found an m3u file */
|
||||
scan_static_playlist(path, pde, &sb);
|
||||
} else if (strcasestr(config.extensions,
|
||||
|
||||
Reference in New Issue
Block a user