Fix linter errors
This commit is contained in:
@@ -266,12 +266,9 @@ class AdapterManager:
|
||||
job.cancel()
|
||||
|
||||
AdapterManager.executor.shutdown()
|
||||
print("2")
|
||||
AdapterManager.download_executor.shutdown()
|
||||
print("3")
|
||||
if AdapterManager._instance:
|
||||
AdapterManager._instance.shutdown()
|
||||
print("4")
|
||||
|
||||
logging.info("AdapterManager shutdown complete")
|
||||
|
||||
|
@@ -791,12 +791,13 @@ class SublimeMusicApp(Gtk.Application):
|
||||
)
|
||||
|
||||
# If already playing, then make the player itself seek.
|
||||
if self.player.song_loaded:
|
||||
if self.player and self.player.song_loaded:
|
||||
self.player.seek(new_time)
|
||||
|
||||
self.save_play_queue()
|
||||
|
||||
def on_device_update(self, win: Any, device_uuid: str):
|
||||
assert self.player
|
||||
if device_uuid == self.app_config.state.current_device:
|
||||
return
|
||||
self.app_config.state.current_device = device_uuid
|
||||
@@ -997,6 +998,7 @@ class SublimeMusicApp(Gtk.Application):
|
||||
# in the callback.
|
||||
@dbus_propagate(self)
|
||||
def do_play_song(order_token: int, song: Song):
|
||||
assert self.player
|
||||
if order_token != self.song_playing_order_token:
|
||||
return
|
||||
|
||||
|
Reference in New Issue
Block a user