mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-02 17:33:37 +00:00
Fix for manual anime searches
This commit is contained in:
parent
6ca979d51b
commit
2c37523ab7
1 changed files with 6 additions and 9 deletions
|
@ -168,17 +168,14 @@ def _getEpisode(show, season=None, episode=None, absolute=None):
|
|||
showObj = sickbeard.helpers.findCertainShow(sickbeard.showList, int(show))
|
||||
|
||||
if showObj is None:
|
||||
return "Show not in show list"
|
||||
return "Invalid show paramaters"
|
||||
|
||||
if showObj.is_anime and not absolute is None:
|
||||
return "Invalid absolute number parameters"
|
||||
elif season is None or episode is None:
|
||||
return "Invalid season or episode number parameters"
|
||||
|
||||
if showObj.is_anime:
|
||||
epObj = showObj.getEpisode(absolute_number=int(absolute))
|
||||
else:
|
||||
if absolute:
|
||||
epObj = showObj.getEpisode(absolute=int(absolute))
|
||||
elif season and episode:
|
||||
epObj = showObj.getEpisode(int(season), int(episode))
|
||||
else:
|
||||
return "Invalid paramaters"
|
||||
|
||||
if epObj is None:
|
||||
return "Episode couldn't be retrieved"
|
||||
|
|
Loading…
Reference in a new issue