Disable OSC idle message

This commit is contained in:
kelciour 2020-06-20 01:21:11 +03:00
parent ae533fce71
commit 9aee8085e0

View file

@ -346,6 +346,7 @@ class MpvManager(MPV, SoundOrVideoPlayer):
assert isinstance(tag, SoundOrVideoTag) assert isinstance(tag, SoundOrVideoTag)
self._on_done = on_done self._on_done = on_done
path = os.path.join(os.getcwd(), tag.filename) path = os.path.join(os.getcwd(), tag.filename)
self.command("script-message", "osc-visibility", "never", "no-osd")
self.command("loadfile", path, "append-play") self.command("loadfile", path, "append-play")
gui_hooks.av_player_did_begin_playing(self, tag) gui_hooks.av_player_did_begin_playing(self, tag)
@ -362,6 +363,9 @@ class MpvManager(MPV, SoundOrVideoPlayer):
if self._on_done: if self._on_done:
self._on_done() self._on_done()
def on_start_file(self) -> None:
self.command("script-message", "osc-visibility", "auto", "no-osd")
def shutdown(self) -> None: def shutdown(self) -> None:
self.close() self.close()