expose always_rescan option
This commit is contained in:
parent
cbfbd9990f
commit
b6876538f3
|
@ -56,6 +56,11 @@ take effect.
|
||||||
<TD>Rescan Interval</TD>
|
<TD>Rescan Interval</TD>
|
||||||
<TD><INPUT TYPE="TEXT" @READONLY@ NAME="RESCAN_INTERVAL" VALUE="@RESCAN_INTERVAL@"></TD>
|
<TD><INPUT TYPE="TEXT" @READONLY@ NAME="RESCAN_INTERVAL" VALUE="@RESCAN_INTERVAL@"></TD>
|
||||||
</TR>
|
</TR>
|
||||||
|
<TR>
|
||||||
|
<TD>Always Scan</TD>
|
||||||
|
<TD><INPUT TYPE="TEXT" @READONLY@ NAME="ALWAYS_SCAN" VALUE="@ALWAYS_SCAN@"></TD>
|
||||||
|
</TR>
|
||||||
|
|
||||||
<TR>
|
<TR>
|
||||||
<TD>Process .m3u Files</TD>
|
<TD>Process .m3u Files</TD>
|
||||||
<TD><INPUT TYPE="TEXT" @READONLY@ NAME="PROCESS_M3U" VALUE="@PROCESS_M3U@"></TD>
|
<TD><INPUT TYPE="TEXT" @READONLY@ NAME="PROCESS_M3U" VALUE="@PROCESS_M3U@"></TD>
|
||||||
|
|
|
@ -156,3 +156,17 @@ extensions .mp3,.m4a,.m4p
|
||||||
#
|
#
|
||||||
|
|
||||||
#rescan_interval 300
|
#rescan_interval 300
|
||||||
|
|
||||||
|
#
|
||||||
|
# always_scan
|
||||||
|
#
|
||||||
|
# The default behavior is not not do background rescans of the filesystem
|
||||||
|
# unless there are clients connected. The thought is to allow the drives
|
||||||
|
# to spin down unless they are in use. This might be of more importance
|
||||||
|
# in IDE drives that aren't designed to be run 24x7.
|
||||||
|
#
|
||||||
|
# Forcing a scan will always work though, even if no users are connected.
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# always_scan 0
|
||||||
|
|
||||||
|
|
|
@ -107,6 +107,7 @@ CONFIGELEMENT config_elements[] = {
|
||||||
#endif
|
#endif
|
||||||
{ 1,1,0,CONFIG_TYPE_STRING,"servername",(void*)&config.servername,config_emit_string },
|
{ 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,"rescan_interval",(void*)&config.rescan_interval,config_emit_int },
|
||||||
|
{ 1,0,0,CONFIG_TYPE_INT,"always_scan",(void*)&config.always_scan,config_emit_int },
|
||||||
{ 1,0,0,CONFIG_TYPE_INT,"process_m3u",(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,"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,"extensions",(void*)&config.extensions,config_emit_string },
|
||||||
|
@ -335,6 +336,7 @@ int config_write(WS_CONNINFO *pwsc) {
|
||||||
fprintf(configfile,"extensions\t%s\n",ws_getvar(pwsc,"extensions"));
|
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,"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,"rescan_interval\t%s\n",ws_getvar(pwsc,"rescan_interval"));
|
||||||
|
fprintf(configfile,"always_scan\t%s\n",ws_getvar(pwsc,"always_scan"));
|
||||||
fprintf(configfile,"process_m3u\t%s\n",ws_getvar(pwsc,"process_m3u"));
|
fprintf(configfile,"process_m3u\t%s\n",ws_getvar(pwsc,"process_m3u"));
|
||||||
|
|
||||||
fclose(configfile);
|
fclose(configfile);
|
||||||
|
|
|
@ -51,7 +51,7 @@ typedef struct tag_config {
|
||||||
char *web_root; /**< path to the directory containing the admin-root files */
|
char *web_root; /**< path to the directory containing the admin-root files */
|
||||||
int port; /**< port to listen on */
|
int port; /**< port to listen on */
|
||||||
int rescan_interval; /**< How often to do a background rescan of the file system */
|
int rescan_interval; /**< How often to do a background rescan of the file system */
|
||||||
int always_scan; /**< 0 to minimize disk usage (embedded devices) - not in config */
|
int always_scan; /**< 0 to minimize disk usage (embedded devices) */
|
||||||
int process_m3u; /**< Should we process m3u files? */
|
int process_m3u; /**< Should we process m3u files? */
|
||||||
char *adminpassword; /**< Password to web management pages */
|
char *adminpassword; /**< Password to web management pages */
|
||||||
char *readpassword; /**< iTunes password */
|
char *readpassword; /**< iTunes password */
|
||||||
|
|
Loading…
Reference in New Issue