start liquidsoap part; fix some bugs; update Stream model
This commit is contained in:
@ -60,7 +60,7 @@ class SoundAdmin (NameableAdmin):
|
||||
|
||||
@admin.register(Stream)
|
||||
class StreamAdmin (SortableModelAdmin):
|
||||
list_display = ('id', 'name', 'type', 'priority')
|
||||
list_display = ('id', 'name', 'type')
|
||||
sortable = "priority"
|
||||
|
||||
|
||||
|
@ -102,7 +102,6 @@ class Command (BaseCommand):
|
||||
self.report(program, path, 'no diffusion found for the given date')
|
||||
return
|
||||
diffusion = diffusion[0]
|
||||
print(diffusion, sound_info)
|
||||
return diffusion.episode or None
|
||||
|
||||
@staticmethod
|
||||
|
@ -404,14 +404,19 @@ class Stream (Nameable):
|
||||
default = True,
|
||||
help_text = _('program list is public'),
|
||||
)
|
||||
active = models.BooleanField(
|
||||
_('active'),
|
||||
default = True,
|
||||
help_text = _('stream is active')
|
||||
)
|
||||
type = models.SmallIntegerField(
|
||||
verbose_name = _('type'),
|
||||
choices = [ (y, x) for x,y in Type.items() ],
|
||||
)
|
||||
priority = models.SmallIntegerField(
|
||||
_('priority'),
|
||||
default = 0,
|
||||
help_text = _('priority of the stream')
|
||||
delay = models.TimeField(
|
||||
_('delay'),
|
||||
blank = True, null = True,
|
||||
help_text = _('play this playlist at least every delay')
|
||||
)
|
||||
time_start = models.TimeField(
|
||||
_('start'),
|
||||
|
Reference in New Issue
Block a user