@@ -5218,7 +5218,11 @@ def _show_stations_history_notification(self, msg_id):
5218
5218
'Operation not supported' ,
5219
5219
'Please wait for the player to settle...'
5220
5220
)
5221
- self .log .write (msg = msg [msg_id ], help_msg = True , suffix = self ._status_suffix )
5221
+ if self .player .isPlaying ():
5222
+ self .log .write (msg = msg [msg_id ])
5223
+ self .player .threadUpdateTitle ()
5224
+ else :
5225
+ self .log .write (msg = msg [msg_id ], help_msg = True , suffix = self ._status_suffix )
5222
5226
else :
5223
5227
msg = (
5224
5228
'___Operation not suported!!!___\n ____Connection timeout is 0 ' ,
@@ -7681,21 +7685,51 @@ def _show_delayed_notification(self, txt, delay=.75):
7681
7685
callback_function = self .refreshBody
7682
7686
)
7683
7687
7688
+ def _show_stations_history_playlist_modified (self ):
7689
+ if self ._limited_height_mode or self ._limited_width_mode :
7690
+ msg = 'Playlist has been modified, cannot close it...'
7691
+ if self .player .isPlaying ():
7692
+ self .log .write (msg = msg )
7693
+ self .player .threadUpdateTitle ()
7694
+ else :
7695
+ self .log .write (msg = mgd , help_msg = True , suffix = self ._status_suffix )
7696
+ else :
7697
+ self ._show_notification_with_delay (
7698
+ txt = '____Playlist has been modified____\n ___Please save it and try again___' ,
7699
+ delay = 1.5 ,
7700
+ mode_to_set = self .ws .operation_mode ,
7701
+ callback_function = self .refreshBody )
7702
+
7684
7703
def _show_no_station_history_notification (self ):
7685
7704
if self ._limited_height_mode or self ._limited_width_mode :
7686
- self .log .write (msg = 'History is empty!!!' , help_msg = True , suffix = self ._status_suffix )
7705
+ msg = 'History is empty!!!'
7706
+ if self .player .isPlaying ():
7707
+ self .log .write (msg = msg )
7708
+ self .player .threadUpdateTitle ()
7709
+ else :
7710
+ self .log .write (msg = mgd , help_msg = True , suffix = self ._status_suffix )
7687
7711
else :
7688
7712
self ._show_delayed_notification ('___History is empty!!!___' )
7689
7713
7690
7714
def _show_first_station_history_notification (self ):
7691
7715
if self ._limited_height_mode or self ._limited_width_mode :
7692
- self .log .write (msg = 'Already at first item!!!' , help_msg = True , suffix = self ._status_suffix )
7716
+ msg = 'Already at first item!!!'
7717
+ if self .player .isPlaying ():
7718
+ self .log .write (msg = msg )
7719
+ self .player .threadUpdateTitle ()
7720
+ else :
7721
+ self .log .write (msg = msg , help_msg = True , suffix = self ._status_suffix )
7693
7722
else :
7694
7723
self ._show_delayed_notification ('___Already at first item!!!___' )
7695
7724
7696
7725
def _show_last_station_history_notification (self ):
7697
7726
if self ._limited_height_mode or self ._limited_width_mode :
7698
- self .log .write (msg = 'Already at last item!!!' , help_msg = True , suffix = self ._status_suffix )
7727
+ msg = 'Already at last item!!!'
7728
+ if self .player .isPlaying ():
7729
+ self .log .write (msg = msg )
7730
+ self .player .threadUpdateTitle ()
7731
+ else :
7732
+ self .log .write (msg = msg , help_msg = True , suffix = self ._status_suffix )
7699
7733
else :
7700
7734
self ._show_delayed_notification ('___Already at last item!!!___' )
7701
7735
@@ -8529,11 +8563,7 @@ def _load_playlist_and_station_from_station_history(self, h_item, func):
8529
8563
''' I have to load a new playlist '''
8530
8564
if self ._cnf .dirty_playlist :
8531
8565
self ._cnf .stations_history .restore_index (func )
8532
- self ._show_notification_with_delay (
8533
- txt = '____Playlist has been modified____\n ___Please save it and try again___' ,
8534
- delay = 1.5 ,
8535
- mode_to_set = self .ws .operation_mode ,
8536
- callback_function = self .refreshBody )
8566
+ self ._show_stations_history_playlist_modified ()
8537
8567
return
8538
8568
8539
8569
ret = 0
@@ -8582,7 +8612,6 @@ def _load_playlist_and_station_from_station_history(self, h_item, func):
8582
8612
self ._get_playlists_data_from_playlist_name (h_item [0 ])
8583
8613
self .saved_active_stations = [['' , 0 ], ['' , - 1 ]]
8584
8614
if self ._limited_height_mode or self ._limited_width_mode :
8585
- logger .error ('==== update body' )
8586
8615
self ._print_limited_info ()
8587
8616
return
8588
8617
0 commit comments