diff --git a/vrobbler/apps/videos/admin.py b/vrobbler/apps/videos/admin.py index 77b9f4b..0517953 100644 --- a/vrobbler/apps/videos/admin.py +++ b/vrobbler/apps/videos/admin.py @@ -21,17 +21,16 @@ class SeriesAdmin(admin.ModelAdmin): @admin.register(Video) class VideoAdmin(admin.ModelAdmin): date_hierarchy = "created" - raw_id_fields = ("tv_series",) + raw_id_fields = ("tv_series","channel",) list_display = ( "title", "video_type", "year", "tv_series", - "season_number", - "episode_number", + "channel", "imdb_rating", ) - list_filter = ("year", "tv_series", "video_type") + list_filter = ("year", "tv_series", "channel", "video_type") ordering = ("-created",) inlines = [ ScrobbleInline, diff --git a/vrobbler/apps/videos/migrations/0020_channel_youtube_id.py b/vrobbler/apps/videos/migrations/0020_channel_youtube_id.py new file mode 100644 index 0000000..71d5e8c --- /dev/null +++ b/vrobbler/apps/videos/migrations/0020_channel_youtube_id.py @@ -0,0 +1,21 @@ +# Generated by Django 4.2.16 on 2024-11-06 16:07 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ( + "videos", + "0019_rename_youtube_url_video_youtube_id_channel_and_more", + ), + ] + + operations = [ + migrations.AddField( + model_name="channel", + name="youtube_id", + field=models.CharField(blank=True, max_length=255, null=True), + ), + ] diff --git a/vrobbler/apps/videos/models.py b/vrobbler/apps/videos/models.py index d52d238..fa7432b 100644 --- a/vrobbler/apps/videos/models.py +++ b/vrobbler/apps/videos/models.py @@ -39,6 +39,7 @@ class Channel(TimeStampedModel): format="JPEG", options={"quality": 75}, ) + youtube_id = models.CharField(max_length=255, **BNULL) genre = TaggableManager(through=ObjectWithGenres) def __str__(self):