kill music dl thread and clear player list on disconnect
This commit is contained in:
parent
ed6a6cc3b2
commit
8d88b150a9
@ -2541,6 +2541,12 @@ class gui(QtGui.QWidget):
|
||||
if audio.handleisactive(self.music):
|
||||
audio.stophandle(self.music)
|
||||
audio.freehandle(self.music)
|
||||
if self.stream:
|
||||
del self.stream
|
||||
|
||||
if self.download_thread:
|
||||
self.download_thread.terminate() # Live dangerously
|
||||
self.download_thread = None
|
||||
|
||||
def playDownloadedMusic(self, file_length):
|
||||
# Part of the evil HTTPS music download hack for XP systems
|
||||
@ -2947,6 +2953,7 @@ class TCP_Thread(QtCore.QThread):
|
||||
color.setHsv(rainbow, 255, 255)
|
||||
while True:
|
||||
if self.parent.disconnectnow:
|
||||
self.parent.playerList.clear()
|
||||
self.parent.stopMusic()
|
||||
self.parent.tcp.close()
|
||||
self.quit()
|
||||
|
Loading…
Reference in New Issue
Block a user