diff options
Diffstat (limited to 'module/web/cnl')
-rw-r--r-- | module/web/cnl/urls.py | 1 | ||||
-rw-r--r-- | module/web/cnl/views.py | 10 |
2 files changed, 11 insertions, 0 deletions
diff --git a/module/web/cnl/urls.py b/module/web/cnl/urls.py index 7887953b7..635e751ca 100644 --- a/module/web/cnl/urls.py +++ b/module/web/cnl/urls.py @@ -16,5 +16,6 @@ urlpatterns = patterns('cnl', (r'^addcrypted2$', 'views.addcrypted2'), (r'^crossdomain\.xml', 'views.crossdomain'), (r'^jdcheck\.js', 'views.jdcheck'), + (r'^checkSupportForUrl', 'views.checksupport'), (r'', 'views.flash') ) diff --git a/module/web/cnl/views.py b/module/web/cnl/views.py index 46db5e76e..c2e95151c 100644 --- a/module/web/cnl/views.py +++ b/module/web/cnl/views.py @@ -160,6 +160,16 @@ def crossdomain(request): return HttpResponse(rep) @local_check +def checksupport(request): + supported = False + + url = request.GET.get("url") + res = settings.PYLOAD.checkURLs([url]) + supported = (not res[0][1] is None) + + return JsonResponse(str(supported).lower(), request) + +@local_check def jdcheck(request): rep = "jdownloader=true;\n" rep += "var version='10629';\n" |