|
@@ -69,9 +69,7 @@ def main():
|
|
|
|
|
|
|
|
stations_parser = subparsers.add_parser('station')
|
|
stations_parser = subparsers.add_parser('station')
|
|
|
stations_parser.add_argument('action')
|
|
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',
|
|
stations_parser.add_argument('--play-only', dest='play_only',
|
|
|
action='store_const',
|
|
action='store_const',
|
|
|
const=True,
|
|
const=True,
|
|
@@ -172,7 +170,7 @@ def main():
|
|
|
if '.' not in dr:
|
|
if '.' not in dr:
|
|
|
print(dr)
|
|
print(dr)
|
|
|
|
|
|
|
|
- elif action == 'record-all' or action == 'play-all':
|
|
|
|
|
|
|
+ elif action == 'record-all' or action == 'play':
|
|
|
import pyaudio, wave
|
|
import pyaudio, wave
|
|
|
|
|
|
|
|
if action == 'play-all':
|
|
if action == 'play-all':
|
|
@@ -185,23 +183,14 @@ def main():
|
|
|
output=True)
|
|
output=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
- receivers_count = config['receivers_count']
|
|
|
|
|
processes = []
|
|
processes = []
|
|
|
transcoders = []
|
|
transcoders = []
|
|
|
totals = []
|
|
totals = []
|
|
|
basepath = '/var/fourier/tests'
|
|
basepath = '/var/fourier/tests'
|
|
|
env = os.environ
|
|
env = os.environ
|
|
|
stream_index = 0
|
|
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):
|
|
if not os.path.isdir(basepath):
|
|
|
os.mkdir(basepath)
|
|
os.mkdir(basepath)
|