fixed single mode
This commit is contained in:
parent
594f1dfe5d
commit
2e42703725
1 changed files with 4 additions and 4 deletions
|
@ -18,7 +18,7 @@ class MusicPlayer:
|
|||
self._play_dir(item.data["dir"], False)
|
||||
elif item.data["mode"] == "random":
|
||||
self._play_dir(item.data["dir"], True)
|
||||
elif item.data["mode"] == "track":
|
||||
elif item.data["mode"] == "single":
|
||||
self._play_track(item.data["track"])
|
||||
elif item.data["mode"] == "resume":
|
||||
self._play_resume(item.data["dir"])
|
||||
|
@ -26,16 +26,16 @@ class MusicPlayer:
|
|||
return
|
||||
|
||||
def _play_dir(self, directory: str, random: bool):
|
||||
ic("Playing directory", directory, "random=", random)
|
||||
ic("Playing", directory, random)
|
||||
return
|
||||
|
||||
def _play_track(self, track: str):
|
||||
ic("Playing track", track)
|
||||
ic("Playing", track)
|
||||
player = MPV()
|
||||
player.play(track)
|
||||
player.wait_for_playback()
|
||||
return
|
||||
|
||||
def _play_resume(self, directory: str):
|
||||
ic("Resuming directory", directory)
|
||||
ic("Resuming", directory)
|
||||
return
|
||||
|
|
Reference in a new issue