You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
636 B
30 lines
636 B
from couchpotato.core.event import addEvent
|
|
from couchpotato.core.logger import CPLog
|
|
from couchpotato.core.plugins.base import Plugin
|
|
|
|
log = CPLog(__name__)
|
|
|
|
|
|
class Downloader(Plugin):
|
|
|
|
type = []
|
|
|
|
def __init__(self):
|
|
addEvent('download', self.download)
|
|
|
|
def download(self, data = {}):
|
|
pass
|
|
|
|
def isDisabled(self):
|
|
return not self.isEnabled()
|
|
|
|
def isEnabled(self):
|
|
return self.conf('enabled', True)
|
|
|
|
def isCorrectType(self, type):
|
|
is_correct = type in self.type
|
|
|
|
if not is_correct:
|
|
log.debug("Downloader doesn't support this type")
|
|
|
|
return bool
|
|
|