mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-13 11:32:20 -05:00
Merge pull request #818 from KontiSR/dev_addsearchstring_newznab_no_ep_par
Made improvements for searching for anime on newznab providers, who have...
This commit is contained in:
commit
8a10b0ced5
@ -189,7 +189,7 @@ class NewznabProvider(generic.NZBProvider):
|
||||
params['season'] = date_str.partition('-')[0]
|
||||
params['ep'] = date_str.partition('-')[2].replace('-', '/')
|
||||
elif ep_obj.show.anime:
|
||||
params['ep'] = "%i" % int(ep_obj.scene_absolute_number)
|
||||
params['ep'] = "%i" % int(ep_obj.scene_absolute_number if int(ep_obj.scene_absolute_number) > 0 else ep_obj.scene_episode)
|
||||
else:
|
||||
params['season'] = ep_obj.scene_season
|
||||
params['ep'] = ep_obj.scene_episode
|
||||
@ -207,7 +207,20 @@ class NewznabProvider(generic.NZBProvider):
|
||||
for cur_exception in name_exceptions:
|
||||
params['q'] = helpers.sanitizeSceneName(cur_exception)
|
||||
to_return.append(params)
|
||||
|
||||
|
||||
if ep_obj.show.anime:
|
||||
# Experimental, add a searchstring without search explicitly for the episode!
|
||||
# Remove the ?ep=e46 paramater and use add the episode number to the query paramater.
|
||||
# Can be usefull for newznab indexers that do not have the episodes 100% parsed.
|
||||
# Start with only applying the searchstring to anime shows
|
||||
params['q'] = helpers.sanitizeSceneName(cur_exception)
|
||||
paramsNoEp = params.copy()
|
||||
|
||||
paramsNoEp['q'] = paramsNoEp['q'] + " " + str(paramsNoEp['ep'])
|
||||
if "ep" in paramsNoEp:
|
||||
paramsNoEp.pop("ep")
|
||||
to_return.append(paramsNoEp)
|
||||
|
||||
return to_return
|
||||
|
||||
def _doGeneralSearch(self, search_string):
|
||||
|
Loading…
Reference in New Issue
Block a user