mirror of
https://github.com/Ombi-app/Ombi.git
synced 2025-07-29 19:18:30 -07:00
Fixed #162
This commit is contained in:
parent
84edd6636d
commit
ffbb3d9a44
1 changed files with 31 additions and 25 deletions
|
@ -130,34 +130,40 @@
|
||||||
|
|
||||||
@if (!string.IsNullOrEmpty(Model.QualityProfile))
|
@if (!string.IsNullOrEmpty(Model.QualityProfile))
|
||||||
{
|
{
|
||||||
<text>
|
|
||||||
var qualitySelected = @Model.QualityProfile;
|
|
||||||
if (!qualitySelected) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var $form = $("#mainForm");
|
|
||||||
$.ajax({
|
|
||||||
type: $form.prop("method"),
|
|
||||||
data: $form.serialize(),
|
|
||||||
url: "sonarrprofiles",
|
|
||||||
dataType: "json",
|
|
||||||
success: function(response) {
|
|
||||||
response.forEach(function(result) {
|
|
||||||
if (result.id == qualitySelected) {
|
|
||||||
|
|
||||||
$("#select").append("<option selected='selected' value='" + result.id + "'>" + result.name + "</option>");
|
<text>
|
||||||
} else {
|
|
||||||
$("#select").append("<option value='" + result.id + "'>" + result.name + "</option>");
|
preLoad();
|
||||||
}
|
|
||||||
});
|
function preLoad() {
|
||||||
},
|
var qualitySelected = @Model.QualityProfile;
|
||||||
error: function(e) {
|
if (!qualitySelected) {
|
||||||
console.log(e);
|
return;
|
||||||
generateNotify("Something went wrong!", "danger");
|
|
||||||
}
|
}
|
||||||
});
|
var $form = $("#mainForm");
|
||||||
|
$.ajax({
|
||||||
|
type: $form.prop("method"),
|
||||||
|
data: $form.serialize(),
|
||||||
|
url: "sonarrprofiles",
|
||||||
|
dataType: "json",
|
||||||
|
success: function(response) {
|
||||||
|
response.forEach(function(result) {
|
||||||
|
if (result.id == qualitySelected) {
|
||||||
|
|
||||||
|
$("#select").append("<option selected='selected' value='" + result.id + "'>" + result.name + "</option>");
|
||||||
|
} else {
|
||||||
|
$("#select").append("<option value='" + result.id + "'>" + result.name + "</option>");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
},
|
||||||
|
error: function(e) {
|
||||||
|
console.log(e);
|
||||||
|
generateNotify("Something went wrong!", "danger");
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
</text>
|
</text>
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$('#save').click(function(e) {
|
$('#save').click(function(e) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue