[gnome-music/wip/mschraal/player-factor-out-gstreamer: 6/42] remove gst check



commit 1c923f687bbd3d00d32a3b83302b700c83bcb0d3
Author: Marinus Schraal <mschraal gnome org>
Date:   Fri Feb 9 08:10:29 2018 +0100

    remove gst check

 gnomemusic/gstplayer.py | 33 ++++++++++++---------------------
 1 file changed, 12 insertions(+), 21 deletions(-)
---
diff --git a/gnomemusic/gstplayer.py b/gnomemusic/gstplayer.py
index 74985d0..14e41b3 100644
--- a/gnomemusic/gstplayer.py
+++ b/gnomemusic/gstplayer.py
@@ -133,14 +133,6 @@ class GstPlayer(GObject.GObject):
         # Gst.State.PAUSED are.
         self._super_player._sync_playing()
 
-    @log
-    def _gst_plugins_base_check_version(self, major, minor, micro):
-        gst_major, gst_minor, gst_micro, gst_nano = GstPbutils.plugins_base_version()
-        return ((gst_major > major) or
-                (gst_major == major and gst_minor > minor) or
-                (gst_major == major and gst_minor == minor and gst_micro >= micro) or
-                (gst_major == major and gst_minor == minor and gst_micro + 1 == micro and gst_nano > 0))
-
     @log
     def _start_plugin_installation(
             self, missing_plugin_messages, confirm_search):
@@ -193,19 +185,18 @@ class GstPlayer(GObject.GObject):
         missing_plugin_messages = self._missingPluginMessages
         self._missingPluginMessages = []
 
-        if self._gst_plugins_base_check_version(1, 5, 0):
-            proxy = Gio.DBusProxy.new_sync(
-                Gio.bus_get_sync(Gio.BusType.SESSION, None),
-                Gio.DBusProxyFlags.NONE, None, 'org.freedesktop.PackageKit',
-                '/org/freedesktop/PackageKit',
-                'org.freedesktop.PackageKit.Modify2', None)
-            prop = Gio.DBusProxy.get_cached_property(proxy, 'DisplayName')
-            if prop:
-                display_name = prop.get_string()
-                if display_name:
-                    self._show_codec_confirmation_dialog(
-                        display_name, missing_plugin_messages)
-                    return
+        proxy = Gio.DBusProxy.new_sync(
+            Gio.bus_get_sync(Gio.BusType.SESSION, None),
+            Gio.DBusProxyFlags.NONE, None, 'org.freedesktop.PackageKit',
+            '/org/freedesktop/PackageKit',
+            'org.freedesktop.PackageKit.Modify2', None)
+        prop = Gio.DBusProxy.get_cached_property(proxy, 'DisplayName')
+        if prop:
+               display_name = prop.get_string()
+               if display_name:
+                   self._show_codec_confirmation_dialog(
+                       display_name, missing_plugin_messages)
+                   return
 
         # If the above failed, fall back to immediately starting the
         # codec installation.


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