@@ -1871,6 +1871,7 @@ def _get_mpv_metadata(self, *args):
18711871 album, year : Album and Year of song (vorbis stations)
18721872 '''
18731873
1874+ return_value = False
18741875 a_data = args [0 ]
18751876 stop = args [1 ]
18761877 enable_crash_detection_function = args [2 ]
@@ -1938,7 +1939,9 @@ def _get_mpv_metadata(self, *args):
19381939 if not self .playback_is_on :
19391940 if stop ():
19401941 return False
1941- return self ._set_mpv_playback_is_on (stop , enable_crash_detection_function )
1942+ return_value = self ._set_mpv_playback_is_on (stop , enable_crash_detection_function )
1943+ if not return_value :
1944+ return False
19421945 else :
19431946 if (logger .isEnabledFor (logging .INFO )):
19441947 logger .info ('Icy-Title is NOT valid' )
@@ -1974,7 +1977,7 @@ def _get_mpv_metadata(self, *args):
19741977 with self .status_update_lock :
19751978 try :
19761979 self ._icy_data [icy ] = a_data .split (bytes_icy + b'":"' )[1 ].split (b'",' )[0 ].split (b'"}' )[0 ].decode (enc )
1977- except UnicodeDecodeError :
1980+ except ( IndexError , UnicodeDecodeError ) :
19781981 pass
19791982 # logger.error('DE 0 {}'.format(self._icy_data))
19801983 # if got_icy_br:
@@ -2022,7 +2025,8 @@ def _get_mpv_metadata(self, *args):
20222025 self .info_display_handler ()
20232026 return True
20242027 else :
2025- return False
2028+ return return_value
2029+ # return False
20262030
20272031 def _set_mpv_playback_is_on (self , stop , enable_crash_detection_function ):
20282032 self .stop_timeout_counter_thread = True
0 commit comments