OS: Windows 8.1
Deluge Version: 1.3.11
libtorrent: 0.16.18.0
Regarding Execute plugin
I'm trying to automate the process of renaming and moving files (currently I'm just at the renaming stage), but I'm having trouble getting the scripts to run correctly. I've scoured the forums and web for answers, but my search has been fruitless.
From what I understand (I'm new to Deluge), the Execute plugin doesn't have the same capabilities on windows as it does on other platforms (Ubuntu/Linux) and can't run python scripts directly. I've read, however, that it can execute batch files and a python script can be called from within the batch file. Everything works fine when I execute the scripts from the command line while passing my own arguments in place of torrent name, ID and save path. However, when run from deluge on torrent completion, the line that calls my python script doesn't seem to execute at all, but still writes the data to a log file.
getinfo.bat
Code: Select all
@echo off
set torrentid=%1
set torrentname=%2
set torrentpath=%3
test.py %torrentid% %torrentname% %torrentpath%
@echo Torrent Details: %torrentname% %torrentpath% %torrentid% >> %userprofile%\Desktop\log.log
Code: Select all
import sys
import subprocess
torrent_id = sys.argv[1]
torrent_name = sys.argv[2]
torrent_path = sys.argv[3]
data = open('torrent_data.txt', 'w')
for arg in sys.argv:
data.write(arg)
data.close()
subprocess.call(['filebot', '-rename', 'C:\\Users\\Alex\\Downloads\\' + torrent_name])