simplify and factorize code, remove dead code, follow conventions, use new-style classes

This commit is contained in:
Christophe Benz 2010-12-09 15:27:06 +01:00 committed by Romain Bignon
commit f1b3264a67
28 changed files with 202 additions and 251 deletions

View file

@ -15,6 +15,7 @@
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
from weboob.capabilities.torrent import ICapTorrent
from weboob.tools.backend import BaseBackend
@ -31,10 +32,6 @@ class IsohuntBackend(BaseBackend, ICapTorrent):
VERSION = '0.5'
DESCRIPTION = 'isohunt.com bittorrent tracker'
LICENSE = 'GPLv3'
#CONFIG = ValuesDict(Value('domain', label='Domain (example "ssl.what.cd")'),
# Value('protocol', label='Protocol to use', choices=('http', 'https')),
# Value('username', label='Username'),
# Value('password', label='Password', masked=True))
BROWSER = IsohuntBrowser
def create_default_browser(self):
@ -47,7 +44,6 @@ class IsohuntBackend(BaseBackend, ICapTorrent):
torrent = self.browser.get_torrent(id)
if not torrent:
return None
return self.browser.openurl(torrent.url.encode('utf-8')).read()
def iter_torrents(self, pattern):