Merge pull request #1932 from softworkz/ReduceWarnings

Reduced compiler warnings. No functional changes.
pull/702/head
Luke 8 years ago committed by GitHub
commit fec7c47824

@ -559,13 +559,13 @@ namespace MediaBrowser.Api
{ {
} }
catch (IOException ex) catch (IOException)
{ {
//Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path); //Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path);
DeletePartialStreamFiles(path, jobType, retryCount + 1, 500); DeletePartialStreamFiles(path, jobType, retryCount + 1, 500);
} }
catch (Exception ex) catch
{ {
//Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path); //Logger.ErrorException("Error deleting partial stream file(s) {0}", ex, path);
} }

@ -1093,7 +1093,7 @@ namespace MediaBrowser.Api.Playback
//process.BeginOutputReadLine(); //process.BeginOutputReadLine();
// Important - don't await the log task or we won't be able to kill ffmpeg when the user stops playback // 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 proceeeding // Wait for the file to exist before proceeeding
while (!FileSystem.FileExists(state.WaitForPath ?? outputPath) && !transcodingJob.HasExited) while (!FileSystem.FileExists(state.WaitForPath ?? outputPath) && !transcodingJob.HasExited)

@ -227,7 +227,7 @@ namespace MediaBrowser.Api
.ToList(); .ToList();
} }
} }
catch (Exception ex) catch
{ {
//Logger.ErrorException("Error getting plugin list", ex); //Logger.ErrorException("Error getting plugin list", ex);
// Play it safe here // Play it safe here

@ -211,7 +211,7 @@ namespace MediaBrowser.Common.Plugins
{ {
return (TConfigurationType)Activator.CreateInstance(typeof(TConfigurationType)); return (TConfigurationType)Activator.CreateInstance(typeof(TConfigurationType));
} }
catch (Exception ex) catch
{ {
return (TConfigurationType)Activator.CreateInstance(typeof(TConfigurationType)); return (TConfigurationType)Activator.CreateInstance(typeof(TConfigurationType));
} }

@ -75,7 +75,7 @@ namespace MediaBrowser.LocalMetadata
} }
} }
public int Order public virtual int Order
{ {
get get
{ {

@ -31,7 +31,7 @@ namespace MediaBrowser.LocalMetadata.Providers
return directoryService.GetFile(Path.Combine(info.Path, "series.xml")); return directoryService.GetFile(Path.Combine(info.Path, "series.xml"));
} }
public int Order public override int Order
{ {
get get
{ {

@ -58,7 +58,7 @@ namespace MediaBrowser.MediaEncoding.Encoder
else else
{ {
// Kick this off, but no need to wait on it // 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); await DownloadFontFile(fontsDirectory, fontFilename, new Progress<double>()).ConfigureAwait(false);

@ -151,7 +151,7 @@ namespace MediaBrowser.Server.Implementations.Connect
{ {
DiscoveredWanIpAddress = address; DiscoveredWanIpAddress = address;
UpdateConnectInfo(); var task = UpdateConnectInfo();
} }
private async Task UpdateConnectInfo() private async Task UpdateConnectInfo()

@ -1620,7 +1620,7 @@ namespace MediaBrowser.Server.Implementations.Dto
{ {
size = _imageProcessor.GetImageSize(imageInfo); size = _imageProcessor.GetImageSize(imageInfo);
} }
catch (Exception ex) catch
{ {
//_logger.ErrorException("Failed to determine primary image aspect ratio for {0}", ex, path); //_logger.ErrorException("Failed to determine primary image aspect ratio for {0}", ex, path);
return null; return null;

@ -29,7 +29,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
private readonly IInstallationManager _installationManager; private readonly IInstallationManager _installationManager;
//private readonly ILogManager _logManager; //private readonly ILogManager _logManager;
private readonly ILogger _logger; //private readonly ILogger _logger;
private readonly ISessionManager _sessionManager; private readonly ISessionManager _sessionManager;
private readonly ITaskManager _taskManager; private readonly ITaskManager _taskManager;
private readonly IActivityManager _activityManager; private readonly IActivityManager _activityManager;

@ -165,7 +165,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
CreateRules(device); CreateRules(device);
} }
catch (Exception ex) catch
{ {
// I think it could be a good idea to log the exception because // 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 time // you are using permanent portmapping here (never expire) and that means that next time

@ -92,7 +92,7 @@ namespace MediaBrowser.Server.Implementations.EntryPoints
var changes = _changedItems.ToList(); var changes = _changedItems.ToList();
_changedItems.Clear(); _changedItems.Clear();
SendNotifications(changes, CancellationToken.None); var task = SendNotifications(changes, CancellationToken.None);
if (UpdateTimer != null) if (UpdateTimer != null)
{ {

@ -251,7 +251,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
httpRes.Close(); httpRes.Close();
} }
catch (Exception errorEx) catch
{ {
//_logger.ErrorException("Error this.ProcessRequest(context)(Exception while writing error to the response)", errorEx); //_logger.ErrorException("Error this.ProcessRequest(context)(Exception while writing error to the response)", errorEx);
} }

@ -191,7 +191,7 @@ namespace MediaBrowser.Server.Implementations.HttpServer
} }
} }
} }
catch (IOException ex) catch (IOException)
{ {
throw; throw;
} }

@ -55,8 +55,8 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
public static EmbyTV Current; public static EmbyTV Current;
public event EventHandler DataSourceChanged; public event EventHandler DataSourceChanged { add { } remove { } }
public event EventHandler<RecordingStatusChangedEventArgs> RecordingStatusChanged; public event EventHandler<RecordingStatusChangedEventArgs> RecordingStatusChanged { add { } remove { } }
private readonly ConcurrentDictionary<string, ActiveRecordingInfo> _activeRecordings = private readonly ConcurrentDictionary<string, ActiveRecordingInfo> _activeRecordings =
new ConcurrentDictionary<string, ActiveRecordingInfo>(StringComparer.OrdinalIgnoreCase); new ConcurrentDictionary<string, ActiveRecordingInfo>(StringComparer.OrdinalIgnoreCase);

@ -52,7 +52,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.EmbyTV
catch (FileNotFoundException) catch (FileNotFoundException)
{ {
} }
catch (DirectoryNotFoundException ex) catch (DirectoryNotFoundException)
{ {
} }
catch (IOException ex) catch (IOException ex)

@ -431,7 +431,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.HdHomerun
list.Add(await GetMediaSource(info, hdhrId, "mobile").ConfigureAwait(false)); list.Add(await GetMediaSource(info, hdhrId, "mobile").ConfigureAwait(false));
} }
} }
catch (Exception ex) catch
{ {
} }

@ -649,7 +649,7 @@ namespace MediaBrowser.Server.Implementations.LiveTv.TunerHosts.SatIp.Rtsp
#region Public Events #region Public Events
public event PropertyChangedEventHandler PropertyChanged; ////public event PropertyChangedEventHandler PropertyChanged;
#endregion #endregion

@ -22,7 +22,7 @@ namespace MediaBrowser.Server.Implementations.Notifications
public event EventHandler<NotificationUpdateEventArgs> NotificationAdded; public event EventHandler<NotificationUpdateEventArgs> NotificationAdded;
public event EventHandler<NotificationReadEventArgs> NotificationsMarkedRead; public event EventHandler<NotificationReadEventArgs> NotificationsMarkedRead;
public event EventHandler<NotificationUpdateEventArgs> NotificationUpdated; ////public event EventHandler<NotificationUpdateEventArgs> NotificationUpdated;
public async Task Initialize() public async Task Initialize()
{ {

@ -606,7 +606,7 @@ namespace MediaBrowser.Server.Startup.Common
{ {
return new ImageMagickEncoder(LogManager.GetLogger("ImageMagick"), ApplicationPaths, HttpClient, FileSystemManager, ServerConfigurationManager); return new ImageMagickEncoder(LogManager.GetLogger("ImageMagick"), ApplicationPaths, HttpClient, FileSystemManager, ServerConfigurationManager);
} }
catch (Exception ex) catch
{ {
Logger.Error("Error loading ImageMagick. Will revert to GDI."); 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")); return new GDIImageEncoder(FileSystemManager, LogManager.GetLogger("GDI"));
} }
catch (Exception ex) catch
{ {
Logger.Error("Error loading GDI. Will revert to NullImageEncoder."); Logger.Error("Error loading GDI. Will revert to NullImageEncoder.");
} }
@ -1412,7 +1412,7 @@ namespace MediaBrowser.Server.Startup.Common
{ {
return new Uri(externalDns).Host; return new Uri(externalDns).Host;
} }
catch (Exception e) catch
{ {
return externalDns; return externalDns;
} }

Loading…
Cancel
Save