Skip to content

Commit 34e77e9

Browse files
committed
Get recording name from request
1 parent ba35f63 commit 34e77e9

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

localhost-vao-recorder.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
import socket
55

6-
from flask import Flask
6+
from flask import Flask, request
77

88
app = Flask(__name__)
99

@@ -12,13 +12,11 @@
1212
# ! Workaround: Global variable because it is not JSON serializable and can't
1313
# ! be stored in Flask.session.
1414
recorder = Recorder(Config.from_yaml(), setup_name=False)
15-
print(yaml_dump(recorder.config))
16-
1715

1816
@app.route('/setup', methods=['GET'])
1917
def setup():
20-
# TODO get recording name from request
21-
recorder.setup()
18+
name = request.args.get('name', None)
19+
recorder.setup(name=name)
2220
return str(recorder.next_output.name)
2321

2422

0 commit comments

Comments
 (0)