bug fixing
This commit is contained in:
@@ -49,6 +49,14 @@ class Sickbeard:
|
||||
return (season, episode, episodeResult['data']['name'])
|
||||
|
||||
return None
|
||||
|
||||
def FindEpisodeName(self, showId, season, episode):
|
||||
jsonurl = urlopen("{0}?cmd=episode&tvdbid={1}&season={2}&episode={3}".format(self.__GetApiURL(), showId, int(season), int(episode)))
|
||||
result = json.loads(jsonurl.read())
|
||||
if result['result'] == 'error':
|
||||
return ""
|
||||
else:
|
||||
return result['data']['name']
|
||||
|
||||
def FindEpisode(self, showId, name=None, description=None):
|
||||
jsonurl = urlopen("{0}?cmd=show.seasons&tvdbid={1}".format(self.__GetApiURL(), showId))
|
||||
|
||||
@@ -81,10 +81,13 @@ class TVData:
|
||||
show.season = str(result[0])
|
||||
show.episode = str(result[1])
|
||||
show.subtitle = result[2]
|
||||
|
||||
if show.subtitle is None or show.subtitle == "":
|
||||
show.subtitle = sickbeard.FindEpisodeName(showId, show.season, show.episode)
|
||||
|
||||
#if show.season != "0" and show.episode != "0":
|
||||
show.season = self.FixEpisodeSeasonNumber(show.season)
|
||||
show.episode = self.FixEpisodeSeasonNumber(show.episode)
|
||||
show.season = self.FixEpisodeSeasonNumber(show.season)
|
||||
show.episode = self.FixEpisodeSeasonNumber(show.episode)
|
||||
|
||||
seasonFolder = "Season {0}".format(show.season)
|
||||
season = "S{0}".format(show.season)
|
||||
|
||||
@@ -4,4 +4,3 @@ Created on Fri Jul 5 14:12:38 2013
|
||||
|
||||
@author: shanef
|
||||
"""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user