Browse Source

changed play schema

Gamaliel Espinoza 8 years ago
parent
commit
e2901778da
2 changed files with 5 additions and 16 deletions
  1. 1 1
      tools/fourier/__init__.py
  2. 4 15
      tools/fourier/cli.py

+ 1 - 1
tools/fourier/__init__.py

@@ -1 +1 @@
-__version__ = '1.0.2'
+__version__ = '1.0.3'

+ 4 - 15
tools/fourier/cli.py

@@ -69,9 +69,7 @@ def main():
 
     stations_parser = subparsers.add_parser('station')
     stations_parser.add_argument('action')
-    stations_parser.add_argument('station', nargs='?', default='98.5')
-    stations_parser.add_argument('-stations', dest='stations',
-                                 type=parse_stations)
+    stations_parser.add_argument('stations', nargs='*', default=['98.5'])
     stations_parser.add_argument('--play-only', dest='play_only',
                                  action='store_const',
                                  const=True,
@@ -172,7 +170,7 @@ def main():
                 if '.' not in dr:
                     print(dr)
 
-        elif action == 'record-all' or action == 'play-all':
+        elif action == 'record-all' or action == 'play':
             import pyaudio, wave
 
             if action == 'play-all':
@@ -185,23 +183,14 @@ def main():
                                 output=True)
 
             
-            receivers_count = config['receivers_count']
             processes = []
             transcoders = []
             totals = []
             basepath = '/var/fourier/tests'
             env = os.environ
             stream_index = 0
-
-            if args.stations:
-                stations = args.stations
-                if len(stations) < receivers_count:
-                    for i in range(receivers_count - len(stations)):
-                        stations.append('98.5')
-            else:
-                stations = [args.station] * receivers_count
-
-            print(stations)
+            stations = args.stations
+            receivers_count = len(stations)
 
             if not os.path.isdir(basepath):
                 os.mkdir(basepath)