following episode function good, need to work on the random episode and more admin stuff
Gitea Actions Demo / Explore-Gitea-Actions (push) Successful in 7s

This commit is contained in:
2026-08-25 16:24:43 +01:00
parent e66c7034f0
commit e85c372ad8
9 changed files with 193 additions and 8 deletions
+12 -3
View File
@@ -18,8 +18,8 @@ class StreamingSiteTestingData(models.Model):
class StreamingRedirectData(models.Model):
name = models.CharField(primary_key=True,max_length=1000, help_text="Name of the show")
season_to_watch = models.IntegerField(null=False,default=1)
episode_to_watch = models.IntegerField(null=False,default=1)
season = models.IntegerField(null=False,default=1)
episode = models.IntegerField(null=False,default=0)
url_example = models.CharField(max_length=1000, help_text="https://www.1shows.org/tv/456-the-simpsons?streaming=true&season=18&episode=5")
prefix = models.CharField(max_length=1000, help_text="https://www.1shows.org/tv/456-the-simpsons?streaming=true&season=",blank=True, null=True)
infix = models.CharField(max_length=1000, help_text="&episode=",blank=True, null=True)
@@ -27,6 +27,7 @@ class StreamingRedirectData(models.Model):
addedDate = models.DateField('Published', blank=True, null=True, auto_now_add=True)
alias = models.CharField(max_length=1000, null=True,blank=True)
seasonInformation = models.JSONField(default=dict, blank=True)
betaserieShowId = models.IntegerField(null=True,blank=True)
randomViewing = models.BooleanField(default=False)
def sanitize(self, name):
@@ -37,13 +38,21 @@ class StreamingRedirectData(models.Model):
print(serie_name)
print(betaserie.identify_serie(serie_name))
return betaserie.series_information(betaserie.identify_serie(serie_name))[0]
def betaserie_show_id(self,serie_name):
betaserie = betaserieUtils()
print(serie_name)
print(betaserie.identify_serie(serie_name))
return betaserie.identify_serie(serie_name)
def save(self, *args, **kwargs):
if not self.seasonInformation :
self.seasonInformation = self.season_information(self.name)
if not self.alias:
self.alias = self.sanitize(self.name)
if not self.betaserieShowId:
self.betaserieShowId = self.betaserie_show_id(self.name)
super().save(*args, **kwargs)
class Meta: