Rename backend.py to module.py

This commit is contained in:
Florent 2014-09-23 10:09:03 +02:00
commit f3aeddffbc
339 changed files with 175 additions and 175 deletions

38
modules/btdigg/module.py Normal file
View file

@ -0,0 +1,38 @@
# -*- coding: utf-8 -*-
from weboob.capabilities.torrent import CapTorrent
from weboob.tools.backend import BaseModule
from .browser import BTDiggBrowser
__all__ = ['BTDiggModule']
class BTDiggModule(BaseModule, CapTorrent):
NAME = 'btdigg'
MAINTAINER = u'Matthieu Rakotojaona'
EMAIL = 'matthieu.rakotojaona@gmail.com'
VERSION = '1.0'
DESCRIPTION = 'The BitTorrent DHT search engine.'
LICENSE = 'CC0'
BROWSER = BTDiggBrowser
def create_default_browser(self):
return self.create_browser()
def get_torrent(self, id):
return self.browser.get_torrent(id)
def get_torrent_file(self, id):
return self.browser.get_torrent_file(id)
def iter_torrents(self, pattern):
return self.browser.iter_torrents(pattern.replace(' ', '+'))
#def fill_torrent(self, torrent, fields):
# if 'description' in fields or fields == None:
# return self.get_torrent(torrent.id)
#OBJECTS = {
# Torrent:fill_torrent
#}