From ff1db0a17341345cb5d625b9a44d02981ce131bf Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Wed, 10 Apr 2013 11:56:36 -0400 Subject: [PATCH] resharper suggestions in controller project --- .../Drawing/ImageManager.cs | 7 +++---- MediaBrowser.Controller/Entities/BaseItem.cs | 13 ++++++------ MediaBrowser.Controller/Entities/Folder.cs | 12 +++-------- .../Entities/Movies/Movie.cs | 16 +++++++-------- MediaBrowser.Controller/Entities/User.cs | 3 +-- .../IServerApplicationPaths.cs | 1 + .../Library/ILibraryManager.cs | 5 ++--- MediaBrowser.Controller/Library/Profiler.cs | 20 +++++++++---------- MediaBrowser.Controller/Library/TVUtils.cs | 4 +--- .../Localization/LocalizedStrings.cs | 7 ++----- .../Localization/Ratings.cs | 17 +++++++--------- .../Localization/RatingsDefinition.cs | 2 -- .../Providers/BaseItemXmlParser.cs | 3 +-- .../MediaInfo/FFMpegVideoImageProvider.cs | 1 + .../MediaInfo/FFProbeVideoInfoProvider.cs | 7 +++---- .../Providers/Movies/FanArtMovieProvider.cs | 5 ++--- .../Providers/Movies/MovieDbProvider.cs | 3 ++- .../Providers/Music/FanArtAlbumProvider.cs | 11 ++++------ .../Providers/Music/FanArtArtistProvider.cs | 6 ++---- .../Providers/Music/LastfmAlbumProvider.cs | 2 +- .../Providers/Music/LastfmArtistProvider.cs | 20 ++++++++----------- .../Providers/Music/LastfmHelper.cs | 20 ++++++------------- .../Music/MusicArtistProviderFromJson.cs | 14 +++++-------- .../Providers/TV/FanArtTVProvider.cs | 1 - .../Providers/TV/RemoteEpisodeProvider.cs | 1 + .../Providers/TV/RemoteSeriesProvider.cs | 1 + 26 files changed, 80 insertions(+), 122 deletions(-) diff --git a/MediaBrowser.Controller/Drawing/ImageManager.cs b/MediaBrowser.Controller/Drawing/ImageManager.cs index 7e6b65b48f..ad3f66d2c7 100644 --- a/MediaBrowser.Controller/Drawing/ImageManager.cs +++ b/MediaBrowser.Controller/Drawing/ImageManager.cs @@ -1,5 +1,4 @@ -using System.Globalization; -using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.Extensions; using MediaBrowser.Common.IO; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.TV; @@ -7,13 +6,13 @@ using MediaBrowser.Controller.Providers; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; using MediaBrowser.Model.Logging; -using MediaBrowser.Model.Serialization; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; +using System.Globalization; using System.IO; using System.Linq; using System.Threading; @@ -208,7 +207,7 @@ namespace MediaBrowser.Controller.Drawing var outputFormat = originalImage.RawFormat; - using (var memoryStream = new MemoryStream { }) + using (var memoryStream = new MemoryStream()) { // Save to the memory stream thumbnail.Save(outputFormat, memoryStream, quality.Value); diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs index e8e90b97ad..4e63160fc6 100644 --- a/MediaBrowser.Controller/Entities/BaseItem.cs +++ b/MediaBrowser.Controller/Entities/BaseItem.cs @@ -1,5 +1,4 @@ -using MediaBrowser.Common.Configuration; -using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.IO; using MediaBrowser.Controller.Library; @@ -313,7 +312,7 @@ namespace MediaBrowser.Controller.Entities var path = Path; // non file-system entries will not have a path - if (this.LocationType != LocationType.FileSystem || string.IsNullOrEmpty(path)) + if (LocationType != LocationType.FileSystem || string.IsNullOrEmpty(path)) { return new ItemResolveArgs(ConfigurationManager.ApplicationPaths) { @@ -637,12 +636,12 @@ namespace MediaBrowser.Controller.Entities catch (IOException ex) { Logger.ErrorException("Error getting ResolveArgs for {0}", ex, Path); - return new List