Looks like we were overloading emby with out api calls.

Put a bit of handling around that to wait when we get some errors. Problem about this is it can take a long time to generate the infomation when we have episode searching enabled. #1109
This commit is contained in:
tidusjar 2017-03-16 22:10:24 +00:00
commit b9c0c20af6
3 changed files with 63 additions and 39 deletions

View file

@ -32,7 +32,9 @@
<div class="form-group">
<div>
<button id="recentlyAddedBtn" class="btn btn-primary-outline">Send test email to Admin <div id="testEmailSpinner"></div></button>
<button id="recentlyAddedBtn" class="btn btn-primary-outline">Send test email to Admin @Html.ToolTip("Note: nothing will send if there is no new content...")
<div id="testEmailSpinner"></div></button>
</div>
</div>
@ -84,6 +86,8 @@
$('#recentlyAddedBtn').click(function (e) {
e.preventDefault();
generateNotify("This could take some time depending on if you have episode searching enabled and also how many new items have been added!", "info");
var base = '@Html.GetBaseUrl()';
var url = createBaseUrl(base, '/admin/testnewsletteradminemail');
$('#testEmailSpinner').attr("class", "fa fa-spinner fa-spin");
@ -94,11 +98,11 @@
success: function (response) {
if (response) {
generateNotify(response.message, "success");
$('#testSendMassEmailSpinner').attr("class", "fa fa-check");
$('#testEmailSpinner').attr("class", "fa fa-check");
} else {
generateNotify(response.message, "danger");
$('#testSendMassEmailSpinner').attr("class", "fa fa-times");
$('#testEmailSpinner').attr("class", "fa fa-times");
}
},
error: function (e) {