コード例 #1
0
 def download_torrent_file(self, torrent_url, cookies_dict):
     download = TorrentDownload()
     download.torrent_url = torrent_url
     download.cookies_dict = cookies_dict
     download.torrent_url = torrent_url
     download.success = self.download_success
     if self.use_filedump:
         download.filedump = self.use_filedump
     elif os.path.isfile(torrent_url):
         download.filedump = read_file(torrent_url)
     self.downloads.append(download)
     return download
コード例 #2
0
 def download_torrent_file(self, torrent_url, cookies=None, headers=None):
     download = TorrentDownload()
     download.torrent_url = torrent_url
     download.cookies = cookies
     download.headers = headers
     download.torrent_url = torrent_url
     download.success = self.download_success
     if self.use_filedump:
         download.filedump = self.use_filedump
     elif os.path.isfile(torrent_url):
         download.filedump = read_file(torrent_url)
     self.downloads.append(download)
     return download
コード例 #3
0
 def add(self, filedump=None, filename=None, options=None, magnet=None):
     download = TorrentDownload()
     download.torrent_id = ""
     download.filedump = filedump
     download.filename = filename
     download.options = options
     download.magnet = magnet
     download.add_success = self.add_success
     self.added.append(download)
     return download
コード例 #4
0
 def add(self, filedump=None, filename=None, options=None, magnet=None):
     download = TorrentDownload()
     download.torrent_id = ""
     download.filedump = filedump
     download.filename = filename
     download.options = options
     download.magnet = magnet
     download.add_success = self.add_success
     self.added.append(download)
     return download