Threading always success stop without errors

This commit is contained in:
localhost_frssoft 2023-06-14 21:39:47 +03:00
parent 95874e2289
commit f5840926a6

View File

@ -154,26 +154,18 @@ def radio_load(id_radio=None, type_radio='custom', name=None, related_object=Non
favorite_track(player_fw_storage.storage.get(
track_url_to_uuid())['id'])
elif select == 'Exit':
try:
radio_event_gen.clear()
except:
logger.exception('Error stopping Thread radio generator')
pass
radio_event_gen.clear()
soft_volume_reduce()
player.playlist_clear()
player.stop()
player_fw_storage.storage = {}
break
except:
try:
radio_event_gen.clear()
except:
logger.exception('Error stopping Thread radio generator')
pass
except Exception as E:
radio_event_gen.clear()
player.playlist_clear()
player.stop()
player_fw_storage.storage = {}
logger.exception('Radio force stopped')
logger.exception(f'Radio force stopped: {E}')
break