@@ -299,6 +299,7 @@ class PyRadioServer(object):
299
299
<button id="vs" onclick="js_send_simple_command('/html/volumesave', 1500);" type="button" class="btn btn-success">Save<br>Volume</button>
300
300
<button id="mute" onclick="js_send_simple_command('/html/mute', 1500);" type="button" class="btn btn-warning">Mute<br>Player</button>
301
301
<button id="recording" onclick="js_send_simple_command('/html/trec', 1500);" type="button" class="btn btn-danger">REC<br>Disabled</button>
302
+ <!-- <button id="recondig" onclick="js_send_simple_command('/html/reconfig', 1500);" type="button" class="btn btn-success">Re-read<br>Config</button> -->
302
303
</div>
303
304
</div>
304
305
<div class="col-xs-4 col-lg-4">
@@ -915,7 +916,8 @@ class PyRadioServer(object):
915
916
/rb_page /grb get RadioBrowser searh results page number
916
917
/rb_first_page /frb load RadioBrowser first results page
917
918
/rb_next_page /nrb load RadioBrowser next results page
918
- /rb_previous_page /prb load RadioBrowser previous results page''' ,
919
+ /rb_previous_page /prb load RadioBrowser previous results page
920
+ /reconfig force a headless instance to read config''' ,
919
921
'/quit' : 'PyRadio Remote Service exiting!\n Cheers!' ,
920
922
'/volumeup' : 'Volume increased!' ,
921
923
'/volumedown' : 'Volume decreased!' ,
@@ -1244,6 +1246,19 @@ def _handle_client_connection(self, address, request):
1244
1246
else :
1245
1247
self ._send_text (self ._text ['/' ])
1246
1248
1249
+ elif self ._path in ('/reconfig' , ):
1250
+ ''' no html command '''
1251
+ if not self ._is_html :
1252
+ if self ._cnf .headless :
1253
+ if self .can_send_command ():
1254
+ received = self ._commands ['/text_reconfig' ]()
1255
+ # logger.error('received = "{}"'.format(received))
1256
+ self ._send_text (received )
1257
+ else :
1258
+ self ._send_text (self ._text ['/perm' ])
1259
+ else :
1260
+ self ._send_text ('Command not applicable in non-headless operation!' )
1261
+
1247
1262
elif self ._path in ('/i' , '/info' ):
1248
1263
if self ._is_html :
1249
1264
received = self ._commands ['/html_info' ]()
0 commit comments