@@ -807,6 +807,19 @@ def _text_info(self):
807
807
else :
808
808
out .append (' Status: Idle' )
809
809
out .append (' Selection (id={0}): "{1}"' .format (self .selection + 1 , self .stations [self .selection ][0 ]))
810
+ if self .ws .operation_mode != self .ws .NORMAL_MODE :
811
+ if self ._cnf .headless :
812
+ out .append (
813
+ '\n PyRadio is NOT in Main Mode!'
814
+ "\n Please attach the program's session to a terminal and take appropriate action"
815
+ "\n to close the opened window, effectively putting PyRadio in Main Mode"
816
+ )
817
+ else :
818
+ out .append (
819
+ '\n PyRadio is NOT in Main Mode!'
820
+ "\n Please get to the program's terminal and take appropriate action to close the"
821
+ "\n opened window, effectively putting PyRadio in Main Mode"
822
+ )
810
823
return '\n ' .join (out )
811
824
812
825
@@ -846,6 +859,19 @@ def _html_info(self):
846
859
out .append ('<tr><td>Status:</td><td>Idle</span></td></tr>' )
847
860
out .append ('<tr><td>Selection:</td><td>{}</span></td></tr>' .format (self .stations [self .selection ][0 ]))
848
861
out .append ('</tbody></table>' )
862
+ if self .ws .operation_mode != self .ws .NORMAL_MODE :
863
+ if self ._cnf .headless :
864
+ out .append (r'''<p><br><b>PyRadio</b> is <span style="font-weight: bold; color: Red;">NOT</span>
865
+ in <span style="font-weight: bold; color: Green;">Main Mode</span>!</p>
866
+ <p>Please attach the program's session to a terminal and take appropriate action to close the opened window,
867
+ effectively putting <b>PyRadio</b> in <span style="font-weight:bold; color: Green;">Main Mode</span>
868
+ </p>''' )
869
+ else :
870
+ out .append (r'''<p><br><b>PyRadio</b> is <span style="font-weight: bold; color: Red;">NOT</span>
871
+ in <span style="font-weight: bold; color: Green;">Main Mode</span>!</p>
872
+ <p>Please get to the program's terminal and take appropriate action to close the opened window,
873
+ effectively putting <b>PyRadio</b> in <span style="font-weight:bold; color: Green;">Main Mode</span>
874
+ </p>''' )
849
875
out .append ('</div>' )
850
876
return '\n ' .join (out )
851
877
@@ -5269,7 +5295,7 @@ def _move_cursor_one_down(self):
5269
5295
def _html_check_op_mode (self ):
5270
5296
if self .ws .window_mode == self .ws .NORMAL_MODE :
5271
5297
return None
5272
- return '<div class="alert alert-danger">Operation not permitted (not in <b>Normal Mode</b>)</div>'
5298
+ return '<div class="alert alert-danger">Operation not permitted (not in <b>Main Mode</b>)</div>'
5273
5299
5274
5300
def _html_play_next_station (self ):
5275
5301
self ._reset_status_bar_right ()
0 commit comments