Bug 423124 - 'qdbus org.kde.amarok /Player' has stopped working
Summary: 'qdbus org.kde.amarok /Player' has stopped working
Status: RESOLVED INTENTIONAL
Alias: None
Product: amarok
Classification: Applications
Component: D-Bus interfaces (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR normal
Target Milestone: kf5
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-17 21:11 UTC by Toni Asensi Esteve
Modified: 2020-06-17 21:45 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Toni Asensi Esteve 2020-06-17 21:11:41 UTC
First of all, thanks for Amarok!

SUMMARY
After a recent update of the helpful Amarok PPA from Pedro Gomes, `qdbus org.kde.amarok /Player` has stopped working.

This bug is important, because during more than ten years that `qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata` has allowed (for example) that a script sends the actual track in Amarok to the recycle bin, and automatically plays the next track.

STEPS TO REPRODUCE
Execute: qdbus org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata

OBSERVED RESULT
"Error: org.freedesktop.DBus.Error.UnknownObject
No such object path '/Player'"

EXPECTED RESULT
Get information useful to know the title of the current track, its file path, album, etc.

SOFTWARE/OS VERSIONS
Operating System: Kubuntu 20.04
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-37-generic
OS Type: 64-bit

ADDITIONAL INFORMATION
If we look for "org.kde.amarok /Player org.freedesktop.MediaPlayer.GetMetadata" using Google, a lot of pages appear, as it's very useful. For example, in https://www.tuxarena.com/2014/03/how-to-control-amarok-from-command-line/ there's an entire article: "How-To: Control Amarok from Command-Line".

Is the problem related to https://invent.kde.org/multimedia/amarok/-/commit/f34a0464075896b2547f8210b5ee63f1eea80303 ?

Perhaps Amarok has a new qdbus "interface" that keeps allowing playing tracks, stopping them, getting the information about the path to the file which is being played, etc.?
Comment 1 Alex Merry 2020-06-17 21:45:03 UTC
You'll need to move to using the MPRIS2 interface instead. The full spec is at https://specifications.freedesktop.org/mpris-spec/latest/ but the replacement for your specific command should be something like

qdbus org.kde.amarok /org/mpris/MediaPlayer2 org.freedesktop.DBus.Properties.Get org.mpris.MediaPlayer2.Player Metadata