mdb_table = ''
mdb_field = ''
feeds_dir = ''
+ is_alive = False
def __init__(self, station, q, logqueue, m3u):
Thread.__init__(self)
song = mediaobj.get_song(True)
except:
pass
-
+
# print(title, artist, song)
return title, artist, song
# break
if self.next_media or not self.run_mode:
+ self.is_alive = False
break
if self.record_mode:
# Send the chunk to the stream
self.channel.send(self.chunk)
self.channel.sync()
+ self.is_alive = True
except:
self._err('could not send the buffer')
self.channel_close()
if not self.channel_open():
self._err('could not restart the channel')
+ self.is_alive = False
if self.record_mode:
self.recorder.close()
return
self._info('channel restarted')
self.channel.send(self.chunk)
self.channel.sync()
+ self.is_alive = True
except:
self._err('could not send data after restarting the channel')
self.channel_close()
if self.record_mode:
self.recorder.close()
+ self.is_alive = False
return
# send chunk loop end