This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Change playing track from cmdline / external program

Tags: None
(comma "," separated)
ratface
Registered Member
Posts
5
Karma
0
OS
Hi there,

I'm writing a small tool to control amarok remotely. Thus far I've been sucessfully using the dbus interface to do most things, but I need to be able to specify a track to play from the playlist by it's track ID.

There appears to be no dbus method to do this. I've reviewed everything in /Player and /TrackList.

So far I've worked out you can do it inside an Amarok script with the following:

Amarok.Playlist.playByIndex(id);

But I need to be able to do this from an external program. How might I go about this? Is there a way to call run an amarok script from an external program / command-line?

Any help would be appreciated.

Cheers,
Jamie.
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Assuming Amarok scripts have access to the QtDBus module, then you could use your script to export a DBus interface for you to use from your command line application.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
ratface
Registered Member
Posts
5
Karma
0
OS
Thanks for the tip, but I don't think it's available.

I may be way off track here, but I'm assuming it would have to be loaded with the Importer.loadQtBinding('qt.dbus'); method.

This returns false, and the amarok wiki says:

* void loadQtBinding( String binding )

Choices include:

* qt.core
* qt.gui
* qt.network
* qt.xml
* qt.sql
* qt.uitools


Is there any other way to load Qt modules in Amarok, or am I through?
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS
Unfortunately then it does not appear that DBus can be scripted ( using QtScript ) at this time.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]


Bookmarks



Who is online

Registered users: Bing [Bot], gfielding, Google [Bot], markhm, Sogou [Bot], Yahoo [Bot]