[gnome-music] mpris: fix method call to set_repeat_mode



commit ef63bc7a544752922de6efb323a6baf6c4e73c31
Author: Gaurav Narula <gnarula94 gmail com>
Date:   Tue Apr 26 19:08:03 2016 +0530

    mpris: fix method call to set_repeat_mode
    
    https://bugzilla.gnome.org/show_bug.cgi?id=765609

 gnomemusic/mpris.py |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index eb4691a..3bd8587 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -748,10 +748,10 @@ class MediaPlayer2Service(Server):
                 elif new_value == 'Playlist':
                     self.player.set_repeat_mode(RepeatType.ALL)
             elif property_name == 'Shuffle':
-                if (new_value and self.player.get_repeat_mode() != RepeatType.SHUFFLE):
-                    self.set_repeat_mode(RepeatType.SHUFFLE)
-                elif new_value and self.player.get_repeat_mode() == RepeatType.SHUFFLE:
-                    self.set_repeat_mode(RepeatType.NONE)
+                if new_value:
+                    self.player.set_repeat_mode(RepeatType.SHUFFLE)
+                else:
+                    self.player.set_repeat_mode(RepeatType.NONE)
         else:
             raise Exception(
                 'org.mpris.MediaPlayer2.GnomeMusic',


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]