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