()
| 118 | @route("/flashgot", method="POST") |
| 119 | @local_check |
| 120 | def flashgot(): |
| 121 | if request.environ['HTTP_REFERER'] != "http://localhost:9666/flashgot" and request.environ['HTTP_REFERER'] != "http://127.0.0.1:9666/flashgot": |
| 122 | return HTTPError() |
| 123 | |
| 124 | autostart = int(request.forms.get('autostart', 0)) |
| 125 | package = request.forms.get('package', None) |
| 126 | urls = [x.strip() for x in request.POST['urls'].split("\n") if x.strip()] |
| 127 | folder = request.forms.get('dir', None) |
| 128 | |
| 129 | if package: |
| 130 | PYLOAD.addPackage(package, urls, autostart) |
| 131 | else: |
| 132 | PYLOAD.generateAndAddPackages(urls, autostart) |
| 133 | |
| 134 | return "" |
| 135 | |
| 136 | @route("/crossdomain.xml") |
| 137 | @local_check |
nothing calls this directly
no test coverage detected