Last active
November 4, 2022 15:34
-
-
Save matrixd/b9a875717fa1950db03f to your computer and use it in GitHub Desktop.
Import all torrents from deluge to transmission
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
import re | |
#it's supposed that you are in "state" directory | |
#~/.config/deluge/state | |
f = open("torrents.state") | |
buf = f.read() | |
f.close() | |
p = re.findall("sg21\\nS\'([^']+)", buf) | |
t = re.findall("sg25\\nS\'(\w+)\'", buf) | |
for n in range(0,len(p)): | |
print(t[n]+".torrent") | |
print(p[n]) | |
#if you don't run transmission as a daemon, you have to change this string | |
#don't forget to check port:host | |
os.system("transmission-remote localhost:9091 -a %s -w %s" % (t[n]+".torrent",p[n])) | |
print('--------') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment