diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-05 11:50:21 -0500 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2013-12-05 11:50:21 -0500 |
| commit | 55a776427b97bec48a70a4b4f403b52935b620ea (patch) | |
| tree | 5fc0e1feaee36df2116a4842d3eb9d27c491bbae /MediaBrowser.ServerApplication | |
| parent | 9e84a712ae3da9eada815e790160a17153b76d37 (diff) | |
Removed unused properties from BaseItem.
Diffstat (limited to 'MediaBrowser.ServerApplication')
4 files changed, 14 insertions, 24 deletions
diff --git a/MediaBrowser.ServerApplication/ApplicationHost.cs b/MediaBrowser.ServerApplication/ApplicationHost.cs index f51238152..ac6959e45 100644 --- a/MediaBrowser.ServerApplication/ApplicationHost.cs +++ b/MediaBrowser.ServerApplication/ApplicationHost.cs @@ -57,7 +57,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Net.Http; using System.Reflection; using System.Threading; using System.Threading.Tasks; diff --git a/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs b/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs index 1a5f9e2c3..ea346e1be 100644 --- a/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs +++ b/MediaBrowser.ServerApplication/EntryPoints/StartupWizard.cs @@ -3,10 +3,8 @@ using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Plugins; using MediaBrowser.Model.Logging; -using System; -using System.Linq; -using System.Windows.Forms; using MediaBrowser.ServerApplication.Native; +using System.Linq; namespace MediaBrowser.ServerApplication.EntryPoints { @@ -58,16 +56,7 @@ namespace MediaBrowser.ServerApplication.EntryPoints { var user = _userManager.Users.FirstOrDefault(u => u.Configuration.IsAdministrator); - try - { - BrowserLauncher.OpenDashboardPage("wizardstart.html", user, _configurationManager, _appHost, _logger); - } - catch (Exception ex) - { - _logger.ErrorException("Error launching startup wizard", ex); - - MessageBox.Show("There was an error launching the Media Browser startup wizard. Please ensure a web browser is installed on the machine and is configured as the default browser.", "Media Browser"); - } + BrowserLauncher.OpenDashboardPage("wizardstart.html", user, _configurationManager, _appHost, _logger); } /// <summary> diff --git a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj index 5f05bc787..79204e056 100644 --- a/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj +++ b/MediaBrowser.ServerApplication/MediaBrowser.ServerApplication.csproj @@ -166,8 +166,6 @@ <Reference Include="System.Data" /> <Reference Include="System.Drawing" /> <Reference Include="System.Net" /> - <Reference Include="System.Net.Http" /> - <Reference Include="System.Net.Http.WebRequest" /> <Reference Include="System.ServiceProcess" /> <Reference Include="System.Windows.Forms" /> <Reference Include="System.Xml" /> diff --git a/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs b/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs index 43a698434..39beee563 100644 --- a/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs +++ b/MediaBrowser.ServerApplication/Native/BrowserLauncher.cs @@ -6,7 +6,6 @@ using MediaBrowser.Model.Logging; using System; using System.Diagnostics; using System.Linq; -using System.Windows.Forms; namespace MediaBrowser.ServerApplication.Native { @@ -107,14 +106,14 @@ namespace MediaBrowser.ServerApplication.Native private static void OpenUrl(string url, ILogger logger) { var process = new Process + { + StartInfo = new ProcessStartInfo { - StartInfo = new ProcessStartInfo - { - FileName = url - }, + FileName = url + }, - EnableRaisingEvents = true - }; + EnableRaisingEvents = true, + }; process.Exited += ProcessExited; @@ -126,7 +125,12 @@ namespace MediaBrowser.ServerApplication.Native { logger.ErrorException("Error launching url: {0}", ex, url); - MessageBox.Show("There was an error launching your web browser. Please check your default browser settings."); + Console.WriteLine("Error launching browser"); + Console.WriteLine(ex.Message); + +#if !__MonoCS__ + System.Windows.Forms.MessageBox.Show("There was an error launching your web browser. Please check your default browser settings."); +#endif } } |
