diff --git a/buscribe-api/buscribeapi/main.py b/buscribe-api/buscribeapi/main.py index 87568c2..f653763 100644 --- a/buscribe-api/buscribeapi/main.py +++ b/buscribe-api/buscribeapi/main.py @@ -37,7 +37,8 @@ def servelet(server): logging.info('Starting WSGI server.') server.serve_forever() - +@argh.arg('channel', + help="Twitch channel to transcribe.") @argh.arg('--host', help='Address or socket server will listen to. Default is 0.0.0.0 (everything on the local machine).') @argh.arg('--port', @@ -49,7 +50,7 @@ def servelet(server): help='The start time in UTC for the event, for UTC-Bustime conversion') @argh.arg('--base-dir', help='Directory from which segments will be grabbed. Default is current working directory.') -def main(database="", host='0.0.0.0', port=8010, bustime_start=None, base_dir=None): +def main(channel, database="", host='0.0.0.0', port=8010, bustime_start=None, base_dir=None): if bustime_start is None: logging.error("Missing --bustime-start!") exit(1) @@ -62,7 +63,7 @@ def main(database="", host='0.0.0.0', port=8010, bustime_start=None, base_dir=No logging.error("Invalid --bustime-start!") exit(1) - app.segments_dir = base_dir + app.segments_dir = os.path.join(base_dir, channel, "source") app.db_manager = DBManager(dsn=database)