From bbdf11b9cea8789c7481009be844f1e6b7f4d52e Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 6 Aug 2018 22:44:02 +0200 Subject: [PATCH] Added shuffle method to music.mpd --- platypush/plugins/music/mpd/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/platypush/plugins/music/mpd/__init__.py b/platypush/plugins/music/mpd/__init__.py index dab128aa1..2de251af0 100644 --- a/platypush/plugins/music/mpd/__init__.py +++ b/platypush/plugins/music/mpd/__init__.py @@ -166,9 +166,9 @@ class MusicMpdPlugin(MusicPlugin): @action def random(self, value=None): """ - Set shuffle mode + Set random mode - :param value: If set, set the random/shuffle state this value (true/false). Default: None (toggle current state) + :param value: If set, set the random state this value (true/false). Default: None (toggle current state) :type value: bool """ @@ -191,6 +191,14 @@ class MusicMpdPlugin(MusicPlugin): value = 1 if value == 0 else 0 return self._exec('repeat', value) + @action + def shuffle(self): + """ + Shuffles the current playlist + """ + + return self._exec('shuffle') + @action def add(self, resource): """