I'm trying to make a script for my magic folder that will move files to a seeding directory without KTorrent losing track of where the data is, similar to the "Move Data" context menu action in the application. I've poked around the dbus API and this is what I have so far:
for x in `qdbus org.ktorrent.ktorrent /core org.ktorrent.core.torrents`; do name=`qdbus org.ktorrent.ktorrent /torrent/$x org.ktorrent.torrent.name` if [ "$name" = "$1" ]; then # Tell KTorrent to move the data to the seeding directory fi done
The problem is that I can't find anything in The API to do that, or even to set the new location after moving it manually.
I played with the idea of doing it by directly manipulating to GUI to activate the context menu action (if I could get that far I'd be satisfied) and found this:
qdbus org.ktorrent.ktorrent /ktorrent/MainWindow_1 org.kde.KMainWindow.activateAction view_move_data
Which does what I want but always for the currently selected torrent, and I can't even figure out the first step to selecting the torrent I actually want to move.