mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 01:02:05 +00:00
Fixed issue with loading update page when there is no update available.
This commit is contained in:
parent
9d47d8677d
commit
917ae0f999
1 changed files with 3 additions and 1 deletions
|
@ -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 a new issue