示例#1
0
 def __init__(self):
     """
     Default constructor.
     """
     TorrentProvider.__init__(self)
     MovieProvider.__init__(self)
     addEvent('setting.save.ygg.url.after', self.refreshUrls)
     self.refreshUrls()
     self.size_gb.append('go')
     self.size_mb.append('mo')
     self.size_kb.append('ko')
示例#2
0
 def __init__(self):
     """
     Default constructor
     """
     TorrentProvider.__init__(self)
     MovieProvider.__init__(self)
     path_www = YGG.url_scheme + '://' + YGG.domain_name
     self.urls = {
         'login': path_www + '/user/login',
         'login_check': path_www + '/user/account',
         'search': path_www + '/engine/search?{0}',
         'url': path_www + '/engine/download_torrent?id={0}'
     }
示例#3
0
文件: ygg.py 项目: atah/potatoygg
 def __init__(self):
     """
     Default constructor.
     """
     TorrentProvider.__init__(self)
     MovieProvider.__init__(self)
     self.urls = {
         'login': YGG.getBasePath() + '/user/login',
         'login_check': YGG.getBasePath() + '/user/account',
         'search': YGG.getBasePath() + '/engine/search?{}',
         'torrent': YGG.getBasePath() + '/torrent',
         'url': YGG.getBasePath() + '/engine/download_torrent?id={}'
     }
     self.size_gb.append('go')
     self.size_mb.append('mo')
     self.size_kb.append('ko')
示例#4
0
文件: t411.py 项目: Ripolin/potato411
 def __init__(self):
     """
     Default constructor
     """
     TorrentProvider.__init__(self)
     MovieProvider.__init__(self)
     path_www = T411.url_scheme+'://www.'+T411.domain_name
     path_api = T411.url_scheme+'://api.'+T411.domain_name
     self.headers[T411.authentication_header] = None
     self.urls = {
         'login': path_api+'/auth',  # Used by YarrProvider.login()
         'login_check': path_api,  # Used by YarrProvider.login()
         'search': path_api+'/torrents/search/{0}?{1}',
         'url': path_api+'/torrents/download/{0}',
         'detail': path_api+'/torrents/details/{0}',
         'detail_url': path_www+'/torrents/?id={0}'
     }
示例#5
0
 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 TorrentProvider.isEnabled(
         self) and host['host'] and host['pass_key'] and int(host['use'])
    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 TorrentProvider.isEnabled(self) and host['host'] and host['pass_key'] and int(host['use'])