30 lines
1,008 B
Python
30 lines
1,008 B
Python
from django.contrib import admin
|
|
from .models import EpisodeProgress, PodcastEpisode, PodcastFeed, PodcastQueue
|
|
|
|
|
|
@admin.register(PodcastFeed)
|
|
class PodcastFeedAdmin(admin.ModelAdmin):
|
|
list_display = ('title', 'user', 'last_refreshed_at', 'added_at')
|
|
list_filter = ('user',)
|
|
search_fields = ('title', 'rss_url')
|
|
readonly_fields = ('added_at', 'last_refreshed_at')
|
|
|
|
|
|
@admin.register(PodcastEpisode)
|
|
class PodcastEpisodeAdmin(admin.ModelAdmin):
|
|
list_display = ('title', 'feed', 'pub_date', 'duration_seconds')
|
|
list_filter = ('feed__user',)
|
|
search_fields = ('title', 'guid')
|
|
readonly_fields = ('discovered_at',)
|
|
|
|
|
|
@admin.register(EpisodeProgress)
|
|
class EpisodeProgressAdmin(admin.ModelAdmin):
|
|
list_display = ('user', 'episode', 'position_seconds', 'played', 'updated_at')
|
|
list_filter = ('user', 'played')
|
|
|
|
|
|
@admin.register(PodcastQueue)
|
|
class PodcastQueueAdmin(admin.ModelAdmin):
|
|
list_display = ('user', 'episode', 'position', 'added_at')
|
|
list_filter = ('user',)
|