fix some issues, make the liquidsoap monitor working

This commit is contained in:
bkfox
2015-11-23 02:04:37 +01:00
parent 25e3d4cb53
commit edfdd94eda
8 changed files with 88 additions and 123 deletions

View File

@ -53,6 +53,7 @@ class SoundAdmin (NameableAdmin):
(None, { 'fields': ['embed', 'duration', 'mtime'] }),
(None, { 'fields': ['removed', 'good_quality', 'public' ] } )
]
readonly_fields = ('path', 'duration',)
@admin.register(Stream)
@ -82,7 +83,7 @@ class ProgramAdmin (NameableAdmin):
@admin.register(Diffusion)
class DiffusionAdmin (admin.ModelAdmin):
def archives (self, obj):
sounds = obj.get_archives()
sounds = [ str(s) for s in obj.get_archives()]
return ', '.join(sounds) if sounds else ''
list_display = ('id', 'type', 'date', 'archives', 'program', 'initial')