summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Udvare <audvare@gmail.com>2024-05-03 04:18:43 -0400
committerSam James <sam@gentoo.org>2024-07-23 06:29:54 +0100
commitc55bc022b110d21d69e47ea92303dadd736dfdad (patch)
tree920b010287d156c98792108d45a953652724a1b6 /net-irc
parentnet-irc/quassel: add patch to fix /exec scriptname (diff)
downloadgentoo-c55bc022b110d21d69e47ea92303dadd736dfdad.tar.gz
gentoo-c55bc022b110d21d69e47ea92303dadd736dfdad.tar.bz2
gentoo-c55bc022b110d21d69e47ea92303dadd736dfdad.zip
net-irc/quassel: add patch for mpris script
From https://github.com/quassel/quassel/pull/617 Signed-off-by: Andrew Udvare <audvare@gmail.com> Closes: https://github.com/gentoo/gentoo/pull/36522 Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'net-irc')
-rw-r--r--net-irc/quassel/files/quassel-0.14.0-fix-mpris-script.patch60
-rw-r--r--net-irc/quassel/quassel-0.14.0-r2.ebuild1
2 files changed, 61 insertions, 0 deletions
diff --git a/net-irc/quassel/files/quassel-0.14.0-fix-mpris-script.patch b/net-irc/quassel/files/quassel-0.14.0-fix-mpris-script.patch
new file mode 100644
index 000000000000..6477d946b306
--- /dev/null
+++ b/net-irc/quassel/files/quassel-0.14.0-fix-mpris-script.patch
@@ -0,0 +1,60 @@
+From c2ddbb99ed25c96e7f8eefd7eeff88f6d10c3875 Mon Sep 17 00:00:00 2001
+From: Andrew Udvare <audvare@gmail.com>
+Date: Fri, 3 May 2024 04:15:21 -0400
+Subject: [PATCH] data/scripts/mpris: update to use current MPRIS D-Bus
+ interface
+
+Update documentation
+Allow for . in the name of the player name
+Strip xesam: from the result
+---
+ data/scripts/mpris | 18 +++++++++---------
+ 1 file changed, 9 insertions(+), 9 deletions(-)
+
+diff --git a/data/scripts/mpris b/data/scripts/mpris
+index c483c7214a..ace8a573de 100755
+--- a/data/scripts/mpris
++++ b/data/scripts/mpris
+@@ -23,21 +23,21 @@
+ # Simple script to read metadata from mpris compatible mediaplayers via dbus.
+ #
+ # Run it like this:
+-# mpris amarok
++# mpris strawberry
+ #
+ # The script fills all fields exported by the player's dbusinterface.
+-# They are defined here: http://wiki.xmms2.xmms.se/wiki/MPRIS_Metadata
++# They are defined here: https://www.freedesktop.org/wiki/Specifications/mpris-spec/metadata/#fields
+ #
+ # To see which fields are actually available from your player,
+ # call something like this from a terminal:
+ #
+-# qdbus org.mpris.amarok /Player GetMetadata
++# qdbus org.mpris.MediaPlayer2.strawberry /org/mpris/MediaPlayer2 Metadata
+ # or
+-# qdbus org.mpris.vlc /Player GetMetadata
++# qdbus org.mpris.MediaPlayer2.mpv /org/mpris/MediaPlayer2 Metadata
+ # etc.
+-#
++#
+ # Every field is available in the data hash 'd' via
+-# $d{"NAME_OF_FIELD"}
++# $d{"NAME_OF_FIELD"} (without the 'xesam:' prefix)
+ # To edit the output just change the marked line accordingly.
+
+ use strict;
+@@ -48,11 +48,11 @@ if($#ARGV < 0) {
+ exit 1;
+ }
+
+-die "Please don't use any special characters in playername." if($ARGV[0] =~ /[^\w\d_-]/);
++die "Please don't use any special characters in playername." if($ARGV[0] =~ /[^\.\w\d_-]/);
+
+-open(IN,"qdbus org.mpris.".$ARGV[0]." /Player GetMetadata|") or die "Couldn't get dbus result.";
++open(IN,"qdbus org.mpris.MediaPlayer2.".$ARGV[0]." /org/mpris/MediaPlayer2 Metadata|") or die "Couldn't get dbus result.";
+ while(<IN>) {
+- $d{$1} = $2 if(/^([^:]+):\s+([^\n]+)/);
++ $d{$1} = $2 if(/^xesam:([^:]+):\s+([^\n]+)/);
+ }
+ close IN;
+
diff --git a/net-irc/quassel/quassel-0.14.0-r2.ebuild b/net-irc/quassel/quassel-0.14.0-r2.ebuild
index af4e2d872c26..546741201071 100644
--- a/net-irc/quassel/quassel-0.14.0-r2.ebuild
+++ b/net-irc/quassel/quassel-0.14.0-r2.ebuild
@@ -106,6 +106,7 @@ PATCHES=(
"${FILESDIR}/${P}-cxxflags.patch"
"${FILESDIR}/${P}-fix-desktop-application-name.patch"
"${FILESDIR}/${P}-fix-exec-script.patch"
+ "${FILESDIR}/${P}-fix-mpris-script.patch"
)
src_configure() {