[podcasts] Fix name for Episode model to PodcastEpisode
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
from django.contrib import admin
|
||||
from podcasts.models import Episode, Podcast, Producer
|
||||
from podcasts.models import PodcastEpisode, Podcast, Producer
|
||||
from scrobbles.admin import ScrobbleInline
|
||||
|
||||
|
||||
@ -21,8 +21,8 @@ class PodcastAdmin(admin.ModelAdmin):
|
||||
ordering = ("name",)
|
||||
|
||||
|
||||
@admin.register(Episode)
|
||||
class EpisodeAdmin(admin.ModelAdmin):
|
||||
@admin.register(PodcastEpisode)
|
||||
class PodcastEpisodeAdmin(admin.ModelAdmin):
|
||||
date_hierarchy = "created"
|
||||
list_display = (
|
||||
"title",
|
||||
|
||||
@ -0,0 +1,18 @@
|
||||
# Generated by Django 4.2.9 on 2024-02-10 18:54
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
("scrobbles", "0048_alter_scrobble_media_type"),
|
||||
("podcasts", "0012_alter_episode_genre"),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameModel(
|
||||
old_name="Episode",
|
||||
new_name="PodcastEpisode",
|
||||
),
|
||||
]
|
||||
@ -76,7 +76,7 @@ class Podcast(TimeStampedModel):
|
||||
self.cover_image.save(fname, ContentFile(r.content), save=True)
|
||||
|
||||
|
||||
class Episode(ScrobblableMixin):
|
||||
class PodcastEpisode(ScrobblableMixin):
|
||||
COMPLETION_PERCENT = getattr(settings, "PODCAST_COMPLETION_PERCENT", 90)
|
||||
|
||||
podcast = models.ForeignKey(Podcast, on_delete=models.DO_NOTHING)
|
||||
|
||||
Reference in New Issue
Block a user