create EpisodeSound & adapt; update list editors
This commit is contained in:
@ -198,7 +198,7 @@ class Monitor:
|
||||
Diffusion.objects.station(self.station)
|
||||
.on_air()
|
||||
.now(now)
|
||||
.filter(episode__sound__type=Sound.TYPE_ARCHIVE)
|
||||
.filter(episode__episodesound__broadcast=True)
|
||||
.first()
|
||||
)
|
||||
# Can't use delay: diffusion may start later than its assigned start.
|
||||
@ -227,7 +227,7 @@ class Monitor:
|
||||
return log
|
||||
|
||||
def start_diff(self, source, diff):
|
||||
playlist = Sound.objects.episode(id=diff.episode_id).playlist()
|
||||
playlist = diff.episode.episodesound_set.all().broadcast().playlist()
|
||||
source.push(*playlist)
|
||||
self.log(
|
||||
type=Log.TYPE_START,
|
||||
|
@ -80,7 +80,7 @@ class PlaylistSource(Source):
|
||||
|
||||
def get_sound_queryset(self):
|
||||
"""Get playlist's sounds queryset."""
|
||||
return self.program.sound_set.archive()
|
||||
return self.program.sound_set.broadcast()
|
||||
|
||||
def get_playlist(self):
|
||||
"""Get playlist from db."""
|
||||
|
@ -137,7 +137,7 @@ class QueueSourceViewSet(SourceViewSet):
|
||||
model = controllers.QueueSource
|
||||
|
||||
def get_sound_queryset(self, request):
|
||||
return Sound.objects.station(request.station).archive()
|
||||
return Sound.objects.station(request.station).broadcast()
|
||||
|
||||
@action(detail=True, methods=["POST"])
|
||||
def push(self, request, pk):
|
||||
|
Reference in New Issue
Block a user