diff --git a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs index b25c1808d..0a60b703f 100644 --- a/MediaBrowser.Common.Implementations/BaseApplicationHost.cs +++ b/MediaBrowser.Common.Implementations/BaseApplicationHost.cs @@ -158,10 +158,10 @@ namespace MediaBrowser.Common.Implementations { return Task.Run(() => { + IsFirstRun = !ConfigurationManager.CommonConfiguration.IsStartupWizardCompleted; + Logger = LogManager.GetLogger("App"); - IsFirstRun = !File.Exists(ApplicationPaths.SystemConfigurationFilePath); - DiscoverTypes(); LogManager.ReloadLogger(ConfigurationManager.CommonConfiguration.EnableDebugLevelLogging ? LogSeverity.Debug : LogSeverity.Info); diff --git a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs index 474d985f2..74241ac02 100644 --- a/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs +++ b/MediaBrowser.Model/Configuration/BaseApplicationConfiguration.cs @@ -65,6 +65,13 @@ namespace MediaBrowser.Model.Configuration /// The legacy web socket port number. [ProtoMember(59)] public int LegacyWebSocketPortNumber { get; set; } + + /// + /// Gets or sets a value indicating whether this instance is first run. + /// + /// true if this instance is first run; otherwise, false. + [ProtoMember(4)] + public bool IsStartupWizardCompleted { get; set; } /// /// Initializes a new instance of the class. diff --git a/MediaBrowser.WebDashboard/Api/DashboardService.cs b/MediaBrowser.WebDashboard/Api/DashboardService.cs index 7cf6b2873..1603fc9eb 100644 --- a/MediaBrowser.WebDashboard/Api/DashboardService.cs +++ b/MediaBrowser.WebDashboard/Api/DashboardService.cs @@ -430,6 +430,7 @@ namespace MediaBrowser.WebDashboard.Api "UpdatePasswordPage.js", "UserImagePage.js", "UserProfilesPage.js", + "WizardFinishPage.js", "WizardStartPage.js", "WizardUserPage.js", "SupporterKeyPage.js", diff --git a/MediaBrowser.WebDashboard/Html/scripts/WizardFinishPage.js b/MediaBrowser.WebDashboard/Html/scripts/WizardFinishPage.js new file mode 100644 index 000000000..1633bf140 --- /dev/null +++ b/MediaBrowser.WebDashboard/Html/scripts/WizardFinishPage.js @@ -0,0 +1,16 @@ +var WizardFinishPage = { + + onFinish: function() { + + ApiClient.getServerConfiguration().done(function (config) { + + config.IsStartupWizardCompleted = true; + + ApiClient.updateServerConfiguration(config).done(function() { + Dashboard.navigate('dashboard.html'); + }); + }); + + } + +}; \ No newline at end of file diff --git a/MediaBrowser.WebDashboard/Html/wizardFinish.html b/MediaBrowser.WebDashboard/Html/wizardFinish.html index 06650c4f8..3d51aa0bf 100644 --- a/MediaBrowser.WebDashboard/Html/wizardFinish.html +++ b/MediaBrowser.WebDashboard/Html/wizardFinish.html @@ -16,7 +16,7 @@
- +
diff --git a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj index a2a1269ee..7d4895020 100644 --- a/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj +++ b/MediaBrowser.WebDashboard/MediaBrowser.WebDashboard.csproj @@ -384,6 +384,7 @@ +