Comment 2 for bug 1031933

Revision history for this message
Alex Launi (alexlauni) wrote :

Conor, the unity music player IS given the desktop file name

unity-webapps-music-player-context.c
87 UnityMusicPlayer *player;
92 player = unity_music_player_new (context->desktop_name);

and then when exporting the bus you do ->
// TODO: I think you will need to ensure the name is only one word and lower case
var mpris_extension = consumer.app_info.get_name().down();
var dbus_name = MPRIS_INTERFACE_PREFIX.concat (mpris_extension);
      bus_name_owner_handle =
            Bus.own_name (BusType.SESSION,
                          dbus_name,
                          BusNameOwnerFlags.NONE,
                          null,
                          () => { Trace.log ("Owning name %s", dbus_name); },
                          on_name_lost);

but never convert spaces to underscores or anything.