1
0
mirror of https://github.com/moparisthebest/SickRage synced 2024-12-14 03:52:22 -05:00

Merge pull request #815 from KontiSR/dev_fix_tokyotosho_no_rows_returned

Dev fix tokyotosho no rows returned
This commit is contained in:
echel0n 2014-09-19 20:54:38 -07:00
commit a20b9cb6ba
2 changed files with 16 additions and 15 deletions

View File

@ -105,6 +105,7 @@ class TokyoToshokanProvider(generic.TorrentProvider):
with BS4Parser(data, features=["html5lib", "permissive"]) as soup: with BS4Parser(data, features=["html5lib", "permissive"]) as soup:
torrent_table = soup.find('table', attrs={'class': 'listing'}) torrent_table = soup.find('table', attrs={'class': 'listing'})
torrent_rows = torrent_table.find_all('tr') if torrent_table else [] torrent_rows = torrent_table.find_all('tr') if torrent_table else []
if torrent_rows:
if torrent_rows[0].find('td', attrs={'class': 'centertext'}): if torrent_rows[0].find('td', attrs={'class': 'centertext'}):
a = 1 a = 1
else: else:

View File

@ -190,7 +190,7 @@ def makeSceneSearchString(show, ep_obj):
if (show.air_by_date or show.sports) and ep_obj.airdate != datetime.date.fromordinal(1): if (show.air_by_date or show.sports) and ep_obj.airdate != datetime.date.fromordinal(1):
epStrings = [str(ep_obj.airdate)] epStrings = [str(ep_obj.airdate)]
elif show.is_anime: elif show.is_anime:
epStrings = ["%02i" % int(ep_obj.scene_absolute_number)] epStrings = ["%02i" % int(ep_obj.scene_absolute_number if ep_obj.scene_absolute_number > 0 else ep_obj.scene_episode)]
else: else:
epStrings = ["S%02iE%02i" % (int(ep_obj.scene_season), int(ep_obj.scene_episode)), epStrings = ["S%02iE%02i" % (int(ep_obj.scene_season), int(ep_obj.scene_episode)),
"%ix%02i" % (int(ep_obj.scene_season), int(ep_obj.scene_episode))] "%ix%02i" % (int(ep_obj.scene_season), int(ep_obj.scene_episode))]