Skip to content

Commit

Permalink
web-app: Fix bug where sometimes updates are disabled in web only mode
Browse files Browse the repository at this point in the history
In web only mode, inconsistent results can be obtained for scheduler
status. Take account that scheduler will always be disabled in web only
mode.
  • Loading branch information
bennettpeter committed Jun 30, 2024
1 parent 50d1845 commit 1df29c9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion mythtv/html/apps/backend/main.js

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ export class BackendWarningComponent implements OnInit {
this.setupService.isDatabaseIgnored = data.BackendInfo.Env.IsDatabaseIgnored;
this.setupService.DBTimezoneSupport = data.BackendInfo.Env.DBTimezoneSupport;
this.setupService.WebOnlyStartup = data.BackendInfo.Env.WebOnlyStartup;
// Sometimes conflicting results are returned by the backend, saying that
// scheduling is enabled when it could not be beacuse there is no database.
if (this.setupService.isDatabaseIgnored || !this.setupService.DBTimezoneSupport
|| this.setupService.WebOnlyStartup != 'NONE')
this.setupService.schedulingEnabled = false;
if (this.setupService.isDatabaseIgnored)
this.wizardService.wizardItems = this.wizardService.dbSetupMenu;
else
Expand All @@ -88,8 +93,6 @@ export class BackendWarningComponent implements OnInit {
}
},
error: () => {
// default to true in case backend is down
this.setupService.schedulingEnabled = true;
this.errorCount++;
if (this.errorCount < this.retryCount)
// shutdowsn doen, waiting for restart
Expand Down

0 comments on commit 1df29c9

Please sign in to comment.