mirror of
https://code.eliotberriot.com/funkwhale/funkwhale.git
synced 2025-10-04 21:19:15 +02:00
See #272: added admin and model for transcoding
This commit is contained in:
parent
f06295a5b3
commit
baf5a350b3
3 changed files with 100 additions and 0 deletions
|
@ -78,6 +78,28 @@ class UploadAdmin(admin.ModelAdmin):
|
|||
list_filter = ["mimetype", "import_status", "library__privacy_level"]
|
||||
|
||||
|
||||
@admin.register(models.UploadVersion)
|
||||
class UploadVersionAdmin(admin.ModelAdmin):
|
||||
list_display = [
|
||||
"upload",
|
||||
"audio_file",
|
||||
"mimetype",
|
||||
"size",
|
||||
"bitrate",
|
||||
"creation_date",
|
||||
"accessed_date",
|
||||
]
|
||||
list_select_related = ["upload"]
|
||||
search_fields = [
|
||||
"upload__source",
|
||||
"upload__acoustid_track_id",
|
||||
"upload__track__title",
|
||||
"upload__track__album__title",
|
||||
"upload__track__artist__name",
|
||||
]
|
||||
list_filter = ["mimetype"]
|
||||
|
||||
|
||||
def launch_scan(modeladmin, request, queryset):
|
||||
for library in queryset:
|
||||
library.schedule_scan(actor=request.user.actor, force=True)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue