[videos] Add preliminary Twitch video support

This commit is contained in:
2026-04-02 11:10:39 -04:00
parent 1bf558938d
commit b6af201ba3
10 changed files with 430 additions and 24 deletions

View File

@ -397,6 +397,7 @@ class Scrobble(TimeStampedModel):
LIFE_EVENT = "LifeEvent", "Life event"
MOOD = "Mood", "Mood"
BRICKSET = "BrickSet", "Brick set"
CHANNEL = "Channel", "Channel"
@classmethod
def list(cls):
@ -404,6 +405,7 @@ class Scrobble(TimeStampedModel):
uuid = models.UUIDField(editable=False, **BNULL)
video = models.ForeignKey(Video, on_delete=models.DO_NOTHING, **BNULL)
channel = models.ForeignKey("videos.Channel", on_delete=models.DO_NOTHING, **BNULL)
track = models.ForeignKey(Track, on_delete=models.DO_NOTHING, **BNULL)
podcast_episode = models.ForeignKey(
PodcastEpisode, on_delete=models.DO_NOTHING, **BNULL
@ -961,6 +963,8 @@ class Scrobble(TimeStampedModel):
media_obj = self.task
if self.food:
media_obj = self.food
if self.channel:
media_obj = self.channel
return media_obj
def __str__(self):