mirror of
https://github.com/lidarr/Lidarr
synced 2024-12-25 17:17:02 +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>
|
<h2>
|
||||||
Available Update: @Model.UpdatePackage.Version
|
Available Update: @Model.UpdatePackage.Version
|
||||||
@Ajax.ActionLink("Update", "StartUpdate", "Update", new AjaxOptions{ OnSuccess = "updateStarted" })
|
@Ajax.ActionLink("Update", "StartUpdate", "Update", new AjaxOptions{ OnSuccess = "updateStarted" })
|
||||||
|
@Html.HiddenFor(m => m.UpdatePackage.Version)
|
||||||
</h2>
|
</h2>
|
||||||
}
|
}
|
||||||
@if (Model.LogFiles.Count != 0)
|
@if (Model.LogFiles.Count != 0)
|
||||||
|
@ -32,6 +33,7 @@ else
|
||||||
{
|
{
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
function updateStarted() {
|
function updateStarted() {
|
||||||
|
var expectedVersion = $('#UpdatePackage_Version').val();
|
||||||
var errors = 0;
|
var errors = 0;
|
||||||
|
|
||||||
//Pool the server every 5 seconds for a change in state
|
//Pool the server every 5 seconds for a change in state
|
||||||
|
@ -47,7 +49,7 @@ else
|
||||||
if (errors > 0) {
|
if (errors > 0) {
|
||||||
//Kill the timer, redirect
|
//Kill the timer, redirect
|
||||||
$.doTimeout('updateStarted');
|
$.doTimeout('updateStarted');
|
||||||
window.location = '/Update/Post?expectedVersion=@Model.UpdatePackage.Version';
|
window.location = '/Update/Post?expectedVersion=' + expectedVersion;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue