forked from rc/aircox
work on admin interface, player, list of sounds
This commit is contained in:
@ -268,38 +268,6 @@ class Sound(Nameable):
|
||||
verbose_name_plural = _('Sounds')
|
||||
|
||||
|
||||
class Stream(models.Model):
|
||||
"""
|
||||
When there are no program scheduled, it is possible to play sounds
|
||||
in order to avoid blanks. A Stream is a Program that plays this role,
|
||||
and whose linked to a Stream.
|
||||
|
||||
All sounds that are marked as good and that are under the related
|
||||
program's archive dir are elligible for the sound's selection.
|
||||
"""
|
||||
program = models.ForeignKey(
|
||||
'Program',
|
||||
verbose_name = _('related program'),
|
||||
)
|
||||
delay = models.TimeField(
|
||||
_('delay'),
|
||||
blank = True, null = True,
|
||||
help_text = _('delay between two sound plays')
|
||||
)
|
||||
begin = models.TimeField(
|
||||
_('begin'),
|
||||
blank = True, null = True,
|
||||
help_text = _('used to define a time range this stream is'
|
||||
'played')
|
||||
)
|
||||
end = models.TimeField(
|
||||
_('end'),
|
||||
blank = True, null = True,
|
||||
help_text = _('used to define a time range this stream is'
|
||||
'played')
|
||||
)
|
||||
|
||||
|
||||
class Schedule(models.Model):
|
||||
"""
|
||||
A Schedule defines time slots of programs' diffusions. It can be an initial
|
||||
@ -636,6 +604,38 @@ class DiffusionManager(models.Manager):
|
||||
).order_by('start')
|
||||
|
||||
|
||||
class Stream(models.Model):
|
||||
"""
|
||||
When there are no program scheduled, it is possible to play sounds
|
||||
in order to avoid blanks. A Stream is a Program that plays this role,
|
||||
and whose linked to a Stream.
|
||||
|
||||
All sounds that are marked as good and that are under the related
|
||||
program's archive dir are elligible for the sound's selection.
|
||||
"""
|
||||
program = models.ForeignKey(
|
||||
'Program',
|
||||
verbose_name = _('related program'),
|
||||
)
|
||||
delay = models.TimeField(
|
||||
_('delay'),
|
||||
blank = True, null = True,
|
||||
help_text = _('delay between two sound plays')
|
||||
)
|
||||
begin = models.TimeField(
|
||||
_('begin'),
|
||||
blank = True, null = True,
|
||||
help_text = _('used to define a time range this stream is'
|
||||
'played')
|
||||
)
|
||||
end = models.TimeField(
|
||||
_('end'),
|
||||
blank = True, null = True,
|
||||
help_text = _('used to define a time range this stream is'
|
||||
'played')
|
||||
)
|
||||
|
||||
|
||||
class Diffusion(models.Model):
|
||||
"""
|
||||
A Diffusion is an occurrence of a Program that is scheduled on the
|
||||
|
Reference in New Issue
Block a user