Skip to content

Commit

Permalink
Fix forced search
Browse files Browse the repository at this point in the history
searchEpisode (ForcedSearch) should send list of eps not single ep object.
  • Loading branch information
p0psicles authored and fernandog committed Apr 25, 2016
1 parent 5c68bde commit 8209966
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion sickbeard/manual_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ def get_provider_cache_results(indexer, show_all_results=None, perform_search=No
and episode: {1}x{2}'.format(show_obj.name, season, episode)

# make a queue item for it and put it on the queue
ep_queue_item = search_queue.ForcedSearchQueueItem(ep_obj.show, ep_obj, bool(int(down_cur_quality)), True, manual_search_type) # pylint: disable=maybe-no-member
ep_queue_item = search_queue.ForcedSearchQueueItem(ep_obj.show, [ep_obj], bool(int(down_cur_quality)), True, manual_search_type) # pylint: disable=maybe-no-member

sickbeard.forcedSearchQueueScheduler.action.add_item(ep_queue_item)

Expand Down
2 changes: 1 addition & 1 deletion sickbeard/search.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def searchProviders(show, episodes, forced_search=False, downCurQuality=False, m
Walk providers for information on shows
:param show: Show we are looking for
:param episodes: Episodes we hope to find
:param episodes: List, episodes we hope to find
:param forced_search: Boolean, is this a forced search?
:param downCurQuality: Boolean, should we re-download currently available quality file
:param manual_search: Boolean, should we choose what to download?
Expand Down
2 changes: 1 addition & 1 deletion sickbeard/webapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -781,7 +781,7 @@ def run(self):
return _responds(RESULT_FAILURE, msg="Episode not found")

# make a queue item for it and put it on the queue
ep_queue_item = search_queue.ForcedSearchQueueItem(show_obj, ep_obj)
ep_queue_item = search_queue.ForcedSearchQueueItem(show_obj, [ep_obj])
sickbeard.forcedSearchQueueScheduler.action.add_item(ep_queue_item) # @UndefinedVariable

# wait until the queue item tells us whether it worked or not
Expand Down
5 changes: 2 additions & 3 deletions sickbeard/webserve.py
Original file line number Diff line number Diff line change
Expand Up @@ -2282,8 +2282,7 @@ def doRename(self, show=None, eps=None):
return self.redirect("/home/displayShow?show=" + show)

def searchEpisode(self, show=None, season=None, episode=None, manual_search=None):
"""
"""
"""Search a ForcedSearch single episode using providers which are backlog enabled"""
down_cur_quality = 0

# retrieve the episode object and fail if we can't get one
Expand All @@ -2292,7 +2291,7 @@ def searchEpisode(self, show=None, season=None, episode=None, manual_search=None
return json.dumps({'result': 'failure'})

# make a queue item for it and put it on the queue
ep_queue_item = search_queue.ForcedSearchQueueItem(ep_obj.show, ep_obj, bool(int(down_cur_quality)), bool(manual_search))
ep_queue_item = search_queue.ForcedSearchQueueItem(ep_obj.show, [ep_obj], bool(int(down_cur_quality)), bool(manual_search))

sickbeard.forcedSearchQueueScheduler.action.add_item(ep_queue_item)

Expand Down

0 comments on commit 8209966

Please sign in to comment.