From: yomguy Date: Tue, 9 Oct 2012 11:20:23 +0000 (+0200) Subject: fix single deefuzzer station X-Git-Tag: 0.9~32^2 X-Git-Url: https://git.parisson.com/?a=commitdiff_plain;h=d61bbf941cb236ccd0134bf60220f7faf7aecce7;p=telecaster-client.git fix single deefuzzer station --- diff --git a/telecaster/models.py b/telecaster/models.py index 2a606cc..18e08fd 100644 --- a/telecaster/models.py +++ b/telecaster/models.py @@ -130,8 +130,11 @@ class Station(Model): self.user = pwd.getpwuid(self.uid)[0] self.encoder = 'TeleCaster system by Parisson' self.save() - - for station in self.conf['deefuzzer']['station']: + + self._stations = self.conf['deefuzzer']['station'] + if not isinstance(self._stations,list): + self._stations = [self._stations] + for station in self._stations: if station['control']['mode'] != '0': port = int(station['control']['port']) osc = OSC.objects.filter(port=port) @@ -143,7 +146,7 @@ class Station(Model): def deefuzzer_setup(self): self.output_dirs = [] self.urls = [] - for station in self.conf['deefuzzer']['station']: + for station in self._stations: if station['record']['mode'] != '0': output_dir = station['record']['dir'] if output_dir[-1] != os.sep: @@ -158,7 +161,6 @@ class Station(Model): self.output_dir = output_dir self.record_dir = output_dir - station['infos']['short_name'] = self.mount_point station['infos']['name'] = self.slug station['infos']['description'] = self.slug