本文整理汇总了Python中couchpotato.core.providers.nzb.base.NZBProvider.isEnabled方法的典型用法代码示例。如果您正苦于以下问题:Python NZBProvider.isEnabled方法的具体用法?Python NZBProvider.isEnabled怎么用?Python NZBProvider.isEnabled使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类couchpotato.core.providers.nzb.base.NZBProvider
的用法示例。
在下文中一共展示了NZBProvider.isEnabled方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: isEnabled
# 需要导入模块: from couchpotato.core.providers.nzb.base import NZBProvider [as 别名]
# 或者: from couchpotato.core.providers.nzb.base.NZBProvider import isEnabled [as 别名]
def isEnabled(self, host = None):
# Return true if at least one is enabled and no host is given
if host is None:
for host in self.getHosts():
if self.isEnabled(host):
return True
return False
return NZBProvider.isEnabled(self) and host['host'] and host['api_key'] and int(host['use'])
示例2: isEnabled
# 需要导入模块: from couchpotato.core.providers.nzb.base import NZBProvider [as 别名]
# 或者: from couchpotato.core.providers.nzb.base.NZBProvider import isEnabled [as 别名]
def isEnabled(self):
return NZBProvider.isEnabled(self) and self.conf('username') and self.conf('api_key')
示例3: isEnabled
# 需要导入模块: from couchpotato.core.providers.nzb.base import NZBProvider [as 别名]
# 或者: from couchpotato.core.providers.nzb.base.NZBProvider import isEnabled [as 别名]
def isEnabled(self, host):
return NZBProvider.isEnabled(self) and host['host'] and host['api_key'] and int(host['use'])
示例4: isEnabled
# 需要导入模块: from couchpotato.core.providers.nzb.base import NZBProvider [as 别名]
# 或者: from couchpotato.core.providers.nzb.base.NZBProvider import isEnabled [as 别名]
def isEnabled(self):
return NZBProvider.isEnabled(self) and self.conf('enabled')
示例5: isEnabled
# 需要导入模块: from couchpotato.core.providers.nzb.base import NZBProvider [as 别名]
# 或者: from couchpotato.core.providers.nzb.base.NZBProvider import isEnabled [as 别名]
def isEnabled(self):
return NZBProvider.isEnabled(self) and self.conf('enabled') and self.conf('username') and self.conf('password')