From 96c3c96633302c6117b84c63714cfadf3cf43f3f Mon Sep 17 00:00:00 2001 From: achbed Date: Wed, 19 Nov 2014 03:18:33 -0600 Subject: [PATCH] Add option to append stream type to the mount path for icecast streams. Default is enabled (matches current behavior) Signed-off-by: achbed --- deefuzzer/station.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deefuzzer/station.py b/deefuzzer/station.py index 6cb020c..1b04c8b 100644 --- a/deefuzzer/station.py +++ b/deefuzzer/station.py @@ -72,6 +72,7 @@ class Station(Thread): record_mode = 0 run_mode = 1 station_dir = None + appendtype = 1 def __init__(self, station, q, logger, m3u): Thread.__init__(self) @@ -105,6 +106,9 @@ class Station(Thread): self.short_name = self.mountpoint + if 'appendtype' in self.station['server'].keys(): + self.appendtype = self.station['server']['appendtype'] + if 'type' in self.station['server']: self.type = self.station['server']['type'] # 'icecast' | 'stream-m' else: @@ -115,7 +119,9 @@ class Station(Thread): self.channel.mount = '/publish/' + self.mountpoint elif 'icecast' in self.type: self.channel = shout.Shout() - self.channel.mount = '/' + self.mountpoint + '.' + self.media_format + self.channel.mount = '/' + self.mountpoint + if self.appendtype: + self.channel.mount = self.channel.mount + '.' + self.media_format else: sys.exit('Not a compatible server type. Choose "stream-m" or "icecast".') -- 2.39.5