wip now playing screen
This commit is contained in:
parent
dbd1f301cb
commit
1aec8c7059
|
@ -34,16 +34,16 @@ class MusicPlayer:
|
||||||
ic("Playing", track)
|
ic("Playing", track)
|
||||||
player = MPV()
|
player = MPV()
|
||||||
player.play(path.join(directory, track))
|
player.play(path.join(directory, track))
|
||||||
self._run_now_playing(player)
|
self._run_now_playing(player, track)
|
||||||
return
|
return
|
||||||
|
|
||||||
def _play_resume(self, directory: str):
|
def _play_resume(self, directory: str):
|
||||||
ic("Resuming", directory)
|
ic("Resuming", directory)
|
||||||
return
|
return
|
||||||
|
|
||||||
def _run_now_playing(self, player: MPV):
|
def _run_now_playing(self, player: MPV, init_name: str):
|
||||||
self._graphics.clear()
|
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._graphics.text("Pos:", 0, 1, 1)
|
||||||
self._draw_progress(0, int(player.properties["duration"] or 0))
|
self._draw_progress(0, int(player.properties["duration"] or 0))
|
||||||
self._graphics.show()
|
self._graphics.show()
|
||||||
|
|
Reference in New Issue