ff
This commit is contained in:
@@ -83,6 +83,8 @@ def filterFilename(fileName: str) -> str:
|
|||||||
fileName = str(fileName).replace('*', '')
|
fileName = str(fileName).replace('*', '')
|
||||||
fileName = str(fileName).replace("'", '')
|
fileName = str(fileName).replace("'", '')
|
||||||
fileName = str(fileName).replace("?", '#')
|
fileName = str(fileName).replace("?", '#')
|
||||||
|
fileName = str(fileName).replace('♥', '')
|
||||||
|
fileName = str(fileName).replace('’', '')
|
||||||
|
|
||||||
return fileName.strip()
|
return fileName.strip()
|
||||||
|
|
||||||
|
|||||||
@@ -18,9 +18,16 @@ class ShiftedSeasonController():
|
|||||||
self.Session = self.context['database']['session'] # convenience
|
self.Session = self.context['database']['session'] # convenience
|
||||||
|
|
||||||
def checkShiftedSeason(self, showId: int, shiftedSeasonObj: dict, shiftedSeasonId: int = 0):
|
def checkShiftedSeason(self, showId: int, shiftedSeasonObj: dict, shiftedSeasonId: int = 0):
|
||||||
|
"""
|
||||||
|
Check if for a particula season
|
||||||
|
|
||||||
|
shiftedSeasonId
|
||||||
|
"""
|
||||||
|
|
||||||
try:
|
try:
|
||||||
s = self.Session()
|
s = self.Session()
|
||||||
|
|
||||||
|
originalSeason = shiftedSeasonObj['original_season']
|
||||||
firstEpisode = int(shiftedSeasonObj['first_episode'])
|
firstEpisode = int(shiftedSeasonObj['first_episode'])
|
||||||
lastEpisode = int(shiftedSeasonObj['last_episode'])
|
lastEpisode = int(shiftedSeasonObj['last_episode'])
|
||||||
|
|
||||||
@@ -31,11 +38,14 @@ class ShiftedSeasonController():
|
|||||||
siblingShiftedSeason: ShiftedSeason
|
siblingShiftedSeason: ShiftedSeason
|
||||||
for siblingShiftedSeason in q.all():
|
for siblingShiftedSeason in q.all():
|
||||||
|
|
||||||
|
siblingOriginalSeason = siblingShiftedSeason.getOriginalSeason
|
||||||
siblingFirstEpisode = siblingShiftedSeason.getFirstEpisode()
|
siblingFirstEpisode = siblingShiftedSeason.getFirstEpisode()
|
||||||
siblingLastEpisode = siblingShiftedSeason.getLastEpisode()
|
siblingLastEpisode = siblingShiftedSeason.getLastEpisode()
|
||||||
|
|
||||||
if (lastEpisode >= siblingFirstEpisode
|
if (originalSeason == siblingOriginalSeason
|
||||||
|
and lastEpisode >= siblingFirstEpisode
|
||||||
and siblingLastEpisode >= firstEpisode):
|
and siblingLastEpisode >= firstEpisode):
|
||||||
|
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user