feat: database and config support for playback mode.

This commit is contained in:
Terry Geng
2020-02-26 22:56:07 +08:00
parent 6a1320f8f9
commit b85956ef2f
5 changed files with 43 additions and 15 deletions

View File

@ -16,7 +16,6 @@ class PlayList(list):
def set_mode(self, mode):
# modes are "one-shot", "loop", "random"
self.mode = mode
var.db.set('playlist', 'mode', mode)
if mode == "random":
self.randomize()