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    fidoneThe 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_dataWhich 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.Any ideas?
KTorrent: Moving data in a shell script
scripting;kde;d bus
I found a better solution to my problem. Rather than having my completed downloads moved to a specific directory and then moved back when I'm done with them, I made a KTorrent Script that catches the finished signal and creates a symbolic link to the files in the directory I want to see them in. When I'm done with them I can just delete the symbolic link and never have to move the actual data, which is much more efficient anyway.I've made the packaged script and source available here:http://schmunsler.no-ip.org/code/shared/file_linker/but I'll post the contents of the main script here just in case.#!/usr/bin/env kross# -*- coding: utf-8 -*-import KTorrentimport KTScriptingPluginimport Krossimport osimport socketclass FileLinker:    def __init__(self):        self.link_dir = KTScriptingPlugin.readConfigEntry(downloads,completedDir,os.path.expanduser(~/))+/        if self.link_dir.startswith(file://):            self.link_dir = self.link_dir[7:]        KTorrent.log(linkDir is +self.link_dir)        KTorrent.connect(torrentAdded(const QString &),self.torrentAdded)        tors = KTorrent.torrents()        # bind to signals for each torrent        for t in tors:            self.torrentAdded(t)    def torrentFinished(self,tor):        KTorrent.log(Symlinking +tor.pathOnDisk()+ to +self.link_dir+tor.name())        os.symlink(+tor.pathOnDisk(),+self.link_dir+tor.name())    def connectSignals(self,tor):        KTorrent.log(connectSignals  + tor.name())        tor.connect(finished(QObject* ),self.torrentFinished)    def torrentAdded(self,ih):        tor = KTorrent.torrent(ih)        self.connectSignals(tor)# load settingslinker = FileLinker()def unload():    global linker    del linker