Description: Sometimes dbus methods hasn't all the capabilities that qtscript amarok API has. This script can bridge some programming languages with Amarok qtscript API. Is a receiver of udp datagrams to evaluate qtscript commands coming from outside, by default listens on port 45450 and replies the output to 45451. Included a little python script to broadcast datagrams to udp receiver plugin, and to receive the reply from amarok (look at ~/.kde/share/apps/amarok/scripts/udpreceiver/ for broadcastsenderqt.py).
good script for remote control.
The convert QByteArray convert catch(es) a lot. I don't know the reason but have a simple workarround.
1. append one char so all eval response is always a string.
UDPcommand="X" + eval(command)
2. cut this char before write
response= new QByteArray(message).mid(1);
Alfred
Really amazing.
I'm thinking in a method to read lyrics from a plasmoid and here is the solution. Brilliant.
In my test seems to be problems with encoding 'áéíóúñ' and for asian characters :(.
Ah, one thing, turn off your firewall or open needed ports ;).
Ratings & Comments
2 Comments
good script for remote control. The convert QByteArray convert catch(es) a lot. I don't know the reason but have a simple workarround. 1. append one char so all eval response is always a string. UDPcommand="X" + eval(command) 2. cut this char before write response= new QByteArray(message).mid(1); Alfred
Really amazing. I'm thinking in a method to read lyrics from a plasmoid and here is the solution. Brilliant. In my test seems to be problems with encoding 'áéíóúñ' and for asian characters :(. Ah, one thing, turn off your firewall or open needed ports ;).