MCPcopy Index your code
hub / github.com/pyload/pyload / flashgot

Function flashgot

module/web/cnl_app.py:120–134  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118@route("/flashgot", method="POST")
119@local_check
120def 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

Callers

nothing calls this directly

Calls 5

HTTPErrorClass · 0.90
splitMethod · 0.80
getMethod · 0.45
addPackageMethod · 0.45

Tested by

no test coverage detected