Fixed error on exit

This commit is contained in:
Sumner Evans
2019-08-08 08:53:06 -06:00
parent 5186792e8a
commit 594ecaed81
2 changed files with 3 additions and 2 deletions

View File

@@ -347,10 +347,10 @@ class LibremsonicApp(Gtk.Application):
return True
def on_app_shutdown(self, app):
CacheManager.should_exit = True
self.player.pause()
self.chromecast_player.shutdown()
self.mpv_player.shutdown()
CacheManager.should_exit = True
self.state.save()
self.save_play_queue()

View File

@@ -372,4 +372,5 @@ class ChromecastPlayer(Player):
return 100
def shutdown(self):
self.chromecast.disconnect(blocking=True)
if self.chromecast:
self.chromecast.disconnect(blocking=True)