#137 Deployment: **Upgrade to Liquidsoap 2.4**: code has been adapted to work with liquidsoap 2.4 Co-authored-by: bkfox <thomas bkfox net> Reviewed-on: #138
This commit was merged in pull request #138.
This commit is contained in:
@@ -133,8 +133,10 @@ class Monitor:
|
||||
# get sound
|
||||
diff = None
|
||||
sound = Sound.objects.path(air_uri).first()
|
||||
if sound and sound.episode_id is not None:
|
||||
diff = Diffusion.objects.episode(id=sound.episode_id).on_air().now(air_time).first()
|
||||
if sound:
|
||||
ids = sound.episodesound_set.values_list("episode_id", flat=True)
|
||||
if ids:
|
||||
diff = Diffusion.objects.filter(episode_id__in=ids).on_air().now(air_time).first()
|
||||
|
||||
# log sound on air
|
||||
return self.log(
|
||||
@@ -198,7 +200,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 +229,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,
|
||||
|
||||
Reference in New Issue
Block a user