mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 00:43:37 +00:00
Fix for anidb errors
This commit is contained in:
parent
75f69396d4
commit
a16bf8ca2c
2 changed files with 13 additions and 12 deletions
|
@ -224,9 +224,6 @@ class Anime(aniDBabstractObject):
|
||||||
class Episode(aniDBabstractObject):
|
class Episode(aniDBabstractObject):
|
||||||
|
|
||||||
def __init__(self, aniDB, number=None, epid=None, filePath=None, fid=None, epno=None, paramsA=None, paramsF=None, load=False, calculate=False):
|
def __init__(self, aniDB, number=None, epid=None, filePath=None, fid=None, epno=None, paramsA=None, paramsF=None, load=False, calculate=False):
|
||||||
if not aniDB and not number and not epid and not file and not fid:
|
|
||||||
return None
|
|
||||||
|
|
||||||
self.maper = AniDBMaper()
|
self.maper = AniDBMaper()
|
||||||
self.epid = epid
|
self.epid = epid
|
||||||
self.filePath = filePath
|
self.filePath = filePath
|
||||||
|
|
|
@ -23,12 +23,11 @@ import threading
|
||||||
import regexes
|
import regexes
|
||||||
import sickbeard
|
import sickbeard
|
||||||
|
|
||||||
from sickbeard import logger, helpers, scene_numbering, common
|
from sickbeard import logger, helpers, scene_numbering, common, exceptions
|
||||||
from dateutil import parser
|
from dateutil import parser
|
||||||
|
|
||||||
nameparser_lock = threading.Lock()
|
nameparser_lock = threading.Lock()
|
||||||
|
|
||||||
|
|
||||||
class NameParser(object):
|
class NameParser(object):
|
||||||
ALL_REGEX = 0
|
ALL_REGEX = 0
|
||||||
NORMAL_REGEX = 1
|
NORMAL_REGEX = 1
|
||||||
|
@ -522,11 +521,16 @@ class ParseResult(object):
|
||||||
|
|
||||||
if self.show.is_anime and len(self.ab_episode_numbers):
|
if self.show.is_anime and len(self.ab_episode_numbers):
|
||||||
for epAbsNo in self.ab_episode_numbers:
|
for epAbsNo in self.ab_episode_numbers:
|
||||||
a = scene_numbering.get_indexer_absolute_numbering(self.show.indexerid, self.show.indexer, epAbsNo)
|
ab = scene_numbering.get_indexer_absolute_numbering(self.show.indexerid, self.show.indexer, epAbsNo)
|
||||||
if a:
|
if ab:
|
||||||
(s, e) = helpers.get_all_episodes_from_absolute_number(self.show, None, [a])
|
try:
|
||||||
|
(s, e) = helpers.get_all_episodes_from_absolute_number(self.show, None, [ab])
|
||||||
new_absolute_numbers.append(a)
|
except exceptions.EpisodeNotFoundByAbsoluteNumberException:
|
||||||
|
logger.log(str(self.show.indexerid) + ": Indexer object absolute number " + str(
|
||||||
|
ab) + " is incomplete, skipping this episode")
|
||||||
|
return self
|
||||||
|
else:
|
||||||
|
new_absolute_numbers.append(ab)
|
||||||
new_episode_numbers.extend(e)
|
new_episode_numbers.extend(e)
|
||||||
new_season_numbers.append(s)
|
new_season_numbers.append(s)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue