Esempio n. 1
0
 def __init__(self):
     self.command = ""
     KTorrent.connect("torrentAdded(const QString &)", self.torrentAdded)
     tors = KTorrent.torrents()
     # bind to signals for each torrent
     for t in tors:
         self.torrentAdded(t)
Esempio n. 2
0
	def __init__(self):
		self.auto_resume = False
		self.hours = 0
		self.minutes = 5
		self.seconds = 0
		KTorrent.connect("pauseStateChanged(bool)",self.pausedStateChanged)
		self.timer = KTScriptingPlugin.createTimer(True)
		self.timer.connect('timeout()',self.timerFired)
Esempio n. 3
0
	def __init__(self):
		self.auto_resume = False
		self.hours = 0
		self.minutes = 5
		self.seconds = 0
		KTorrent.connect("suspendStateChanged(bool)",self.suspendedStateChanged)
		self.timer = KTScriptingPlugin.createTimer(True)
		self.timer.connect('timeout()',self.timerFired)
Esempio n. 4
0
	def __init__(self):
		self.tracker_map = {} # initialize the dictionary
		self.id = 0
		KTorrent.connect("torrentAdded(const QString &)",self.torrentAdded)
		KTorrent.connect("torrentRemoved(const QString &)",self.torrentRemoved)
		tors = KTorrent.torrents()
		# go over each torrent and collect all the trackers
		for t in tors:
			self.torrentAdded(t)
Esempio n. 5
0
	def __init__(self):
		self.tracker_map = {} # initialize the dictionary
		self.id = 0
		KTorrent.connect("torrentAdded(const QString &)",self.torrentAdded)
		KTorrent.connect("torrentRemoved(const QString &)",self.torrentRemoved)
		tors = KTorrent.torrents()
		# go over each torrent and collect all the trackers
		for t in tors:
			self.torrentAdded(t)
Esempio n. 6
0
	def __init__(self):
		self.auto_resume = False
		self.remove_on_finish_downloading = False
		self.remove_on_finish_seeding = False
		self.timer = KTScriptingPlugin.createTimer(True)
		KTorrent.connect("torrentAdded(const QString &)",self.torrentAdded)
		tors = KTorrent.torrents()
		# bind to signals for each torrent
		for t in tors:
			self.torrentAdded(t)
Esempio n. 7
0
    def __init__(self):
        KTorrent.connect("torrentAdded(const QString &)", self.torrentAdded)
        tors = KTorrent.torrents()
        # bind to signals for each torrent
        f = open(
            KTScriptingPlugin.scriptDir("auto_tracker_add") + "tracker.list")
        self.trackers = f.read().splitlines()

        for t in tors:
            self.torrentAdded(t)
Esempio n. 8
0
	def __init__(self):
		self.auto_resume = False
		self.remove_on_finish_downloading = False
		self.remove_on_finish_seeding = False
		self.timer = KTScriptingPlugin.createTimer(True)
		KTorrent.connect("torrentAdded(const QString &)",self.torrentAdded)
		tors = KTorrent.torrents()
		# bind to signals for each torrent
		for t in tors:
			self.torrentAdded(t)
Esempio n. 9
0
 def __init__(self):
     self.mail_user = "******"
     self.mail_pwd = "your_password"
     self.mail_server = "smtp.gmail.com"
     self.mail_port = 587
     self.mail_dest = "*****@*****.**"
     self.mail_add_cc = False
     self.mail_cc = ""
     self.mail_add_bcc = False
     self.mail_bcc = ""
     self.mail_use_tls = True
     KTorrent.connect("torrentAdded(const QString &)", self.torrentAdded)
     tors = KTorrent.torrents()
     # bind to signals for each torrent
     for t in tors:
         self.torrentAdded(t)
Esempio n. 10
0
	def __init__(self):
		self.mail_user = "******"
		self.mail_pwd = "your_password"
		self.mail_server = "smtp.gmail.com"
		self.mail_port = 587
		self.mail_dest = "*****@*****.**"
		self.mail_add_cc = False
		self.mail_cc = ""
		self.mail_add_bcc = False
		self.mail_bcc = ""
		self.mail_use_tls = True
		KTorrent.connect("torrentAdded(const QString &)",self.torrentAdded)
		tors = KTorrent.torrents()
		# bind to signals for each torrent
		for t in tors:
			self.torrentAdded(t)
Esempio n. 11
0
#!/usr/bin/python
import KTorrent
import Kross

def torrentAdded(ih):
	tor = KTorrent.torrent(ih)
	KTorrent.log("torrentAdded=%s" % tor.name())

def torrentRemoved(ih):
	tor = KTorrent.torrent(ih)
	KTorrent.log("torrentRemoved=%s" % tor.name())

 
KTorrent.connect("torrentAdded(const QString &)",torrentAdded)
KTorrent.connect("torrentRemoved(const QString &)",torrentRemoved)

tors = KTorrent.torrents()

KTorrent.log("Num torrents : %i" % len(tors))
for t in tors:
	tor = KTorrent.torrent(t)
	KTorrent.log("Torrent %s = %s" % (t, tor.name()))
	for i in range(0,tor.numFiles()):
		KTorrent.log("File %i = %s" % (i,tor.filePath(i)))
Esempio n. 12
0
#!/usr/bin/python
import KTorrent
import Kross

def torrentAdded(ih):
	tor = KTorrent.torrent(ih)
	KTorrent.log("torrentAdded=%s" % tor.name())

def torrentRemoved(ih):
	tor = KTorrent.torrent(ih)
	KTorrent.log("torrentRemoved=%s" % tor.name())

 
KTorrent.connect("torrentAdded(const QString &)",torrentAdded)
KTorrent.connect("torrentRemoved(const QString &)",torrentRemoved)

tors = KTorrent.torrents()

KTorrent.log("Num torrents : %i" % len(tors))
for t in tors:
	tor = KTorrent.torrent(t)
	KTorrent.log("Torrent %s = %s" % (t, tor.name()))
	for i in range(0,tor.numFiles()):
		KTorrent.log("File %i = %s" % (i,tor.filePath(i)))