Skip to content

Commit

Permalink
Fix for Newznab providers when searching for a show without a tvrage …
Browse files Browse the repository at this point in the history
…id we use the name of the show. If the show name is more than one word we are using a `_` as our delimiter which works fine unless the NN provider uses sphinx.. as the underscore then is used as part of the show name.. thus we always get back no results. We should just use `.` as it works for both sphinx and non sphinx servers. Tested this out on nzbs.org / nzb.su (sphinx) / sbi (non sphinx).
  • Loading branch information
thezoggy committed Nov 10, 2012
1 parent a469a12 commit ead2fb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sickbeard/providers/newznab.py
Expand Up @@ -86,7 +86,7 @@ def _get_season_search_strings(self, show, season=None):
cur_params['rid'] = show.tvrid
# if we can't then fall back on a very basic name search
else:
cur_params['q'] = helpers.sanitizeSceneName(cur_exception).replace('.', '_')
cur_params['q'] = helpers.sanitizeSceneName(cur_exception)

if season != None:
# air-by-date means &season=2010&q=2010.03, no other way to do it atm
Expand Down Expand Up @@ -117,7 +117,7 @@ def _get_episode_search_strings(self, ep_obj):
params['rid'] = ep_obj.show.tvrid
# if we can't then fall back on a very basic name search
else:
params['q'] = helpers.sanitizeSceneName(ep_obj.show.name).replace('.', '_')
params['q'] = helpers.sanitizeSceneName(ep_obj.show.name)

if ep_obj.show.air_by_date:
date_str = str(ep_obj.airdate)
Expand All @@ -142,7 +142,7 @@ def _get_episode_search_strings(self, ep_obj):
continue

cur_return = params.copy()
cur_return['q'] = helpers.sanitizeSceneName(cur_exception).replace('.', '_')
cur_return['q'] = helpers.sanitizeSceneName(cur_exception)
to_return.append(cur_return)

return to_return
Expand Down

0 comments on commit ead2fb8

Please sign in to comment.