Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
roboticsound committed Sep 19, 2017
2 parents 7513267 + c65a03c commit 20b7198
Show file tree
Hide file tree
Showing 4 changed files with 92 additions and 81 deletions.
24 changes: 0 additions & 24 deletions opt/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -98,18 +98,6 @@ <h3>API Key:<i class="fa fa-question-circle icon-small" data-toggle="tooltip" ar
<input type="text" id="radarrApiKey" class="form-control x-path tt-input form-custom" autocomplete="off" spellcheck="false" dir="auto">
</div>
</div>

<div class="row">
<div class="col-xs-12">
<h3>Root Path:<i class="fa fa-question-circle icon-small" data-toggle="tooltip" aria-hidden="true"></i></h3>
</div>
</div>

<div class="row">
<div class="col-xs-12">
<input type="text" id="radarrRootPath" class="form-control x-path tt-input form-custom" autocomplete="off" spellcheck="false" dir="auto">
</div>
</div>
</div>

<div id="sonarrConfig" class="tab-pane fade">
Expand Down Expand Up @@ -177,18 +165,6 @@ <h3>API Key:<i class="fa fa-question-circle icon-small" data-toggle="tooltip" ar
<input type="text" id="sonarrApiKey" class="form-control x-path tt-input form-custom" autocomplete="off" spellcheck="false" dir="auto">
</div>
</div>

<div class="row">
<div class="col-xs-12">
<h3>Root Path:<i class="fa fa-question-circle icon-small" data-toggle="tooltip" aria-hidden="true"></i></h3>
</div>
</div>

<div class="row">
<div class="col-xs-12">
<input type="text" id="sonarrRootPath" class="form-control x-path tt-input form-custom" autocomplete="off" spellcheck="false" dir="auto">
</div>
</div>
</div>
</div>
</div>
Expand Down
15 changes: 2 additions & 13 deletions opt/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class Server {
this.auth = server.configuration.isAuth;
this.user = server.configuration.auth.user;
this.password = server.configuration.auth.password;
this.rootpath = server.configuration.rootpath;
}

constructBaseUrl() {
Expand Down Expand Up @@ -94,8 +93,7 @@ var pulsarrConfig = {
"auth": {
"user": "",
"password": "",
},
"rootpath": ""
}
},
"preferences": {
"monitored": true,
Expand All @@ -113,8 +111,7 @@ var pulsarrConfig = {
"auth": {
"user": "",
"password": "",
},
"rootpath": ""
}
},
"preferences": {
"monitored": true,
Expand All @@ -129,12 +126,10 @@ var tooltips = [
{title: "Enable if your server requires basic http authentication.", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "Port number that Radarr is accessible on. Radarr > Settings > General", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "Radarr API Key. Radarr > Settings > General", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "Path to root folder where movies will be saved. Leave blank to use Radarr default path.", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "IP address or domain name of your Sonarr server.", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "Enable if your server requires basic http authentication.", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "Port number that Sonarr is accessible on. Sonarr > Settings > General", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "Sonarr API Key. Sonarr > Settings > General", placement: "right", animation: true, delay: {show: 500, hide: 100}},
{title: "Path to root folder where TV shows will be saved. Leave blank to use Sonarr default path.", placement: "right", animation: true, delay: {show: 500, hide: 100}},
];

var radarrServer = new Server(pulsarrConfig.radarr);
Expand Down Expand Up @@ -204,7 +199,6 @@ function readInputs() {
radarrServer.user = document.getElementById('radarrUser').value.trim();
radarrServer.password = document.getElementById('radarrPassword').value.trim();
}
radarrServer.rootpath = document.getElementById('radarrRootPath').value.trim();

sonarrServer.host = document.getElementById('sonarrHost').value.trim();
sonarrServer.port = document.getElementById('sonarrPort').value.trim();
Expand All @@ -213,7 +207,6 @@ function readInputs() {
sonarrServer.user = document.getElementById('sonarrUser').value.trim();
sonarrServer.password = document.getElementById('sonarrPassword').value.trim();
}
sonarrServer.rootpath = document.getElementById('sonarrRootPath').value.trim();
}

function saveConfig() {
Expand All @@ -224,7 +217,6 @@ function saveConfig() {
pulsarrConfig.radarr.configuration.isAuth = radarrServer.auth;
pulsarrConfig.radarr.configuration.auth.user = radarrServer.user;
pulsarrConfig.radarr.configuration.auth.password = radarrServer.password;
pulsarrConfig.radarr.configuration.rootpath = radarrServer.rootpath;

pulsarrConfig.sonarr.isEnabled = sonarrServer.isEnabled;
pulsarrConfig.sonarr.configuration.host = sonarrServer.host;
Expand All @@ -233,7 +225,6 @@ function saveConfig() {
pulsarrConfig.sonarr.configuration.isAuth = sonarrServer.auth;
pulsarrConfig.sonarr.configuration.auth.user = sonarrServer.user;
pulsarrConfig.sonarr.configuration.auth.password = sonarrServer.password;
pulsarrConfig.sonarr.configuration.rootpath = sonarrServer.rootpath;

localStorage.setItem("pulsarrConfig", JSON.stringify(pulsarrConfig));

Expand All @@ -258,7 +249,6 @@ function restoreConfig() {
if (pulsarrConfig.radarr.configuration.isAuth) $('#optRadarrAuth').removeClass('hidden');
$('#radarrUser').val(pulsarrConfig.radarr.configuration.auth.user);
$('#radarrPassword').val(pulsarrConfig.radarr.configuration.auth.password);
$('#radarrRootPath').val(pulsarrConfig.radarr.configuration.rootpath);


$('#sonarrHost').val(pulsarrConfig.sonarr.configuration.host);
Expand All @@ -268,5 +258,4 @@ function restoreConfig() {
if (pulsarrConfig.sonarr.configuration.isAuth) $('#optSonarrAuth').removeClass('hidden');
$('#sonarrUser').val(pulsarrConfig.sonarr.configuration.auth.user);
$('#sonarrPassword').val(pulsarrConfig.sonarr.configuration.auth.password);
$('#sonarrRootPath').val(pulsarrConfig.sonarr.configuration.rootpath);
}
11 changes: 10 additions & 1 deletion popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,15 @@ <h2 id="title"><span id="year"></span></h2>
<select id="lstProfile" class="form-control x-profile"></select>
</div>
</div>

<div id="optFolderPath" class="row internal-container hidden">
<div class="col-xs-4 vcenter">
<label class="textpadding">Folder</label>
</div>
<div class="col-xs-8 vcenter">
<select id="lstFolderPath" class="form-control x-profile"></select>
</div>
</div>
</div>

<div class="row internal-container ctlRow">
Expand All @@ -116,7 +125,7 @@ <h2 id="title"><span id="year"></span></h2>
</button>
</div>
<div id="btnBar" class="form-group col-xs-8 text-right hidden">
<button id="btnExists" class="btn button hidden" title="View in Radarr">
<button id="btnExists" class="btn button hidden" title="View">
Already Exists
</button>
<div class="btn-group">
Expand Down
Loading

0 comments on commit 20b7198

Please sign in to comment.