Skip to content

Commit

Permalink
Fix initial setup validation.
Browse files Browse the repository at this point in the history
Always force a server reload after setting the config if we were previously in
the "running without config" state, as the various managers we expect to be
valid are empty.
  • Loading branch information
danrahn committed Jun 3, 2024
1 parent 00b2da1 commit c5311f1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Server/MarkerEditorConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { fileURLToPath } from 'url';

import { allServerSettings, isFeatureSetting, ServerConfigState, ServerSettings, Setting } from '../Shared/ServerConfig.js';
import { BaseLog, ConsoleLog, ContextualLog } from '../Shared/ConsoleLog.js';
import { GetServerState, ServerState } from './ServerState.js';
import { PlexQueries, PlexQueryManager } from './PlexQueryManager.js';
import { ServerEvents, waitForServerEvent } from './ServerEvents.js';
import { testFfmpeg, testHostPort } from './ServerHelpers.js';
Expand Down Expand Up @@ -614,8 +615,10 @@ class MarkerEditorConfig extends ConfigBase {
return ServerConfigState.FullReloadNeeded;
}

// It's easier to do a soft restart with most settings
if (changedKeys.has(ServerSettings.DataPath)
// It's easier to do a soft restart with most settings,
// or if we had an unset/invalid config previously.
if (GetServerState() === ServerState.RunningWithoutConfig
|| changedKeys.has(ServerSettings.DataPath)
|| changedKeys.has(ServerSettings.Database)
|| changedKeys.has(ServerSettings.ExtendedStats)) {
return ServerConfigState.ReloadNeeded;
Expand Down

0 comments on commit c5311f1

Please sign in to comment.