feat(main): main

This commit is contained in:
2026-03-09 08:26:45 -04:00
parent f37382d2b8
commit f14454b4c8
12 changed files with 598 additions and 62 deletions

View File

@@ -255,6 +255,7 @@ class ChannelSourceRule(models.Model):
channel = models.ForeignKey(Channel, on_delete=models.CASCADE)
media_source = models.ForeignKey(MediaSource, on_delete=models.CASCADE, blank=True, null=True)
media_collection = models.ForeignKey(MediaCollection, on_delete=models.CASCADE, blank=True, null=True)
schedule_block_label = models.CharField(max_length=255, blank=True, null=True)
class RuleMode(models.TextChoices):
ALLOW = 'allow', 'Allow'
@@ -347,6 +348,16 @@ class ScheduleBlock(models.Model):
end_local_time = models.TimeField()
day_of_week_mask = models.SmallIntegerField() # 1 to 127
spills_past_midnight = models.BooleanField(default=False)
class TargetRating(models.IntegerChoices):
TV_Y = 1, 'TV-Y / All Children'
TV_Y7 = 2, 'TV-Y7 / Directed to Older Children'
TV_G = 3, 'TV-G / General Audience'
TV_PG = 4, 'TV-PG / Parental Guidance Suggested'
TV_14 = 5, 'TV-14 / Parents Strongly Cautioned'
TV_MA = 6, 'TV-MA / Mature Audience Only'
target_content_rating = models.IntegerField(choices=TargetRating.choices, blank=True, null=True)
default_genre = models.ForeignKey(Genre, on_delete=models.SET_NULL, blank=True, null=True)
min_content_rating = models.ForeignKey(ContentRating, on_delete=models.SET_NULL, blank=True, null=True, related_name='+')
max_content_rating = models.ForeignKey(ContentRating, on_delete=models.SET_NULL, blank=True, null=True, related_name='+')