summaryrefslogtreecommitdiff
path: root/gnome-extra/gnome-integration-spotify/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
committerV3n3RiX <venerix@redcorelinux.org>2021-04-28 20:21:43 +0100
commit40aaaa64e86ba6710bbeb31c4615a6ce80e75e11 (patch)
tree758c221bad35c9288d0bd6df9c7dfc226728e52c /gnome-extra/gnome-integration-spotify/files
parent8d5dbd847cbc704a6a06405856e94b461011afe3 (diff)
gentoo resync : 28.04.2021
Diffstat (limited to 'gnome-extra/gnome-integration-spotify/files')
-rw-r--r--gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-command-line-parsing.patch11
-rw-r--r--gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-correct-interface.patch23
-rw-r--r--gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-use-glib.patch40
3 files changed, 74 insertions, 0 deletions
diff --git a/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-command-line-parsing.patch b/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-command-line-parsing.patch
new file mode 100644
index 000000000000..52e3d15481cc
--- /dev/null
+++ b/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-command-line-parsing.patch
@@ -0,0 +1,11 @@
+--- a/spotify-dbus.py 2021-04-12 11:11:00.710360694 +0200
++++ b/spotify-dbus.py 2021-04-12 11:53:06.208197383 +0200
+@@ -632,7 +636,7 @@
+ self.action_trigger('play')
+
+ # Play/pause (0.6)
+- elif '--playpause' or 'playpause' in sys.argv:
++ elif '--playpause' in sys.argv or 'playpause' in sys.argv:
+ self.action_trigger('playpause')
+
+ # Stop
diff --git a/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-correct-interface.patch b/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-correct-interface.patch
new file mode 100644
index 000000000000..d6cb838de2c5
--- /dev/null
+++ b/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-correct-interface.patch
@@ -0,0 +1,23 @@
+--- a/spotify-dbus.py 2021-04-12 11:11:00.710360694 +0200
++++ b/spotify-dbus.py 2021-04-12 11:50:55.946631871 +0200
+@@ -227,8 +227,7 @@
+ if self.debug == True:
+ print("Opening " + param + "...")
+
+- window = self.get_window()
+- window._openLink(param)
++ self.player.OpenUri(param)
+
+ # Action listener
+ def action_listener(self, id = 0, action = ''):
+@@ -322,8 +321,8 @@
+ # Get the player object
+ def get_player(self):
+ try:
+- proxyobj = self.bus.get_object('org.mpris.MediaPlayer2.spotify', '/')
+- pl = dbus.Interface(proxyobj, 'org.freedesktop.MediaPlayer2')
++ proxyobj = self.bus.get_object('org.mpris.MediaPlayer2.spotify', '/org/mpris/MediaPlayer2')
++ pl = dbus.Interface(proxyobj, 'org.mpris.MediaPlayer2.Player')
+ except dbus.DBusException:
+ pl = False
+
diff --git a/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-use-glib.patch b/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-use-glib.patch
new file mode 100644
index 000000000000..b590b304e92a
--- /dev/null
+++ b/gnome-extra/gnome-integration-spotify/files/gnome-integration-spotify-use-glib.patch
@@ -0,0 +1,40 @@
+--- a/spotify-dbus.py 2021-04-12 11:11:00.710360694 +0200
++++ b/spotify-dbus.py 2021-04-12 11:23:16.895644502 +0200
+@@ -39,7 +39,7 @@
+ import sys
+ import dbus
+ import time
+-from gi.repository import GObject
++from gi.repository import GLib
+ import hashlib
+ import sys
+ if (sys.version_info) < (3, 0):
+@@ -146,8 +146,8 @@
+ interface.connect_to_signal('ActionInvoked', self.action_listener)
+
+ interface.connect_to_signal('NotificationClosed', self.action_dismisser)
+- GObject.threads_init()
+- GObject.timeout_add(self.timeout * 10, self.action_listener)
++ GLib.threads_init()
++ GLib.timeout_add(self.timeout * 10, self.action_listener)
+
+ return self.nid
+
+@@ -532,7 +532,7 @@
+ self.locale = locale
+
+ # loop must be global to can quit from listener
+- self.loop = GObject.MainLoop()
++ self.loop = GLib.MainLoop()
+
+ # Prepare loop for interactive notifications or daemon mode
+ self.dloop = DBusGMainLoop()
+@@ -606,7 +606,7 @@
+
+ # Start loop listening for track changes
+ try:
+- GObject.timeout_add(100, self.change_listener)
++ GLib.timeout_add(100, self.change_listener)
+ self.loop.run()
+ except KeyboardInterrupt:
+ print('Stopping daemon...')