command 'getfile' to store torrent in a file (or to stdout with '-')
This commit is contained in:
parent
bcc3079d41
commit
550fee93ba
3 changed files with 38 additions and 3 deletions
|
|
@ -53,5 +53,12 @@ class GazelleBackend(BaseBackend, ICapTorrent):
|
|||
def get_torrent(self, id):
|
||||
return self.browser.get_torrent(id)
|
||||
|
||||
def get_torrent_file(self, id):
|
||||
torrent = self.browser.get_torrent(id)
|
||||
if not torrent:
|
||||
return None
|
||||
|
||||
return self.browser.openurl(torrent.url).read()
|
||||
|
||||
def iter_torrents(self, pattern):
|
||||
return self.browser.iter_torrents(pattern)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue