wip now playing screen

This commit is contained in:
Rudis Muiznieks 2022-12-28 12:53:20 -06:00
parent dbd1f301cb
commit 1aec8c7059
Signed by: rudism
GPG key ID: CABF2F86EF7884F9

View file

@ -34,16 +34,16 @@ class MusicPlayer:
ic("Playing", track)
player = MPV()
player.play(path.join(directory, track))
self._run_now_playing(player)
self._run_now_playing(player, track)
return
def _play_resume(self, directory: str):
ic("Resuming", directory)
return
def _run_now_playing(self, player: MPV):
def _run_now_playing(self, player: MPV, init_name: str):
self._graphics.clear()
self._graphics.text(player.properties["filename"], 0, 0, 1)
self._graphics.text(init_name, 0, 0, 1)
self._graphics.text("Pos:", 0, 1, 1)
self._draw_progress(0, int(player.properties["duration"] or 0))
self._graphics.show()