start liquidsoap part; fix some bugs; update Stream model

This commit is contained in:
bkfox
2015-11-03 23:20:03 +01:00
parent 86bc9c1251
commit bd987bd62c
5 changed files with 159 additions and 6 deletions

View File

@ -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"

View File

@ -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

View File

@ -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'),