The Free Software Media System - Server Backend & API
Reduced compiler warnings. No functional changes (except MediaEncoder.cs and AutomaticRestartEntryPoint.cs)
softworkz23da61281ee1
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.csindex 87fa3d46ca..dbc1179e22 100644--- a/MediaBrowser.Api/ApiEntryPoint.cs+++ b/MediaBrowser.Api/ApiEntryPoint.cs@@ -559,13 +559,13 @@ namespace MediaBrowser.Api{}- catch (IOException ex)+ catch (IOException){//Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path);DeletePartialStreamFiles(path, jobType, retryCount + 1, 500);}- catch (Exception ex)+ catch{//Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path);}diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.csindex ab73aabe43..a5f78420c7 100644--- a/MediaBrowser.Api/Playback/BaseStreamingService.cs+++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs@@ -1080,7 +1080,7 @@ namespace MediaBrowser.Api.Playback//process.BeginOutputReadLine();// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback- Task.Run(() => StartStreamingLog(transcodingJob, state, process.StandardError.BaseStream, state.LogFileStream));+ var task = Task.Run(() => StartStreamingLog(transcodingJob, state, process.StandardError.BaseStream, state.LogFileStream));// Wait for the file to exist before proceeedingwhile (!FileSystem.FileExists(state.WaitForPath ?? outputPath) && !transcodingJob.HasExited)diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.csindex 3bf70715fb..7ad69fd041 100644--- a/MediaBrowser.Api/PluginService.cs+++ b/MediaBrowser.Api/PluginService.cs@@ -227,7 +227,7 @@ namespace MediaBrowser.Api.ToList();}}- catch (Exception ex)+ catch{//Logger.ErrorException("Error getting plugin list", ex);// Play it safe herediff --git a/MediaBrowser.Common/Plugins/BasePlugin.cs b/MediaBrowser.Common/Plugins/BasePlugin.csindex a0716137b9..b75accf9b0 100644--- a/MediaBrowser.Common/Plugins/BasePlugin.cs+++ b/MediaBrowser.Common/Plugins/BasePlugin.cs@@ -211,7 +211,7 @@ namespace MediaBrowser.Common.Plugins{return (TConfigurationType)Activator.CreateInstance(typeof(TConfigurationType));}- catch (Exception ex)+ catch{return (TConfigurationType)Activator.CreateInstance(typeof(TConfigurationType));}diff --git a/MediaBrowser.LocalMetadata/BaseXmlProvider.cs b/MediaBrowser.LocalMetadata/BaseXmlProvider.csindex 0289ffb083..f23559e4be 100644--- a/MediaBrowser.LocalMetadata/BaseXmlProvider.cs+++ b/MediaBrowser.LocalMetadata/BaseXmlProvider.cs@@ -75,7 +75,7 @@ namespace MediaBrowser.LocalMetadata}}- public int Order+ public virtual int Order{get{diff --git a/MediaBrowser.LocalMetadata/Providers/SeriesXmlProvider.cs b/MediaBrowser.LocalMetadata/Providers/SeriesXmlProvider.csindex 8f9d21eae8..0893f192fa 100644--- a/MediaBrowser.LocalMetadata/Providers/SeriesXmlProvider.cs+++ b/MediaBrowser.LocalMetadata/Providers/SeriesXmlProvider.cs@@ -31,7 +31,7 @@ namespace MediaBrowser.LocalMetadata.Providersreturn directoryService.GetFile(Path.Combine(info.Path, "series.xml"));}- public int Order+ public override int Order{get{diff --git a/MediaBrowser.MediaEncoding/Encoder/FontConfigLoader.cs b/MediaBrowser.MediaEncoding/Encoder/FontConfigLoader.csindex d7ef493c2c..71306e0ec0 100644--- a/MediaBrowser.MediaEncoding/Encoder/FontConfigLoader.cs+++ b/MediaBrowser.MediaEncoding/Encoder/FontConfigLoader.cs@@ -58,7 +58,7 @@ namespace MediaBrowser.MediaEncoding.Encoderelse{// Kick this off, but no need to wait on it- Task.Run(async () =>+ var task = Task.Run(async () =>{await DownloadFontFile(fontsDirectory, fontFilename, new Progress<double>()).ConfigureAwait(false);diff --git a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs b/MediaBrowser.Server.Implementations/Connect/ConnectManager.csindex 24750de94c..4e913cf994 100644--- a/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs+++ b/MediaBrowser.Server.Implementations/Connect/ConnectManager.cs@@ -151,7 +151,7 @@ namespace MediaBrowser.Server.Implementations.Connect{DiscoveredWanIpAddress = address;- UpdateConnectInfo();+ var task = UpdateConnectInfo();}private async Task UpdateConnectInfo()diff --git a/MediaBrowser.Server.Implementations/Dto/DtoService.cs b/MediaBrowser.Server.Implementations/Dto/DtoService.csindex 779afdcf27..cc165da6a7 100644--- a/MediaBrowser.Server.Implementations/Dto/DtoService.cs+++ b/MediaBrowser.Server.Implementations/Dto/DtoService.cs@@ -1620,7 +1620,7 @@ namespace MediaBrowser.Server.Implementations.Dto{size = _imageProcessor.GetImageSize(imageInfo);}- catch (Exception ex)+ catch{//_logger.ErrorException("Failed to determine primary image aspect ratio for {0}", ex, path);return null;diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs b/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.csindex 46ddf3dd8c..a36583a412 100644--- a/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs+++ b/MediaBrowser.Server.Implementations/EntryPoints/ActivityLogEntryPoint.cs@@ -29,7 +29,7 @@ namespace MediaBrowser.Server.Implementations.EntryPointsprivate readonly IInstallationManager _installationManager;//private readonly ILogManager _logManager;- private readonly ILogger _logger;+ //private readonly ILogger _logger;private readonly ISessionManager _sessionManager;private readonly ITaskManager _taskManager;private readonly IActivityManager _activityManager;diff --git a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.csindex 64e3c56a63..280bec65ba 100644--- a/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs+++ b/MediaBrowser.Server.Implementations/EntryPoints/ExternalPortForwarding.cs@@ -165,7 +165,7 @@ namespace MediaBrowser.Server.Implementations.EntryPointsCreateRules(device);}- catch (Exception ex)+ catch{// I think it could be a good idea to log the exception because// you are using permanent portmapping here (never expire) and that means that next timediff --git a/MediaBrowser.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs b/MediaBrowser.Server.Implementations/EntryPoints/UserDataChangeNotifier.csindex b616b7761a..2bb0101330 100644--- a/MediaBrowser.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs+++ b/MediaBrowser.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs@@ -92,7 +92,7 @@ namespace MediaBrowser.Server.Implementations.EntryPointsvar changes = _changedItems.ToList();_changedItems.Clear();- SendNotifications(changes, CancellationToken.None);+ var task = SendNotifications(changes, CancellationToken.None);if (UpdateTimer != null){diff --git a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.csindex 4121c5e5e6..5cf0a246fe 100644--- a/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs+++ b/MediaBrowser.Server.Implementations/HttpServer/HttpListenerHost.cs@@ -251,7 +251,7 @@ namespace MediaBrowser.Server.Implementations.HttpServerhttpRes.Close();}- catch (Exception errorEx)+ catch{//_logger.ErrorException("Error this.ProcessRequest(context)(Exception while writing error to the response)", errorEx);}diff --git a/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs b/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.csindex 71cd20743a..488c630fe4 100644--- a/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs+++ b/MediaBrowser.Server.Implementations/HttpServer/RangeRequestWriter.cs@@ -191,7 +191,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer}}}- catch (IOException ex)+ catch (IOException){throw;}diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.csindex a36eae8d22..ee8ab7c254 100644--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs@@ -55,8 +55,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTVpublic static EmbyTV Current;- public event EventHandler DataSourceChanged;- public event EventHandler<RecordingStatusChangedEventArgs> RecordingStatusChanged;+ public event EventHandler DataSourceChanged { add { } remove { } }+ public event EventHandler<RecordingStatusChangedEventArgs> RecordingStatusChanged { add { } remove { } }private readonly ConcurrentDictionary<string, ActiveRecordingInfo> _activeRecordings =new ConcurrentDictionary<string, ActiveRecordingInfo>(StringComparer.OrdinalIgnoreCase);diff --git a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.csindex 79b26468e6..7fe271bea4 100644--- a/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs@@ -52,7 +52,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTVcatch (FileNotFoundException){}- catch (DirectoryNotFoundException ex)+ catch (DirectoryNotFoundException){}catch (IOException ex)diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.csindex 69b6fb5a94..fd4775938a 100644--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs@@ -431,7 +431,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerunlist.Add(await GetMediaSource(info, hdhrId, "mobile").ConfigureAwait(false));}}- catch (Exception ex)+ catch{}diff --git a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/Rtsp/RtspSession.cs b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/Rtsp/RtspSession.csindex 71b3f8a184..0f8682b7cc 100644--- a/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/Rtsp/RtspSession.cs+++ b/MediaBrowser.Server.Implementations/LiveTv/TunerHosts/SatIp/Rtsp/RtspSession.cs@@ -649,7 +649,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp.Rtsp#region Public Events- public event PropertyChangedEventHandler PropertyChanged;+ ////public event PropertyChangedEventHandler PropertyChanged;#endregiondiff --git a/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs b/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.csindex be8c6d48d6..f30ba3e542 100644--- a/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs+++ b/MediaBrowser.Server.Implementations/Notifications/SqliteNotificationsRepository.cs@@ -22,7 +22,7 @@ namespace MediaBrowser.Server.Implementations.Notificationspublic event EventHandler<NotificationUpdateEventArgs> NotificationAdded;public event EventHandler<NotificationReadEventArgs> NotificationsMarkedRead;- public event EventHandler<NotificationUpdateEventArgs> NotificationUpdated;+ ////public event EventHandler<NotificationUpdateEventArgs> NotificationUpdated;public async Task Initialize(){diff --git a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs b/MediaBrowser.Server.Startup.Common/ApplicationHost.csindex 3f1f98cd00..ce99f0a240 100644--- a/MediaBrowser.Server.Startup.Common/ApplicationHost.cs+++ b/MediaBrowser.Server.Startup.Common/ApplicationHost.cs@@ -606,7 +606,7 @@ namespace MediaBrowser.Server.Startup.Common{return new ImageMagickEncoder(LogManager.GetLogger("ImageMagick"), ApplicationPaths, HttpClient, FileSystemManager, ServerConfigurationManager);}- catch (Exception ex)+ catch{Logger.Error("Error loading ImageMagick. Will revert to GDI.");}@@ -616,7 +616,7 @@ namespace MediaBrowser.Server.Startup.Common{return new GDIImageEncoder(FileSystemManager, LogManager.GetLogger("GDI"));}- catch (Exception ex)+ catch{Logger.Error("Error loading GDI. Will revert to NullImageEncoder.");}@@ -1412,7 +1412,7 @@ namespace MediaBrowser.Server.Startup.Common{return new Uri(externalDns).Host;}- catch (Exception e)+ catch{return externalDns;}