Add useful fields to the Encodings admin screen (#885)

This commit is contained in:
Kyle Maas 2023-11-10 08:37:40 -05:00 committed by GitHub
parent fdff0811a1
commit 4829adf110
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,18 @@ class SubtitleAdmin(admin.ModelAdmin):
class EncodingAdmin(admin.ModelAdmin): class EncodingAdmin(admin.ModelAdmin):
pass list_display = ["get_title", "chunk", "profile", "progress", "status", "has_file"]
list_filter = ["chunk", "profile", "status"]
def get_title(self, obj):
return str(obj)
get_title.short_description = "Encoding"
def has_file(self, obj):
return obj.media_encoding_url is not None
has_file.short_description = "Has file"
admin.site.register(EncodeProfile, EncodeProfileAdmin) admin.site.register(EncodeProfile, EncodeProfileAdmin)