1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Auto-Organize: Display errors in client on server exceptions

When an exception occured on the server, the organize dialog or the
confirm dialog were displayed eternally and not indication of failure
was presented to the user

Auto-Organize: Display errors in client on server exceptions

When an exception occured on the server, the organize dialog or the
confirm dialog were displayed eternally and not indication of failure
was presented to the user
This commit is contained in:
softworkz 2015-09-25 11:36:01 +02:00
parent f1f12e4765
commit 3306513b06
3 changed files with 18 additions and 9 deletions

View file

@ -44,7 +44,7 @@
reloadItems(page);
});
}).fail(onApiFailure);
}
});
@ -60,11 +60,9 @@
sortBy: 'SortName'
}).done(function (result) {
Dashboard.hideLoadingMsg();
showEpisodeCorrectionPopup(page, item, result.Items);
});
}).fail(onApiFailure);
}
@ -129,8 +127,7 @@
reloadItems(page);
});
}).fail(onApiFailure);
}
});
@ -160,7 +157,7 @@
reloadItems(page);
});
}).fail(onApiFailure);
}
function reloadItems(page) {
@ -173,7 +170,7 @@
renderResults(page, result);
Dashboard.hideLoadingMsg();
});
}).fail(onApiFailure);
}
@ -333,6 +330,16 @@
}
}
function onApiFailure(e) {
Dashboard.hideLoadingMsg();
Dashboard.alert({
title: Globalize.translate('AutoOrganizeError'),
message: e.status + ' - ' + e.statusText + '<br>' + e.getResponseHeader("X-Application-Error-Code")
});
}
function onEpisodeCorrectionFormSubmit() {
submitEpisodeForm(this);
return false;
@ -346,7 +353,7 @@
ApiClient.clearOrganizationLog().done(function () {
reloadItems(page);
});
}).fail(onApiFailure);
});