forked from rc/aircox
streamer sound uri/path
This commit is contained in:
@ -136,7 +136,7 @@ class Monitor:
|
||||
|
||||
# check if there is yet a log for this sound on the source
|
||||
log = self.logs.on_air().filter(
|
||||
Q(sound__path=air_uri) |
|
||||
Q(sound__file=air_uri) |
|
||||
# sound can be null when arbitrary sound file is played
|
||||
Q(sound__isnull=True, track__isnull=True, comment=air_uri),
|
||||
source=source.id,
|
||||
@ -147,7 +147,7 @@ class Monitor:
|
||||
|
||||
# get sound
|
||||
diff = None
|
||||
sound = Sound.objects.filter(path=air_uri).first()
|
||||
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()
|
||||
@ -227,7 +227,7 @@ class Monitor:
|
||||
self.cancel_diff(dealer, diff)
|
||||
|
||||
def start_diff(self, source, diff):
|
||||
playlist = Sound.objects.episode(id=diff.episode_id).paths()
|
||||
playlist = Sound.objects.episode(id=diff.episode_id).playlist()
|
||||
source.push(*playlist)
|
||||
self.log(type=Log.TYPE_START, source=source.id, diffusion=diff,
|
||||
comment=str(diff))
|
||||
|
Reference in New Issue
Block a user