feat(main): commit
This commit is contained in:
@@ -85,6 +85,8 @@ class MediaSource(models.Model):
|
||||
PLAYLIST = 'playlist', 'Playlist'
|
||||
STREAM = 'stream', 'Stream'
|
||||
API_FEED = 'api_feed', 'API Feed'
|
||||
YOUTUBE_CHANNEL = 'youtube_channel', 'YouTube Channel'
|
||||
YOUTUBE_PLAYLIST = 'youtube_playlist', 'YouTube Playlist'
|
||||
|
||||
source_type = models.CharField(max_length=32, choices=SourceType.choices)
|
||||
uri = models.TextField()
|
||||
@@ -152,6 +154,11 @@ class MediaItem(models.Model):
|
||||
is_active = models.BooleanField(default=True)
|
||||
date_added_at = models.DateTimeField(auto_now_add=True)
|
||||
metadata_json = models.JSONField(default=dict)
|
||||
# YouTube-specific: the video ID from yt-dlp
|
||||
youtube_video_id = models.CharField(max_length=64, blank=True, null=True, db_index=True)
|
||||
# Local cache path for downloaded YouTube videos (distinct from file_path which holds source URI)
|
||||
cached_file_path = models.TextField(blank=True, null=True)
|
||||
cache_expires_at = models.DateTimeField(blank=True, null=True)
|
||||
|
||||
genres = models.ManyToManyField(Genre, related_name="media_items", blank=True)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user