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( favorite_track(player_fw_storage.storage.get(
track_url_to_uuid())['id']) track_url_to_uuid())['id'])
elif select == 'Exit': elif select == 'Exit':
try: radio_event_gen.clear()
radio_event_gen.clear()
except:
logger.exception('Error stopping Thread radio generator')
pass
soft_volume_reduce() soft_volume_reduce()
player.playlist_clear() player.playlist_clear()
player.stop() player.stop()
player_fw_storage.storage = {} player_fw_storage.storage = {}
break break
except: except Exception as E:
try: radio_event_gen.clear()
radio_event_gen.clear()
except:
logger.exception('Error stopping Thread radio generator')
pass
player.playlist_clear() player.playlist_clear()
player.stop() player.stop()
player_fw_storage.storage = {} player_fw_storage.storage = {}
logger.exception('Radio force stopped') logger.exception(f'Radio force stopped: {E}')
break break