[gnome-music/wip/jfelder/flatpak-cleanup: 2/4] mpris: Use the application_id for the interface name



commit 50d583ebb619f89964303efba54337df4d7879d8
Author: Jean Felder <jfelder src gnome org>
Date:   Sun Mar 29 17:24:36 2020 +0200

    mpris: Use the application_id for the interface name
    
    This will allow to remove a flatpak specific permission since
    applications now own the org.mpris.MediaPlayer2.$app_id name.

 gnomemusic/mpris.py  | 2 +-
 org.gnome.Music.json | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gnomemusic/mpris.py b/gnomemusic/mpris.py
index 2bb2b30e..d27c226d 100644
--- a/gnomemusic/mpris.py
+++ b/gnomemusic/mpris.py
@@ -277,7 +277,7 @@ class MPRIS(DBusInterface):
     _playlist_nb_songs = 10
 
     def __init__(self, app):
-        name = 'org.mpris.MediaPlayer2.GnomeMusic'
+        name = "org.mpris.MediaPlayer2.{}".format(app.props.application_id)
         path = '/org/mpris/MediaPlayer2'
         super().__init__(name, path, app)
 
diff --git a/org.gnome.Music.json b/org.gnome.Music.json
index 60e82b48..5c24e5b3 100644
--- a/org.gnome.Music.json
+++ b/org.gnome.Music.json
@@ -15,7 +15,7 @@
         "--talk-name=org.gnome.OnlineAccounts",
         "--filesystem=xdg-run/dconf", "--filesystem=~/.config/dconf:ro",
         "--talk-name=ca.desrt.dconf", "--env=DCONF_USER_CONFIG_DIR=.config/dconf",
-        "--own-name=org.mpris.MediaPlayer2.GnomeMusic",
+        "--own-name=org.mpris.MediaPlayer2.org.gnome.Music.Devel",
         "--talk-name=org.gnome.ControlCenter",
         "--talk-name=org.gnome.SettingsDaemon.MediaKeys",
         "--talk-name=org.gtk.vfs",


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