mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-16 14:25:02 -05:00
Merge pull request #681 from adam111316/fanzub_tidy
Tidy fanzub proper code and PEP8
This commit is contained in:
commit
493f9af02e
@ -29,6 +29,7 @@ from sickbeard.common import *
|
||||
from sickbeard import tvcache
|
||||
from lib.dateutil.parser import parse as parseDate
|
||||
|
||||
|
||||
class Fanzub(generic.NZBProvider):
|
||||
|
||||
def __init__(self):
|
||||
@ -51,9 +52,6 @@ class Fanzub(generic.NZBProvider):
|
||||
def imageName(self):
|
||||
return 'fanzub.gif'
|
||||
|
||||
def _checkAuth(self):
|
||||
return True
|
||||
|
||||
def _get_season_search_strings(self, ep_obj):
|
||||
return [x for x in show_name_helpers.makeSceneSeasonSearchString(self.show, ep_obj)]
|
||||
|
||||
@ -102,8 +100,7 @@ class Fanzub(generic.NZBProvider):
|
||||
|
||||
results = []
|
||||
|
||||
for i in [2, 3, 4]: # we will look for a version 2, 3 and 4
|
||||
for item in self._doSearch("v" + str(i)):
|
||||
for item in self._doSearch("v2|v3|v4|v5"):
|
||||
|
||||
(title, url) = self._get_title_and_url(item)
|
||||
|
||||
@ -121,6 +118,7 @@ class Fanzub(generic.NZBProvider):
|
||||
|
||||
return results
|
||||
|
||||
|
||||
class FanzubCache(tvcache.TVCache):
|
||||
|
||||
def __init__(self, provider):
|
||||
@ -128,12 +126,12 @@ class FanzubCache(tvcache.TVCache):
|
||||
tvcache.TVCache.__init__(self, provider)
|
||||
|
||||
# only poll Fanzub every 20 minutes max
|
||||
# we get 100 post each call !
|
||||
self.minTime = 20
|
||||
|
||||
def _getRSSData(self):
|
||||
|
||||
params = {"cat": "anime".encode('utf-8'),
|
||||
params = {
|
||||
"cat": "anime".encode('utf-8'),
|
||||
"max": "100".encode('utf-8')
|
||||
}
|
||||
|
||||
@ -143,7 +141,5 @@ class FanzubCache(tvcache.TVCache):
|
||||
|
||||
return self.getRSSFeed(rss_url)
|
||||
|
||||
def _checkItemAuth(self, title, url):
|
||||
return True
|
||||
|
||||
provider = Fanzub()
|
||||
|
Loading…
Reference in New Issue
Block a user