Fix manual search - append apikey

This commit is contained in:
chibidev
2017-08-12 01:04:30 +02:00
parent bf23878477
commit eec07bc5b8
2 changed files with 4 additions and 1 deletions

View File

@@ -70,6 +70,8 @@ function loadJackettSettings() {
basePath = '';
}
api.key = data.api_key;
$("#jackett-savedir").val(data.blackholedir);
$("#jackett-allowext").attr('checked', data.external);
$("#jackett-allowupdate").attr('checked', data.updatedisabled);

View File

@@ -1,6 +1,7 @@
var api = {
version: "2.0",
root: "/api",
key: "",
getApiPath: function(category, action) {
var path = this.root + "/v" + this.version + "/" + category;
@@ -47,7 +48,7 @@ var api = {
},
resultsForIndexer: function(indexerId, query, callback) {
return $.get(this.getApiPath("indexers", indexerId + "/results"), query, callback);
return $.get(this.getApiPath("indexers", indexerId + "/results?apikey=" + this.key), query, callback);
},
getServerCache: function(callback) {