dbus: decode uri when sending PropertiesChanged
Thanks to a bug report in another project, I found that the plasma media player does not decode URIs when displaying data from DBUS.
Sure enough, when no title or album are specified in the DBUS PropertiesChanged message sent by VLC, the media player will instead attempt to resolve these values from the value at xesam:url, as presented below
signal time=1758853278.917195 sender=:1.187 -> destination=(null destination) serial=13 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.mpris.MediaPlayer2.Player"
array [
dict entry(
string "Metadata"
variant array [
dict entry(
string "mpris:trackid"
variant object path "/org/videolan/vlc/playlist/3"
)
dict entry(
string "xesam:url"
variant string "file:///home/conor/Videos/Screencasts/test_%28video%29.mp4"
)
...
]
)
...
Other media players, such as the Dragon media player, will present an unencoded url for use by potential listeners, as seen below. So I don't believe there is any issue with VLC doing the same.
signal time=1759292337.335455 sender=:1.540 -> destination=(null destination) serial=30 path=/org/mpris/MediaPlayer2; interface=org.freedesktop.DBus.Properties; member=PropertiesChanged
string "org.mpris.MediaPlayer2.Player"
array [
dict entry(
string "CanSeek"
variant boolean false
)
dict entry(
string "Metadata"
variant array [
dict entry(
string "mpris:trackid"
variant object path "/org/kde/dragonplayer/tid_82c8fed0442242df7fd1848c1964011a0da3a51a"
)
dict entry(
string "xesam:url"
variant string "file:///home/conor/Videos/Screencasts/test_(video).mp4"
)
]
)
]
array [
]
It is also worth noting that this is only a problem for VLC when files are opened a particular way. Opening files from the command line results in an encoded URI, whereas opening files from the QT UI results in only % characters being encoded. This change helps ensure consistency, no matter how a file is opened.
