mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-08-14 10:36:54 -07:00
More work around using the PlexDatabase
This commit is contained in:
parent
67b124148c
commit
dc92285cfa
8 changed files with 265 additions and 14 deletions
|
@ -121,6 +121,8 @@
|
|||
});
|
||||
|
||||
$('#save').click(function (e) {
|
||||
e.preventDefault();
|
||||
|
||||
var start = '';
|
||||
var end = '';
|
||||
if ($startDate.data("DateTimePicker").date()) {
|
||||
|
@ -130,8 +132,6 @@
|
|||
end = $endDate.data("DateTimePicker").date().toISOString();
|
||||
}
|
||||
|
||||
e.preventDefault();
|
||||
|
||||
var $form = $("#mainForm");
|
||||
|
||||
var data = $form.serialize();
|
||||
|
|
|
@ -91,7 +91,15 @@
|
|||
<div class="form-group">
|
||||
<label for="PlexDatabaseLocationOverride" class="control-label">Plex Database Override</label>
|
||||
<div>
|
||||
<input type="text" class="form-control form-control-custom " id="PlexDatabaseLocationOverride" name="PlexDatabaseLocationOverride" value="@Model.PlexDatabaseLocationOverride">
|
||||
<input type="text" class="form-control form-control-custom " id="PlexDatabaseLocationOverride" name="PlexDatabaseLocationOverride" placeholder="%LOCALAPPDATA%\Plex Media Server\" value="@Model.PlexDatabaseLocationOverride">
|
||||
</div>
|
||||
<small>
|
||||
This is your Plex data directory location, if we cannot manually find it then you need to specify the location! See <a href="https://support.plex.tv/hc/en-us/articles/202915258-Where-is-the-Plex-Media-Server-data-directory-located-">Here</a>.
|
||||
</small>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="">
|
||||
<button id="dbTest" class="btn btn-primary-outline">Test Database Directory <i class="fa fa-database"></i> <div id="dbSpinner"></div></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
@ -101,6 +109,8 @@
|
|||
<input type="text" class="form-control-custom form-control" id="authToken" name="PlexAuthToken" placeholder="Plex Auth Token" value="@Model.PlexAuthToken">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group">
|
||||
<label for="username" class="control-label">Username and Password</label>
|
||||
|
@ -173,6 +183,38 @@
|
|||
});
|
||||
});
|
||||
|
||||
$('#dbTest').click(function (e) {
|
||||
e.preventDefault();
|
||||
var url = createBaseUrl(base, '/test/plexdb');
|
||||
var $form = $("#mainForm");
|
||||
|
||||
$('#dbSpinner').attr("class", "fa fa-spinner fa-spin");
|
||||
$.ajax({
|
||||
type: $form.prop("method"),
|
||||
url: url,
|
||||
data: $form.serialize(),
|
||||
dataType: "json",
|
||||
success: function (response) {
|
||||
$('#dbSpinner').attr("class", "");
|
||||
console.log(response);
|
||||
if (response.result === true) {
|
||||
generateNotify(response.message, "success");
|
||||
|
||||
$('#dbSpinner').attr("class", "fa fa-check");
|
||||
} else {
|
||||
generateNotify(response.message, "warning");
|
||||
$('#dbSpinner').attr("class", "fa fa-times");
|
||||
}
|
||||
},
|
||||
error: function (e) {
|
||||
|
||||
$('#spinner').attr("class", "fa fa-times");
|
||||
console.log(e);
|
||||
generateNotify("Something went wrong!", "danger");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
$('#requestToken').click(function (e) {
|
||||
e.preventDefault();
|
||||
var $form = $("#mainForm");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue