mirror of
https://github.com/Sonarr/Sonarr.git
synced 2024-10-30 07:22:35 +01:00
Fixed issue with loading update page when there is no update available.
This commit is contained in:
parent
9d47d8677d
commit
917ae0f999
@ -11,6 +11,7 @@ else
|
||||
<h2>
|
||||
Available Update: @Model.UpdatePackage.Version
|
||||
@Ajax.ActionLink("Update", "StartUpdate", "Update", new AjaxOptions{ OnSuccess = "updateStarted" })
|
||||
@Html.HiddenFor(m => m.UpdatePackage.Version)
|
||||
</h2>
|
||||
}
|
||||
@if (Model.LogFiles.Count != 0)
|
||||
@ -32,6 +33,7 @@ else
|
||||
{
|
||||
<script type="text/javascript">
|
||||
function updateStarted() {
|
||||
var expectedVersion = $('#UpdatePackage_Version').val();
|
||||
var errors = 0;
|
||||
|
||||
//Pool the server every 5 seconds for a change in state
|
||||
@ -47,7 +49,7 @@ else
|
||||
if (errors > 0) {
|
||||
//Kill the timer, redirect
|
||||
$.doTimeout('updateStarted');
|
||||
window.location = '/Update/Post?expectedVersion=@Model.UpdatePackage.Version';
|
||||
window.location = '/Update/Post?expectedVersion=' + expectedVersion;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user