Skip to content

Commit

Permalink
Attempted hotfix to v2 settings port
Browse files Browse the repository at this point in the history
  • Loading branch information
roboticsound committed Sep 16, 2017
1 parent 6bb0a73 commit 5de0a0e
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 5 deletions.
2 changes: 1 addition & 1 deletion manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"name": "Pulsarr",
"author": "roboticsound",
"description": "Add movies to Radarr from IMDB",
"version": "2.0",
"version": "2.0.1",

"icons": {
"16": "/img/icons/pulsarr/16.png",
Expand Down
46 changes: 42 additions & 4 deletions popup.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,45 @@
"use strict";
var pulsarr;
var pulsarrConfig;
var pulsarrConfig = {
"radarr": {
"isEnabled": false,
"configuration": {
"host": "",
"port": "",
"apikey": "",
"isAuth": false,
"auth": {
"user": "",
"password": "",
},
"rootpath": ""
},
"preferences": {
"monitored": true,
"minAvail": "announced",
"qualityProfileId": 1
}
},
"sonarr": {
"isEnabled": false,
"configuration": {
"host": "",
"port": "",
"apikey": "",
"isAuth": false,
"auth": {
"user": "",
"password": "",
},
"rootpath": ""
},
"preferences": {
"monitored": true,
"seriesType": "standard",
"qualityProfileId": 1
}
}
};
var radarr;
var sonarr;

Expand Down Expand Up @@ -227,8 +266,9 @@ class Pulsarr {
localStorage.removeItem("password");
pulsarrConfig.radarr.configuration.rootpath = localStorage.getItem("moviePath");
localStorage.removeItem("moviePath");
localStorage.setItem("pulsarrConfig", JSON.stringify(pulsarrConfig));
}

}

class Server {
Expand Down Expand Up @@ -277,7 +317,6 @@ class Server {
var url = self.constructBaseUrl() + endpoint + "?" + params;

http.open("GET", url, true);
http.timeout = 15000;
if (self.auth === "true") http.setRequestHeader("Authorization", "Basic " + btoa(self.user + ":" + self.password));
http.setRequestHeader("X-Api-Key", self.apikey);

Expand Down Expand Up @@ -321,7 +360,6 @@ class Server {
var url = self.constructBaseUrl() + endpoint;

http.open("POST", url, true);
http.timeout = 5000;
if (self.auth == "true") http.setRequestHeader("Authorization", "Basic " + btoa(self.user + ":" + self.password));
http.setRequestHeader("X-Api-Key", self.apikey);

Expand Down

0 comments on commit 5de0a0e

Please sign in to comment.