44 lines
1.2 KiB
Python
44 lines
1.2 KiB
Python
class IndicatorCombinator():
|
|
|
|
IDENTIFIER = 'indicator'
|
|
|
|
MAX_SEASON = 2
|
|
MAX_EPISODE = 3
|
|
|
|
def __init__(self, context = None):
|
|
self._context = context
|
|
self._logger = context['logger']
|
|
self._reportLogger = context['report_logger']
|
|
|
|
def getIdentifier(self):
|
|
return IndicatorCombinator.IDENTIFIER
|
|
|
|
def getPayload(self, season: int = -1, episode: int = -1):
|
|
if season == -1 and episode == -1:
|
|
return {
|
|
'variant': 'S00E00',
|
|
'indicator': '',
|
|
'season': season,
|
|
'episode': episode
|
|
}
|
|
else:
|
|
return {
|
|
'variant': f"S{season:02d}E{episode:02d}",
|
|
'indicator': f"S{season:02d}E{episode:02d}",
|
|
'season': season,
|
|
'episode': episode
|
|
}
|
|
|
|
def assertFunc(self, testObj = {}):
|
|
pass
|
|
|
|
def shouldFail(self):
|
|
return False
|
|
|
|
def getYield(self):
|
|
|
|
yield self.getPayload()
|
|
for season in range(IndicatorCombinator.MAX_SEASON):
|
|
for episode in range(IndicatorCombinator.MAX_EPISODE):
|
|
yield self.getPayload(season+1, episode+1)
|