Skip to content

Commit

Permalink
Add useful fields to the Encodings admin screen (#885)
Browse files Browse the repository at this point in the history
  • Loading branch information
KyleMaas committed Nov 10, 2023
1 parent fdff081 commit 4829adf
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion files/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,18 @@ class SubtitleAdmin(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)
Expand Down

0 comments on commit 4829adf

Please sign in to comment.