From 25f0315e918cf6f8c26b1e435c236ff1dbcbc6a5 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 20:22:56 +0100 Subject: Visual Studio Reformat: Emby.Server.Implementations Part T-T --- .../TextEncoding/NLangDetect/ProbVector.cs | 46 +++++++++++----------- 1 file changed, 23 insertions(+), 23 deletions(-) (limited to 'Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs') diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs index c5a20dbf0..0684d91c3 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs @@ -3,33 +3,33 @@ using System.Collections.Generic; namespace NLangDetect.Core { - public class ProbVector - { - private readonly Dictionary _dict = new Dictionary(); - - public double this[int key] + public class ProbVector { - get - { - double value; - - return _dict.TryGetValue(key, out value) ? value : 0.0; - } + private readonly Dictionary _dict = new Dictionary(); - set - { - if (Math.Abs(value) < double.Epsilon) + public double this[int key] { - if (_dict.ContainsKey(key)) - { - _dict.Remove(key); - } + get + { + double value; - return; - } + return _dict.TryGetValue(key, out value) ? value : 0.0; + } - _dict[key] = value; - } + set + { + if (Math.Abs(value) < double.Epsilon) + { + if (_dict.ContainsKey(key)) + { + _dict.Remove(key); + } + + return; + } + + _dict[key] = value; + } + } } - } } -- cgit v1.2.3 From e566d9a23163c297bdddddcbffb438c2b951d840 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 20:54:44 +0100 Subject: Find+Sed BOM removal *.cs: BDInfo-Emby.XmlTv --- BDInfo/BDInfoSettings.cs | 2 +- BDInfo/BDROM.cs | 2 +- BDInfo/LanguageCodes.cs | 2 +- BDInfo/TSCodecAC3.cs | 2 +- BDInfo/TSCodecAVC.cs | 2 +- BDInfo/TSCodecDTS.cs | 2 +- BDInfo/TSCodecDTSHD.cs | 2 +- BDInfo/TSCodecLPCM.cs | 2 +- BDInfo/TSCodecMPEG2.cs | 2 +- BDInfo/TSCodecMVC.cs | 2 +- BDInfo/TSCodecTrueHD.cs | 2 +- BDInfo/TSCodecVC1.cs | 2 +- BDInfo/TSInterleavedFile.cs | 2 +- BDInfo/TSPlaylistFile.cs | 2 +- BDInfo/TSStream.cs | 2 +- BDInfo/TSStreamBuffer.cs | 2 +- BDInfo/TSStreamClip.cs | 2 +- BDInfo/TSStreamClipFile.cs | 2 +- BDInfo/TSStreamFile.cs | 2 +- DvdLib/BigEndianBinaryReader.cs | 2 +- DvdLib/Ifo/AudioAttributes.cs | 2 +- DvdLib/Ifo/Cell.cs | 2 +- DvdLib/Ifo/CellPlaybackInfo.cs | 2 +- DvdLib/Ifo/CellPositionInfo.cs | 2 +- DvdLib/Ifo/Dvd.cs | 2 +- DvdLib/Ifo/PgcCommandTable.cs | 2 +- DvdLib/Ifo/Program.cs | 2 +- DvdLib/Ifo/ProgramChain.cs | 2 +- DvdLib/Ifo/Title.cs | 2 +- DvdLib/Ifo/UserOperation.cs | 2 +- DvdLib/Ifo/VideoAttributes.cs | 2 +- Emby.Dlna/Api/DlnaServerService.cs | 2 +- Emby.Dlna/Api/DlnaService.cs | 2 +- Emby.Dlna/Common/Argument.cs | 2 +- Emby.Dlna/Common/DeviceIcon.cs | 2 +- Emby.Dlna/Common/DeviceService.cs | 2 +- Emby.Dlna/Common/ServiceAction.cs | 2 +- Emby.Dlna/Common/StateVariable.cs | 2 +- Emby.Dlna/Configuration/DlnaOptions.cs | 2 +- Emby.Dlna/ConfigurationExtension.cs | 2 +- Emby.Dlna/ConnectionManager/ConnectionManager.cs | 2 +- Emby.Dlna/ConnectionManager/ControlHandler.cs | 2 +- Emby.Dlna/ContentDirectory/ContentDirectory.cs | 2 +- Emby.Dlna/ContentDirectory/ControlHandler.cs | 2 +- Emby.Dlna/ControlRequest.cs | 2 +- Emby.Dlna/ControlResponse.cs | 2 +- Emby.Dlna/Didl/DidlBuilder.cs | 2 +- Emby.Dlna/Didl/Filter.cs | 2 +- Emby.Dlna/Didl/StringWriterWithEncoding.cs | 2 +- Emby.Dlna/DlnaManager.cs | 2 +- Emby.Dlna/EventSubscriptionResponse.cs | 2 +- Emby.Dlna/Eventing/EventManager.cs | 2 +- Emby.Dlna/Eventing/EventSubscription.cs | 2 +- Emby.Dlna/IConnectionManager.cs | 2 +- Emby.Dlna/IContentDirectory.cs | 2 +- Emby.Dlna/IEventManager.cs | 2 +- Emby.Dlna/IMediaReceiverRegistrar.cs | 2 +- Emby.Dlna/IUpnpService.cs | 2 +- Emby.Dlna/Main/DlnaEntryPoint.cs | 2 +- Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs | 2 +- Emby.Dlna/PlayTo/CurrentIdEventArgs.cs | 2 +- Emby.Dlna/PlayTo/Device.cs | 2 +- Emby.Dlna/PlayTo/DeviceInfo.cs | 2 +- Emby.Dlna/PlayTo/PlayToController.cs | 2 +- Emby.Dlna/PlayTo/PlayToManager.cs | 2 +- Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs | 2 +- Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs | 2 +- Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs | 2 +- Emby.Dlna/PlayTo/PlaylistItem.cs | 2 +- Emby.Dlna/PlayTo/TRANSPORTSTATE.cs | 2 +- Emby.Dlna/PlayTo/TransportCommands.cs | 2 +- Emby.Dlna/PlayTo/TransportStateEventArgs.cs | 2 +- Emby.Dlna/PlayTo/UpnpContainer.cs | 2 +- Emby.Dlna/PlayTo/uBaseObject.cs | 2 +- Emby.Dlna/PlayTo/uParser.cs | 2 +- Emby.Dlna/PlayTo/uParserObject.cs | 2 +- Emby.Dlna/PlayTo/uPnpNamespaces.cs | 2 +- Emby.Dlna/Profiles/DefaultProfile.cs | 2 +- Emby.Dlna/Profiles/DenonAvrProfile.cs | 2 +- Emby.Dlna/Profiles/DirectTvProfile.cs | 2 +- Emby.Dlna/Profiles/DishHopperJoeyProfile.cs | 2 +- Emby.Dlna/Profiles/Foobar2000Profile.cs | 2 +- Emby.Dlna/Profiles/LgTvProfile.cs | 2 +- Emby.Dlna/Profiles/LinksysDMA2100Profile.cs | 2 +- Emby.Dlna/Profiles/MarantzProfile.cs | 2 +- Emby.Dlna/Profiles/MediaMonkeyProfile.cs | 2 +- Emby.Dlna/Profiles/PanasonicVieraProfile.cs | 2 +- Emby.Dlna/Profiles/PopcornHourProfile.cs | 2 +- Emby.Dlna/Profiles/SamsungSmartTvProfile.cs | 2 +- Emby.Dlna/Profiles/SharpSmartTvProfile.cs | 2 +- Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs | 2 +- Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs | 2 +- Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs | 2 +- Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs | 2 +- Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs | 2 +- Emby.Dlna/Profiles/SonyBravia2010Profile.cs | 2 +- Emby.Dlna/Profiles/SonyBravia2011Profile.cs | 2 +- Emby.Dlna/Profiles/SonyBravia2012Profile.cs | 2 +- Emby.Dlna/Profiles/SonyBravia2013Profile.cs | 2 +- Emby.Dlna/Profiles/SonyBravia2014Profile.cs | 2 +- Emby.Dlna/Profiles/SonyPs3Profile.cs | 2 +- Emby.Dlna/Profiles/SonyPs4Profile.cs | 2 +- Emby.Dlna/Profiles/WdtvLiveProfile.cs | 2 +- Emby.Dlna/Profiles/XboxOneProfile.cs | 2 +- Emby.Dlna/Service/BaseControlHandler.cs | 2 +- Emby.Dlna/Service/BaseService.cs | 2 +- Emby.Dlna/Service/ControlErrorHandler.cs | 2 +- Emby.Dlna/Ssdp/DeviceDiscovery.cs | 2 +- Emby.Dlna/Ssdp/Extensions.cs | 2 +- Emby.Drawing.Skia/PercentPlayedDrawer.cs | 2 +- Emby.Drawing.Skia/PlayedIndicatorDrawer.cs | 2 +- Emby.Drawing.Skia/SkiaEncoder.cs | 2 +- Emby.Drawing.Skia/UnplayedCountIndicator.cs | 2 +- Emby.Drawing/Common/ImageHeader.cs | 2 +- Emby.Drawing/ImageProcessor.cs | 2 +- Emby.Drawing/NullImageEncoder.cs | 2 +- Emby.IsoMounting/IsoMounter/Configuration/PluginConfiguration.cs | 2 +- Emby.IsoMounting/IsoMounter/Plugin.cs | 2 +- Emby.Naming/Audio/AlbumParser.cs | 2 +- Emby.Naming/Audio/AudioFileParser.cs | 2 +- Emby.Naming/Audio/MultiPartResult.cs | 2 +- Emby.Naming/AudioBook/AudioBookFileInfo.cs | 2 +- Emby.Naming/AudioBook/AudioBookFilePathParser.cs | 2 +- Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs | 2 +- Emby.Naming/AudioBook/AudioBookInfo.cs | 2 +- Emby.Naming/AudioBook/AudioBookListResolver.cs | 2 +- Emby.Naming/AudioBook/AudioBookResolver.cs | 2 +- Emby.Naming/Common/EpisodeExpression.cs | 2 +- Emby.Naming/Common/MediaType.cs | 2 +- Emby.Naming/Common/NamingOptions.cs | 2 +- Emby.Naming/Extensions/StringExtensions.cs | 2 +- Emby.Naming/StringExtensions.cs | 2 +- Emby.Naming/Subtitles/SubtitleInfo.cs | 2 +- Emby.Naming/Subtitles/SubtitleParser.cs | 2 +- Emby.Naming/TV/EpisodeInfo.cs | 2 +- Emby.Naming/TV/EpisodePathParserResult.cs | 2 +- Emby.Naming/TV/EpisodeResolver.cs | 2 +- Emby.Naming/TV/SeasonPathParser.cs | 2 +- Emby.Naming/TV/SeasonPathParserResult.cs | 2 +- Emby.Naming/Video/CleanDateTimeResult.cs | 2 +- Emby.Naming/Video/CleanStringResult.cs | 2 +- Emby.Naming/Video/ExtraResolver.cs | 2 +- Emby.Naming/Video/ExtraResult.cs | 2 +- Emby.Naming/Video/ExtraRule.cs | 2 +- Emby.Naming/Video/ExtraRuleType.cs | 2 +- Emby.Naming/Video/FileStack.cs | 2 +- Emby.Naming/Video/FlagParser.cs | 2 +- Emby.Naming/Video/Format3DResult.cs | 2 +- Emby.Naming/Video/Format3DRule.cs | 2 +- Emby.Naming/Video/StackResolver.cs | 2 +- Emby.Naming/Video/StackResult.cs | 2 +- Emby.Naming/Video/StubResolver.cs | 2 +- Emby.Naming/Video/StubResult.cs | 2 +- Emby.Naming/Video/StubTypeRule.cs | 2 +- Emby.Naming/Video/VideoFileInfo.cs | 2 +- Emby.Naming/Video/VideoInfo.cs | 2 +- Emby.Naming/Video/VideoResolver.cs | 2 +- Emby.Notifications/Api/NotificationsService.cs | 2 +- Emby.Notifications/CoreNotificationTypes.cs | 2 +- Emby.Notifications/NotificationConfigurationFactory.cs | 2 +- Emby.Notifications/NotificationManager.cs | 2 +- Emby.Notifications/Notifications.cs | 2 +- Emby.Photos/PhotoProvider.cs | 2 +- Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs | 2 +- Emby.Server.Implementations/Activity/ActivityManager.cs | 2 +- Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs | 2 +- Emby.Server.Implementations/Archiving/ZipClient.cs | 2 +- Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs | 2 +- Emby.Server.Implementations/Browser/BrowserLauncher.cs | 2 +- .../Channels/ChannelDynamicMediaSourceProvider.cs | 2 +- Emby.Server.Implementations/Channels/ChannelImageProvider.cs | 2 +- Emby.Server.Implementations/Channels/ChannelPostScanTask.cs | 2 +- Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs | 2 +- Emby.Server.Implementations/Collections/CollectionImageProvider.cs | 2 +- Emby.Server.Implementations/Collections/CollectionManager.cs | 2 +- Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs | 2 +- Emby.Server.Implementations/Cryptography/CryptographyProvider.cs | 2 +- Emby.Server.Implementations/Data/BaseSqliteRepository.cs | 2 +- Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs | 2 +- Emby.Server.Implementations/Data/ManagedConnection.cs | 2 +- Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs | 2 +- Emby.Server.Implementations/Data/SqliteExtensions.cs | 2 +- Emby.Server.Implementations/Data/SqliteUserRepository.cs | 2 +- Emby.Server.Implementations/Data/TypeMapper.cs | 2 +- Emby.Server.Implementations/Diagnostics/CommonProcess.cs | 2 +- Emby.Server.Implementations/Diagnostics/ProcessFactory.cs | 2 +- Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs | 2 +- Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs | 2 +- Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs | 2 +- Emby.Server.Implementations/EntryPoints/StartupWizard.cs | 2 +- Emby.Server.Implementations/EntryPoints/SystemEvents.cs | 2 +- Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs | 2 +- Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs | 2 +- Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs | 2 +- Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs | 2 +- Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs | 2 +- Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs | 2 +- Emby.Server.Implementations/HttpClientManager/HttpClientInfo.cs | 2 +- Emby.Server.Implementations/HttpServer/FileWriter.cs | 2 +- Emby.Server.Implementations/HttpServer/IHttpListener.cs | 2 +- Emby.Server.Implementations/HttpServer/LoggerUtils.cs | 2 +- Emby.Server.Implementations/HttpServer/ResponseFilter.cs | 2 +- Emby.Server.Implementations/HttpServer/Security/SessionContext.cs | 2 +- Emby.Server.Implementations/HttpServer/StreamWriter.cs | 2 +- Emby.Server.Implementations/HttpServer/WebSocketConnection.cs | 2 +- Emby.Server.Implementations/IO/ExtendedFileSystemInfo.cs | 2 +- Emby.Server.Implementations/IO/FileRefresher.cs | 2 +- Emby.Server.Implementations/IO/IsoManager.cs | 2 +- Emby.Server.Implementations/IO/LibraryMonitor.cs | 2 +- Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs | 2 +- Emby.Server.Implementations/IO/StreamHelper.cs | 2 +- Emby.Server.Implementations/IO/ThrottledStream.cs | 2 +- Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs | 2 +- Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs | 2 +- Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs | 2 +- Emby.Server.Implementations/Library/ExclusiveLiveStream.cs | 2 +- Emby.Server.Implementations/Library/LiveStreamHelper.cs | 2 +- Emby.Server.Implementations/Library/MediaStreamSelector.cs | 2 +- Emby.Server.Implementations/Library/MusicManager.cs | 2 +- Emby.Server.Implementations/Library/PathExtensions.cs | 2 +- Emby.Server.Implementations/Library/ResolverHelper.cs | 2 +- .../Library/Resolvers/Audio/MusicAlbumResolver.cs | 2 +- .../Library/Resolvers/Audio/MusicArtistResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs | 2 +- Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs | 2 +- Emby.Server.Implementations/Library/UserDataManager.cs | 2 +- Emby.Server.Implementations/Library/UserViewManager.cs | 2 +- Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs | 2 +- Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs | 2 +- .../Library/Validators/GameGenresPostScanTask.cs | 2 +- Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs | 2 +- Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs | 2 +- Emby.Server.Implementations/Library/Validators/GenresValidator.cs | 2 +- .../Library/Validators/MusicGenresPostScanTask.cs | 2 +- Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs | 2 +- Emby.Server.Implementations/Library/Validators/PeopleValidator.cs | 2 +- Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs | 2 +- Emby.Server.Implementations/Library/Validators/StudiosValidator.cs | 2 +- Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs | 2 +- Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs | 2 +- Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs | 2 +- Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs | 2 +- Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs | 2 +- Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs | 2 +- Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs | 2 +- Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs | 2 +- Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs | 2 +- Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs | 2 +- .../LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs | 2 +- Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs | 2 +- Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs | 2 +- Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs | 2 +- Emby.Server.Implementations/Localization/TextLocalizer.cs | 2 +- Emby.Server.Implementations/Net/IWebSocket.cs | 2 +- Emby.Server.Implementations/Net/SocketFactory.cs | 2 +- Emby.Server.Implementations/Net/UdpSocket.cs | 2 +- Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs | 2 +- Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs | 2 +- Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs | 2 +- Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs | 2 +- Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs | 2 +- Emby.Server.Implementations/Playlists/ManualPlaylistsFolder.cs | 2 +- Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs | 2 +- Emby.Server.Implementations/Reflection/AssemblyInfo.cs | 2 +- Emby.Server.Implementations/ResourceFileManager.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/DailyTrigger.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/IntervalTrigger.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/StartupTrigger.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/SystemEventTrigger.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/TaskManager.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs | 2 +- Emby.Server.Implementations/ScheduledTasks/WeeklyTrigger.cs | 2 +- Emby.Server.Implementations/Security/MBLicenseFile.cs | 2 +- Emby.Server.Implementations/Security/PluginSecurityManager.cs | 2 +- Emby.Server.Implementations/Security/RegRecord.cs | 2 +- Emby.Server.Implementations/Serialization/XmlSerializer.cs | 2 +- Emby.Server.Implementations/ServerApplicationPaths.cs | 2 +- Emby.Server.Implementations/Services/ServiceMethod.cs | 2 +- Emby.Server.Implementations/Services/UrlExtensions.cs | 2 +- Emby.Server.Implementations/Session/HttpSessionController.cs | 2 +- Emby.Server.Implementations/Session/WebSocketController.cs | 2 +- Emby.Server.Implementations/Sorting/AlbumComparer.cs | 2 +- Emby.Server.Implementations/Sorting/AlphanumComparator.cs | 2 +- Emby.Server.Implementations/Sorting/ArtistComparer.cs | 2 +- Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs | 2 +- Emby.Server.Implementations/Sorting/CriticRatingComparer.cs | 2 +- Emby.Server.Implementations/Sorting/DateCreatedComparer.cs | 2 +- Emby.Server.Implementations/Sorting/DatePlayedComparer.cs | 2 +- Emby.Server.Implementations/Sorting/GameSystemComparer.cs | 2 +- Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs | 2 +- Emby.Server.Implementations/Sorting/IsFolderComparer.cs | 2 +- Emby.Server.Implementations/Sorting/IsPlayedComparer.cs | 2 +- Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs | 2 +- Emby.Server.Implementations/Sorting/NameComparer.cs | 2 +- Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs | 2 +- Emby.Server.Implementations/Sorting/PlayCountComparer.cs | 2 +- Emby.Server.Implementations/Sorting/PlayersComparer.cs | 2 +- Emby.Server.Implementations/Sorting/PremiereDateComparer.cs | 2 +- Emby.Server.Implementations/Sorting/ProductionYearComparer.cs | 2 +- Emby.Server.Implementations/Sorting/RandomComparer.cs | 2 +- Emby.Server.Implementations/Sorting/RuntimeComparer.cs | 2 +- Emby.Server.Implementations/Sorting/SortNameComparer.cs | 2 +- Emby.Server.Implementations/Sorting/StartDateComparer.cs | 2 +- Emby.Server.Implementations/Sorting/StudioComparer.cs | 2 +- Emby.Server.Implementations/StartupOptions.cs | 2 +- Emby.Server.Implementations/SystemEvents.cs | 2 +- Emby.Server.Implementations/TextEncoding/NLangDetect/ErrorCode.cs | 2 +- .../TextEncoding/NLangDetect/Extensions/CharExtensions.cs | 2 +- .../TextEncoding/NLangDetect/Extensions/RandomExtensions.cs | 2 +- .../TextEncoding/NLangDetect/Extensions/UnicodeBlock.cs | 2 +- .../TextEncoding/NLangDetect/InternalException.cs | 2 +- .../TextEncoding/NLangDetect/LanguageDetector.cs | 2 +- .../TextEncoding/NLangDetect/NLangDetectException.cs | 2 +- Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs | 2 +- Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs | 2 +- Emby.Server.Implementations/Threading/CommonTimer.cs | 2 +- Emby.Server.Implementations/Threading/TimerFactory.cs | 2 +- Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs | 2 +- Emby.Server.Implementations/UserViews/FolderImageProvider.cs | 2 +- Emby.Server.Implementations/Xml/XmlReaderSettingsFactory.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Console/Classes/EntityExtensions.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Console/Program.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderLanguageTests.cs | 2 +- Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderTests.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvChannel.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCredit.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCreditType.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvIcon.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvLanguage.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvPremiere.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs | 2 +- Emby.XmlTv/Emby.XmlTv/Entities/XmlTvRating.cs | 2 +- 347 files changed, 347 insertions(+), 347 deletions(-) (limited to 'Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs') diff --git a/BDInfo/BDInfoSettings.cs b/BDInfo/BDInfoSettings.cs index 7abb67499..d127710f4 100644 --- a/BDInfo/BDInfoSettings.cs +++ b/BDInfo/BDInfoSettings.cs @@ -1,4 +1,4 @@ - + namespace BDInfo { class BDInfoSettings diff --git a/BDInfo/BDROM.cs b/BDInfo/BDROM.cs index 7d8268222..0b2eefcc0 100644 --- a/BDInfo/BDROM.cs +++ b/BDInfo/BDROM.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/LanguageCodes.cs b/BDInfo/LanguageCodes.cs index 90d0bccc4..ab2693ffb 100644 --- a/BDInfo/LanguageCodes.cs +++ b/BDInfo/LanguageCodes.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecAC3.cs b/BDInfo/TSCodecAC3.cs index 42128af1b..35d306a19 100644 --- a/BDInfo/TSCodecAC3.cs +++ b/BDInfo/TSCodecAC3.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecAVC.cs b/BDInfo/TSCodecAVC.cs index 43c6d6f85..5833d169f 100644 --- a/BDInfo/TSCodecAVC.cs +++ b/BDInfo/TSCodecAVC.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecDTS.cs b/BDInfo/TSCodecDTS.cs index 904dcd986..ff94cb702 100644 --- a/BDInfo/TSCodecDTS.cs +++ b/BDInfo/TSCodecDTS.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecDTSHD.cs b/BDInfo/TSCodecDTSHD.cs index 3c5ad85cc..f2315d4c5 100644 --- a/BDInfo/TSCodecDTSHD.cs +++ b/BDInfo/TSCodecDTSHD.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecLPCM.cs b/BDInfo/TSCodecLPCM.cs index d12674f0e..5709d8689 100644 --- a/BDInfo/TSCodecLPCM.cs +++ b/BDInfo/TSCodecLPCM.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecMPEG2.cs b/BDInfo/TSCodecMPEG2.cs index 1d523528e..8bcd07d02 100644 --- a/BDInfo/TSCodecMPEG2.cs +++ b/BDInfo/TSCodecMPEG2.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecMVC.cs b/BDInfo/TSCodecMVC.cs index 80fed3886..abff0c1b0 100644 --- a/BDInfo/TSCodecMVC.cs +++ b/BDInfo/TSCodecMVC.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecTrueHD.cs b/BDInfo/TSCodecTrueHD.cs index 6ea78614c..5e81e162c 100644 --- a/BDInfo/TSCodecTrueHD.cs +++ b/BDInfo/TSCodecTrueHD.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSCodecVC1.cs b/BDInfo/TSCodecVC1.cs index ce9eabdb9..e2fbbf692 100644 --- a/BDInfo/TSCodecVC1.cs +++ b/BDInfo/TSCodecVC1.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSInterleavedFile.cs b/BDInfo/TSInterleavedFile.cs index 4bca9e76b..0f35cfb2a 100644 --- a/BDInfo/TSInterleavedFile.cs +++ b/BDInfo/TSInterleavedFile.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSPlaylistFile.cs b/BDInfo/TSPlaylistFile.cs index fb38ef862..aa1f175d3 100644 --- a/BDInfo/TSPlaylistFile.cs +++ b/BDInfo/TSPlaylistFile.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSStream.cs b/BDInfo/TSStream.cs index 250308b1a..98269a362 100644 --- a/BDInfo/TSStream.cs +++ b/BDInfo/TSStream.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSStreamBuffer.cs b/BDInfo/TSStreamBuffer.cs index 2f9094876..36f3149fa 100644 --- a/BDInfo/TSStreamBuffer.cs +++ b/BDInfo/TSStreamBuffer.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSStreamClip.cs b/BDInfo/TSStreamClip.cs index d7592a71a..23408859d 100644 --- a/BDInfo/TSStreamClip.cs +++ b/BDInfo/TSStreamClip.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSStreamClipFile.cs b/BDInfo/TSStreamClipFile.cs index 56ed8b581..6aed7e4d4 100644 --- a/BDInfo/TSStreamClipFile.cs +++ b/BDInfo/TSStreamClipFile.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/BDInfo/TSStreamFile.cs b/BDInfo/TSStreamFile.cs index 089196e49..29d105da0 100644 --- a/BDInfo/TSStreamFile.cs +++ b/BDInfo/TSStreamFile.cs @@ -1,4 +1,4 @@ -//============================================================================ +//============================================================================ // BDInfo - Blu-ray Video and Audio Analysis Tool // Copyright © 2010 Cinema Squid // diff --git a/DvdLib/BigEndianBinaryReader.cs b/DvdLib/BigEndianBinaryReader.cs index 7b581e340..b3b2eabd5 100644 --- a/DvdLib/BigEndianBinaryReader.cs +++ b/DvdLib/BigEndianBinaryReader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; namespace DvdLib diff --git a/DvdLib/Ifo/AudioAttributes.cs b/DvdLib/Ifo/AudioAttributes.cs index f0fa827b6..b76f9fc05 100644 --- a/DvdLib/Ifo/AudioAttributes.cs +++ b/DvdLib/Ifo/AudioAttributes.cs @@ -1,4 +1,4 @@ -namespace DvdLib.Ifo +namespace DvdLib.Ifo { public enum AudioCodec { diff --git a/DvdLib/Ifo/Cell.cs b/DvdLib/Ifo/Cell.cs index bfa38123e..268ab897e 100644 --- a/DvdLib/Ifo/Cell.cs +++ b/DvdLib/Ifo/Cell.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace DvdLib.Ifo { diff --git a/DvdLib/Ifo/CellPlaybackInfo.cs b/DvdLib/Ifo/CellPlaybackInfo.cs index 95209aebc..e588e51ac 100644 --- a/DvdLib/Ifo/CellPlaybackInfo.cs +++ b/DvdLib/Ifo/CellPlaybackInfo.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace DvdLib.Ifo { diff --git a/DvdLib/Ifo/CellPositionInfo.cs b/DvdLib/Ifo/CellPositionInfo.cs index f8eb81dfc..2b973e083 100644 --- a/DvdLib/Ifo/CellPositionInfo.cs +++ b/DvdLib/Ifo/CellPositionInfo.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; namespace DvdLib.Ifo { diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs index 4c6b6a1d7..a8f2ab970 100644 --- a/DvdLib/Ifo/Dvd.cs +++ b/DvdLib/Ifo/Dvd.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/DvdLib/Ifo/PgcCommandTable.cs b/DvdLib/Ifo/PgcCommandTable.cs index 95d11b9bf..d329fcba2 100644 --- a/DvdLib/Ifo/PgcCommandTable.cs +++ b/DvdLib/Ifo/PgcCommandTable.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace DvdLib.Ifo { diff --git a/DvdLib/Ifo/Program.cs b/DvdLib/Ifo/Program.cs index 6c211035f..af08afa35 100644 --- a/DvdLib/Ifo/Program.cs +++ b/DvdLib/Ifo/Program.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace DvdLib.Ifo { diff --git a/DvdLib/Ifo/ProgramChain.cs b/DvdLib/Ifo/ProgramChain.cs index f3f1b05ce..0cdaad4cc 100644 --- a/DvdLib/Ifo/ProgramChain.cs +++ b/DvdLib/Ifo/ProgramChain.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/DvdLib/Ifo/Title.cs b/DvdLib/Ifo/Title.cs index 895a6cfd7..85be9daf1 100644 --- a/DvdLib/Ifo/Title.cs +++ b/DvdLib/Ifo/Title.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; namespace DvdLib.Ifo diff --git a/DvdLib/Ifo/UserOperation.cs b/DvdLib/Ifo/UserOperation.cs index f7de818d4..757a5a05d 100644 --- a/DvdLib/Ifo/UserOperation.cs +++ b/DvdLib/Ifo/UserOperation.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace DvdLib.Ifo { diff --git a/DvdLib/Ifo/VideoAttributes.cs b/DvdLib/Ifo/VideoAttributes.cs index 68468f748..8b3996715 100644 --- a/DvdLib/Ifo/VideoAttributes.cs +++ b/DvdLib/Ifo/VideoAttributes.cs @@ -1,4 +1,4 @@ -namespace DvdLib.Ifo +namespace DvdLib.Ifo { public enum VideoCodec { diff --git a/Emby.Dlna/Api/DlnaServerService.cs b/Emby.Dlna/Api/DlnaServerService.cs index dd6607f9d..44c9ebc71 100644 --- a/Emby.Dlna/Api/DlnaServerService.cs +++ b/Emby.Dlna/Api/DlnaServerService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Dlna/Api/DlnaService.cs b/Emby.Dlna/Api/DlnaService.cs index 05e8c1c41..7f51f477a 100644 --- a/Emby.Dlna/Api/DlnaService.cs +++ b/Emby.Dlna/Api/DlnaService.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using MediaBrowser.Controller.Dlna; using MediaBrowser.Controller.Net; using MediaBrowser.Model.Dlna; diff --git a/Emby.Dlna/Common/Argument.cs b/Emby.Dlna/Common/Argument.cs index 4da6b4850..3e325c41c 100644 --- a/Emby.Dlna/Common/Argument.cs +++ b/Emby.Dlna/Common/Argument.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna.Common { public class Argument diff --git a/Emby.Dlna/Common/DeviceIcon.cs b/Emby.Dlna/Common/DeviceIcon.cs index 27ae92d6f..3a91b952e 100644 --- a/Emby.Dlna/Common/DeviceIcon.cs +++ b/Emby.Dlna/Common/DeviceIcon.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna.Common { public class DeviceIcon diff --git a/Emby.Dlna/Common/DeviceService.cs b/Emby.Dlna/Common/DeviceService.cs index 0d91dbe76..c60d65291 100644 --- a/Emby.Dlna/Common/DeviceService.cs +++ b/Emby.Dlna/Common/DeviceService.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna.Common { public class DeviceService diff --git a/Emby.Dlna/Common/ServiceAction.cs b/Emby.Dlna/Common/ServiceAction.cs index 1bcc6a1d6..5e030d396 100644 --- a/Emby.Dlna/Common/ServiceAction.cs +++ b/Emby.Dlna/Common/ServiceAction.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Dlna.Common { diff --git a/Emby.Dlna/Common/StateVariable.cs b/Emby.Dlna/Common/StateVariable.cs index 92a943eed..4ca84bf51 100644 --- a/Emby.Dlna/Common/StateVariable.cs +++ b/Emby.Dlna/Common/StateVariable.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.Common { diff --git a/Emby.Dlna/Configuration/DlnaOptions.cs b/Emby.Dlna/Configuration/DlnaOptions.cs index 6ab337752..0ebb490a1 100644 --- a/Emby.Dlna/Configuration/DlnaOptions.cs +++ b/Emby.Dlna/Configuration/DlnaOptions.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna.Configuration { public class DlnaOptions diff --git a/Emby.Dlna/ConfigurationExtension.cs b/Emby.Dlna/ConfigurationExtension.cs index 82b2e0ba2..82d726e01 100644 --- a/Emby.Dlna/ConfigurationExtension.cs +++ b/Emby.Dlna/ConfigurationExtension.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Emby.Dlna.Configuration; using MediaBrowser.Common.Configuration; diff --git a/Emby.Dlna/ConnectionManager/ConnectionManager.cs b/Emby.Dlna/ConnectionManager/ConnectionManager.cs index e26d98d70..cc427f2a1 100644 --- a/Emby.Dlna/ConnectionManager/ConnectionManager.cs +++ b/Emby.Dlna/ConnectionManager/ConnectionManager.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Emby.Dlna.Service; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; diff --git a/Emby.Dlna/ConnectionManager/ControlHandler.cs b/Emby.Dlna/ConnectionManager/ControlHandler.cs index a8c32fd99..16211c61f 100644 --- a/Emby.Dlna/ConnectionManager/ControlHandler.cs +++ b/Emby.Dlna/ConnectionManager/ControlHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Emby.Dlna.Service; using MediaBrowser.Common.Extensions; diff --git a/Emby.Dlna/ContentDirectory/ContentDirectory.cs b/Emby.Dlna/ContentDirectory/ContentDirectory.cs index 217b8cfce..cd21599d0 100644 --- a/Emby.Dlna/ContentDirectory/ContentDirectory.cs +++ b/Emby.Dlna/ContentDirectory/ContentDirectory.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Emby.Dlna.Service; using MediaBrowser.Common.Net; diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 97ae50245..61ee45f74 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/Emby.Dlna/ControlRequest.cs b/Emby.Dlna/ControlRequest.cs index 2b8ce844a..afd9a0b87 100644 --- a/Emby.Dlna/ControlRequest.cs +++ b/Emby.Dlna/ControlRequest.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; namespace Emby.Dlna diff --git a/Emby.Dlna/ControlResponse.cs b/Emby.Dlna/ControlResponse.cs index 64a3f1244..d2b79fc58 100644 --- a/Emby.Dlna/ControlResponse.cs +++ b/Emby.Dlna/ControlResponse.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Dlna { diff --git a/Emby.Dlna/Didl/DidlBuilder.cs b/Emby.Dlna/Didl/DidlBuilder.cs index 1e22a84f5..6ecb9f3b4 100644 --- a/Emby.Dlna/Didl/DidlBuilder.cs +++ b/Emby.Dlna/Didl/DidlBuilder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Linq; diff --git a/Emby.Dlna/Didl/Filter.cs b/Emby.Dlna/Didl/Filter.cs index 1249e525d..a0e67870e 100644 --- a/Emby.Dlna/Didl/Filter.cs +++ b/Emby.Dlna/Didl/Filter.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Extensions; namespace Emby.Dlna.Didl diff --git a/Emby.Dlna/Didl/StringWriterWithEncoding.cs b/Emby.Dlna/Didl/StringWriterWithEncoding.cs index 23b5f017c..93ed323d0 100644 --- a/Emby.Dlna/Didl/StringWriterWithEncoding.cs +++ b/Emby.Dlna/Didl/StringWriterWithEncoding.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Text; diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index 366a10cc3..2a65ce40a 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Dlna/EventSubscriptionResponse.cs b/Emby.Dlna/EventSubscriptionResponse.cs index 1c405e601..6dc1aacf4 100644 --- a/Emby.Dlna/EventSubscriptionResponse.cs +++ b/Emby.Dlna/EventSubscriptionResponse.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Dlna { diff --git a/Emby.Dlna/Eventing/EventManager.cs b/Emby.Dlna/Eventing/EventManager.cs index 32bdec62f..a416ebb2b 100644 --- a/Emby.Dlna/Eventing/EventManager.cs +++ b/Emby.Dlna/Eventing/EventManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; diff --git a/Emby.Dlna/Eventing/EventSubscription.cs b/Emby.Dlna/Eventing/EventSubscription.cs index adb042d6c..4c72c4211 100644 --- a/Emby.Dlna/Eventing/EventSubscription.cs +++ b/Emby.Dlna/Eventing/EventSubscription.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.Eventing { diff --git a/Emby.Dlna/IConnectionManager.cs b/Emby.Dlna/IConnectionManager.cs index 5f889a34c..855c4454d 100644 --- a/Emby.Dlna/IConnectionManager.cs +++ b/Emby.Dlna/IConnectionManager.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna { public interface IConnectionManager : IEventManager, IUpnpService diff --git a/Emby.Dlna/IContentDirectory.cs b/Emby.Dlna/IContentDirectory.cs index d63af4ef2..b54a17c00 100644 --- a/Emby.Dlna/IContentDirectory.cs +++ b/Emby.Dlna/IContentDirectory.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna { public interface IContentDirectory : IEventManager, IUpnpService diff --git a/Emby.Dlna/IEventManager.cs b/Emby.Dlna/IEventManager.cs index e90476fe3..4f67a1b9b 100644 --- a/Emby.Dlna/IEventManager.cs +++ b/Emby.Dlna/IEventManager.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna { public interface IEventManager diff --git a/Emby.Dlna/IMediaReceiverRegistrar.cs b/Emby.Dlna/IMediaReceiverRegistrar.cs index cb43221e5..5dde01f58 100644 --- a/Emby.Dlna/IMediaReceiverRegistrar.cs +++ b/Emby.Dlna/IMediaReceiverRegistrar.cs @@ -1,4 +1,4 @@ - + namespace Emby.Dlna { public interface IMediaReceiverRegistrar : IEventManager, IUpnpService diff --git a/Emby.Dlna/IUpnpService.cs b/Emby.Dlna/IUpnpService.cs index 0a52e9acf..ab8aa4619 100644 --- a/Emby.Dlna/IUpnpService.cs +++ b/Emby.Dlna/IUpnpService.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Dlna { diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs index 9c219ec0e..e0b4f025a 100644 --- a/Emby.Dlna/Main/DlnaEntryPoint.cs +++ b/Emby.Dlna/Main/DlnaEntryPoint.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs b/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs index 929d29a27..2b84528ea 100644 --- a/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs +++ b/Emby.Dlna/MediaReceiverRegistrar/MediaReceiverRegistrar.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Emby.Dlna.Service; using MediaBrowser.Common.Net; using MediaBrowser.Controller.Configuration; diff --git a/Emby.Dlna/PlayTo/CurrentIdEventArgs.cs b/Emby.Dlna/PlayTo/CurrentIdEventArgs.cs index e148191f3..fdf435bcf 100644 --- a/Emby.Dlna/PlayTo/CurrentIdEventArgs.cs +++ b/Emby.Dlna/PlayTo/CurrentIdEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/Device.cs b/Emby.Dlna/PlayTo/Device.cs index 127c29c47..117646108 100644 --- a/Emby.Dlna/PlayTo/Device.cs +++ b/Emby.Dlna/PlayTo/Device.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/Emby.Dlna/PlayTo/DeviceInfo.cs b/Emby.Dlna/PlayTo/DeviceInfo.cs index 6642b3d7b..d81ce584b 100644 --- a/Emby.Dlna/PlayTo/DeviceInfo.cs +++ b/Emby.Dlna/PlayTo/DeviceInfo.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Emby.Dlna.Common; using MediaBrowser.Model.Dlna; diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index 85937963d..49c944790 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/Emby.Dlna/PlayTo/PlayToManager.cs b/Emby.Dlna/PlayTo/PlayToManager.cs index 177303d48..d8d289c59 100644 --- a/Emby.Dlna/PlayTo/PlayToManager.cs +++ b/Emby.Dlna/PlayTo/PlayToManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs b/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs index 7f9fb5caf..ffa56419b 100644 --- a/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs +++ b/Emby.Dlna/PlayTo/PlaybackProgressEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs b/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs index 17d2540a5..8cd8b47ac 100644 --- a/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs +++ b/Emby.Dlna/PlayTo/PlaybackStartEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs b/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs index 5dfaa9294..2afdc324d 100644 --- a/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs +++ b/Emby.Dlna/PlayTo/PlaybackStoppedEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/PlaylistItem.cs b/Emby.Dlna/PlayTo/PlaylistItem.cs index 6155fb239..1e62b61e9 100644 --- a/Emby.Dlna/PlayTo/PlaylistItem.cs +++ b/Emby.Dlna/PlayTo/PlaylistItem.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs b/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs index 32fb46660..9f1690b04 100644 --- a/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs +++ b/Emby.Dlna/PlayTo/TRANSPORTSTATE.cs @@ -1,4 +1,4 @@ -namespace Emby.Dlna.PlayTo +namespace Emby.Dlna.PlayTo { public enum TRANSPORTSTATE { diff --git a/Emby.Dlna/PlayTo/TransportCommands.cs b/Emby.Dlna/PlayTo/TransportCommands.cs index bb71c2835..bb6d69115 100644 --- a/Emby.Dlna/PlayTo/TransportCommands.cs +++ b/Emby.Dlna/PlayTo/TransportCommands.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; diff --git a/Emby.Dlna/PlayTo/TransportStateEventArgs.cs b/Emby.Dlna/PlayTo/TransportStateEventArgs.cs index c6a96f58c..7dcd39e10 100644 --- a/Emby.Dlna/PlayTo/TransportStateEventArgs.cs +++ b/Emby.Dlna/PlayTo/TransportStateEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/UpnpContainer.cs b/Emby.Dlna/PlayTo/UpnpContainer.cs index 4c07f3605..943e0347b 100644 --- a/Emby.Dlna/PlayTo/UpnpContainer.cs +++ b/Emby.Dlna/PlayTo/UpnpContainer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Xml.Linq; using Emby.Dlna.Ssdp; diff --git a/Emby.Dlna/PlayTo/uBaseObject.cs b/Emby.Dlna/PlayTo/uBaseObject.cs index 3d80d7ed0..f29a126df 100644 --- a/Emby.Dlna/PlayTo/uBaseObject.cs +++ b/Emby.Dlna/PlayTo/uBaseObject.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/uParser.cs b/Emby.Dlna/PlayTo/uParser.cs index 4d26ee6b3..3a0ffffd4 100644 --- a/Emby.Dlna/PlayTo/uParser.cs +++ b/Emby.Dlna/PlayTo/uParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Xml.Linq; diff --git a/Emby.Dlna/PlayTo/uParserObject.cs b/Emby.Dlna/PlayTo/uParserObject.cs index bdd67bca9..87a7f69c6 100644 --- a/Emby.Dlna/PlayTo/uParserObject.cs +++ b/Emby.Dlna/PlayTo/uParserObject.cs @@ -1,4 +1,4 @@ -using System.Xml.Linq; +using System.Xml.Linq; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/PlayTo/uPnpNamespaces.cs b/Emby.Dlna/PlayTo/uPnpNamespaces.cs index 81acb5e41..7132ecd15 100644 --- a/Emby.Dlna/PlayTo/uPnpNamespaces.cs +++ b/Emby.Dlna/PlayTo/uPnpNamespaces.cs @@ -1,4 +1,4 @@ -using System.Xml.Linq; +using System.Xml.Linq; namespace Emby.Dlna.PlayTo { diff --git a/Emby.Dlna/Profiles/DefaultProfile.cs b/Emby.Dlna/Profiles/DefaultProfile.cs index 9c85a8393..ea50bd4a7 100644 --- a/Emby.Dlna/Profiles/DefaultProfile.cs +++ b/Emby.Dlna/Profiles/DefaultProfile.cs @@ -1,4 +1,4 @@ -using System.Linq; +using System.Linq; using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles diff --git a/Emby.Dlna/Profiles/DenonAvrProfile.cs b/Emby.Dlna/Profiles/DenonAvrProfile.cs index b723accb2..a73885191 100644 --- a/Emby.Dlna/Profiles/DenonAvrProfile.cs +++ b/Emby.Dlna/Profiles/DenonAvrProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/DirectTvProfile.cs b/Emby.Dlna/Profiles/DirectTvProfile.cs index ec134905e..317c0976a 100644 --- a/Emby.Dlna/Profiles/DirectTvProfile.cs +++ b/Emby.Dlna/Profiles/DirectTvProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs index 586a9d89a..d501cce0d 100644 --- a/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs +++ b/Emby.Dlna/Profiles/DishHopperJoeyProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/Foobar2000Profile.cs b/Emby.Dlna/Profiles/Foobar2000Profile.cs index 02be16f2a..947194bce 100644 --- a/Emby.Dlna/Profiles/Foobar2000Profile.cs +++ b/Emby.Dlna/Profiles/Foobar2000Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/LgTvProfile.cs b/Emby.Dlna/Profiles/LgTvProfile.cs index ac9305336..145685ab1 100644 --- a/Emby.Dlna/Profiles/LgTvProfile.cs +++ b/Emby.Dlna/Profiles/LgTvProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs b/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs index 480b0ae8e..3f0bb4263 100644 --- a/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs +++ b/Emby.Dlna/Profiles/LinksysDMA2100Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/MarantzProfile.cs b/Emby.Dlna/Profiles/MarantzProfile.cs index 0ad679a9e..162e284be 100644 --- a/Emby.Dlna/Profiles/MarantzProfile.cs +++ b/Emby.Dlna/Profiles/MarantzProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/MediaMonkeyProfile.cs b/Emby.Dlna/Profiles/MediaMonkeyProfile.cs index e4053e878..53cae4e2f 100644 --- a/Emby.Dlna/Profiles/MediaMonkeyProfile.cs +++ b/Emby.Dlna/Profiles/MediaMonkeyProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/PanasonicVieraProfile.cs b/Emby.Dlna/Profiles/PanasonicVieraProfile.cs index 16fe65a9f..5f31ec484 100644 --- a/Emby.Dlna/Profiles/PanasonicVieraProfile.cs +++ b/Emby.Dlna/Profiles/PanasonicVieraProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/PopcornHourProfile.cs b/Emby.Dlna/Profiles/PopcornHourProfile.cs index 18467bace..aefe8c44f 100644 --- a/Emby.Dlna/Profiles/PopcornHourProfile.cs +++ b/Emby.Dlna/Profiles/PopcornHourProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs b/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs index 86b8837eb..51a1c8173 100644 --- a/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs +++ b/Emby.Dlna/Profiles/SamsungSmartTvProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SharpSmartTvProfile.cs b/Emby.Dlna/Profiles/SharpSmartTvProfile.cs index 9cf678d65..f840cfb34 100644 --- a/Emby.Dlna/Profiles/SharpSmartTvProfile.cs +++ b/Emby.Dlna/Profiles/SharpSmartTvProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs index 26a76bd2b..2af1d3b50 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2013.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs index ba6ec71f2..3de0b5192 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2014.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs index ddeb0f160..889484bea 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2015.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs b/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs index 10c3fbe38..acb90bd01 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayer2016.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs b/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs index 0cbc9369c..e1808b205 100644 --- a/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs +++ b/Emby.Dlna/Profiles/SonyBlurayPlayerProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs b/Emby.Dlna/Profiles/SonyBravia2010Profile.cs index 7bfa5c70f..f8e8faa76 100644 --- a/Emby.Dlna/Profiles/SonyBravia2010Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2010Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBravia2011Profile.cs b/Emby.Dlna/Profiles/SonyBravia2011Profile.cs index 90363c9b1..111f36e9b 100644 --- a/Emby.Dlna/Profiles/SonyBravia2011Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2011Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBravia2012Profile.cs b/Emby.Dlna/Profiles/SonyBravia2012Profile.cs index 64c1e0d49..d5efe4270 100644 --- a/Emby.Dlna/Profiles/SonyBravia2012Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2012Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBravia2013Profile.cs b/Emby.Dlna/Profiles/SonyBravia2013Profile.cs index b45f561aa..3b0228694 100644 --- a/Emby.Dlna/Profiles/SonyBravia2013Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2013Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyBravia2014Profile.cs b/Emby.Dlna/Profiles/SonyBravia2014Profile.cs index c0f8576f2..e860eae34 100644 --- a/Emby.Dlna/Profiles/SonyBravia2014Profile.cs +++ b/Emby.Dlna/Profiles/SonyBravia2014Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyPs3Profile.cs b/Emby.Dlna/Profiles/SonyPs3Profile.cs index 735a783a4..88d064695 100644 --- a/Emby.Dlna/Profiles/SonyPs3Profile.cs +++ b/Emby.Dlna/Profiles/SonyPs3Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/SonyPs4Profile.cs b/Emby.Dlna/Profiles/SonyPs4Profile.cs index a65d55754..499cf8803 100644 --- a/Emby.Dlna/Profiles/SonyPs4Profile.cs +++ b/Emby.Dlna/Profiles/SonyPs4Profile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/WdtvLiveProfile.cs b/Emby.Dlna/Profiles/WdtvLiveProfile.cs index ed9e45bc7..bf7b1ab47 100644 --- a/Emby.Dlna/Profiles/WdtvLiveProfile.cs +++ b/Emby.Dlna/Profiles/WdtvLiveProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Profiles/XboxOneProfile.cs b/Emby.Dlna/Profiles/XboxOneProfile.cs index 14f7b430c..710b891e3 100644 --- a/Emby.Dlna/Profiles/XboxOneProfile.cs +++ b/Emby.Dlna/Profiles/XboxOneProfile.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Dlna; +using MediaBrowser.Model.Dlna; namespace Emby.Dlna.Profiles { diff --git a/Emby.Dlna/Service/BaseControlHandler.cs b/Emby.Dlna/Service/BaseControlHandler.cs index d3fc1d1f8..d65f8972b 100644 --- a/Emby.Dlna/Service/BaseControlHandler.cs +++ b/Emby.Dlna/Service/BaseControlHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Dlna/Service/BaseService.cs b/Emby.Dlna/Service/BaseService.cs index d7357a45c..5359e94c4 100644 --- a/Emby.Dlna/Service/BaseService.cs +++ b/Emby.Dlna/Service/BaseService.cs @@ -1,4 +1,4 @@ -using Emby.Dlna.Eventing; +using Emby.Dlna.Eventing; using MediaBrowser.Common.Net; using Microsoft.Extensions.Logging; diff --git a/Emby.Dlna/Service/ControlErrorHandler.cs b/Emby.Dlna/Service/ControlErrorHandler.cs index 96d65356c..e9c2c67b9 100644 --- a/Emby.Dlna/Service/ControlErrorHandler.cs +++ b/Emby.Dlna/Service/ControlErrorHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Text; using System.Xml; diff --git a/Emby.Dlna/Ssdp/DeviceDiscovery.cs b/Emby.Dlna/Ssdp/DeviceDiscovery.cs index c06274fd4..069d704b8 100644 --- a/Emby.Dlna/Ssdp/DeviceDiscovery.cs +++ b/Emby.Dlna/Ssdp/DeviceDiscovery.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller.Configuration; diff --git a/Emby.Dlna/Ssdp/Extensions.cs b/Emby.Dlna/Ssdp/Extensions.cs index 134549456..c680c123e 100644 --- a/Emby.Dlna/Ssdp/Extensions.cs +++ b/Emby.Dlna/Ssdp/Extensions.cs @@ -1,4 +1,4 @@ -using System.Xml.Linq; +using System.Xml.Linq; namespace Emby.Dlna.Ssdp { diff --git a/Emby.Drawing.Skia/PercentPlayedDrawer.cs b/Emby.Drawing.Skia/PercentPlayedDrawer.cs index 2b8a60cd2..a204999fe 100644 --- a/Emby.Drawing.Skia/PercentPlayedDrawer.cs +++ b/Emby.Drawing.Skia/PercentPlayedDrawer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Drawing; using SkiaSharp; diff --git a/Emby.Drawing.Skia/PlayedIndicatorDrawer.cs b/Emby.Drawing.Skia/PlayedIndicatorDrawer.cs index ba0ba133b..7e9cb8c5c 100644 --- a/Emby.Drawing.Skia/PlayedIndicatorDrawer.cs +++ b/Emby.Drawing.Skia/PlayedIndicatorDrawer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Common.Configuration; +using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; using MediaBrowser.Model.Drawing; using MediaBrowser.Model.IO; diff --git a/Emby.Drawing.Skia/SkiaEncoder.cs b/Emby.Drawing.Skia/SkiaEncoder.cs index 2d6bdb16b..3f82fd4b7 100644 --- a/Emby.Drawing.Skia/SkiaEncoder.cs +++ b/Emby.Drawing.Skia/SkiaEncoder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Linq; diff --git a/Emby.Drawing.Skia/UnplayedCountIndicator.cs b/Emby.Drawing.Skia/UnplayedCountIndicator.cs index 176248b5f..e1d1ecff8 100644 --- a/Emby.Drawing.Skia/UnplayedCountIndicator.cs +++ b/Emby.Drawing.Skia/UnplayedCountIndicator.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Net; using MediaBrowser.Model.Drawing; diff --git a/Emby.Drawing/Common/ImageHeader.cs b/Emby.Drawing/Common/ImageHeader.cs index 094e1ad45..6b604bc15 100644 --- a/Emby.Drawing/Common/ImageHeader.cs +++ b/Emby.Drawing/Common/ImageHeader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index cdc1f21d2..5b9b15857 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/Emby.Drawing/NullImageEncoder.cs b/Emby.Drawing/NullImageEncoder.cs index 95ea42ecf..748ae6f2c 100644 --- a/Emby.Drawing/NullImageEncoder.cs +++ b/Emby.Drawing/NullImageEncoder.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Drawing; using MediaBrowser.Model.Drawing; diff --git a/Emby.IsoMounting/IsoMounter/Configuration/PluginConfiguration.cs b/Emby.IsoMounting/IsoMounter/Configuration/PluginConfiguration.cs index c21a1d81f..4755e4e82 100644 --- a/Emby.IsoMounting/IsoMounter/Configuration/PluginConfiguration.cs +++ b/Emby.IsoMounting/IsoMounter/Configuration/PluginConfiguration.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Plugins; +using MediaBrowser.Model.Plugins; namespace IsoMounter.Configuration { diff --git a/Emby.IsoMounting/IsoMounter/Plugin.cs b/Emby.IsoMounting/IsoMounter/Plugin.cs index 6a2431393..bcacab906 100644 --- a/Emby.IsoMounting/IsoMounter/Plugin.cs +++ b/Emby.IsoMounting/IsoMounter/Plugin.cs @@ -1,4 +1,4 @@ -using System; +using System; using IsoMounter.Configuration; using MediaBrowser.Common.Configuration; using MediaBrowser.Common.Plugins; diff --git a/Emby.Naming/Audio/AlbumParser.cs b/Emby.Naming/Audio/AlbumParser.cs index 447c8b3ec..8cf8ec5e5 100644 --- a/Emby.Naming/Audio/AlbumParser.cs +++ b/Emby.Naming/Audio/AlbumParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Linq; diff --git a/Emby.Naming/Audio/AudioFileParser.cs b/Emby.Naming/Audio/AudioFileParser.cs index 20016915a..609eb779a 100644 --- a/Emby.Naming/Audio/AudioFileParser.cs +++ b/Emby.Naming/Audio/AudioFileParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using Emby.Naming.Common; diff --git a/Emby.Naming/Audio/MultiPartResult.cs b/Emby.Naming/Audio/MultiPartResult.cs index fae0ae4d8..983b9fe67 100644 --- a/Emby.Naming/Audio/MultiPartResult.cs +++ b/Emby.Naming/Audio/MultiPartResult.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Audio { public class MultiPartResult diff --git a/Emby.Naming/AudioBook/AudioBookFileInfo.cs b/Emby.Naming/AudioBook/AudioBookFileInfo.cs index 6f56737f7..5ece6771a 100644 --- a/Emby.Naming/AudioBook/AudioBookFileInfo.cs +++ b/Emby.Naming/AudioBook/AudioBookFileInfo.cs @@ -1,4 +1,4 @@ - + using System; namespace Emby.Naming.AudioBook diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs index fbc3772fb..8c52fd9b9 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs @@ -1,4 +1,4 @@ -using System.Globalization; +using System.Globalization; using System.IO; using System.Text.RegularExpressions; using Emby.Naming.Common; diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs index ee4bfe632..3a8e3c31f 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParserResult.cs @@ -1,4 +1,4 @@ -namespace Emby.Naming.AudioBook +namespace Emby.Naming.AudioBook { public class AudioBookFilePathParserResult { diff --git a/Emby.Naming/AudioBook/AudioBookInfo.cs b/Emby.Naming/AudioBook/AudioBookInfo.cs index 4ce8e16a6..f6e1d5be4 100644 --- a/Emby.Naming/AudioBook/AudioBookInfo.cs +++ b/Emby.Naming/AudioBook/AudioBookInfo.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Naming.AudioBook { diff --git a/Emby.Naming/AudioBook/AudioBookListResolver.cs b/Emby.Naming/AudioBook/AudioBookListResolver.cs index af9d4fea6..4e3ad7cac 100644 --- a/Emby.Naming/AudioBook/AudioBookListResolver.cs +++ b/Emby.Naming/AudioBook/AudioBookListResolver.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using Emby.Naming.Common; using Emby.Naming.Video; diff --git a/Emby.Naming/AudioBook/AudioBookResolver.cs b/Emby.Naming/AudioBook/AudioBookResolver.cs index 3dbdba398..f8f13bc5e 100644 --- a/Emby.Naming/AudioBook/AudioBookResolver.cs +++ b/Emby.Naming/AudioBook/AudioBookResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using Emby.Naming.Common; diff --git a/Emby.Naming/Common/EpisodeExpression.cs b/Emby.Naming/Common/EpisodeExpression.cs index e058210bb..ebaacd3a1 100644 --- a/Emby.Naming/Common/EpisodeExpression.cs +++ b/Emby.Naming/Common/EpisodeExpression.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text.RegularExpressions; namespace Emby.Naming.Common diff --git a/Emby.Naming/Common/MediaType.cs b/Emby.Naming/Common/MediaType.cs index 2a3d433cf..2332b6455 100644 --- a/Emby.Naming/Common/MediaType.cs +++ b/Emby.Naming/Common/MediaType.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Common { public enum MediaType diff --git a/Emby.Naming/Common/NamingOptions.cs b/Emby.Naming/Common/NamingOptions.cs index 63b828a5e..2ef0208ba 100644 --- a/Emby.Naming/Common/NamingOptions.cs +++ b/Emby.Naming/Common/NamingOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Text.RegularExpressions; using Emby.Naming.Video; diff --git a/Emby.Naming/Extensions/StringExtensions.cs b/Emby.Naming/Extensions/StringExtensions.cs index e773dbfe8..26c09aeb4 100644 --- a/Emby.Naming/Extensions/StringExtensions.cs +++ b/Emby.Naming/Extensions/StringExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; namespace Emby.Naming.Extensions diff --git a/Emby.Naming/StringExtensions.cs b/Emby.Naming/StringExtensions.cs index 63532075e..7c61922af 100644 --- a/Emby.Naming/StringExtensions.cs +++ b/Emby.Naming/StringExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; namespace Emby.Naming diff --git a/Emby.Naming/Subtitles/SubtitleInfo.cs b/Emby.Naming/Subtitles/SubtitleInfo.cs index 3ece0679e..6cb683a36 100644 --- a/Emby.Naming/Subtitles/SubtitleInfo.cs +++ b/Emby.Naming/Subtitles/SubtitleInfo.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Subtitles { public class SubtitleInfo diff --git a/Emby.Naming/Subtitles/SubtitleParser.cs b/Emby.Naming/Subtitles/SubtitleParser.cs index 181154b07..ac9432d57 100644 --- a/Emby.Naming/Subtitles/SubtitleParser.cs +++ b/Emby.Naming/Subtitles/SubtitleParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using Emby.Naming.Common; diff --git a/Emby.Naming/TV/EpisodeInfo.cs b/Emby.Naming/TV/EpisodeInfo.cs index 41397480e..ce77da14f 100644 --- a/Emby.Naming/TV/EpisodeInfo.cs +++ b/Emby.Naming/TV/EpisodeInfo.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.TV { public class EpisodeInfo diff --git a/Emby.Naming/TV/EpisodePathParserResult.cs b/Emby.Naming/TV/EpisodePathParserResult.cs index 9890c78a4..0d9e4dd8c 100644 --- a/Emby.Naming/TV/EpisodePathParserResult.cs +++ b/Emby.Naming/TV/EpisodePathParserResult.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.TV { public class EpisodePathParserResult diff --git a/Emby.Naming/TV/EpisodeResolver.cs b/Emby.Naming/TV/EpisodeResolver.cs index b0e83038d..49a3558bd 100644 --- a/Emby.Naming/TV/EpisodeResolver.cs +++ b/Emby.Naming/TV/EpisodeResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using Emby.Naming.Common; diff --git a/Emby.Naming/TV/SeasonPathParser.cs b/Emby.Naming/TV/SeasonPathParser.cs index e3fb84f30..002bbe19c 100644 --- a/Emby.Naming/TV/SeasonPathParser.cs +++ b/Emby.Naming/TV/SeasonPathParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.IO; using System.Linq; diff --git a/Emby.Naming/TV/SeasonPathParserResult.cs b/Emby.Naming/TV/SeasonPathParserResult.cs index 9a18d0a03..048b390ae 100644 --- a/Emby.Naming/TV/SeasonPathParserResult.cs +++ b/Emby.Naming/TV/SeasonPathParserResult.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.TV { public class SeasonPathParserResult diff --git a/Emby.Naming/Video/CleanDateTimeResult.cs b/Emby.Naming/Video/CleanDateTimeResult.cs index 946fd953c..a1794ed38 100644 --- a/Emby.Naming/Video/CleanDateTimeResult.cs +++ b/Emby.Naming/Video/CleanDateTimeResult.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Video { public class CleanDateTimeResult diff --git a/Emby.Naming/Video/CleanStringResult.cs b/Emby.Naming/Video/CleanStringResult.cs index 0282863e0..0c1360a77 100644 --- a/Emby.Naming/Video/CleanStringResult.cs +++ b/Emby.Naming/Video/CleanStringResult.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Video { public class CleanStringResult diff --git a/Emby.Naming/Video/ExtraResolver.cs b/Emby.Naming/Video/ExtraResolver.cs index 866a8044e..3459b689a 100644 --- a/Emby.Naming/Video/ExtraResolver.cs +++ b/Emby.Naming/Video/ExtraResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using System.Text.RegularExpressions; diff --git a/Emby.Naming/Video/ExtraResult.cs b/Emby.Naming/Video/ExtraResult.cs index ab42d8e84..ff6f20c47 100644 --- a/Emby.Naming/Video/ExtraResult.cs +++ b/Emby.Naming/Video/ExtraResult.cs @@ -1,4 +1,4 @@ -namespace Emby.Naming.Video +namespace Emby.Naming.Video { public class ExtraResult { diff --git a/Emby.Naming/Video/ExtraRule.cs b/Emby.Naming/Video/ExtraRule.cs index ef83b3cd6..b8eb8427e 100644 --- a/Emby.Naming/Video/ExtraRule.cs +++ b/Emby.Naming/Video/ExtraRule.cs @@ -1,4 +1,4 @@ -using Emby.Naming.Common; +using Emby.Naming.Common; namespace Emby.Naming.Video { diff --git a/Emby.Naming/Video/ExtraRuleType.cs b/Emby.Naming/Video/ExtraRuleType.cs index 323c7cef6..eda315779 100644 --- a/Emby.Naming/Video/ExtraRuleType.cs +++ b/Emby.Naming/Video/ExtraRuleType.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Video { public enum ExtraRuleType diff --git a/Emby.Naming/Video/FileStack.cs b/Emby.Naming/Video/FileStack.cs index 2feea4cb3..2df1e9aed 100644 --- a/Emby.Naming/Video/FileStack.cs +++ b/Emby.Naming/Video/FileStack.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; diff --git a/Emby.Naming/Video/FlagParser.cs b/Emby.Naming/Video/FlagParser.cs index f326f0754..bb129499b 100644 --- a/Emby.Naming/Video/FlagParser.cs +++ b/Emby.Naming/Video/FlagParser.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using Emby.Naming.Common; diff --git a/Emby.Naming/Video/Format3DResult.cs b/Emby.Naming/Video/Format3DResult.cs index 147ccfc05..e12494079 100644 --- a/Emby.Naming/Video/Format3DResult.cs +++ b/Emby.Naming/Video/Format3DResult.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Naming.Video { diff --git a/Emby.Naming/Video/Format3DRule.cs b/Emby.Naming/Video/Format3DRule.cs index 3c173efbc..7c815524f 100644 --- a/Emby.Naming/Video/Format3DRule.cs +++ b/Emby.Naming/Video/Format3DRule.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Video { public class Format3DRule diff --git a/Emby.Naming/Video/StackResolver.cs b/Emby.Naming/Video/StackResolver.cs index 420f6a495..4893002c1 100644 --- a/Emby.Naming/Video/StackResolver.cs +++ b/Emby.Naming/Video/StackResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Naming/Video/StackResult.cs b/Emby.Naming/Video/StackResult.cs index 920a7dea7..de35d2825 100644 --- a/Emby.Naming/Video/StackResult.cs +++ b/Emby.Naming/Video/StackResult.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Naming.Video { diff --git a/Emby.Naming/Video/StubResolver.cs b/Emby.Naming/Video/StubResolver.cs index d8c03a10f..7925f381d 100644 --- a/Emby.Naming/Video/StubResolver.cs +++ b/Emby.Naming/Video/StubResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using Emby.Naming.Common; diff --git a/Emby.Naming/Video/StubResult.cs b/Emby.Naming/Video/StubResult.cs index c9d06c9a7..597681337 100644 --- a/Emby.Naming/Video/StubResult.cs +++ b/Emby.Naming/Video/StubResult.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Naming.Video { diff --git a/Emby.Naming/Video/StubTypeRule.cs b/Emby.Naming/Video/StubTypeRule.cs index 66ebfc3a2..d8fee617e 100644 --- a/Emby.Naming/Video/StubTypeRule.cs +++ b/Emby.Naming/Video/StubTypeRule.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Video { public class StubTypeRule diff --git a/Emby.Naming/Video/VideoFileInfo.cs b/Emby.Naming/Video/VideoFileInfo.cs index 3cdc483ff..d14d04b20 100644 --- a/Emby.Naming/Video/VideoFileInfo.cs +++ b/Emby.Naming/Video/VideoFileInfo.cs @@ -1,4 +1,4 @@ - + namespace Emby.Naming.Video { /// diff --git a/Emby.Naming/Video/VideoInfo.cs b/Emby.Naming/Video/VideoInfo.cs index 033a8ae2d..d96d0e757 100644 --- a/Emby.Naming/Video/VideoInfo.cs +++ b/Emby.Naming/Video/VideoInfo.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace Emby.Naming.Video { diff --git a/Emby.Naming/Video/VideoResolver.cs b/Emby.Naming/Video/VideoResolver.cs index 5b43096fe..de8f96965 100644 --- a/Emby.Naming/Video/VideoResolver.cs +++ b/Emby.Naming/Video/VideoResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using Emby.Naming.Common; diff --git a/Emby.Notifications/Api/NotificationsService.cs b/Emby.Notifications/Api/NotificationsService.cs index 37d3f4b20..83845558a 100644 --- a/Emby.Notifications/Api/NotificationsService.cs +++ b/Emby.Notifications/Api/NotificationsService.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Notifications/CoreNotificationTypes.cs b/Emby.Notifications/CoreNotificationTypes.cs index 0443aa416..158898084 100644 --- a/Emby.Notifications/CoreNotificationTypes.cs +++ b/Emby.Notifications/CoreNotificationTypes.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller; diff --git a/Emby.Notifications/NotificationConfigurationFactory.cs b/Emby.Notifications/NotificationConfigurationFactory.cs index 62258315e..d08475f7d 100644 --- a/Emby.Notifications/NotificationConfigurationFactory.cs +++ b/Emby.Notifications/NotificationConfigurationFactory.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.Notifications; diff --git a/Emby.Notifications/NotificationManager.cs b/Emby.Notifications/NotificationManager.cs index 7a88dccf5..3d1d4722d 100644 --- a/Emby.Notifications/NotificationManager.cs +++ b/Emby.Notifications/NotificationManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Notifications/Notifications.cs b/Emby.Notifications/Notifications.cs index dc3ccfb38..fbdc39f94 100644 --- a/Emby.Notifications/Notifications.cs +++ b/Emby.Notifications/Notifications.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs index 16d3062fb..40480b2ae 100644 --- a/Emby.Photos/PhotoProvider.cs +++ b/Emby.Photos/PhotoProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using System.Threading; diff --git a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs index 4a05d1e56..90a0671f2 100644 --- a/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs +++ b/Emby.Server.Implementations/Activity/ActivityLogEntryPoint.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Text; diff --git a/Emby.Server.Implementations/Activity/ActivityManager.cs b/Emby.Server.Implementations/Activity/ActivityManager.cs index 718bdae50..e526acb0d 100644 --- a/Emby.Server.Implementations/Activity/ActivityManager.cs +++ b/Emby.Server.Implementations/Activity/ActivityManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using MediaBrowser.Controller.Library; using MediaBrowser.Model.Activity; diff --git a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs index 3ad2d4b91..e4a2cd9df 100644 --- a/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs +++ b/Emby.Server.Implementations/AppBase/BaseApplicationPaths.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using MediaBrowser.Common.Configuration; namespace Emby.Server.Implementations.AppBase diff --git a/Emby.Server.Implementations/Archiving/ZipClient.cs b/Emby.Server.Implementations/Archiving/ZipClient.cs index fa335272a..84072cde6 100644 --- a/Emby.Server.Implementations/Archiving/ZipClient.cs +++ b/Emby.Server.Implementations/Archiving/ZipClient.cs @@ -1,4 +1,4 @@ -using System.IO; +using System.IO; using MediaBrowser.Model.IO; using SharpCompress.Archives.SevenZip; using SharpCompress.Archives.Tar; diff --git a/Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs b/Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs index 20fd4144a..b27f84848 100644 --- a/Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs +++ b/Emby.Server.Implementations/Branding/BrandingConfigurationFactory.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.Branding; diff --git a/Emby.Server.Implementations/Browser/BrowserLauncher.cs b/Emby.Server.Implementations/Browser/BrowserLauncher.cs index 737569978..718129ef0 100644 --- a/Emby.Server.Implementations/Browser/BrowserLauncher.cs +++ b/Emby.Server.Implementations/Browser/BrowserLauncher.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller; namespace Emby.Server.Implementations.Browser diff --git a/Emby.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs b/Emby.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs index a80b2c46c..c10f00f9b 100644 --- a/Emby.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs +++ b/Emby.Server.Implementations/Channels/ChannelDynamicMediaSourceProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Channels/ChannelImageProvider.cs b/Emby.Server.Implementations/Channels/ChannelImageProvider.cs index 13244e9b7..bafa68818 100644 --- a/Emby.Server.Implementations/Channels/ChannelImageProvider.cs +++ b/Emby.Server.Implementations/Channels/ChannelImageProvider.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs b/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs index 35469a4ce..ad6c537ef 100644 --- a/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs +++ b/Emby.Server.Implementations/Channels/ChannelPostScanTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs index 67fcd3695..844f77a1a 100644 --- a/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs +++ b/Emby.Server.Implementations/Channels/RefreshChannelsScheduledTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs index a061ebf79..6642d1ef4 100644 --- a/Emby.Server.Implementations/Collections/CollectionImageProvider.cs +++ b/Emby.Server.Implementations/Collections/CollectionImageProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Emby.Server.Implementations.Images; diff --git a/Emby.Server.Implementations/Collections/CollectionManager.cs b/Emby.Server.Implementations/Collections/CollectionManager.cs index 6765dfbcc..213bb35e4 100644 --- a/Emby.Server.Implementations/Collections/CollectionManager.cs +++ b/Emby.Server.Implementations/Collections/CollectionManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs index 6d8641243..55f40db8f 100644 --- a/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs +++ b/Emby.Server.Implementations/Configuration/ServerConfigurationManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using Emby.Server.Implementations.AppBase; diff --git a/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs b/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs index 6402da0c9..09fdbc856 100644 --- a/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs +++ b/Emby.Server.Implementations/Cryptography/CryptographyProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Security.Cryptography; using System.Text; diff --git a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs index bd66d76fd..0f432c36c 100644 --- a/Emby.Server.Implementations/Data/BaseSqliteRepository.cs +++ b/Emby.Server.Implementations/Data/BaseSqliteRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs index 35fae0283..dcfe14943 100644 --- a/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs +++ b/Emby.Server.Implementations/Data/CleanDatabaseScheduledTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.Configuration; diff --git a/Emby.Server.Implementations/Data/ManagedConnection.cs b/Emby.Server.Implementations/Data/ManagedConnection.cs index 63d0ca59c..2f3dfc4d1 100644 --- a/Emby.Server.Implementations/Data/ManagedConnection.cs +++ b/Emby.Server.Implementations/Data/ManagedConnection.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using SQLitePCL.pretty; diff --git a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs index a7ea5d412..822573f20 100644 --- a/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteDisplayPreferencesRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Threading; diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index 13bc0094c..5ff61d37c 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/Emby.Server.Implementations/Data/SqliteUserRepository.cs b/Emby.Server.Implementations/Data/SqliteUserRepository.cs index 4305bdef6..bf00f2e65 100644 --- a/Emby.Server.Implementations/Data/SqliteUserRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteUserRepository.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using MediaBrowser.Controller; diff --git a/Emby.Server.Implementations/Data/TypeMapper.cs b/Emby.Server.Implementations/Data/TypeMapper.cs index b43d82c41..fa6a29aa3 100644 --- a/Emby.Server.Implementations/Data/TypeMapper.cs +++ b/Emby.Server.Implementations/Data/TypeMapper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Linq; using MediaBrowser.Model.Reflection; diff --git a/Emby.Server.Implementations/Diagnostics/CommonProcess.cs b/Emby.Server.Implementations/Diagnostics/CommonProcess.cs index dbde12703..d8a798c46 100644 --- a/Emby.Server.Implementations/Diagnostics/CommonProcess.cs +++ b/Emby.Server.Implementations/Diagnostics/CommonProcess.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.IO; using System.Threading; diff --git a/Emby.Server.Implementations/Diagnostics/ProcessFactory.cs b/Emby.Server.Implementations/Diagnostics/ProcessFactory.cs index a2c511cb9..14aadaaae 100644 --- a/Emby.Server.Implementations/Diagnostics/ProcessFactory.cs +++ b/Emby.Server.Implementations/Diagnostics/ProcessFactory.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Model.Diagnostics; +using MediaBrowser.Model.Diagnostics; namespace Emby.Server.Implementations.Diagnostics { diff --git a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs index 8a450a5fe..0fc4c3858 100644 --- a/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/AutomaticRestartEntryPoint.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs b/Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs index 7d0ca3552..b7565adec 100644 --- a/Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs +++ b/Emby.Server.Implementations/EntryPoints/RefreshUsersMetadata.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs b/Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs index 4e357bbbc..92ea3a8f4 100644 --- a/Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/ServerEventNotifier.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using MediaBrowser.Common.Plugins; diff --git a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs index 3afec4296..05c8b07ab 100644 --- a/Emby.Server.Implementations/EntryPoints/StartupWizard.cs +++ b/Emby.Server.Implementations/EntryPoints/StartupWizard.cs @@ -1,4 +1,4 @@ -using Emby.Server.Implementations.Browser; +using Emby.Server.Implementations.Browser; using MediaBrowser.Controller; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Plugins; diff --git a/Emby.Server.Implementations/EntryPoints/SystemEvents.cs b/Emby.Server.Implementations/EntryPoints/SystemEvents.cs index 2f9cd044f..72c8acd9f 100644 --- a/Emby.Server.Implementations/EntryPoints/SystemEvents.cs +++ b/Emby.Server.Implementations/EntryPoints/SystemEvents.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller; using MediaBrowser.Controller.Plugins; using MediaBrowser.Model.System; diff --git a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs index 13898a7b9..2c8246d13 100644 --- a/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs +++ b/Emby.Server.Implementations/EntryPoints/UdpServerEntryPoint.cs @@ -1,4 +1,4 @@ -using System; +using System; using Emby.Server.Implementations.Udp; using MediaBrowser.Controller; using MediaBrowser.Controller.Plugins; diff --git a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs index 4c448ba34..d6cf39d62 100644 --- a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs index b39790339..c8104150d 100644 --- a/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs +++ b/Emby.Server.Implementations/EnvironmentInfo/EnvironmentInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Runtime.InteropServices; using MediaBrowser.Model.System; diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs b/Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs index 13e1c2bf1..60cd7b3d7 100644 --- a/Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegInfo.cs @@ -1,4 +1,4 @@ -namespace Emby.Server.Implementations.FFMpeg +namespace Emby.Server.Implementations.FFMpeg { /// /// Class FFMpegInfo diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs b/Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs index f88033cfb..715a26913 100644 --- a/Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegInstallInfo.cs @@ -1,4 +1,4 @@ - + namespace Emby.Server.Implementations.FFMpeg { public class FFMpegInstallInfo diff --git a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs index 3c87f72f7..9a4aec958 100644 --- a/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs +++ b/Emby.Server.Implementations/FFMpeg/FFMpegLoader.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientInfo.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientInfo.cs index 21cec9d2b..f747b01b9 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientInfo.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net.Http; namespace Emby.Server.Implementations.HttpClientManager diff --git a/Emby.Server.Implementations/HttpServer/FileWriter.cs b/Emby.Server.Implementations/HttpServer/FileWriter.cs index 247299da6..c32c91670 100644 --- a/Emby.Server.Implementations/HttpServer/FileWriter.cs +++ b/Emby.Server.Implementations/HttpServer/FileWriter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/Emby.Server.Implementations/HttpServer/IHttpListener.cs b/Emby.Server.Implementations/HttpServer/IHttpListener.cs index 88d531668..835091361 100644 --- a/Emby.Server.Implementations/HttpServer/IHttpListener.cs +++ b/Emby.Server.Implementations/HttpServer/IHttpListener.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/HttpServer/LoggerUtils.cs b/Emby.Server.Implementations/HttpServer/LoggerUtils.cs index bf1079a2c..d22d9db26 100644 --- a/Emby.Server.Implementations/HttpServer/LoggerUtils.cs +++ b/Emby.Server.Implementations/HttpServer/LoggerUtils.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using MediaBrowser.Model.Services; using Microsoft.Extensions.Logging; diff --git a/Emby.Server.Implementations/HttpServer/ResponseFilter.cs b/Emby.Server.Implementations/HttpServer/ResponseFilter.cs index 21bd9df75..edd2a394b 100644 --- a/Emby.Server.Implementations/HttpServer/ResponseFilter.cs +++ b/Emby.Server.Implementations/HttpServer/ResponseFilter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.Text; using MediaBrowser.Model.Services; diff --git a/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs b/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs index b53d56a48..2c7057222 100644 --- a/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs +++ b/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Net; diff --git a/Emby.Server.Implementations/HttpServer/StreamWriter.cs b/Emby.Server.Implementations/HttpServer/StreamWriter.cs index 675590189..3269d44cf 100644 --- a/Emby.Server.Implementations/HttpServer/StreamWriter.cs +++ b/Emby.Server.Implementations/HttpServer/StreamWriter.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs index d4ef2d810..1ad92a83f 100644 --- a/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs +++ b/Emby.Server.Implementations/HttpServer/WebSocketConnection.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net.WebSockets; using System.Text; using System.Threading; diff --git a/Emby.Server.Implementations/IO/ExtendedFileSystemInfo.cs b/Emby.Server.Implementations/IO/ExtendedFileSystemInfo.cs index c7192bf99..48b34a3a0 100644 --- a/Emby.Server.Implementations/IO/ExtendedFileSystemInfo.cs +++ b/Emby.Server.Implementations/IO/ExtendedFileSystemInfo.cs @@ -1,4 +1,4 @@ -namespace Emby.Server.Implementations.IO +namespace Emby.Server.Implementations.IO { public class ExtendedFileSystemInfo { diff --git a/Emby.Server.Implementations/IO/FileRefresher.cs b/Emby.Server.Implementations/IO/FileRefresher.cs index b7f45c462..dcf26fdaf 100644 --- a/Emby.Server.Implementations/IO/FileRefresher.cs +++ b/Emby.Server.Implementations/IO/FileRefresher.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/IO/IsoManager.cs b/Emby.Server.Implementations/IO/IsoManager.cs index e0cf32868..e82335d65 100644 --- a/Emby.Server.Implementations/IO/IsoManager.cs +++ b/Emby.Server.Implementations/IO/IsoManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs index deaa506cc..39ed1afa7 100644 --- a/Emby.Server.Implementations/IO/LibraryMonitor.cs +++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; diff --git a/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs b/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs index 3c89039f7..a306f94b3 100644 --- a/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs +++ b/Emby.Server.Implementations/IO/MbLinkShortcutHandler.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using MediaBrowser.Model.IO; diff --git a/Emby.Server.Implementations/IO/StreamHelper.cs b/Emby.Server.Implementations/IO/StreamHelper.cs index b3854c79f..09cf4d4a3 100644 --- a/Emby.Server.Implementations/IO/StreamHelper.cs +++ b/Emby.Server.Implementations/IO/StreamHelper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/IO/ThrottledStream.cs b/Emby.Server.Implementations/IO/ThrottledStream.cs index 070dc9038..81e8abc98 100644 --- a/Emby.Server.Implementations/IO/ThrottledStream.cs +++ b/Emby.Server.Implementations/IO/ThrottledStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs index 5c0aa8a23..b99b98157 100644 --- a/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs +++ b/Emby.Server.Implementations/Images/BaseDynamicImageProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs index 2af06c78f..c0a126b84 100644 --- a/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs +++ b/Emby.Server.Implementations/Library/CoreResolutionIgnoreRule.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs b/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs index bf68f11b5..4013ac0c8 100644 --- a/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs +++ b/Emby.Server.Implementations/Library/DefaultAuthenticationProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; using System.Threading.Tasks; using MediaBrowser.Controller.Authentication; diff --git a/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs b/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs index 2da50339a..45a33a296 100644 --- a/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs +++ b/Emby.Server.Implementations/Library/ExclusiveLiveStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/LiveStreamHelper.cs b/Emby.Server.Implementations/Library/LiveStreamHelper.cs index ea1d1890c..c3082a78a 100644 --- a/Emby.Server.Implementations/Library/LiveStreamHelper.cs +++ b/Emby.Server.Implementations/Library/LiveStreamHelper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.IO; diff --git a/Emby.Server.Implementations/Library/MediaStreamSelector.cs b/Emby.Server.Implementations/Library/MediaStreamSelector.cs index 3777023e7..0a6c8845d 100644 --- a/Emby.Server.Implementations/Library/MediaStreamSelector.cs +++ b/Emby.Server.Implementations/Library/MediaStreamSelector.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Model.Configuration; diff --git a/Emby.Server.Implementations/Library/MusicManager.cs b/Emby.Server.Implementations/Library/MusicManager.cs index 46889e6d9..10602fea7 100644 --- a/Emby.Server.Implementations/Library/MusicManager.cs +++ b/Emby.Server.Implementations/Library/MusicManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller.Dto; diff --git a/Emby.Server.Implementations/Library/PathExtensions.cs b/Emby.Server.Implementations/Library/PathExtensions.cs index 2d3019d17..6a3adda5a 100644 --- a/Emby.Server.Implementations/Library/PathExtensions.cs +++ b/Emby.Server.Implementations/Library/PathExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text.RegularExpressions; namespace Emby.Server.Implementations.Library diff --git a/Emby.Server.Implementations/Library/ResolverHelper.cs b/Emby.Server.Implementations/Library/ResolverHelper.cs index 7bfc58fe3..7484fc743 100644 --- a/Emby.Server.Implementations/Library/ResolverHelper.cs +++ b/Emby.Server.Implementations/Library/ResolverHelper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs index 64f78d511..3ce1da81a 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicAlbumResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Emby.Naming.Audio; using MediaBrowser.Controller.Entities.Audio; diff --git a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs index ab1406c6f..74e9b8304 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Audio/MusicArtistResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Entities.Audio; diff --git a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs index e6b05a1af..bd5132c4b 100644 --- a/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/BaseVideoResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using Emby.Naming.Video; diff --git a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs index d7f80b3f4..f22554ee5 100644 --- a/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/Books/BookResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs b/Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs index 47e7f7344..e48b6c967 100644 --- a/Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/FolderResolver.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; diff --git a/Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs b/Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs index 529916619..a6db40714 100644 --- a/Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/ItemResolver.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Resolvers; diff --git a/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs index 53837cfca..82779f8d3 100644 --- a/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/PhotoAlbumResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs index fb84e3ad5..78c1c6629 100644 --- a/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/PhotoResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using MediaBrowser.Controller.Drawing; diff --git a/Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs b/Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs index 4695940f1..c295894d3 100644 --- a/Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/PlaylistResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs b/Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs index 2981eb8dc..fa8c89e88 100644 --- a/Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/SpecialFolderResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using MediaBrowser.Controller; diff --git a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs index 97dff0093..fed0904d1 100644 --- a/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/TV/EpisodeResolver.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using MediaBrowser.Controller.Entities.TV; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs b/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs index 4da83af84..60752a85d 100644 --- a/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs +++ b/Emby.Server.Implementations/Library/Resolvers/VideoResolver.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Model.IO; diff --git a/Emby.Server.Implementations/Library/UserDataManager.cs b/Emby.Server.Implementations/Library/UserDataManager.cs index 1e7ea469e..f2921e354 100644 --- a/Emby.Server.Implementations/Library/UserDataManager.cs +++ b/Emby.Server.Implementations/Library/UserDataManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; diff --git a/Emby.Server.Implementations/Library/UserViewManager.cs b/Emby.Server.Implementations/Library/UserViewManager.cs index 8b1f3ac80..9fa859bde 100644 --- a/Emby.Server.Implementations/Library/UserViewManager.cs +++ b/Emby.Server.Implementations/Library/UserViewManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs index 323219e3d..27261d449 100644 --- a/Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/ArtistsPostScanTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs index b490aa396..294348660 100644 --- a/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/ArtistsValidator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs index b4333a1dc..2b067951d 100644 --- a/Emby.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/GameGenresPostScanTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs b/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs index c9c3674a0..f5ffa1e45 100644 --- a/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/GameGenresValidator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs index 55638a26f..056807300 100644 --- a/Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/GenresPostScanTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/GenresValidator.cs b/Emby.Server.Implementations/Library/Validators/GenresValidator.cs index 6e24bd5c8..f8459c61f 100644 --- a/Emby.Server.Implementations/Library/Validators/GenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/GenresValidator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs index ec4685ef6..d7ab92d30 100644 --- a/Emby.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/MusicGenresPostScanTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs b/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs index 9cead7b43..710e5d043 100644 --- a/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/MusicGenresValidator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs index 7cef23799..0ea543ba0 100644 --- a/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/PeopleValidator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Configuration; diff --git a/Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs b/Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs index 551275ec0..4aa5c7e72 100644 --- a/Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs +++ b/Emby.Server.Implementations/Library/Validators/StudiosPostScanTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs b/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs index 409612be7..da4645a11 100644 --- a/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs +++ b/Emby.Server.Implementations/Library/Validators/StudiosValidator.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Entities; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs index 32241812d..7d7ef21e3 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/DirectRecorder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Common.Net; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs index 139cf570e..982a54b68 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EntryPoint.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Plugins; +using MediaBrowser.Controller.Plugins; namespace Emby.Server.Implementations.LiveTv.EmbyTV { diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs index e639a312c..6eced3050 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/IRecorder.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using System.Threading.Tasks; using MediaBrowser.Controller.Library; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs index ecf5343c7..1b8287ed1 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/ItemDataProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs index b5ae38839..ded3c7607 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/RecordingHelper.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using MediaBrowser.Controller.LiveTv; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs index cec04f58c..d2ad65a1e 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/SeriesTimerManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Model.IO; using MediaBrowser.Model.Serialization; diff --git a/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs b/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs index c1773c1b1..f9b274acb 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvConfigurationFactory.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using MediaBrowser.Common.Configuration; using MediaBrowser.Model.LiveTv; diff --git a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs index a9b00c4fb..cd1731de5 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvMediaSourceProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs index e1303125e..542951de4 100644 --- a/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs +++ b/Emby.Server.Implementations/LiveTv/RefreshChannelsScheduledTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading.Tasks; using MediaBrowser.Common.Configuration; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs index 7263572d5..ee86f66e6 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/BaseTunerHost.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs index d0c0d9e76..1ec5894d0 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Net; using System.Text; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs index f44bb8c20..1f8ca276e 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/LiveStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs index 20cb402d8..0772a6025 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs index 8ca91388f..b39a9f679 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/SharedHttpStream.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Localization/TextLocalizer.cs b/Emby.Server.Implementations/Localization/TextLocalizer.cs index 09445d428..96591e5e6 100644 --- a/Emby.Server.Implementations/Localization/TextLocalizer.cs +++ b/Emby.Server.Implementations/Localization/TextLocalizer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.Linq; using System.Text; diff --git a/Emby.Server.Implementations/Net/IWebSocket.cs b/Emby.Server.Implementations/Net/IWebSocket.cs index 432b1e41a..4671de07c 100644 --- a/Emby.Server.Implementations/Net/IWebSocket.cs +++ b/Emby.Server.Implementations/Net/IWebSocket.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net.WebSockets; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Net/SocketFactory.cs b/Emby.Server.Implementations/Net/SocketFactory.cs index bfb2e1c46..2e22fbbb8 100644 --- a/Emby.Server.Implementations/Net/SocketFactory.cs +++ b/Emby.Server.Implementations/Net/SocketFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Net; using System.Net.Sockets; diff --git a/Emby.Server.Implementations/Net/UdpSocket.cs b/Emby.Server.Implementations/Net/UdpSocket.cs index 39f25e024..cdfdb7210 100644 --- a/Emby.Server.Implementations/Net/UdpSocket.cs +++ b/Emby.Server.Implementations/Net/UdpSocket.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Net; using System.Net.Sockets; using System.Threading; diff --git a/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs b/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs index c6a1e0fe8..3ab8e854a 100644 --- a/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs +++ b/Emby.Server.Implementations/Net/WebSocketConnectEventArgs.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Services; namespace Emby.Server.Implementations.Net diff --git a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs index 50a3023a4..1a2ad665b 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/BigIntegerExt.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; namespace System.Net { diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs index 34a6001c6..c2a6305f6 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPAddressCollection.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using System.Collections.Generic; using System.Numerics; diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs index cb9ac8ffd..321d4a3c5 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.IO; using System.Net.Sockets; using System.Numerics; diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs index 0201f6fc3..1827af77a 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPNetworkCollection.cs @@ -1,4 +1,4 @@ -using System.Collections; +using System.Collections; using System.Collections.Generic; using System.Numerics; diff --git a/Emby.Server.Implementations/Playlists/ManualPlaylistsFolder.cs b/Emby.Server.Implementations/Playlists/ManualPlaylistsFolder.cs index f2bc4c07d..f4decc856 100644 --- a/Emby.Server.Implementations/Playlists/ManualPlaylistsFolder.cs +++ b/Emby.Server.Implementations/Playlists/ManualPlaylistsFolder.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Linq; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Playlists; diff --git a/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs index 7c3cad5df..223153164 100644 --- a/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs +++ b/Emby.Server.Implementations/Playlists/PlaylistImageProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using Emby.Server.Implementations.Images; diff --git a/Emby.Server.Implementations/Reflection/AssemblyInfo.cs b/Emby.Server.Implementations/Reflection/AssemblyInfo.cs index c3ce97d40..9d16fe43f 100644 --- a/Emby.Server.Implementations/Reflection/AssemblyInfo.cs +++ b/Emby.Server.Implementations/Reflection/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Reflection; using MediaBrowser.Model.Reflection; diff --git a/Emby.Server.Implementations/ResourceFileManager.cs b/Emby.Server.Implementations/ResourceFileManager.cs index fd88c4bb5..f54e3205a 100644 --- a/Emby.Server.Implementations/ResourceFileManager.cs +++ b/Emby.Server.Implementations/ResourceFileManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading.Tasks; using MediaBrowser.Controller; diff --git a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs index fdc8ed9c4..0ae7ae96c 100644 --- a/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/ChapterImagesTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/ScheduledTasks/DailyTrigger.cs b/Emby.Server.Implementations/ScheduledTasks/DailyTrigger.cs index c2a69ba48..98685cebe 100644 --- a/Emby.Server.Implementations/ScheduledTasks/DailyTrigger.cs +++ b/Emby.Server.Implementations/ScheduledTasks/DailyTrigger.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Globalization; using System.Threading; using MediaBrowser.Model.Tasks; diff --git a/Emby.Server.Implementations/ScheduledTasks/IntervalTrigger.cs b/Emby.Server.Implementations/ScheduledTasks/IntervalTrigger.cs index edd3eb8c0..3a34da3af 100644 --- a/Emby.Server.Implementations/ScheduledTasks/IntervalTrigger.cs +++ b/Emby.Server.Implementations/ScheduledTasks/IntervalTrigger.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Threading; using MediaBrowser.Model.Tasks; diff --git a/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs index 1ba7c853c..f6fa64d13 100644 --- a/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/RefreshMediaLibraryTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/ScheduledTasks/StartupTrigger.cs b/Emby.Server.Implementations/ScheduledTasks/StartupTrigger.cs index bcddb2b2a..08ff4f55f 100644 --- a/Emby.Server.Implementations/ScheduledTasks/StartupTrigger.cs +++ b/Emby.Server.Implementations/ScheduledTasks/StartupTrigger.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using MediaBrowser.Model.Tasks; using Microsoft.Extensions.Logging; diff --git a/Emby.Server.Implementations/ScheduledTasks/SystemEventTrigger.cs b/Emby.Server.Implementations/ScheduledTasks/SystemEventTrigger.cs index 0d629786f..7a88fc2b0 100644 --- a/Emby.Server.Implementations/ScheduledTasks/SystemEventTrigger.cs +++ b/Emby.Server.Implementations/ScheduledTasks/SystemEventTrigger.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading.Tasks; using MediaBrowser.Model.System; using MediaBrowser.Model.Tasks; diff --git a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs index c81025edd..754fb1633 100644 --- a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs +++ b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.IO; diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs index 93d1f1a94..2590f455c 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteCacheFileTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs index 67ecdd147..a57fe4945 100644 --- a/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs +++ b/Emby.Server.Implementations/ScheduledTasks/Tasks/DeleteLogFileTask.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Threading; diff --git a/Emby.Server.Implementations/ScheduledTasks/WeeklyTrigger.cs b/Emby.Server.Implementations/ScheduledTasks/WeeklyTrigger.cs index 11e92b771..2a6a7b13c 100644 --- a/Emby.Server.Implementations/ScheduledTasks/WeeklyTrigger.cs +++ b/Emby.Server.Implementations/ScheduledTasks/WeeklyTrigger.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using MediaBrowser.Model.Tasks; using Microsoft.Extensions.Logging; diff --git a/Emby.Server.Implementations/Security/MBLicenseFile.cs b/Emby.Server.Implementations/Security/MBLicenseFile.cs index fc1c1f0bf..8273ec8b2 100644 --- a/Emby.Server.Implementations/Security/MBLicenseFile.cs +++ b/Emby.Server.Implementations/Security/MBLicenseFile.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Globalization; diff --git a/Emby.Server.Implementations/Security/PluginSecurityManager.cs b/Emby.Server.Implementations/Security/PluginSecurityManager.cs index ddff00628..cb224627c 100644 --- a/Emby.Server.Implementations/Security/PluginSecurityManager.cs +++ b/Emby.Server.Implementations/Security/PluginSecurityManager.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Threading; using System.Threading.Tasks; diff --git a/Emby.Server.Implementations/Security/RegRecord.cs b/Emby.Server.Implementations/Security/RegRecord.cs index 8363e9223..11a02e0e7 100644 --- a/Emby.Server.Implementations/Security/RegRecord.cs +++ b/Emby.Server.Implementations/Security/RegRecord.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Server.Implementations.Security { diff --git a/Emby.Server.Implementations/Serialization/XmlSerializer.cs b/Emby.Server.Implementations/Serialization/XmlSerializer.cs index 5bacc754d..210b5dfdd 100644 --- a/Emby.Server.Implementations/Serialization/XmlSerializer.cs +++ b/Emby.Server.Implementations/Serialization/XmlSerializer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Xml; diff --git a/Emby.Server.Implementations/ServerApplicationPaths.cs b/Emby.Server.Implementations/ServerApplicationPaths.cs index 933b67291..edea10a07 100644 --- a/Emby.Server.Implementations/ServerApplicationPaths.cs +++ b/Emby.Server.Implementations/ServerApplicationPaths.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using Emby.Server.Implementations.AppBase; using MediaBrowser.Controller; diff --git a/Emby.Server.Implementations/Services/ServiceMethod.cs b/Emby.Server.Implementations/Services/ServiceMethod.cs index cc3a17a37..7add72815 100644 --- a/Emby.Server.Implementations/Services/ServiceMethod.cs +++ b/Emby.Server.Implementations/Services/ServiceMethod.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Server.Implementations.Services { diff --git a/Emby.Server.Implementations/Services/UrlExtensions.cs b/Emby.Server.Implementations/Services/UrlExtensions.cs index bdef1760f..8899fbfa3 100644 --- a/Emby.Server.Implementations/Services/UrlExtensions.cs +++ b/Emby.Server.Implementations/Services/UrlExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace Emby.Server.Implementations.Services { diff --git a/Emby.Server.Implementations/Session/HttpSessionController.cs b/Emby.Server.Implementations/Session/HttpSessionController.cs index 56befdeca..9281f82b3 100644 --- a/Emby.Server.Implementations/Session/HttpSessionController.cs +++ b/Emby.Server.Implementations/Session/HttpSessionController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Globalization; using System.Linq; diff --git a/Emby.Server.Implementations/Session/WebSocketController.cs b/Emby.Server.Implementations/Session/WebSocketController.cs index 3bfe57658..0d483c55f 100644 --- a/Emby.Server.Implementations/Session/WebSocketController.cs +++ b/Emby.Server.Implementations/Session/WebSocketController.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Linq; using System.Net.WebSockets; diff --git a/Emby.Server.Implementations/Sorting/AlbumComparer.cs b/Emby.Server.Implementations/Sorting/AlbumComparer.cs index b64c60861..3831a0d2d 100644 --- a/Emby.Server.Implementations/Sorting/AlbumComparer.cs +++ b/Emby.Server.Implementations/Sorting/AlbumComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/AlphanumComparator.cs b/Emby.Server.Implementations/Sorting/AlphanumComparator.cs index 4bfcda1ac..f21f905df 100644 --- a/Emby.Server.Implementations/Sorting/AlphanumComparator.cs +++ b/Emby.Server.Implementations/Sorting/AlphanumComparator.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using System.Text; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/ArtistComparer.cs b/Emby.Server.Implementations/Sorting/ArtistComparer.cs index af0b332cc..9d5befc9a 100644 --- a/Emby.Server.Implementations/Sorting/ArtistComparer.cs +++ b/Emby.Server.Implementations/Sorting/ArtistComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Entities.Audio; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs index 60aa68425..87d3ae2d6 100644 --- a/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/CommunityRatingComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs b/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs index 5c4aeaf86..adb78dec5 100644 --- a/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/CriticRatingComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs b/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs index 8ff438aca..8501bd9ee 100644 --- a/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DateCreatedComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs index dd961c23e..73f59f8cd 100644 --- a/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/DatePlayedComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/GameSystemComparer.cs b/Emby.Server.Implementations/Sorting/GameSystemComparer.cs index fcd66f97f..2a04bae3c 100644 --- a/Emby.Server.Implementations/Sorting/GameSystemComparer.cs +++ b/Emby.Server.Implementations/Sorting/GameSystemComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs index 919ac55df..66de05a6a 100644 --- a/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsFavoriteOrLikeComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/IsFolderComparer.cs b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs index 8b6cbb2db..dfaa144cd 100644 --- a/Emby.Server.Implementations/Sorting/IsFolderComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsFolderComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs index 544cae845..da3f3dd25 100644 --- a/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsPlayedComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs index d145aa8dd..d99d0eff2 100644 --- a/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs +++ b/Emby.Server.Implementations/Sorting/IsUnplayedComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/NameComparer.cs b/Emby.Server.Implementations/Sorting/NameComparer.cs index 7ba25c6c2..10fa4359a 100644 --- a/Emby.Server.Implementations/Sorting/NameComparer.cs +++ b/Emby.Server.Implementations/Sorting/NameComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs index 359ab607e..e8fa8edc8 100644 --- a/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs +++ b/Emby.Server.Implementations/Sorting/OfficialRatingComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Globalization; diff --git a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs index b7165ab8c..eb74ce1bd 100644 --- a/Emby.Server.Implementations/Sorting/PlayCountComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayCountComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/PlayersComparer.cs b/Emby.Server.Implementations/Sorting/PlayersComparer.cs index 5b50ea48a..e3652f36b 100644 --- a/Emby.Server.Implementations/Sorting/PlayersComparer.cs +++ b/Emby.Server.Implementations/Sorting/PlayersComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs index e36d65056..0c944a7a0 100644 --- a/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/PremiereDateComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs index 0aa5e833b..472a07eb3 100644 --- a/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs +++ b/Emby.Server.Implementations/Sorting/ProductionYearComparer.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Controller.Entities; +using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/RandomComparer.cs b/Emby.Server.Implementations/Sorting/RandomComparer.cs index de8e1d88f..bde8b4534 100644 --- a/Emby.Server.Implementations/Sorting/RandomComparer.cs +++ b/Emby.Server.Implementations/Sorting/RandomComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/RuntimeComparer.cs b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs index 08a25269a..1d2bdde26 100644 --- a/Emby.Server.Implementations/Sorting/RuntimeComparer.cs +++ b/Emby.Server.Implementations/Sorting/RuntimeComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/SortNameComparer.cs b/Emby.Server.Implementations/Sorting/SortNameComparer.cs index 2b70d8b02..cc0571c78 100644 --- a/Emby.Server.Implementations/Sorting/SortNameComparer.cs +++ b/Emby.Server.Implementations/Sorting/SortNameComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; using MediaBrowser.Model.Querying; diff --git a/Emby.Server.Implementations/Sorting/StartDateComparer.cs b/Emby.Server.Implementations/Sorting/StartDateComparer.cs index 9954daf19..aa040fa15 100644 --- a/Emby.Server.Implementations/Sorting/StartDateComparer.cs +++ b/Emby.Server.Implementations/Sorting/StartDateComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.LiveTv; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/Sorting/StudioComparer.cs b/Emby.Server.Implementations/Sorting/StudioComparer.cs index 9b6c15b2b..617ed55d5 100644 --- a/Emby.Server.Implementations/Sorting/StudioComparer.cs +++ b/Emby.Server.Implementations/Sorting/StudioComparer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Sorting; diff --git a/Emby.Server.Implementations/StartupOptions.cs b/Emby.Server.Implementations/StartupOptions.cs index 2114d85bf..221263634 100644 --- a/Emby.Server.Implementations/StartupOptions.cs +++ b/Emby.Server.Implementations/StartupOptions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; namespace Emby.Server.Implementations diff --git a/Emby.Server.Implementations/SystemEvents.cs b/Emby.Server.Implementations/SystemEvents.cs index 578338aee..1297200f9 100644 --- a/Emby.Server.Implementations/SystemEvents.cs +++ b/Emby.Server.Implementations/SystemEvents.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.System; using Microsoft.Extensions.Logging; diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/ErrorCode.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/ErrorCode.cs index cba084c8b..87f07fc9c 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/ErrorCode.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/ErrorCode.cs @@ -1,4 +1,4 @@ -namespace NLangDetect.Core +namespace NLangDetect.Core { public enum ErrorCode { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs index 24fc6cd87..6e58a0be8 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/CharExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace NLangDetect.Core.Extensions { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/RandomExtensions.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/RandomExtensions.cs index ec8784df3..5b2fce60b 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/RandomExtensions.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/RandomExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace NLangDetect.Core.Extensions { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/UnicodeBlock.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/UnicodeBlock.cs index bda12fc2f..bcc81f968 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/UnicodeBlock.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Extensions/UnicodeBlock.cs @@ -1,4 +1,4 @@ -namespace NLangDetect.Core.Extensions +namespace NLangDetect.Core.Extensions { public enum UnicodeBlock { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/InternalException.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/InternalException.cs index 11e8f876d..6ed1efa88 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/InternalException.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/InternalException.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace NLangDetect.Core { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs index 044c7e759..98c4f623c 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/LanguageDetector.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Serialization; namespace NLangDetect.Core diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/NLangDetectException.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/NLangDetectException.cs index 99825bcf3..800858bca 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/NLangDetectException.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/NLangDetectException.cs @@ -1,4 +1,4 @@ -using System; +using System; namespace NLangDetect.Core { diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs index 0684d91c3..7ad16108a 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; namespace NLangDetect.Core diff --git a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs index 15f1ce91e..49a371efa 100644 --- a/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs +++ b/Emby.Server.Implementations/TextEncoding/TextEncodingDetect.cs @@ -1,4 +1,4 @@ -namespace Emby.Server.Implementations.TextEncoding +namespace Emby.Server.Implementations.TextEncoding { // Copyright 2015-2016 Jonathan Bennett // diff --git a/Emby.Server.Implementations/Threading/CommonTimer.cs b/Emby.Server.Implementations/Threading/CommonTimer.cs index 9451b07f3..5a05da564 100644 --- a/Emby.Server.Implementations/Threading/CommonTimer.cs +++ b/Emby.Server.Implementations/Threading/CommonTimer.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Threading; using MediaBrowser.Model.Threading; diff --git a/Emby.Server.Implementations/Threading/TimerFactory.cs b/Emby.Server.Implementations/Threading/TimerFactory.cs index 4ab6f6fc4..ca50064c7 100644 --- a/Emby.Server.Implementations/Threading/TimerFactory.cs +++ b/Emby.Server.Implementations/Threading/TimerFactory.cs @@ -1,4 +1,4 @@ -using System; +using System; using MediaBrowser.Model.Threading; namespace Emby.Server.Implementations.Threading diff --git a/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs b/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs index 799c9794f..8788cfc26 100644 --- a/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/CollectionFolderImageProvider.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/Emby.Server.Implementations/UserViews/FolderImageProvider.cs b/Emby.Server.Implementations/UserViews/FolderImageProvider.cs index 580eb89ad..7629f6039 100644 --- a/Emby.Server.Implementations/UserViews/FolderImageProvider.cs +++ b/Emby.Server.Implementations/UserViews/FolderImageProvider.cs @@ -1,4 +1,4 @@ -using System.Collections.Generic; +using System.Collections.Generic; using Emby.Server.Implementations.Images; using MediaBrowser.Common.Configuration; using MediaBrowser.Controller.Drawing; diff --git a/Emby.Server.Implementations/Xml/XmlReaderSettingsFactory.cs b/Emby.Server.Implementations/Xml/XmlReaderSettingsFactory.cs index 0f4e8af3c..308922e6d 100644 --- a/Emby.Server.Implementations/Xml/XmlReaderSettingsFactory.cs +++ b/Emby.Server.Implementations/Xml/XmlReaderSettingsFactory.cs @@ -1,4 +1,4 @@ -using System.Xml; +using System.Xml; using MediaBrowser.Model.Xml; namespace Emby.Server.Implementations.Xml diff --git a/Emby.XmlTv/Emby.XmlTv.Console/Classes/EntityExtensions.cs b/Emby.XmlTv/Emby.XmlTv.Console/Classes/EntityExtensions.cs index 37fcf0eca..96e508f12 100644 --- a/Emby.XmlTv/Emby.XmlTv.Console/Classes/EntityExtensions.cs +++ b/Emby.XmlTv/Emby.XmlTv.Console/Classes/EntityExtensions.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Linq; using System.Text; diff --git a/Emby.XmlTv/Emby.XmlTv.Console/Program.cs b/Emby.XmlTv/Emby.XmlTv.Console/Program.cs index 056f5a589..3e0c7d125 100644 --- a/Emby.XmlTv/Emby.XmlTv.Console/Program.cs +++ b/Emby.XmlTv/Emby.XmlTv.Console/Program.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Diagnostics; using System.IO; using System.Linq; diff --git a/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs index 4178a27a1..ff59f890f 100644 --- a/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs +++ b/Emby.XmlTv/Emby.XmlTv.Console/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs b/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs index e79fda8a8..902860363 100644 --- a/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs +++ b/Emby.XmlTv/Emby.XmlTv.Test/Properties/AssemblyInfo.cs @@ -1,4 +1,4 @@ -using System.Reflection; +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; diff --git a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs index 2e4516be5..857cc339c 100644 --- a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs +++ b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderDateTimeTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using Emby.XmlTv.Classes; diff --git a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderLanguageTests.cs b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderLanguageTests.cs index 77dabe13e..32a0431d2 100644 --- a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderLanguageTests.cs +++ b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderLanguageTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using System.Threading; diff --git a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderTests.cs b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderTests.cs index 1485cf06c..b1dffc59c 100644 --- a/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderTests.cs +++ b/Emby.XmlTv/Emby.XmlTv.Test/XmlTvReaderTests.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.IO; using System.Linq; using System.Threading; diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvChannel.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvChannel.cs index 6821c2ec6..2673d711c 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvChannel.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvChannel.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Text; namespace Emby.XmlTv.Entities diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCredit.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCredit.cs index a003cc05e..d959ce76f 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCredit.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCredit.cs @@ -1,4 +1,4 @@ -namespace Emby.XmlTv.Entities +namespace Emby.XmlTv.Entities { public class XmlTvCredit { diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCreditType.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCreditType.cs index c449cb700..31c7f5e44 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCreditType.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvCreditType.cs @@ -1,4 +1,4 @@ -namespace Emby.XmlTv.Entities +namespace Emby.XmlTv.Entities { public enum XmlTvCreditType { diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs index fbe6b2cb6..47525b57c 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvEpisode.cs @@ -1,4 +1,4 @@ -using System.Text; +using System.Text; namespace Emby.XmlTv.Entities { diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvIcon.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvIcon.cs index d8cb76679..77ef8d5fd 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvIcon.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvIcon.cs @@ -1,4 +1,4 @@ -using System.Text; +using System.Text; namespace Emby.XmlTv.Entities { diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvLanguage.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvLanguage.cs index 2dc20db4b..0fd5573cd 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvLanguage.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvLanguage.cs @@ -1,4 +1,4 @@ -namespace Emby.XmlTv.Entities +namespace Emby.XmlTv.Entities { public class XmlTvLanguage { diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvPremiere.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvPremiere.cs index 0b7377f54..a1920bc77 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvPremiere.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvPremiere.cs @@ -1,4 +1,4 @@ -namespace Emby.XmlTv.Entities +namespace Emby.XmlTv.Entities { public class XmlTvPremiere { diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs index b6614afc1..1725e17d7 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvProgram.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using System.Text; diff --git a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvRating.cs b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvRating.cs index ac6a4e823..e37113d7a 100644 --- a/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvRating.cs +++ b/Emby.XmlTv/Emby.XmlTv/Entities/XmlTvRating.cs @@ -1,4 +1,4 @@ -using System.Text; +using System.Text; namespace Emby.XmlTv.Entities { -- cgit v1.2.3 From e8674464373c3635243953cded42fcd2aa87d196 Mon Sep 17 00:00:00 2001 From: Erwin de Haan Date: Sun, 13 Jan 2019 21:46:33 +0100 Subject: ReSharper format: conform inline 'out' parameters. --- DvdLib/Ifo/Dvd.cs | 3 +- Emby.Dlna/ContentDirectory/ControlHandler.cs | 19 ++----- Emby.Dlna/DlnaManager.cs | 7 +-- Emby.Dlna/Eventing/EventManager.cs | 11 +--- Emby.Dlna/Main/DlnaEntryPoint.cs | 3 +- Emby.Dlna/PlayTo/Device.cs | 4 +- Emby.Dlna/PlayTo/PlayToController.cs | 43 ++++---------- Emby.Dlna/PlayTo/PlayToManager.cs | 9 +-- Emby.Drawing/ImageProcessor.cs | 3 +- Emby.Naming/Audio/AlbumParser.cs | 3 +- Emby.Naming/AudioBook/AudioBookFilePathParser.cs | 6 +- Emby.Naming/TV/EpisodePathParser.cs | 6 +- Emby.Naming/TV/SeasonPathParser.cs | 9 +-- Emby.Naming/Video/CleanDateTimeParser.cs | 3 +- Emby.Photos/PhotoProvider.cs | 4 +- .../Channels/ChannelManager.cs | 4 +- .../Data/SqliteExtensions.cs | 34 ++++------- .../Data/SqliteItemRepository.cs | 29 +++------- Emby.Server.Implementations/Devices/DeviceId.cs | 3 +- .../Devices/DeviceManager.cs | 3 +- Emby.Server.Implementations/Dto/DtoService.cs | 4 +- .../EntryPoints/ExternalPortForwarding.cs | 12 ++-- .../EntryPoints/LibraryChangedNotifier.cs | 3 +- .../EntryPoints/UserDataChangeNotifier.cs | 4 +- .../HttpClientManager/HttpClientManager.cs | 4 +- .../HttpServer/HttpListenerHost.cs | 12 ++-- .../HttpServer/HttpResultFactory.cs | 17 ++---- .../HttpServer/ResponseFilter.cs | 3 +- .../HttpServer/Security/AuthService.cs | 3 +- .../HttpServer/Security/AuthorizationContext.cs | 3 +- .../HttpServer/Security/SessionContext.cs | 3 +- Emby.Server.Implementations/IO/LibraryMonitor.cs | 11 +--- .../Library/LibraryManager.cs | 7 +-- .../Library/MediaSourceManager.cs | 7 +-- .../LiveTv/EmbyTV/EmbyTV.cs | 30 +++------- .../LiveTv/EmbyTV/TimerManager.cs | 3 +- .../LiveTv/LiveTvManager.cs | 6 +- .../LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs | 3 +- .../TunerHosts/HdHomerun/HdHomerunManager.cs | 9 +-- .../LiveTv/TunerHosts/M3UTunerHost.cs | 3 +- .../LiveTv/TunerHosts/M3uParser.cs | 33 ++++------- .../Localization/LocalizationManager.cs | 16 ++---- .../Networking/IPNetwork/IPNetwork.cs | 39 +++++-------- .../Networking/NetworkManager.cs | 20 ++----- .../ScheduledTasks/TaskManager.cs | 3 +- .../Security/MBLicenseFile.cs | 9 +-- .../Serialization/XmlSerializer.cs | 3 +- .../Services/ServiceController.cs | 3 +- .../Services/ServiceExec.cs | 3 +- .../Services/ServiceHandler.cs | 9 +-- .../Services/ServicePath.cs | 6 +- .../Session/SessionManager.cs | 6 +- .../TextEncoding/NLangDetect/ProbVector.cs | 4 +- .../TextEncoding/NLangDetect/Utils/Messages.cs | 4 +- .../Updates/InstallationManager.cs | 4 +- Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs | 9 +-- Jellyfin.Server/SocketSharp/RequestMono.cs | 4 +- MediaBrowser.Api/ApiEntryPoint.cs | 3 +- MediaBrowser.Api/IHasItemFields.cs | 4 +- MediaBrowser.Api/Images/ImageService.cs | 3 +- MediaBrowser.Api/Playback/BaseStreamingService.cs | 9 +-- MediaBrowser.Api/Session/SessionsService.cs | 3 +- MediaBrowser.Common/Net/HttpRequestOptions.cs | 4 +- .../Entities/CollectionFolder.cs | 3 +- MediaBrowser.Controller/Entities/Folder.cs | 4 +- MediaBrowser.Controller/Entities/Year.cs | 8 +-- MediaBrowser.Controller/Library/TVUtils.cs | 4 +- .../MediaEncoding/EncodingHelper.cs | 4 +- .../MediaEncoding/EncodingJobInfo.cs | 15 ++--- .../MediaEncoding/EncodingJobOptions.cs | 3 +- MediaBrowser.Controller/MediaEncoding/JobLogger.cs | 14 ++--- .../Providers/DirectoryService.cs | 10 +--- .../Parsers/BaseItemXmlParser.cs | 33 ++++------- .../Parsers/GameXmlParser.cs | 4 +- .../Probing/FFProbeHelpers.cs | 12 +--- .../Probing/ProbeResultNormalizer.cs | 41 ++++---------- MediaBrowser.MediaEncoding/Subtitles/AssParser.cs | 3 +- MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs | 3 +- MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs | 3 +- MediaBrowser.Model/Configuration/LibraryOptions.cs | 3 +- MediaBrowser.Model/Dlna/ConditionProcessor.cs | 12 ++-- MediaBrowser.Model/Dlna/StreamBuilder.cs | 39 +++++-------- MediaBrowser.Model/Dlna/StreamInfo.cs | 18 ++---- MediaBrowser.Model/Drawing/ImageSize.cs | 4 +- .../Entities/ProviderIdsExtensions.cs | 3 +- MediaBrowser.Model/Net/MimeTypes.cs | 6 +- MediaBrowser.Providers/Manager/ProviderManager.cs | 6 +- .../Manager/SimplePriorityQueue.cs | 3 +- .../MediaInfo/FFProbeVideoInfo.cs | 4 +- .../Movies/FanartMovieImageProvider.cs | 3 +- .../Movies/GenericMovieDbInfo.cs | 7 +-- MediaBrowser.Providers/Movies/MovieDbProvider.cs | 4 +- MediaBrowser.Providers/Movies/MovieDbSearch.cs | 8 +-- MediaBrowser.Providers/Music/Extensions.cs | 6 +- .../Music/FanArtAlbumProvider.cs | 3 +- .../Music/FanArtArtistProvider.cs | 3 +- .../Music/MusicBrainzAlbumProvider.cs | 3 +- MediaBrowser.Providers/Omdb/OmdbItemProvider.cs | 6 +- MediaBrowser.Providers/Omdb/OmdbProvider.cs | 30 +++------- .../People/MovieDbPersonProvider.cs | 4 +- .../TV/FanArt/FanArtSeasonProvider.cs | 7 +-- .../TV/FanArt/FanartSeriesProvider.cs | 3 +- .../TV/MissingEpisodeProvider.cs | 11 +--- .../TV/Omdb/OmdbEpisodeProvider.cs | 3 +- .../TV/TheMovieDb/MovieDbEpisodeProvider.cs | 3 +- .../TV/TheMovieDb/MovieDbSeasonProvider.cs | 3 +- .../TV/TheMovieDb/MovieDbSeriesProvider.cs | 3 +- .../TV/TheTVDB/TvdbEpisodeImageProvider.cs | 8 +-- .../TV/TheTVDB/TvdbEpisodeProvider.cs | 42 ++++---------- .../TV/TheTVDB/TvdbPrescanTask.cs | 4 +- .../TV/TheTVDB/TvdbSeasonImageProvider.cs | 12 +--- .../TV/TheTVDB/TvdbSeriesImageProvider.cs | 12 +--- .../TV/TheTVDB/TvdbSeriesProvider.cs | 65 +++++++--------------- MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs | 39 ++++--------- .../Parsers/EpisodeNfoParser.cs | 32 +++-------- .../Parsers/SeasonNfoParser.cs | 4 +- .../Parsers/SeriesNfoParser.cs | 3 +- SocketHttpListener/Ext.cs | 3 +- SocketHttpListener/Net/CookieHelper.cs | 3 +- SocketHttpListener/Net/HttpEndPointListener.cs | 3 +- SocketHttpListener/Net/HttpEndPointManager.cs | 3 +- .../Net/HttpListenerRequestUriBuilder.cs | 6 +- SocketHttpListener/Net/WebHeaderCollection.cs | 6 +- .../Net/WebSockets/HttpWebSocket.Managed.cs | 3 +- 124 files changed, 354 insertions(+), 820 deletions(-) (limited to 'Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs') diff --git a/DvdLib/Ifo/Dvd.cs b/DvdLib/Ifo/Dvd.cs index 71ba2d5e4..f784be83e 100644 --- a/DvdLib/Ifo/Dvd.cs +++ b/DvdLib/Ifo/Dvd.cs @@ -31,10 +31,9 @@ namespace DvdLib.Ifo foreach (var ifo in allIfos) { var num = ifo.Name.Split('_').ElementAtOrDefault(1); - ushort ifoNumber; var numbersRead = new List(); - if (!string.IsNullOrEmpty(num) && ushort.TryParse(num, out ifoNumber) && !numbersRead.Contains(ifoNumber)) + if (!string.IsNullOrEmpty(num) && ushort.TryParse(num, out var ifoNumber) && !numbersRead.Contains(ifoNumber)) { ReadVTS(ifoNumber, ifo.FullName); numbersRead.Add(ifoNumber); diff --git a/Emby.Dlna/ContentDirectory/ControlHandler.cs b/Emby.Dlna/ContentDirectory/ControlHandler.cs index 5a8fd4068..ed2114e6a 100644 --- a/Emby.Dlna/ContentDirectory/ControlHandler.cs +++ b/Emby.Dlna/ContentDirectory/ControlHandler.cs @@ -192,9 +192,7 @@ namespace Emby.Dlna.ContentDirectory public string GetValueOrDefault(IDictionary sparams, string key, string defaultValue) { - string val; - - if (sparams.TryGetValue(key, out val)) + if (sparams.TryGetValue(key, out var val)) { return val; } @@ -216,14 +214,12 @@ namespace Emby.Dlna.ContentDirectory int? requestedCount = null; int? start = 0; - int requestedVal; - if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out requestedVal) && requestedVal > 0) + if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out var requestedVal) && requestedVal > 0) { requestedCount = requestedVal; } - int startVal; - if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out startVal) && startVal > 0) + if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out var startVal) && startVal > 0) { start = startVal; } @@ -334,14 +330,12 @@ namespace Emby.Dlna.ContentDirectory int? requestedCount = null; int? start = 0; - int requestedVal; - if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out requestedVal) && requestedVal > 0) + if (sparams.ContainsKey("RequestedCount") && int.TryParse(sparams["RequestedCount"], out var requestedVal) && requestedVal > 0) { requestedCount = requestedVal; } - int startVal; - if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out startVal) && startVal > 0) + if (sparams.ContainsKey("StartingIndex") && int.TryParse(sparams["StartingIndex"], out var startVal) && startVal > 0) { start = startVal; } @@ -1293,7 +1287,6 @@ namespace Emby.Dlna.ContentDirectory private ServerItem ParseItemId(string id, User user) { - Guid itemId; StubType? stubType = null; // After using PlayTo, MediaMonkey sends a request to the server trying to get item info @@ -1319,7 +1312,7 @@ namespace Emby.Dlna.ContentDirectory } } - if (Guid.TryParse(id, out itemId)) + if (Guid.TryParse(id, out var itemId)) { var item = _libraryManager.GetItemById(itemId); diff --git a/Emby.Dlna/DlnaManager.cs b/Emby.Dlna/DlnaManager.cs index 62b261908..45ba44870 100644 --- a/Emby.Dlna/DlnaManager.cs +++ b/Emby.Dlna/DlnaManager.cs @@ -239,9 +239,7 @@ namespace Emby.Dlna return false; } - string value; - - if (headers.TryGetValue(header.Name, out value)) + if (headers.TryGetValue(header.Name, out var value)) { switch (header.Match) { @@ -288,8 +286,7 @@ namespace Emby.Dlna { lock (_profiles) { - Tuple profileTuple; - if (_profiles.TryGetValue(path, out profileTuple)) + if (_profiles.TryGetValue(path, out var profileTuple)) { return profileTuple.Item2; } diff --git a/Emby.Dlna/Eventing/EventManager.cs b/Emby.Dlna/Eventing/EventManager.cs index a416ebb2b..c17f64a57 100644 --- a/Emby.Dlna/Eventing/EventManager.cs +++ b/Emby.Dlna/Eventing/EventManager.cs @@ -82,9 +82,7 @@ namespace Emby.Dlna.Eventing // Starts with SECOND- header = header.Split('-').Last(); - int val; - - if (int.TryParse(header, NumberStyles.Integer, _usCulture, out val)) + if (int.TryParse(header, NumberStyles.Integer, _usCulture, out var val)) { return val; } @@ -97,8 +95,7 @@ namespace Emby.Dlna.Eventing { _logger.LogDebug("Cancelling event subscription {0}", subscriptionId); - EventSubscription sub; - _subscriptions.TryRemove(subscriptionId, out sub); + _subscriptions.TryRemove(subscriptionId, out var sub); return new EventSubscriptionResponse { @@ -129,9 +126,7 @@ namespace Emby.Dlna.Eventing private EventSubscription GetSubscription(string id, bool throwOnMissing) { - EventSubscription e; - - if (!_subscriptions.TryGetValue(id, out e) && throwOnMissing) + if (!_subscriptions.TryGetValue(id, out var e) && throwOnMissing) { throw new ResourceNotFoundException("Event with Id " + id + " not found."); } diff --git a/Emby.Dlna/Main/DlnaEntryPoint.cs b/Emby.Dlna/Main/DlnaEntryPoint.cs index e0b4f025a..1ab6014eb 100644 --- a/Emby.Dlna/Main/DlnaEntryPoint.cs +++ b/Emby.Dlna/Main/DlnaEntryPoint.cs @@ -308,8 +308,7 @@ namespace Emby.Dlna.Main private string CreateUuid(string text) { - Guid guid; - if (!Guid.TryParse(text, out guid)) + if (!Guid.TryParse(text, out var guid)) { guid = text.GetMD5(); } diff --git a/Emby.Dlna/PlayTo/Device.cs b/Emby.Dlna/PlayTo/Device.cs index a85720b5f..68aa0a6a7 100644 --- a/Emby.Dlna/PlayTo/Device.cs +++ b/Emby.Dlna/PlayTo/Device.cs @@ -589,9 +589,7 @@ namespace Emby.Dlna.PlayTo if (transportStateValue != null) { - TRANSPORTSTATE state; - - if (Enum.TryParse(transportStateValue, true, out state)) + if (Enum.TryParse(transportStateValue, true, out TRANSPORTSTATE state)) { return state; } diff --git a/Emby.Dlna/PlayTo/PlayToController.cs b/Emby.Dlna/PlayTo/PlayToController.cs index 85a37d7f8..c615b9fbc 100644 --- a/Emby.Dlna/PlayTo/PlayToController.cs +++ b/Emby.Dlna/PlayTo/PlayToController.cs @@ -98,14 +98,11 @@ namespace Emby.Dlna.PlayTo { var info = e.Argument; - string nts; - info.Headers.TryGetValue("NTS", out nts); + info.Headers.TryGetValue("NTS", out var nts); - string usn; - if (!info.Headers.TryGetValue("USN", out usn)) usn = string.Empty; + if (!info.Headers.TryGetValue("USN", out var usn)) usn = string.Empty; - string nt; - if (!info.Headers.TryGetValue("NT", out nt)) nt = string.Empty; + if (!info.Headers.TryGetValue("NT", out var nt)) nt = string.Empty; if (usn.IndexOf(_device.Properties.UUID, StringComparison.OrdinalIgnoreCase) != -1 && !_disposed) @@ -623,9 +620,7 @@ namespace Emby.Dlna.PlayTo private Task SendGeneralCommand(GeneralCommand command, CancellationToken cancellationToken) { - GeneralCommandType commandType; - - if (Enum.TryParse(command.Name, true, out commandType)) + if (Enum.TryParse(command.Name, true, out GeneralCommandType commandType)) { switch (commandType) { @@ -641,13 +636,9 @@ namespace Emby.Dlna.PlayTo return _device.ToggleMute(cancellationToken); case GeneralCommandType.SetAudioStreamIndex: { - string arg; - - if (command.Arguments.TryGetValue("Index", out arg)) + if (command.Arguments.TryGetValue("Index", out var arg)) { - int val; - - if (int.TryParse(arg, NumberStyles.Integer, _usCulture, out val)) + if (int.TryParse(arg, NumberStyles.Integer, _usCulture, out var val)) { return SetAudioStreamIndex(val); } @@ -659,13 +650,9 @@ namespace Emby.Dlna.PlayTo } case GeneralCommandType.SetSubtitleStreamIndex: { - string arg; - - if (command.Arguments.TryGetValue("Index", out arg)) + if (command.Arguments.TryGetValue("Index", out var arg)) { - int val; - - if (int.TryParse(arg, NumberStyles.Integer, _usCulture, out val)) + if (int.TryParse(arg, NumberStyles.Integer, _usCulture, out var val)) { return SetSubtitleStreamIndex(val); } @@ -677,13 +664,9 @@ namespace Emby.Dlna.PlayTo } case GeneralCommandType.SetVolume: { - string arg; - - if (command.Arguments.TryGetValue("Volume", out arg)) + if (command.Arguments.TryGetValue("Volume", out var arg)) { - int volume; - - if (int.TryParse(arg, NumberStyles.Integer, _usCulture, out volume)) + if (int.TryParse(arg, NumberStyles.Integer, _usCulture, out var volume)) { return _device.SetVolume(volume, cancellationToken); } @@ -878,8 +861,7 @@ namespace Emby.Dlna.PlayTo { var value = values.Get(name); - int result; - if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out result)) + if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -891,8 +873,7 @@ namespace Emby.Dlna.PlayTo { var value = values.Get(name); - long result; - if (long.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out result)) + if (long.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result)) { return result; } diff --git a/Emby.Dlna/PlayTo/PlayToManager.cs b/Emby.Dlna/PlayTo/PlayToManager.cs index d8d289c59..12280d1bf 100644 --- a/Emby.Dlna/PlayTo/PlayToManager.cs +++ b/Emby.Dlna/PlayTo/PlayToManager.cs @@ -78,11 +78,9 @@ namespace Emby.Dlna.PlayTo var info = e.Argument; - string usn; - if (!info.Headers.TryGetValue("USN", out usn)) usn = string.Empty; + if (!info.Headers.TryGetValue("USN", out var usn)) usn = string.Empty; - string nt; - if (!info.Headers.TryGetValue("NT", out nt)) nt = string.Empty; + if (!info.Headers.TryGetValue("NT", out var nt)) nt = string.Empty; string location = info.Location.ToString(); @@ -155,8 +153,7 @@ namespace Emby.Dlna.PlayTo _logger.LogDebug("Attempting to create PlayToController from location {0}", location); _logger.LogDebug("Logging session activity from location {0}", location); - string uuid; - if (info.Headers.TryGetValue("USN", out uuid)) + if (info.Headers.TryGetValue("USN", out var uuid)) { uuid = GetUuid(uuid); } diff --git a/Emby.Drawing/ImageProcessor.cs b/Emby.Drawing/ImageProcessor.cs index a88c720a7..ac6c7e9db 100644 --- a/Emby.Drawing/ImageProcessor.cs +++ b/Emby.Drawing/ImageProcessor.cs @@ -846,8 +846,7 @@ namespace Emby.Drawing { lock (_locks) { - LockInfo info; - if (_locks.TryGetValue(key, out info)) + if (_locks.TryGetValue(key, out var info)) { info.Count++; } diff --git a/Emby.Naming/Audio/AlbumParser.cs b/Emby.Naming/Audio/AlbumParser.cs index 8cf8ec5e5..7d029a9f4 100644 --- a/Emby.Naming/Audio/AlbumParser.cs +++ b/Emby.Naming/Audio/AlbumParser.cs @@ -49,8 +49,7 @@ namespace Emby.Naming.Audio tmp = tmp.Trim().Split(' ').FirstOrDefault() ?? string.Empty; - int val; - if (int.TryParse(tmp, NumberStyles.Integer, CultureInfo.InvariantCulture, out val)) + if (int.TryParse(tmp, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val)) { result.IsMultiPart = true; break; diff --git a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs index b386593e7..590979794 100644 --- a/Emby.Naming/AudioBook/AudioBookFilePathParser.cs +++ b/Emby.Naming/AudioBook/AudioBookFilePathParser.cs @@ -34,8 +34,7 @@ namespace Emby.Naming.AudioBook var value = match.Groups["chapter"]; if (value.Success) { - int intValue; - if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out intValue)) + if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue)) { result.ChapterNumber = intValue; } @@ -46,8 +45,7 @@ namespace Emby.Naming.AudioBook var value = match.Groups["part"]; if (value.Success) { - int intValue; - if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out intValue)) + if (int.TryParse(value.Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var intValue)) { result.ChapterNumber = intValue; } diff --git a/Emby.Naming/TV/EpisodePathParser.cs b/Emby.Naming/TV/EpisodePathParser.cs index 260cb505c..9485d697b 100644 --- a/Emby.Naming/TV/EpisodePathParser.cs +++ b/Emby.Naming/TV/EpisodePathParser.cs @@ -122,8 +122,7 @@ namespace Emby.Naming.TV } else if (expression.IsNamed) { - int num; - if (int.TryParse(match.Groups["seasonnumber"].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(match.Groups["seasonnumber"].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var num)) { result.SeasonNumber = num; } @@ -154,8 +153,7 @@ namespace Emby.Naming.TV } else { - int num; - if (int.TryParse(match.Groups[1].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(match.Groups[1].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var num)) { result.SeasonNumber = num; } diff --git a/Emby.Naming/TV/SeasonPathParser.cs b/Emby.Naming/TV/SeasonPathParser.cs index 002bbe19c..f1dcc50b8 100644 --- a/Emby.Naming/TV/SeasonPathParser.cs +++ b/Emby.Naming/TV/SeasonPathParser.cs @@ -72,8 +72,7 @@ namespace Emby.Naming.TV if (supportNumericSeasonFolders) { - int val; - if (int.TryParse(filename, NumberStyles.Integer, CultureInfo.InvariantCulture, out val)) + if (int.TryParse(filename, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val)) { return new Tuple(val, true); } @@ -83,8 +82,7 @@ namespace Emby.Naming.TV { var testFilename = filename.Substring(1); - int val; - if (int.TryParse(testFilename, NumberStyles.Integer, CultureInfo.InvariantCulture, out val)) + if (int.TryParse(testFilename, NumberStyles.Integer, CultureInfo.InvariantCulture, out var val)) { return new Tuple(val, true); } @@ -121,8 +119,7 @@ namespace Emby.Naming.TV part = part.Substring(1); - int value; - if (int.TryParse(part, NumberStyles.Integer, CultureInfo.InvariantCulture, out value)) + if (int.TryParse(part, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value)) { return value; } diff --git a/Emby.Naming/Video/CleanDateTimeParser.cs b/Emby.Naming/Video/CleanDateTimeParser.cs index 702e7ae6f..74807ef53 100644 --- a/Emby.Naming/Video/CleanDateTimeParser.cs +++ b/Emby.Naming/Video/CleanDateTimeParser.cs @@ -71,8 +71,7 @@ namespace Emby.Naming.Video if (match.Success && match.Groups.Count == 4) { - int year; - if (match.Groups[1].Success && match.Groups[2].Success && int.TryParse(match.Groups[2].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out year)) + if (match.Groups[1].Success && match.Groups[2].Success && int.TryParse(match.Groups[2].Value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var year)) { name = match.Groups[1].Value; result.Year = year; diff --git a/Emby.Photos/PhotoProvider.cs b/Emby.Photos/PhotoProvider.cs index 99d0ed7ab..4fcd418f0 100644 --- a/Emby.Photos/PhotoProvider.cs +++ b/Emby.Photos/PhotoProvider.cs @@ -7,6 +7,7 @@ using MediaBrowser.Controller.Drawing; using MediaBrowser.Controller.Entities; using MediaBrowser.Controller.Library; using MediaBrowser.Controller.Providers; +using MediaBrowser.Model.Drawing; using MediaBrowser.Model.Entities; using MediaBrowser.Model.IO; using Microsoft.Extensions.Logging; @@ -144,8 +145,7 @@ namespace Emby.Photos } else { - MediaBrowser.Model.Drawing.ImageOrientation orientation; - if (Enum.TryParse(image.ImageTag.Orientation.ToString(), true, out orientation)) + if (Enum.TryParse(image.ImageTag.Orientation.ToString(), true, out ImageOrientation orientation)) { item.Orientation = orientation; } diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index e9002abfb..3650900c3 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -387,9 +387,7 @@ namespace Emby.Server.Implementations.Channels private async Task> GetChannelItemMediaSourcesInternal(IRequiresMediaInfoCallback channel, string id, CancellationToken cancellationToken) { - Tuple> cachedInfo; - - if (_channelItemMediaInfo.TryGetValue(id, out cachedInfo)) + if (_channelItemMediaInfo.TryGetValue(id, out var cachedInfo)) { if ((DateTime.UtcNow - cachedInfo.Item1).TotalMinutes < 5) { diff --git a/Emby.Server.Implementations/Data/SqliteExtensions.cs b/Emby.Server.Implementations/Data/SqliteExtensions.cs index edb73d2a1..d990e7149 100644 --- a/Emby.Server.Implementations/Data/SqliteExtensions.cs +++ b/Emby.Server.Implementations/Data/SqliteExtensions.cs @@ -114,9 +114,7 @@ namespace Emby.Server.Implementations.Data { var dateText = result.ToString(); - DateTime dateTimeResult; - - if (DateTime.TryParseExact(dateText, _datetimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out dateTimeResult)) + if (DateTime.TryParseExact(dateText, _datetimeFormats, DateTimeFormatInfo.InvariantInfo, DateTimeStyles.None, out var dateTimeResult)) { return dateTimeResult.ToUniversalTime(); } @@ -201,8 +199,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, double value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value); } @@ -214,8 +211,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, string value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { if (value == null) { @@ -234,8 +230,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, bool value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value); } @@ -247,8 +242,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, float value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value); } @@ -260,8 +254,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, int value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value); } @@ -273,8 +266,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, Guid value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value.ToGuidBlob()); } @@ -286,8 +278,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, DateTime value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value.ToDateTimeParamValue()); } @@ -299,8 +290,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, long value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value); } @@ -312,8 +302,7 @@ namespace Emby.Server.Implementations.Data public static void TryBind(this IStatement statement, string name, byte[] value) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.Bind(value); } @@ -325,8 +314,7 @@ namespace Emby.Server.Implementations.Data public static void TryBindNull(this IStatement statement, string name) { - IBindParameter bindParam; - if (statement.BindParameters.TryGetValue(name, out bindParam)) + if (statement.BindParameters.TryGetValue(name, out var bindParam)) { bindParam.BindNull(); } diff --git a/Emby.Server.Implementations/Data/SqliteItemRepository.cs b/Emby.Server.Implementations/Data/SqliteItemRepository.cs index 7e7271371..972c5c52d 100644 --- a/Emby.Server.Implementations/Data/SqliteItemRepository.cs +++ b/Emby.Server.Implementations/Data/SqliteItemRepository.cs @@ -1164,25 +1164,21 @@ namespace Emby.Server.Implementations.Data image.Path = RestorePath(parts[0]); - long ticks; - if (long.TryParse(parts[1], NumberStyles.Any, CultureInfo.InvariantCulture, out ticks)) + if (long.TryParse(parts[1], NumberStyles.Any, CultureInfo.InvariantCulture, out var ticks)) { image.DateModified = new DateTime(ticks, DateTimeKind.Utc); } - ImageType type; - if (Enum.TryParse(parts[2], true, out type)) + if (Enum.TryParse(parts[2], true, out ImageType type)) { image.Type = type; } if (parts.Length >= 5) { - int width; - int height; - if (int.TryParse(parts[3], NumberStyles.Integer, CultureInfo.InvariantCulture, out width)) + if (int.TryParse(parts[3], NumberStyles.Integer, CultureInfo.InvariantCulture, out var width)) { - if (int.TryParse(parts[4], NumberStyles.Integer, CultureInfo.InvariantCulture, out height)) + if (int.TryParse(parts[4], NumberStyles.Integer, CultureInfo.InvariantCulture, out var height)) { image.Width = width; image.Height = height; @@ -1589,8 +1585,7 @@ namespace Emby.Server.Implementations.Data if (!reader.IsDBNull(index)) { - ProgramAudio audio; - if (Enum.TryParse(reader.GetString(index), true, out audio)) + if (Enum.TryParse(reader.GetString(index), true, out ProgramAudio audio)) { item.Audio = audio; } @@ -1634,9 +1629,7 @@ namespace Emby.Server.Implementations.Data item.LockedFields = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select( i => { - MetadataFields parsedValue; - - if (Enum.TryParse(i, true, out parsedValue)) + if (Enum.TryParse(i, true, out MetadataFields parsedValue)) { return parsedValue; } @@ -1674,9 +1667,7 @@ namespace Emby.Server.Implementations.Data trailer.TrailerTypes = reader.GetString(index).Split('|').Where(i => !string.IsNullOrWhiteSpace(i)).Select( i => { - TrailerType parsedValue; - - if (Enum.TryParse(i, true, out parsedValue)) + if (Enum.TryParse(i, true, out TrailerType parsedValue)) { return parsedValue; } @@ -1857,8 +1848,7 @@ namespace Emby.Server.Implementations.Data if (!reader.IsDBNull(index)) { - ExtraType extraType; - if (Enum.TryParse(reader.GetString(index), true, out extraType)) + if (Enum.TryParse(reader.GetString(index), true, out ExtraType extraType)) { item.ExtraType = extraType; } @@ -5149,8 +5139,7 @@ where AncestorIdText not null and ItemValues.Value not null and ItemValues.Type private IEnumerable MapIncludeItemTypes(string value) { - string[] result; - if (_types.TryGetValue(value, out result)) + if (_types.TryGetValue(value, out var result)) { return result; } diff --git a/Emby.Server.Implementations/Devices/DeviceId.cs b/Emby.Server.Implementations/Devices/DeviceId.cs index 4f5950ac7..56e555937 100644 --- a/Emby.Server.Implementations/Devices/DeviceId.cs +++ b/Emby.Server.Implementations/Devices/DeviceId.cs @@ -25,8 +25,7 @@ namespace Emby.Server.Implementations.Devices { var value = File.ReadAllText(CachePath, Encoding.UTF8); - Guid guid; - if (Guid.TryParse(value, out guid)) + if (Guid.TryParse(value, out var guid)) { return value; } diff --git a/Emby.Server.Implementations/Devices/DeviceManager.cs b/Emby.Server.Implementations/Devices/DeviceManager.cs index f21daab62..f2ab28d4c 100644 --- a/Emby.Server.Implementations/Devices/DeviceManager.cs +++ b/Emby.Server.Implementations/Devices/DeviceManager.cs @@ -98,8 +98,7 @@ namespace Emby.Server.Implementations.Devices { lock (_capabilitiesSyncLock) { - ClientCapabilities result; - if (_capabilitiesCache.TryGetValue(id, out result)) + if (_capabilitiesCache.TryGetValue(id, out var result)) { return result; } diff --git a/Emby.Server.Implementations/Dto/DtoService.cs b/Emby.Server.Implementations/Dto/DtoService.cs index 8877fc051..6cb820716 100644 --- a/Emby.Server.Implementations/Dto/DtoService.cs +++ b/Emby.Server.Implementations/Dto/DtoService.cs @@ -637,9 +637,7 @@ namespace Emby.Server.Implementations.Dto Type = person.Type }; - Person entity; - - if (dictionary.TryGetValue(person.Name, out entity)) + if (dictionary.TryGetValue(person.Name, out var entity)) { baseItemPerson.PrimaryImageTag = GetImageCacheTag(entity, ImageType.Primary); baseItemPerson.Id = entity.Id.ToString("N"); diff --git a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs index 382861635..7faad05e3 100644 --- a/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs +++ b/Emby.Server.Implementations/EntryPoints/ExternalPortForwarding.cs @@ -108,11 +108,9 @@ namespace Emby.Server.Implementations.EntryPoints var info = e.Argument; - string usn; - if (!info.Headers.TryGetValue("USN", out usn)) usn = string.Empty; + if (!info.Headers.TryGetValue("USN", out var usn)) usn = string.Empty; - string nt; - if (!info.Headers.TryGetValue("NT", out nt)) nt = string.Empty; + if (!info.Headers.TryGetValue("NT", out var nt)) nt = string.Empty; // Filter device type if (usn.IndexOf("WANIPConnection:", StringComparison.OrdinalIgnoreCase) == -1 && @@ -141,8 +139,7 @@ namespace Emby.Server.Implementations.EntryPoints _logger.LogDebug("Found NAT device: " + identifier); - IPAddress address; - if (IPAddress.TryParse(info.Location.Host, out address)) + if (IPAddress.TryParse(info.Location.Host, out var address)) { // The Handle method doesn't need the port var endpoint = new IPEndPoint(address, info.Location.Port); @@ -153,8 +150,7 @@ namespace Emby.Server.Implementations.EntryPoints { var localAddressString = await _appHost.GetLocalApiUrl(CancellationToken.None).ConfigureAwait(false); - Uri uri; - if (Uri.TryCreate(localAddressString, UriKind.Absolute, out uri)) + if (Uri.TryCreate(localAddressString, UriKind.Absolute, out var uri)) { localAddressString = uri.Host; diff --git a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs index bcfcc339c..7a8b09cf7 100644 --- a/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/LibraryChangedNotifier.cs @@ -89,8 +89,7 @@ namespace Emby.Server.Implementations.EntryPoints var progress = e.Argument.Item2; - DateTime lastMessageSendTime; - if (_lastProgressMessageTimes.TryGetValue(item.Id, out lastMessageSendTime)) + if (_lastProgressMessageTimes.TryGetValue(item.Id, out var lastMessageSendTime)) { if (progress > 0 && progress < 100 && (DateTime.UtcNow - lastMessageSendTime).TotalMilliseconds < 1000) { diff --git a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs index d6cf39d62..93e222ebe 100644 --- a/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs +++ b/Emby.Server.Implementations/EntryPoints/UserDataChangeNotifier.cs @@ -62,9 +62,7 @@ namespace Emby.Server.Implementations.EntryPoints UpdateTimer.Change(UpdateDuration, Timeout.Infinite); } - List keys; - - if (!_changedItems.TryGetValue(e.UserId, out keys)) + if (!_changedItems.TryGetValue(e.UserId, out var keys)) { keys = new List(); _changedItems[e.UserId] = keys; diff --git a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs index 255e1476f..8b0012410 100644 --- a/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs +++ b/Emby.Server.Implementations/HttpClientManager/HttpClientManager.cs @@ -90,11 +90,9 @@ namespace Emby.Server.Implementations.HttpClientManager throw new ArgumentNullException(nameof(host)); } - HttpClientInfo client; - var key = host + enableHttpCompression; - if (!_httpClients.TryGetValue(key, out client)) + if (!_httpClients.TryGetValue(key, out var client)) { client = new HttpClientInfo(); diff --git a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs index 784b39735..6ae56c2ad 100644 --- a/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs +++ b/Emby.Server.Implementations/HttpServer/HttpListenerHost.cs @@ -124,8 +124,7 @@ namespace Emby.Server.Implementations.HttpServer public Type GetServiceTypeByRequest(Type requestType) { - Type serviceType; - ServiceOperationsMap.TryGetValue(requestType, out serviceType); + ServiceOperationsMap.TryGetValue(requestType, out var serviceType); return serviceType; } @@ -215,8 +214,7 @@ namespace Emby.Server.Implementations.HttpServer var exceptionType = ex.GetType(); - int statusCode; - if (!_mapExceptionToStatusCode.TryGetValue(exceptionType, out statusCode)) + if (!_mapExceptionToStatusCode.TryGetValue(exceptionType, out var statusCode)) { if (ex is DirectoryNotFoundException) { @@ -704,8 +702,7 @@ namespace Emby.Server.Implementations.HttpServer return null; } - string contentType; - var restPath = ServiceHandler.FindMatchingRestPath(httpReq.HttpMethod, pathInfo, out contentType); + var restPath = ServiceHandler.FindMatchingRestPath(httpReq.HttpMethod, pathInfo, out var contentType); if (restPath != null) { @@ -731,8 +728,7 @@ namespace Emby.Server.Implementations.HttpServer private void RedirectToSecureUrl(IHttpRequest httpReq, IResponse httpRes, string url) { int currentPort; - Uri uri; - if (Uri.TryCreate(url, UriKind.Absolute, out uri)) + if (Uri.TryCreate(url, UriKind.Absolute, out var uri)) { currentPort = uri.Port; var builder = new UriBuilder(uri); diff --git a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs index ce9dc9ad9..3cfa2bc75 100644 --- a/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs +++ b/Emby.Server.Implementations/HttpServer/HttpResultFactory.cs @@ -96,8 +96,7 @@ namespace Emby.Server.Implementations.HttpServer responseHeaders = new Dictionary(); } - string expires; - if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires)) + if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out var expires)) { responseHeaders["Expires"] = "-1"; } @@ -143,8 +142,7 @@ namespace Emby.Server.Implementations.HttpServer responseHeaders = new Dictionary(); } - string expires; - if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires)) + if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out var expires)) { responseHeaders["Expires"] = "-1"; } @@ -188,8 +186,7 @@ namespace Emby.Server.Implementations.HttpServer responseHeaders = new Dictionary(); } - string expires; - if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out expires)) + if (addCachePrevention && !responseHeaders.TryGetValue("Expires", out var expires)) { responseHeaders["Expires"] = "-1"; } @@ -702,9 +699,7 @@ namespace Emby.Server.Implementations.HttpServer if (!string.IsNullOrEmpty(ifModifiedSinceHeader)) { - DateTime ifModifiedSince; - - if (DateTime.TryParse(ifModifiedSinceHeader, out ifModifiedSince)) + if (DateTime.TryParse(ifModifiedSinceHeader, out var ifModifiedSince)) { if (IsNotModified(ifModifiedSince.ToUniversalTime(), cacheDuration, lastDateModified)) { @@ -720,11 +715,9 @@ namespace Emby.Server.Implementations.HttpServer // Validate If-None-Match if ((hasCacheKey || !string.IsNullOrEmpty(ifNoneMatchHeader))) { - Guid ifNoneMatch; - ifNoneMatchHeader = (ifNoneMatchHeader ?? string.Empty).Trim('\"'); - if (Guid.TryParse(ifNoneMatchHeader, out ifNoneMatch)) + if (Guid.TryParse(ifNoneMatchHeader, out var ifNoneMatch)) { if (hasCacheKey && cacheKey.Equals(ifNoneMatch)) { diff --git a/Emby.Server.Implementations/HttpServer/ResponseFilter.cs b/Emby.Server.Implementations/HttpServer/ResponseFilter.cs index edd2a394b..ed8644e33 100644 --- a/Emby.Server.Implementations/HttpServer/ResponseFilter.cs +++ b/Emby.Server.Implementations/HttpServer/ResponseFilter.cs @@ -56,9 +56,8 @@ namespace Emby.Server.Implementations.HttpServer } // Content length has to be explicitly set on on HttpListenerResponse or it won't be happy - string contentLength; - if (hasHeaders.Headers.TryGetValue("Content-Length", out contentLength) && !string.IsNullOrEmpty(contentLength)) + if (hasHeaders.Headers.TryGetValue("Content-Length", out var contentLength) && !string.IsNullOrEmpty(contentLength)) { var length = long.Parse(contentLength, UsCulture); diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs index c037292ff..499a334fc 100644 --- a/Emby.Server.Implementations/HttpServer/Security/AuthService.cs +++ b/Emby.Server.Implementations/HttpServer/Security/AuthService.cs @@ -207,8 +207,7 @@ namespace Emby.Server.Implementations.HttpServer.Security private static AuthenticationInfo GetTokenInfo(IRequest request) { - object info; - request.Items.TryGetValue("OriginalAuthenticationInfo", out info); + request.Items.TryGetValue("OriginalAuthenticationInfo", out var info); return info as AuthenticationInfo; } diff --git a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs index ae4adda7c..cab41e65b 100644 --- a/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs +++ b/Emby.Server.Implementations/HttpServer/Security/AuthorizationContext.cs @@ -26,8 +26,7 @@ namespace Emby.Server.Implementations.HttpServer.Security public AuthorizationInfo GetAuthorizationInfo(IRequest requestContext) { - object cached; - if (requestContext.Items.TryGetValue("AuthorizationInfo", out cached)) + if (requestContext.Items.TryGetValue("AuthorizationInfo", out var cached)) { return (AuthorizationInfo)cached; } diff --git a/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs b/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs index 2c7057222..81e11d312 100644 --- a/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs +++ b/Emby.Server.Implementations/HttpServer/Security/SessionContext.cs @@ -31,8 +31,7 @@ namespace Emby.Server.Implementations.HttpServer.Security private AuthenticationInfo GetTokenInfo(IRequest request) { - object info; - request.Items.TryGetValue("OriginalAuthenticationInfo", out info); + request.Items.TryGetValue("OriginalAuthenticationInfo", out var info); return info as AuthenticationInfo; } diff --git a/Emby.Server.Implementations/IO/LibraryMonitor.cs b/Emby.Server.Implementations/IO/LibraryMonitor.cs index 2c92e6543..6a3204011 100644 --- a/Emby.Server.Implementations/IO/LibraryMonitor.cs +++ b/Emby.Server.Implementations/IO/LibraryMonitor.cs @@ -103,8 +103,7 @@ namespace Emby.Server.Implementations.IO // But if we make this delay too high, we risk missing legitimate changes, such as user adding a new file, or hand-editing metadata await Task.Delay(45000).ConfigureAwait(false); - string val; - _tempIgnoredPaths.TryRemove(path, out val); + _tempIgnoredPaths.TryRemove(path, out var val); if (refreshPath) { @@ -365,9 +364,7 @@ namespace Emby.Server.Implementations.IO /// The path. private void StopWatchingPath(string path) { - FileSystemWatcher watcher; - - if (_fileSystemWatchers.TryGetValue(path, out watcher)) + if (_fileSystemWatchers.TryGetValue(path, out var watcher)) { DisposeWatcher(watcher, true); } @@ -424,9 +421,7 @@ namespace Emby.Server.Implementations.IO /// The watcher. private void RemoveWatcherFromList(FileSystemWatcher watcher) { - FileSystemWatcher removed; - - _fileSystemWatchers.TryRemove(watcher.Path, out removed); + _fileSystemWatchers.TryRemove(watcher.Path, out var removed); } /// diff --git a/Emby.Server.Implementations/Library/LibraryManager.cs b/Emby.Server.Implementations/Library/LibraryManager.cs index 0d25cbc92..9f999cb7f 100644 --- a/Emby.Server.Implementations/Library/LibraryManager.cs +++ b/Emby.Server.Implementations/Library/LibraryManager.cs @@ -432,8 +432,7 @@ namespace Emby.Server.Implementations.Library ItemRepository.DeleteItem(child.Id, CancellationToken.None); } - BaseItem removed; - _libraryItemsCache.TryRemove(item.Id, out removed); + _libraryItemsCache.TryRemove(item.Id, out var removed); ReportItemRemoved(item, parent); } @@ -1241,9 +1240,7 @@ namespace Emby.Server.Implementations.Library throw new ArgumentNullException(nameof(id)); } - BaseItem item; - - if (LibraryItemsCache.TryGetValue(id, out item)) + if (LibraryItemsCache.TryGetValue(id, out var item)) { return item; } diff --git a/Emby.Server.Implementations/Library/MediaSourceManager.cs b/Emby.Server.Implementations/Library/MediaSourceManager.cs index fb0f33a2f..321a82c78 100644 --- a/Emby.Server.Implementations/Library/MediaSourceManager.cs +++ b/Emby.Server.Implementations/Library/MediaSourceManager.cs @@ -777,8 +777,7 @@ namespace Emby.Server.Implementations.Library try { - ILiveStream info; - if (_openStreams.TryGetValue(id, out info)) + if (_openStreams.TryGetValue(id, out var info)) { return info; } @@ -810,9 +809,7 @@ namespace Emby.Server.Implementations.Library try { - ILiveStream liveStream; - - if (_openStreams.TryGetValue(id, out liveStream)) + if (_openStreams.TryGetValue(id, out var liveStream)) { liveStream.ConsumerCount--; diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs index 0ee53281d..f48d59040 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/EmbyTV.cs @@ -395,8 +395,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV private async Task GetEpgChannels(IListingsProvider provider, ListingsProviderInfo info, bool enableCache, CancellationToken cancellationToken) { - EpgChannelData result; - if (!enableCache || !_epgChannels.TryGetValue(info.Id, out result)) + if (!enableCache || !_epgChannels.TryGetValue(info.Id, out var result)) { var channels = await provider.GetChannels(info, cancellationToken).ConfigureAwait(false); @@ -652,9 +651,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV TimerCancelled(this, new GenericEventArgs(timerId)); } } - ActiveRecordingInfo activeRecordingInfo; - if (_activeRecordings.TryGetValue(timerId, out activeRecordingInfo)) + if (_activeRecordings.TryGetValue(timerId, out var activeRecordingInfo)) { activeRecordingInfo.Timer = timer; activeRecordingInfo.CancellationTokenSource.Cancel(); @@ -821,8 +819,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV } // Only update if not currently active - ActiveRecordingInfo activeRecordingInfo; - if (!_activeRecordings.TryGetValue(updatedTimer.Id, out activeRecordingInfo)) + if (!_activeRecordings.TryGetValue(updatedTimer.Id, out var activeRecordingInfo)) { existingTimer.PrePaddingSeconds = updatedTimer.PrePaddingSeconds; existingTimer.PostPaddingSeconds = updatedTimer.PostPaddingSeconds; @@ -864,9 +861,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV public string GetActiveRecordingPath(string id) { - ActiveRecordingInfo info; - - if (_activeRecordings.TryGetValue(id, out info)) + if (_activeRecordings.TryGetValue(id, out var info)) { return info.Path; } @@ -1440,8 +1435,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV TriggerRefresh(recordPath); _libraryMonitor.ReportFileSystemChangeComplete(recordPath, false); - ActiveRecordingInfo removed; - _activeRecordings.TryRemove(timer.Id, out removed); + _activeRecordings.TryRemove(timer.Id, out var removed); if (recordingStatus != RecordingStatus.Completed && DateTime.UtcNow < timer.EndDate && timer.RetryCount < 10) { @@ -2007,8 +2001,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV writer.WriteStartDocument(true); writer.WriteStartElement("tvshow"); - string id; - if (timer.SeriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out id)) + if (timer.SeriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out var id)) { writer.WriteElementString("id", id); } @@ -2417,8 +2410,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV { // Only update if not currently active - test both new timer and existing in case Id's are different // Id's could be different if the timer was created manually prior to series timer creation - ActiveRecordingInfo activeRecordingInfo; - if (!_activeRecordings.TryGetValue(timer.Id, out activeRecordingInfo) && !_activeRecordings.TryGetValue(existingTimer.Id, out activeRecordingInfo)) + if (!_activeRecordings.TryGetValue(timer.Id, out var activeRecordingInfo) && !_activeRecordings.TryGetValue(existingTimer.Id, out activeRecordingInfo)) { UpdateExistingTimerWithNewMetadata(existingTimer, timer); @@ -2521,9 +2513,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV if (string.IsNullOrWhiteSpace(channelId) && !parent.ChannelId.Equals(Guid.Empty)) { - LiveTvChannel channel; - - if (!tempChannelCache.TryGetValue(parent.ChannelId, out channel)) + if (!tempChannelCache.TryGetValue(parent.ChannelId, out var channel)) { channel = _libraryManager.GetItemList(new InternalItemsQuery { @@ -2582,9 +2572,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV if (!programInfo.ChannelId.Equals(Guid.Empty)) { - LiveTvChannel channel; - - if (!tempChannelCache.TryGetValue(programInfo.ChannelId, out channel)) + if (!tempChannelCache.TryGetValue(programInfo.ChannelId, out var channel)) { channel = _libraryManager.GetItemList(new InternalItemsQuery { diff --git a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs index 9730d552d..7f67d70a9 100644 --- a/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs +++ b/Emby.Server.Implementations/LiveTv/EmbyTV/TimerManager.cs @@ -140,8 +140,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV private void StopTimer(TimerInfo item) { - ITimer timer; - if (_timers.TryRemove(item.Id, out timer)) + if (_timers.TryRemove(item.Id, out var timer)) { timer.Dispose(); } diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index 379927191..6efbefd5d 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -528,8 +528,7 @@ namespace Emby.Server.Implementations.LiveTv var isNew = false; var forceUpdate = false; - LiveTvProgram item; - if (!allExistingPrograms.TryGetValue(id, out item)) + if (!allExistingPrograms.TryGetValue(id, out var item)) { isNew = true; item = new LiveTvProgram @@ -1940,8 +1939,7 @@ namespace Emby.Server.Implementations.LiveTv foreach (var programDto in currentProgramDtos) { - BaseItemDto channelDto; - if (currentChannelsDict.TryGetValue(programDto.ChannelId, out channelDto)) + if (currentChannelsDict.TryGetValue(programDto.ChannelId, out var channelDto)) { channelDto.CurrentProgram = programDto; } diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs index 36f688c43..09d33342e 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunHost.cs @@ -118,8 +118,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun { if (!string.IsNullOrEmpty(cacheKey)) { - DiscoverResponse response; - if (_modelCache.TryGetValue(cacheKey, out response)) + if (_modelCache.TryGetValue(cacheKey, out var response)) { return response; } diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs index 67eeec21d..8268802fb 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/HdHomerun/HdHomerunManager.cs @@ -132,8 +132,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun var receiveBuffer = new byte[8192]; var response = await socket.ReceiveAsync(receiveBuffer, 0, receiveBuffer.Length, cancellationToken).ConfigureAwait(false); - string returnVal; - ParseReturnMessage(response.Buffer, response.ReceivedBytes, out returnVal); + ParseReturnMessage(response.Buffer, response.ReceivedBytes, out var returnVal); return string.Equals(returnVal, "none", StringComparison.OrdinalIgnoreCase); } @@ -167,9 +166,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun var lockkeyMsg = CreateSetMessage(i, "lockkey", lockKeyString, null); await tcpClient.SendToAsync(lockkeyMsg, 0, lockkeyMsg.Length, ipEndPoint, cancellationToken).ConfigureAwait(false); var response = await tcpClient.ReceiveAsync(receiveBuffer, 0, receiveBuffer.Length, cancellationToken).ConfigureAwait(false); - string returnVal; // parse response to make sure it worked - if (!ParseReturnMessage(response.Buffer, response.ReceivedBytes, out returnVal)) + if (!ParseReturnMessage(response.Buffer, response.ReceivedBytes, out var returnVal)) continue; var commandList = commands.GetCommands(); @@ -222,8 +220,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts.HdHomerun await tcpClient.SendToAsync(channelMsg, 0, channelMsg.Length, new IpEndPointInfo(_remoteIp, HdHomeRunPort), cancellationToken).ConfigureAwait(false); var response = await tcpClient.ReceiveAsync(receiveBuffer, 0, receiveBuffer.Length, cancellationToken).ConfigureAwait(false); // parse response to make sure it worked - string returnVal; - if (!ParseReturnMessage(response.Buffer, response.ReceivedBytes, out returnVal)) + if (!ParseReturnMessage(response.Buffer, response.ReceivedBytes, out var returnVal)) { return; } diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs index 0772a6025..638796e2e 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3UTunerHost.cs @@ -135,9 +135,8 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts var protocol = _mediaSourceManager.GetPathProtocol(path); - Uri uri; var isRemote = true; - if (Uri.TryCreate(path, UriKind.Absolute, out uri)) + if (Uri.TryCreate(path, UriKind.Absolute, out var uri)) { isRemote = !_networkManager.IsInLocalNetwork(uri.Host); } diff --git a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs index 353b938c6..c1ee059f4 100644 --- a/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs +++ b/Emby.Server.Implementations/LiveTv/TunerHosts/M3uParser.cs @@ -117,12 +117,10 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts extInf = extInf.Trim(); - string remaining; - var attributes = ParseExtInf(extInf, out remaining); + var attributes = ParseExtInf(extInf, out var remaining); extInf = remaining; - string value; - if (attributes.TryGetValue("tvg-logo", out value)) + if (attributes.TryGetValue("tvg-logo", out var value)) { channel.ImageUrl = value; } @@ -130,11 +128,9 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts channel.Name = GetChannelName(extInf, attributes); channel.Number = GetChannelNumber(extInf, attributes, mediaUrl); - string tvgId; - attributes.TryGetValue("tvg-id", out tvgId); + attributes.TryGetValue("tvg-id", out var tvgId); - string channelId; - attributes.TryGetValue("channel-id", out channelId); + attributes.TryGetValue("channel-id", out var channelId); channel.TunerChannelId = string.IsNullOrWhiteSpace(tvgId) ? channelId : tvgId; @@ -172,8 +168,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts { var numberPart = nameInExtInf.Substring(0, numberIndex).Trim(new[] { ' ', '.' }); - double number; - if (double.TryParse(numberPart, NumberStyles.Any, CultureInfo.InvariantCulture, out number)) + if (double.TryParse(numberPart, NumberStyles.Any, CultureInfo.InvariantCulture, out var number)) { numberString = numberPart; } @@ -187,11 +182,9 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts if (!IsValidChannelNumber(numberString)) { - string value; - if (attributes.TryGetValue("tvg-id", out value)) + if (attributes.TryGetValue("tvg-id", out var value)) { - double doubleValue; - if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out doubleValue)) + if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var doubleValue)) { numberString = value; } @@ -205,8 +198,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts if (!IsValidChannelNumber(numberString)) { - string value; - if (attributes.TryGetValue("channel-id", out value)) + if (attributes.TryGetValue("channel-id", out var value)) { numberString = value; } @@ -259,8 +251,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts return false; } - double value; - if (!double.TryParse(numberString, NumberStyles.Any, CultureInfo.InvariantCulture, out value)) + if (!double.TryParse(numberString, NumberStyles.Any, CultureInfo.InvariantCulture, out var value)) { return false; } @@ -283,8 +274,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts { var numberPart = nameInExtInf.Substring(0, numberIndex).Trim(new[] { ' ', '.' }); - double number; - if (double.TryParse(numberPart, NumberStyles.Any, CultureInfo.InvariantCulture, out number)) + if (double.TryParse(numberPart, NumberStyles.Any, CultureInfo.InvariantCulture, out var number)) { //channel.Number = number.ToString(); nameInExtInf = nameInExtInf.Substring(numberIndex + 1).Trim(new[] { ' ', '-' }); @@ -292,8 +282,7 @@ namespace Emby.Server.Implementations.LiveTv.TunerHosts } } - string name; - attributes.TryGetValue("tvg-name", out name); + attributes.TryGetValue("tvg-name", out var name); if (string.IsNullOrWhiteSpace(name)) { diff --git a/Emby.Server.Implementations/Localization/LocalizationManager.cs b/Emby.Server.Implementations/Localization/LocalizationManager.cs index 998595ecd..b71e89c5a 100644 --- a/Emby.Server.Implementations/Localization/LocalizationManager.cs +++ b/Emby.Server.Implementations/Localization/LocalizationManager.cs @@ -298,9 +298,7 @@ namespace Emby.Server.Implementations.Localization /// The country code. private Dictionary GetRatings(string countryCode) { - Dictionary value; - - _allParentalRatings.TryGetValue(countryCode, out value); + _allParentalRatings.TryGetValue(countryCode, out var value); return value; } @@ -320,9 +318,7 @@ namespace Emby.Server.Implementations.Localization if (parts.Length == 2) { - int value; - - if (int.TryParse(parts[1], NumberStyles.Integer, UsCulture, out value)) + if (int.TryParse(parts[1], NumberStyles.Integer, UsCulture, out var value)) { return new ParentalRating { Name = parts[0], Value = value }; } @@ -364,9 +360,7 @@ namespace Emby.Server.Implementations.Localization var ratingsDictionary = GetParentalRatingsDictionary(); - ParentalRating value; - - if (ratingsDictionary.TryGetValue(rating, out value)) + if (ratingsDictionary.TryGetValue(rating, out var value)) { return value.Value; } @@ -427,9 +421,7 @@ namespace Emby.Server.Implementations.Localization var dictionary = GetLocalizationDictionary(culture); - string value; - - if (dictionary.TryGetValue(phrase, out value)) + if (dictionary.TryGetValue(phrase, out var value)) { return value; } diff --git a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs index 21feaea33..16f39daf7 100644 --- a/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs +++ b/Emby.Server.Implementations/Networking/IPNetwork/IPNetwork.cs @@ -524,8 +524,7 @@ namespace System.Net } var uintIpAddress = IPNetwork.ToBigInteger(ipaddress); - byte? cidr2 = null; - bool parsed = IPNetwork.TryToCidr(netmask, out cidr2); + bool parsed = IPNetwork.TryToCidr(netmask, out var cidr2); if (parsed == false) { if (tryParse == false) @@ -615,8 +614,7 @@ namespace System.Net /// public static BigInteger ToBigInteger(IPAddress ipaddress) { - BigInteger? uintIpAddress = null; - IPNetwork.InternalToBigInteger(false, ipaddress, out uintIpAddress); + IPNetwork.InternalToBigInteger(false, ipaddress, out var uintIpAddress); return (BigInteger)uintIpAddress; } @@ -630,8 +628,7 @@ namespace System.Net /// public static bool TryToBigInteger(IPAddress ipaddress, out BigInteger? uintIpAddress) { - BigInteger? uintIpAddress2 = null; - IPNetwork.InternalToBigInteger(true, ipaddress, out uintIpAddress2); + IPNetwork.InternalToBigInteger(true, ipaddress, out var uintIpAddress2); bool parsed = (uintIpAddress2 != null); uintIpAddress = uintIpAddress2; return parsed; @@ -681,9 +678,7 @@ namespace System.Net /// public static BigInteger ToUint(byte cidr, AddressFamily family) { - - BigInteger? uintNetmask = null; - IPNetwork.InternalToBigInteger(false, cidr, family, out uintNetmask); + IPNetwork.InternalToBigInteger(false, cidr, family, out var uintNetmask); return (BigInteger)uintNetmask; } @@ -695,9 +690,7 @@ namespace System.Net /// public static bool TryToUint(byte cidr, AddressFamily family, out BigInteger? uintNetmask) { - - BigInteger? uintNetmask2 = null; - IPNetwork.InternalToBigInteger(true, cidr, family, out uintNetmask2); + IPNetwork.InternalToBigInteger(true, cidr, family, out var uintNetmask2); bool parsed = (uintNetmask2 != null); uintNetmask = uintNetmask2; return parsed; @@ -812,8 +805,7 @@ namespace System.Net /// public static byte ToCidr(IPAddress netmask) { - byte? cidr = null; - IPNetwork.InternalToCidr(false, netmask, out cidr); + IPNetwork.InternalToCidr(false, netmask, out var cidr); return (byte)cidr; } @@ -827,8 +819,7 @@ namespace System.Net /// public static bool TryToCidr(IPAddress netmask, out byte? cidr) { - byte? cidr2 = null; - IPNetwork.InternalToCidr(true, netmask, out cidr2); + IPNetwork.InternalToCidr(true, netmask, out var cidr2); bool parsed = (cidr2 != null); cidr = cidr2; return parsed; @@ -846,8 +837,8 @@ namespace System.Net cidr = null; return; } - BigInteger? uintNetmask2 = null; - bool parsed = IPNetwork.TryToBigInteger(netmask, out uintNetmask2); + + bool parsed = IPNetwork.TryToBigInteger(netmask, out var uintNetmask2); /// 20180217 lduchosal /// impossible to reach code. @@ -860,8 +851,7 @@ namespace System.Net /// } var uintNetmask = (BigInteger)uintNetmask2; - byte? cidr2 = null; - IPNetwork.InternalToCidr(tryParse, uintNetmask, netmask.AddressFamily, out cidr2); + IPNetwork.InternalToCidr(tryParse, uintNetmask, netmask.AddressFamily, out var cidr2); cidr = cidr2; return; @@ -1491,8 +1481,7 @@ namespace System.Net /// public static IPNetwork[] Supernet(IPNetwork[] ipnetworks) { - IPNetwork[] supernet; - InternalSupernet(false, ipnetworks, out supernet); + InternalSupernet(false, ipnetworks, out var supernet); return supernet; } @@ -1642,14 +1631,12 @@ namespace System.Net throw new ArgumentNullException(nameof(end)); } - IPAddress startIP; - if (!IPAddress.TryParse(start, out startIP)) + if (!IPAddress.TryParse(start, out var startIP)) { throw new ArgumentException("start"); } - IPAddress endIP; - if (!IPAddress.TryParse(end, out endIP)) + if (!IPAddress.TryParse(end, out var endIP)) { throw new ArgumentException("end"); } diff --git a/Emby.Server.Implementations/Networking/NetworkManager.cs b/Emby.Server.Implementations/Networking/NetworkManager.cs index 70d8376a9..b486c0ef7 100644 --- a/Emby.Server.Implementations/Networking/NetworkManager.cs +++ b/Emby.Server.Implementations/Networking/NetworkManager.cs @@ -203,11 +203,9 @@ namespace Emby.Server.Implementations.Networking private Dictionary> _subnetLookup = new Dictionary>(StringComparer.Ordinal); private List GetSubnets(string endpointFirstPart) { - List subnets; - lock (_subnetLookup) { - if (_subnetLookup.TryGetValue(endpointFirstPart, out subnets)) + if (_subnetLookup.TryGetValue(endpointFirstPart, out var subnets)) { return subnets; } @@ -298,8 +296,7 @@ namespace Emby.Server.Implementations.Networking throw new ArgumentNullException(nameof(endpoint)); } - IPAddress address; - if (IPAddress.TryParse(endpoint, out address)) + if (IPAddress.TryParse(endpoint, out var address)) { var addressString = address.ToString(); @@ -348,8 +345,7 @@ namespace Emby.Server.Implementations.Networking } else if (resolveHost) { - Uri uri; - if (Uri.TryCreate(endpoint, UriKind.RelativeOrAbsolute, out uri)) + if (Uri.TryCreate(endpoint, UriKind.RelativeOrAbsolute, out var uri)) { try { @@ -588,9 +584,7 @@ namespace Emby.Server.Implementations.Networking /// private static int GetPort(string p) { - int port; - - if (!int.TryParse(p, out port) + if (!int.TryParse(p, out var port) || port < IPEndPoint.MinPort || port > IPEndPoint.MaxPort) { @@ -618,8 +612,7 @@ namespace Emby.Server.Implementations.Networking public IpAddressInfo ParseIpAddress(string ipAddress) { - IpAddressInfo info; - if (TryParseIpAddress(ipAddress, out info)) + if (TryParseIpAddress(ipAddress, out var info)) { return info; } @@ -629,8 +622,7 @@ namespace Emby.Server.Implementations.Networking public bool TryParseIpAddress(string ipAddress, out IpAddressInfo ipAddressInfo) { - IPAddress address; - if (IPAddress.TryParse(ipAddress, out address)) + if (IPAddress.TryParse(ipAddress, out var address)) { ipAddressInfo = ToIpAddressInfo(address); return true; diff --git a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs index ac47c9625..09c348e24 100644 --- a/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs +++ b/Emby.Server.Implementations/ScheduledTasks/TaskManager.cs @@ -364,8 +364,7 @@ namespace Emby.Server.Implementations.ScheduledTasks { var list = new List>(); - Tuple item; - while (_taskQueue.TryDequeue(out item)) + while (_taskQueue.TryDequeue(out var item)) { if (list.All(i => i.Item1 != item.Item1)) { diff --git a/Emby.Server.Implementations/Security/MBLicenseFile.cs b/Emby.Server.Implementations/Security/MBLicenseFile.cs index 8273ec8b2..91fbb4a2c 100644 --- a/Emby.Server.Implementations/Security/MBLicenseFile.cs +++ b/Emby.Server.Implementations/Security/MBLicenseFile.cs @@ -68,9 +68,8 @@ namespace Emby.Server.Implementations.Security public void RemoveRegCheck(string featureId) { var key = GetKey(featureId); - FeatureRegInfo val; - _updateRecords.TryRemove(key, out val); + _updateRecords.TryRemove(key, out var val); Save(); } @@ -135,13 +134,11 @@ namespace Emby.Server.Implementations.Security continue; } - Guid feat; - if (Guid.TryParse(line, out feat)) + if (Guid.TryParse(line, out var feat)) { var lineParts = contents[i + 1].Split(new[] { '|' }, StringSplitOptions.RemoveEmptyEntries); - long ticks; - if (long.TryParse(lineParts[0], out ticks)) + if (long.TryParse(lineParts[0], out var ticks)) { var info = new FeatureRegInfo { diff --git a/Emby.Server.Implementations/Serialization/XmlSerializer.cs b/Emby.Server.Implementations/Serialization/XmlSerializer.cs index 210b5dfdd..22d6712ec 100644 --- a/Emby.Server.Implementations/Serialization/XmlSerializer.cs +++ b/Emby.Server.Implementations/Serialization/XmlSerializer.cs @@ -33,8 +33,7 @@ namespace Emby.Server.Implementations.Serialization var key = type.FullName; lock (_serializers) { - XmlSerializer serializer; - if (!_serializers.TryGetValue(key, out serializer)) + if (!_serializers.TryGetValue(key, out var serializer)) { serializer = new XmlSerializer(type); _serializers[key] = serializer; diff --git a/Emby.Server.Implementations/Services/ServiceController.cs b/Emby.Server.Implementations/Services/ServiceController.cs index b34832f45..9afa7f502 100644 --- a/Emby.Server.Implementations/Services/ServiceController.cs +++ b/Emby.Server.Implementations/Services/ServiceController.cs @@ -89,8 +89,7 @@ namespace Emby.Server.Implementations.Services if (restPath.Path.IndexOfAny(InvalidRouteChars) != -1) throw new ArgumentException(string.Format("Route '{0}' on '{1}' contains invalid chars. ", restPath.Path, restPath.RequestType.GetMethodName())); - List pathsAtFirstMatch; - if (!RestPathMap.TryGetValue(restPath.FirstMatchHashKey, out pathsAtFirstMatch)) + if (!RestPathMap.TryGetValue(restPath.FirstMatchHashKey, out var pathsAtFirstMatch)) { pathsAtFirstMatch = new List(); RestPathMap[restPath.FirstMatchHashKey] = pathsAtFirstMatch; diff --git a/Emby.Server.Implementations/Services/ServiceExec.cs b/Emby.Server.Implementations/Services/ServiceExec.cs index 2791ee2ac..0f2247a01 100644 --- a/Emby.Server.Implementations/Services/ServiceExec.cs +++ b/Emby.Server.Implementations/Services/ServiceExec.cs @@ -73,8 +73,7 @@ namespace Emby.Server.Implementations.Services { var actionName = request.Verb ?? "POST"; - ServiceMethod actionContext; - if (ServiceExecGeneral.execMap.TryGetValue(ServiceMethod.Key(serviceType, actionName, requestName), out actionContext)) + if (ServiceExecGeneral.execMap.TryGetValue(ServiceMethod.Key(serviceType, actionName, requestName), out var actionContext)) { if (actionContext.RequestFilters != null) { diff --git a/Emby.Server.Implementations/Services/ServiceHandler.cs b/Emby.Server.Implementations/Services/ServiceHandler.cs index c1c42e3ec..dcf4f4172 100644 --- a/Emby.Server.Implementations/Services/ServiceHandler.cs +++ b/Emby.Server.Implementations/Services/ServiceHandler.cs @@ -62,8 +62,7 @@ namespace Emby.Server.Implementations.Services { if (this.RestPath == null) { - string contentType; - this.RestPath = FindMatchingRestPath(httpMethod, pathInfo, out contentType); + this.RestPath = FindMatchingRestPath(httpMethod, pathInfo, out var contentType); if (contentType != null) ResponseContentType = contentType; @@ -137,9 +136,8 @@ namespace Emby.Server.Implementations.Services public static object CreateRequest(IRequest httpReq, RestPath restPath, Dictionary requestParams, object requestDto) { - string contentType; var pathInfo = !restPath.IsWildCardPath - ? GetSanitizedPathInfo(httpReq.PathInfo, out contentType) + ? GetSanitizedPathInfo(httpReq.PathInfo, out var contentType) : httpReq.PathInfo; return restPath.CreateRequest(pathInfo, requestParams, requestDto); @@ -239,8 +237,7 @@ namespace Emby.Server.Implementations.Services private static RestPath GetRoute(IRequest req) { - object route; - req.Items.TryGetValue("__route", out route); + req.Items.TryGetValue("__route", out var route); return route as RestPath; } } diff --git a/Emby.Server.Implementations/Services/ServicePath.cs b/Emby.Server.Implementations/Services/ServicePath.cs index 8ad31c160..7e1993b71 100644 --- a/Emby.Server.Implementations/Services/ServicePath.cs +++ b/Emby.Server.Implementations/Services/ServicePath.cs @@ -306,8 +306,7 @@ namespace Emby.Server.Implementations.Services public int MatchScore(string httpMethod, string[] withPathInfoParts) { - int wildcardMatchCount; - var isMatch = IsMatch(httpMethod, withPathInfoParts, out wildcardMatchCount); + var isMatch = IsMatch(httpMethod, withPathInfoParts, out var wildcardMatchCount); if (!isMatch) { return -1; @@ -484,8 +483,7 @@ namespace Emby.Server.Implementations.Services continue; } - string propertyNameOnRequest; - if (!this.propertyNamesMap.TryGetValue(variableName.ToLower(), out propertyNameOnRequest)) + if (!this.propertyNamesMap.TryGetValue(variableName.ToLower(), out var propertyNameOnRequest)) { if (string.Equals("ignore", variableName, StringComparison.OrdinalIgnoreCase)) { diff --git a/Emby.Server.Implementations/Session/SessionManager.cs b/Emby.Server.Implementations/Session/SessionManager.cs index e398b58cc..e60593198 100644 --- a/Emby.Server.Implementations/Session/SessionManager.cs +++ b/Emby.Server.Implementations/Session/SessionManager.cs @@ -265,8 +265,7 @@ namespace Emby.Server.Implementations.Session { var key = GetSessionKey(session.Client, session.DeviceId); - SessionInfo removed; - _activeConnections.TryRemove(key, out removed); + _activeConnections.TryRemove(key, out var removed); OnSessionEnded(session); } @@ -281,8 +280,7 @@ namespace Emby.Server.Implementations.Session { var key = GetSessionKey(session.Client, session.DeviceId); - SessionInfo removed; - _activeConnections.TryRemove(key, out removed); + _activeConnections.TryRemove(key, out var removed); OnSessionEnded(session); } diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs index 7ad16108a..d7afb4113 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/ProbVector.cs @@ -11,9 +11,7 @@ namespace NLangDetect.Core { get { - double value; - - return _dict.TryGetValue(key, out value) ? value : 0.0; + return _dict.TryGetValue(key, out var value) ? value : 0.0; } set diff --git a/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs b/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs index d7dab8528..879c0a09b 100644 --- a/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs +++ b/Emby.Server.Implementations/TextEncoding/NLangDetect/Utils/Messages.cs @@ -18,10 +18,8 @@ namespace NLangDetect.Core.Utils public static string getString(string key) { - string value; - return - _messages.TryGetValue(key, out value) + _messages.TryGetValue(key, out var value) ? value : string.Format("!{0}!", key); } diff --git a/Emby.Server.Implementations/Updates/InstallationManager.cs b/Emby.Server.Implementations/Updates/InstallationManager.cs index 68cb7821d..6ed6f127b 100644 --- a/Emby.Server.Implementations/Updates/InstallationManager.cs +++ b/Emby.Server.Implementations/Updates/InstallationManager.cs @@ -317,9 +317,7 @@ namespace Emby.Server.Implementations.Updates return true; } - Version requiredVersion; - - return Version.TryParse(packageVersionInfo.requiredVersionStr, out requiredVersion) && currentServerVersion >= requiredVersion; + return Version.TryParse(packageVersionInfo.requiredVersionStr, out var requiredVersion) && currentServerVersion >= requiredVersion; } /// diff --git a/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs b/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs index 8234393c2..52e58ed8d 100644 --- a/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs +++ b/Emby.XmlTv/Emby.XmlTv/Classes/XmlTvReader.cs @@ -140,8 +140,7 @@ namespace Emby.XmlTv.Classes private void SetChannelNumber(XmlTvChannel channel, string value) { value = value.Replace("-", "."); - double number; - if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out number)) + if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var number)) { channel.Number = value; } @@ -426,8 +425,7 @@ namespace Emby.XmlTv.Classes if (textValue.Contains("/")) { var components = textValue.Split('/'); - float value; - if (float.TryParse(components[0], out value)) + if (float.TryParse(components[0], out var value)) { result.StarRating = value; } @@ -1053,8 +1051,7 @@ namespace Emby.XmlTv.Classes } var standardDate = string.Format("{0} {1}", dateComponent, dateOffset); - DateTimeOffset parsedDateTime; - if (DateTimeOffset.TryParseExact(standardDate, "yyyyMMddHHmmss zzz", CultureInfo.CurrentCulture, DateTimeStyles.None, out parsedDateTime)) + if (DateTimeOffset.TryParseExact(standardDate, "yyyyMMddHHmmss zzz", CultureInfo.CurrentCulture, DateTimeStyles.None, out var parsedDateTime)) { return parsedDateTime.ToUniversalTime(); } diff --git a/Jellyfin.Server/SocketSharp/RequestMono.cs b/Jellyfin.Server/SocketSharp/RequestMono.cs index 0e3d2ad65..45cb323d2 100644 --- a/Jellyfin.Server/SocketSharp/RequestMono.cs +++ b/Jellyfin.Server/SocketSharp/RequestMono.cs @@ -148,9 +148,7 @@ namespace Jellyfin.SocketSharp internal static bool IsInvalidString(string val) { - int validationFailureIndex; - - return IsInvalidString(val, out validationFailureIndex); + return IsInvalidString(val, out var validationFailureIndex); } internal static bool IsInvalidString(string val, out int validationFailureIndex) diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index 0c3431e97..4e2380cfa 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -101,8 +101,7 @@ namespace MediaBrowser.Api { lock (_transcodingLocks) { - SemaphoreSlim result; - if (!_transcodingLocks.TryGetValue(outputPath, out result)) + if (!_transcodingLocks.TryGetValue(outputPath, out var result)) { result = new SemaphoreSlim(1, 1); _transcodingLocks[outputPath] = result; diff --git a/MediaBrowser.Api/IHasItemFields.cs b/MediaBrowser.Api/IHasItemFields.cs index 6b7a64389..8598ea262 100644 --- a/MediaBrowser.Api/IHasItemFields.cs +++ b/MediaBrowser.Api/IHasItemFields.cs @@ -37,9 +37,7 @@ namespace MediaBrowser.Api return val.Split(',').Select(v => { - ItemFields value; - - if (Enum.TryParse(v, true, out value)) + if (Enum.TryParse(v, true, out ItemFields value)) { return (ItemFields?)value; } diff --git a/MediaBrowser.Api/Images/ImageService.cs b/MediaBrowser.Api/Images/ImageService.cs index 418ed18d6..369e9781f 100644 --- a/MediaBrowser.Api/Images/ImageService.cs +++ b/MediaBrowser.Api/Images/ImageService.cs @@ -659,8 +659,7 @@ namespace MediaBrowser.Api.Images { if (!string.IsNullOrWhiteSpace(request.Format)) { - ImageFormat format; - if (Enum.TryParse(request.Format, true, out format)) + if (Enum.TryParse(request.Format, true, out ImageFormat format)) { return new ImageFormat[] { format }; } diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 6d4af16e7..bb525adc7 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -531,8 +531,7 @@ namespace MediaBrowser.Api.Playback { if (!string.IsNullOrWhiteSpace(val) && videoRequest != null) { - SubtitleDeliveryMethod method; - if (Enum.TryParse(val, out method)) + if (Enum.TryParse(val, out SubtitleDeliveryMethod method)) { videoRequest.SubtitleMethod = method; } @@ -636,8 +635,7 @@ namespace MediaBrowser.Api.Playback if (value.IndexOf(':') == -1) { // Parses npt times in the format of '417.33' - double seconds; - if (double.TryParse(value, NumberStyles.Any, UsCulture, out seconds)) + if (double.TryParse(value, NumberStyles.Any, UsCulture, out var seconds)) { return TimeSpan.FromSeconds(seconds).Ticks; } @@ -652,8 +650,7 @@ namespace MediaBrowser.Api.Playback foreach (var time in tokens) { - double digit; - if (double.TryParse(time, NumberStyles.Any, UsCulture, out digit)) + if (double.TryParse(time, NumberStyles.Any, UsCulture, out var digit)) { secondsSum += digit * timeFactor; } diff --git a/MediaBrowser.Api/Session/SessionsService.cs b/MediaBrowser.Api/Session/SessionsService.cs index ded82c19b..234ada6c0 100644 --- a/MediaBrowser.Api/Session/SessionsService.cs +++ b/MediaBrowser.Api/Session/SessionsService.cs @@ -413,10 +413,9 @@ namespace MediaBrowser.Api.Session /// The request. public Task Post(SendSystemCommand request) { - GeneralCommandType commandType; var name = request.Command; - if (Enum.TryParse(name, true, out commandType)) + if (Enum.TryParse(name, true, out GeneralCommandType commandType)) { name = commandType.ToString(); } diff --git a/MediaBrowser.Common/Net/HttpRequestOptions.cs b/MediaBrowser.Common/Net/HttpRequestOptions.cs index 0b21472f0..dadac5e03 100644 --- a/MediaBrowser.Common/Net/HttpRequestOptions.cs +++ b/MediaBrowser.Common/Net/HttpRequestOptions.cs @@ -102,9 +102,7 @@ namespace MediaBrowser.Common.Net private string GetHeaderValue(string name) { - string value; - - RequestHeaders.TryGetValue(name, out value); + RequestHeaders.TryGetValue(name, out var value); return value; } diff --git a/MediaBrowser.Controller/Entities/CollectionFolder.cs b/MediaBrowser.Controller/Entities/CollectionFolder.cs index c56dc04ec..91cfcd0ce 100644 --- a/MediaBrowser.Controller/Entities/CollectionFolder.cs +++ b/MediaBrowser.Controller/Entities/CollectionFolder.cs @@ -103,8 +103,7 @@ namespace MediaBrowser.Controller.Entities { lock (LibraryOptions) { - LibraryOptions options; - if (!LibraryOptions.TryGetValue(path, out options)) + if (!LibraryOptions.TryGetValue(path, out var options)) { options = LoadLibraryOptions(path); LibraryOptions[path] = options; diff --git a/MediaBrowser.Controller/Entities/Folder.cs b/MediaBrowser.Controller/Entities/Folder.cs index bbee594f6..b40bccde6 100644 --- a/MediaBrowser.Controller/Entities/Folder.cs +++ b/MediaBrowser.Controller/Entities/Folder.cs @@ -331,9 +331,7 @@ namespace MediaBrowser.Controller.Entities foreach (var child in nonCachedChildren) { - BaseItem currentChild; - - if (currentChildren.TryGetValue(child.Id, out currentChild)) + if (currentChildren.TryGetValue(child.Id, out var currentChild)) { validChildren.Add(currentChild); diff --git a/MediaBrowser.Controller/Entities/Year.cs b/MediaBrowser.Controller/Entities/Year.cs index 643c0ddcf..cad5ed863 100644 --- a/MediaBrowser.Controller/Entities/Year.cs +++ b/MediaBrowser.Controller/Entities/Year.cs @@ -50,11 +50,9 @@ namespace MediaBrowser.Controller.Entities public IList GetTaggedItems(InternalItemsQuery query) { - int year; - var usCulture = new CultureInfo("en-US"); - if (!int.TryParse(Name, NumberStyles.Integer, usCulture, out year)) + if (!int.TryParse(Name, NumberStyles.Integer, usCulture, out var year)) { return new List(); } @@ -66,9 +64,7 @@ namespace MediaBrowser.Controller.Entities public int? GetYearValue() { - int i; - - if (int.TryParse(Name, NumberStyles.Integer, CultureInfo.InvariantCulture, out i)) + if (int.TryParse(Name, NumberStyles.Integer, CultureInfo.InvariantCulture, out var i)) { return i; } diff --git a/MediaBrowser.Controller/Library/TVUtils.cs b/MediaBrowser.Controller/Library/TVUtils.cs index 223761654..3080143ce 100644 --- a/MediaBrowser.Controller/Library/TVUtils.cs +++ b/MediaBrowser.Controller/Library/TVUtils.cs @@ -40,9 +40,7 @@ namespace MediaBrowser.Controller.Library }; } - DayOfWeek value; - - if (Enum.TryParse(day, true, out value)) + if (Enum.TryParse(day, true, out DayOfWeek value)) { return new DayOfWeek[] { diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs index 3bc43143f..edc43ef46 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingHelper.cs @@ -943,9 +943,7 @@ namespace MediaBrowser.Controller.MediaEncoding var level = state.GetRequestedLevel(videoStream.Codec); if (!string.IsNullOrEmpty(level)) { - double requestLevel; - - if (double.TryParse(level, NumberStyles.Any, _usCulture, out requestLevel)) + if (double.TryParse(level, NumberStyles.Any, _usCulture, out var requestLevel)) { if (!videoStream.Level.HasValue) { diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs index bb09d365e..ea8a79306 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobInfo.cs @@ -193,8 +193,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (!string.IsNullOrEmpty(codec)) { var value = BaseRequest.GetOption(codec, "maxrefframes"); - int result; - if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result)) + if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -213,8 +212,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (!string.IsNullOrEmpty(codec)) { var value = BaseRequest.GetOption(codec, "videobitdepth"); - int result; - if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result)) + if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -233,8 +231,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (!string.IsNullOrEmpty(codec)) { var value = BaseRequest.GetOption(codec, "audiobitdepth"); - int result; - if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result)) + if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -257,8 +254,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (!string.IsNullOrEmpty(codec)) { var value = BaseRequest.GetOption(codec, "audiochannels"); - int result; - if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result)) + if (!string.IsNullOrEmpty(value) && int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -419,8 +415,7 @@ namespace MediaBrowser.Controller.MediaEncoding } var level = GetRequestedLevel(ActualOutputVideoCodec); - double result; - if (!string.IsNullOrEmpty(level) && double.TryParse(level, NumberStyles.Any, CultureInfo.InvariantCulture, out result)) + if (!string.IsNullOrEmpty(level) && double.TryParse(level, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { return result; } diff --git a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs index 625f0b389..ff54bb393 100644 --- a/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs +++ b/MediaBrowser.Controller/MediaEncoding/EncodingJobOptions.cs @@ -228,8 +228,7 @@ namespace MediaBrowser.Controller.MediaEncoding public string GetOption(string name) { - string value; - if (StreamOptions.TryGetValue(name, out value)) + if (StreamOptions.TryGetValue(name, out var value)) { return value; } diff --git a/MediaBrowser.Controller/MediaEncoding/JobLogger.cs b/MediaBrowser.Controller/MediaEncoding/JobLogger.cs index a379efafa..b812a8ddc 100644 --- a/MediaBrowser.Controller/MediaEncoding/JobLogger.cs +++ b/MediaBrowser.Controller/MediaEncoding/JobLogger.cs @@ -74,9 +74,8 @@ namespace MediaBrowser.Controller.MediaEncoding (i + 1 < parts.Length)) { var rate = parts[i + 1]; - float val; - if (float.TryParse(rate, NumberStyles.Any, _usCulture, out val)) + if (float.TryParse(rate, NumberStyles.Any, _usCulture, out var val)) { framerate = val; } @@ -85,9 +84,8 @@ namespace MediaBrowser.Controller.MediaEncoding part.StartsWith("time=", StringComparison.OrdinalIgnoreCase)) { var time = part.Split(new[] { '=' }, 2).Last(); - TimeSpan val; - if (TimeSpan.TryParse(time, _usCulture, out val)) + if (TimeSpan.TryParse(time, _usCulture, out var val)) { var currentMs = startMs + val.TotalMilliseconds; @@ -110,9 +108,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (scale.HasValue) { - long val; - - if (long.TryParse(size, NumberStyles.Any, _usCulture, out val)) + if (long.TryParse(size, NumberStyles.Any, _usCulture, out var val)) { bytesTranscoded = val * scale.Value; } @@ -131,9 +127,7 @@ namespace MediaBrowser.Controller.MediaEncoding if (scale.HasValue) { - float val; - - if (float.TryParse(rate, NumberStyles.Any, _usCulture, out val)) + if (float.TryParse(rate, NumberStyles.Any, _usCulture, out var val)) { bitRate = (int)Math.Ceiling(val * scale.Value); } diff --git a/MediaBrowser.Controller/Providers/DirectoryService.cs b/MediaBrowser.Controller/Providers/DirectoryService.cs index 622bba637..ab3196aba 100644 --- a/MediaBrowser.Controller/Providers/DirectoryService.cs +++ b/MediaBrowser.Controller/Providers/DirectoryService.cs @@ -25,9 +25,7 @@ namespace MediaBrowser.Controller.Providers public FileSystemMetadata[] GetFileSystemEntries(string path) { - FileSystemMetadata[] entries; - - if (!_cache.TryGetValue(path, out entries)) + if (!_cache.TryGetValue(path, out var entries)) { //_logger.LogDebug("Getting files for " + path); @@ -56,8 +54,7 @@ namespace MediaBrowser.Controller.Providers public FileSystemMetadata GetFile(string path) { - FileSystemMetadata file; - if (!_fileCache.TryGetValue(path, out file)) + if (!_fileCache.TryGetValue(path, out var file)) { file = _fileSystem.GetFileInfo(path); @@ -83,8 +80,7 @@ namespace MediaBrowser.Controller.Providers public List GetFilePaths(string path, bool clearCache) { - List result; - if (clearCache || !_filePathCache.TryGetValue(path, out result)) + if (clearCache || !_filePathCache.TryGetValue(path, out var result)) { result = _fileSystem.GetFilePaths(path).ToList(); diff --git a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs index 0ee283325..821b11a5d 100644 --- a/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/BaseItemXmlParser.cs @@ -151,8 +151,7 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - DateTime added; - if (DateTime.TryParse(val, out added)) + if (DateTime.TryParse(val, out var added)) { item.DateCreated = added.ToUniversalTime(); } @@ -185,8 +184,7 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrEmpty(text)) { - float value; - if (float.TryParse(text, NumberStyles.Any, _usCulture, out value)) + if (float.TryParse(text, NumberStyles.Any, _usCulture, out var value)) { item.CriticRating = value; } @@ -261,9 +259,7 @@ namespace MediaBrowser.LocalMetadata.Parsers { item.LockedFields = val.Split('|').Select(i => { - MetadataFields field; - - if (Enum.TryParse(i, true, out field)) + if (Enum.TryParse(i, true, out MetadataFields field)) { return (MetadataFields?)field; } @@ -337,8 +333,7 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrWhiteSpace(text)) { - int runtime; - if (int.TryParse(text.Split(' ')[0], NumberStyles.Integer, _usCulture, out runtime)) + if (int.TryParse(text.Split(' ')[0], NumberStyles.Integer, _usCulture, out var runtime)) { item.RunTimeTicks = TimeSpan.FromMinutes(runtime).Ticks; } @@ -494,8 +489,7 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int productionYear; - if (int.TryParse(val, out productionYear) && productionYear > 1850) + if (int.TryParse(val, out var productionYear) && productionYear > 1850) { item.ProductionYear = productionYear; } @@ -512,9 +506,8 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrWhiteSpace(rating)) { - float val; // All external meta is saving this as '.' for decimal I believe...but just to be sure - if (float.TryParse(rating.Replace(',', '.'), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out val)) + if (float.TryParse(rating.Replace(',', '.'), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var val)) { item.CommunityRating = val; } @@ -530,9 +523,7 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrWhiteSpace(firstAired)) { - DateTime airDate; - - if (DateTime.TryParseExact(firstAired, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out airDate) && airDate.Year > 1850) + if (DateTime.TryParseExact(firstAired, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out var airDate) && airDate.Year > 1850) { item.PremiereDate = airDate.ToUniversalTime(); item.ProductionYear = airDate.Year; @@ -549,9 +540,7 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrWhiteSpace(firstAired)) { - DateTime airDate; - - if (DateTime.TryParseExact(firstAired, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out airDate) && airDate.Year > 1850) + if (DateTime.TryParseExact(firstAired, "yyyy-MM-dd", CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out var airDate) && airDate.Year > 1850) { item.EndDate = airDate.ToUniversalTime(); } @@ -687,8 +676,7 @@ namespace MediaBrowser.LocalMetadata.Parsers default: { string readerName = reader.Name; - string providerIdValue; - if (_validProviderIds.TryGetValue(readerName, out providerIdValue)) + if (_validProviderIds.TryGetValue(readerName, out var providerIdValue)) { var id = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(id)) @@ -1127,8 +1115,7 @@ namespace MediaBrowser.LocalMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int intVal; - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out intVal)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var intVal)) { sortOrder = intVal; } diff --git a/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs b/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs index cc908b97b..df7c51f27 100644 --- a/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs +++ b/MediaBrowser.LocalMetadata/Parsers/GameXmlParser.cs @@ -63,9 +63,7 @@ namespace MediaBrowser.LocalMetadata.Parsers var val = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(val)) { - int num; - - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var num)) { item.PlayersSupported = num; } diff --git a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs b/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs index f4d0899b6..e4eabaf38 100644 --- a/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs +++ b/MediaBrowser.MediaEncoding/Probing/FFProbeHelpers.cs @@ -52,9 +52,7 @@ namespace MediaBrowser.MediaEncoding.Probing return null; } - string val; - - tags.TryGetValue(key, out val); + tags.TryGetValue(key, out var val); return val; } @@ -70,9 +68,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrEmpty(val)) { - int i; - - if (int.TryParse(val, out i)) + if (int.TryParse(val, out var i)) { return i; } @@ -93,9 +89,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrEmpty(val)) { - DateTime i; - - if (DateTime.TryParse(val, out i)) + if (DateTime.TryParse(val, out var i)) { return i.ToUniversalTime(); } diff --git a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs index 7b8964707..b72ad572a 100644 --- a/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs +++ b/MediaBrowser.MediaEncoding/Probing/ProbeResultNormalizer.cs @@ -52,8 +52,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrEmpty(data.format.bit_rate)) { - int value; - if (int.TryParse(data.format.bit_rate, NumberStyles.Any, _usCulture, out value)) + if (int.TryParse(data.format.bit_rate, NumberStyles.Any, _usCulture, out var value)) { info.Bitrate = value; } @@ -579,8 +578,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrEmpty(streamInfo.sample_rate)) { - int value; - if (int.TryParse(streamInfo.sample_rate, NumberStyles.Any, _usCulture, out value)) + if (int.TryParse(streamInfo.sample_rate, NumberStyles.Any, _usCulture, out var value)) { stream.SampleRate = value; } @@ -669,8 +667,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (!string.IsNullOrEmpty(streamInfo.bit_rate)) { - int value; - if (int.TryParse(streamInfo.bit_rate, NumberStyles.Any, _usCulture, out value)) + if (int.TryParse(streamInfo.bit_rate, NumberStyles.Any, _usCulture, out var value)) { bitrate = value; } @@ -679,8 +676,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (bitrate == 0 && formatInfo != null && !string.IsNullOrEmpty(formatInfo.bit_rate) && stream.Type == MediaStreamType.Video) { // If the stream info doesn't have a bitrate get the value from the media format info - int value; - if (int.TryParse(formatInfo.bit_rate, NumberStyles.Any, _usCulture, out value)) + if (int.TryParse(formatInfo.bit_rate, NumberStyles.Any, _usCulture, out var value)) { bitrate = value; } @@ -732,9 +728,7 @@ namespace MediaBrowser.MediaEncoding.Probing return null; } - string val; - - tags.TryGetValue(key, out val); + tags.TryGetValue(key, out var val); return val; } @@ -752,13 +746,10 @@ namespace MediaBrowser.MediaEncoding.Probing { var original = info.display_aspect_ratio; - int height; - int width; - var parts = (original ?? string.Empty).Split(':'); if (!(parts.Length == 2 && - int.TryParse(parts[0], NumberStyles.Any, _usCulture, out width) && - int.TryParse(parts[1], NumberStyles.Any, _usCulture, out height) && + int.TryParse(parts[0], NumberStyles.Any, _usCulture, out var width) && + int.TryParse(parts[1], NumberStyles.Any, _usCulture, out var height) && width > 0 && height > 0)) { @@ -1187,9 +1178,7 @@ namespace MediaBrowser.MediaEncoding.Probing { disc = disc.Split('/')[0]; - int num; - - if (int.TryParse(disc, out num)) + if (int.TryParse(disc, out var num)) { return num; } @@ -1204,8 +1193,7 @@ namespace MediaBrowser.MediaEncoding.Probing if (chapter.tags != null) { - string name; - if (chapter.tags.TryGetValue("title", out name)) + if (chapter.tags.TryGetValue("title", out var name)) { info.Name = name; } @@ -1213,9 +1201,8 @@ namespace MediaBrowser.MediaEncoding.Probing // Limit accuracy to milliseconds to match xml saving var secondsString = chapter.start_time; - double seconds; - if (double.TryParse(secondsString, NumberStyles.Any, CultureInfo.InvariantCulture, out seconds)) + if (double.TryParse(secondsString, NumberStyles.Any, CultureInfo.InvariantCulture, out var seconds)) { var ms = Math.Round(TimeSpan.FromSeconds(seconds).TotalMilliseconds); info.StartPositionTicks = TimeSpan.FromMilliseconds(ms).Ticks; @@ -1269,9 +1256,7 @@ namespace MediaBrowser.MediaEncoding.Probing var year = FFProbeHelpers.GetDictionaryValue(data.format.tags, "WM/OriginalReleaseTime"); if (!string.IsNullOrWhiteSpace(year)) { - int val; - - if (int.TryParse(year, NumberStyles.Integer, _usCulture, out val)) + if (int.TryParse(year, NumberStyles.Integer, _usCulture, out var val)) { video.ProductionYear = val; } @@ -1280,11 +1265,9 @@ namespace MediaBrowser.MediaEncoding.Probing var premiereDateString = FFProbeHelpers.GetDictionaryValue(data.format.tags, "WM/MediaOriginalBroadcastDateTime"); if (!string.IsNullOrWhiteSpace(premiereDateString)) { - DateTime val; - // Credit to MCEBuddy: https://mcebuddy2x.codeplex.com/ // DateTime is reported along with timezone info (typically Z i.e. UTC hence assume None) - if (DateTime.TryParse(year, null, DateTimeStyles.None, out val)) + if (DateTime.TryParse(year, null, DateTimeStyles.None, out var val)) { video.PremiereDate = val.ToUniversalTime(); } diff --git a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs index 7f312eaec..605504418 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/AssParser.cs @@ -61,8 +61,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles long GetTicks(string time) { - TimeSpan span; - return TimeSpan.TryParseExact(time, @"h\:mm\:ss\.ff", _usCulture, out span) + return TimeSpan.TryParseExact(time, @"h\:mm\:ss\.ff", _usCulture, out var span) ? span.Ticks : 0; } diff --git a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs index 02ce71ec3..0606dbdb2 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SrtParser.cs @@ -83,8 +83,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles long GetTicks(string time) { - TimeSpan span; - return TimeSpan.TryParseExact(time, @"hh\:mm\:ss\.fff", _usCulture, out span) + return TimeSpan.TryParseExact(time, @"hh\:mm\:ss\.fff", _usCulture, out var span) ? span.Ticks : (TimeSpan.TryParseExact(time, @"hh\:mm\:ss\,fff", _usCulture, out span) ? span.Ticks : 0); diff --git a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs index 8281de764..2c18a02ef 100644 --- a/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs +++ b/MediaBrowser.MediaEncoding/Subtitles/SsaParser.cs @@ -288,8 +288,7 @@ namespace MediaBrowser.MediaEncoding.Subtitles private static bool IsInteger(string s) { - int i; - if (int.TryParse(s, out i)) + if (int.TryParse(s, out var i)) return true; return false; } diff --git a/MediaBrowser.Model/Configuration/LibraryOptions.cs b/MediaBrowser.Model/Configuration/LibraryOptions.cs index b3d035be2..808c0ed65 100644 --- a/MediaBrowser.Model/Configuration/LibraryOptions.cs +++ b/MediaBrowser.Model/Configuration/LibraryOptions.cs @@ -108,8 +108,7 @@ namespace MediaBrowser.Model.Configuration } } - ImageOption[] options; - if (DefaultImageOptions.TryGetValue(Type, out options)) + if (DefaultImageOptions.TryGetValue(Type, out var options)) { foreach (var i in options) { diff --git a/MediaBrowser.Model/Dlna/ConditionProcessor.cs b/MediaBrowser.Model/Dlna/ConditionProcessor.cs index ae7d17275..dc0c5f139 100644 --- a/MediaBrowser.Model/Dlna/ConditionProcessor.cs +++ b/MediaBrowser.Model/Dlna/ConditionProcessor.cs @@ -129,8 +129,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - int expected; - if (int.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) + if (int.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var expected)) { switch (condition.Condition) { @@ -184,8 +183,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - bool expected; - if (bool.TryParse(condition.Value, out expected)) + if (bool.TryParse(condition.Value, out var expected)) { switch (condition.Condition) { @@ -209,8 +207,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - float expected; - if (float.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) + if (float.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var expected)) { switch (condition.Condition) { @@ -238,8 +235,7 @@ namespace MediaBrowser.Model.Dlna return !condition.IsRequired; } - double expected; - if (double.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out expected)) + if (double.TryParse(condition.Value, NumberStyles.Any, CultureInfo.InvariantCulture, out var expected)) { switch (condition.Condition) { diff --git a/MediaBrowser.Model/Dlna/StreamBuilder.cs b/MediaBrowser.Model/Dlna/StreamBuilder.cs index 2335f0553..4f4054db4 100644 --- a/MediaBrowser.Model/Dlna/StreamBuilder.cs +++ b/MediaBrowser.Model/Dlna/StreamBuilder.cs @@ -688,8 +688,7 @@ namespace MediaBrowser.Model.Dlna if (!string.IsNullOrEmpty(transcodingProfile.MaxAudioChannels)) { - int transcodingMaxAudioChannels; - if (int.TryParse(transcodingProfile.MaxAudioChannels, NumberStyles.Any, CultureInfo.InvariantCulture, out transcodingMaxAudioChannels)) + if (int.TryParse(transcodingProfile.MaxAudioChannels, NumberStyles.Any, CultureInfo.InvariantCulture, out var transcodingMaxAudioChannels)) { playlistItem.TranscodingMaxAudioChannels = transcodingMaxAudioChannels; } @@ -1491,8 +1490,7 @@ namespace MediaBrowser.Model.Dlna continue; } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1526,8 +1524,7 @@ namespace MediaBrowser.Model.Dlna } } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1551,8 +1548,7 @@ namespace MediaBrowser.Model.Dlna continue; } - bool isAvc; - if (bool.TryParse(value, out isAvc)) + if (bool.TryParse(value, out var isAvc)) { if (isAvc && condition.Condition == ProfileConditionType.Equals) { @@ -1572,8 +1568,7 @@ namespace MediaBrowser.Model.Dlna continue; } - bool isAnamorphic; - if (bool.TryParse(value, out isAnamorphic)) + if (bool.TryParse(value, out var isAnamorphic)) { if (isAnamorphic && condition.Condition == ProfileConditionType.Equals) { @@ -1603,8 +1598,7 @@ namespace MediaBrowser.Model.Dlna } } - bool isInterlaced; - if (bool.TryParse(value, out isInterlaced)) + if (bool.TryParse(value, out var isInterlaced)) { if (!isInterlaced && condition.Condition == ProfileConditionType.Equals) { @@ -1645,8 +1639,7 @@ namespace MediaBrowser.Model.Dlna } } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1680,8 +1673,7 @@ namespace MediaBrowser.Model.Dlna } } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1727,8 +1719,7 @@ namespace MediaBrowser.Model.Dlna continue; } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1752,8 +1743,7 @@ namespace MediaBrowser.Model.Dlna continue; } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1777,8 +1767,7 @@ namespace MediaBrowser.Model.Dlna continue; } - float num; - if (float.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (float.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1802,8 +1791,7 @@ namespace MediaBrowser.Model.Dlna continue; } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { @@ -1827,8 +1815,7 @@ namespace MediaBrowser.Model.Dlna continue; } - int num; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var num)) { if (condition.Condition == ProfileConditionType.Equals) { diff --git a/MediaBrowser.Model/Dlna/StreamInfo.cs b/MediaBrowser.Model/Dlna/StreamInfo.cs index 84bd1f429..99c545cc0 100644 --- a/MediaBrowser.Model/Dlna/StreamInfo.cs +++ b/MediaBrowser.Model/Dlna/StreamInfo.cs @@ -56,8 +56,7 @@ namespace MediaBrowser.Model.Dlna public string GetOption(string name) { - string value; - if (StreamOptions.TryGetValue(name, out value)) + if (StreamOptions.TryGetValue(name, out var value)) { return value; } @@ -622,8 +621,7 @@ namespace MediaBrowser.Model.Dlna return null; } - int result; - if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out result)) + if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -639,8 +637,7 @@ namespace MediaBrowser.Model.Dlna return null; } - int result; - if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out result)) + if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -656,8 +653,7 @@ namespace MediaBrowser.Model.Dlna return null; } - double result; - if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result)) + if (double.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -673,8 +669,7 @@ namespace MediaBrowser.Model.Dlna return null; } - int result; - if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out result)) + if (int.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var result)) { return result; } @@ -781,8 +776,7 @@ namespace MediaBrowser.Model.Dlna return defaultValue; } - int result; - if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out result)) + if (int.TryParse(value, NumberStyles.Integer, CultureInfo.InvariantCulture, out var result)) { return Math.Min(result, defaultValue ?? result); } diff --git a/MediaBrowser.Model/Drawing/ImageSize.cs b/MediaBrowser.Model/Drawing/ImageSize.cs index b27df346c..87764bbf4 100644 --- a/MediaBrowser.Model/Drawing/ImageSize.cs +++ b/MediaBrowser.Model/Drawing/ImageSize.cs @@ -69,9 +69,7 @@ namespace MediaBrowser.Model.Drawing if (parts.Length == 2) { - double val; - - if (double.TryParse(parts[0], NumberStyles.Any, CultureInfo.InvariantCulture, out val)) + if (double.TryParse(parts[0], NumberStyles.Any, CultureInfo.InvariantCulture, out var val)) { _width = val; } diff --git a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs index 3957f9dbe..437572d57 100644 --- a/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs +++ b/MediaBrowser.Model/Entities/ProviderIdsExtensions.cs @@ -48,8 +48,7 @@ namespace MediaBrowser.Model.Entities return null; } - string id; - instance.ProviderIds.TryGetValue(name, out id); + instance.ProviderIds.TryGetValue(name, out var id); return id; } diff --git a/MediaBrowser.Model/Net/MimeTypes.cs b/MediaBrowser.Model/Net/MimeTypes.cs index 77cba0f71..3891417c7 100644 --- a/MediaBrowser.Model/Net/MimeTypes.cs +++ b/MediaBrowser.Model/Net/MimeTypes.cs @@ -132,8 +132,7 @@ namespace MediaBrowser.Model.Net var ext = Path.GetExtension(path) ?? string.Empty; - string result; - if (MimeTypeLookup.TryGetValue(ext, out result)) + if (MimeTypeLookup.TryGetValue(ext, out var result)) { return result; } @@ -339,8 +338,7 @@ namespace MediaBrowser.Model.Net // handle text/html; charset=UTF-8 mimeType = mimeType.Split(';')[0]; - string result; - if (ExtensionLookup.TryGetValue(mimeType, out result)) + if (ExtensionLookup.TryGetValue(mimeType, out var result)) { return result; } diff --git a/MediaBrowser.Providers/Manager/ProviderManager.cs b/MediaBrowser.Providers/Manager/ProviderManager.cs index ec6ecaad3..915c260bf 100644 --- a/MediaBrowser.Providers/Manager/ProviderManager.cs +++ b/MediaBrowser.Providers/Manager/ProviderManager.cs @@ -968,8 +968,7 @@ namespace MediaBrowser.Providers.Manager { lock (_activeRefreshes) { - double value; - if (_activeRefreshes.TryGetValue(id, out value)) + if (_activeRefreshes.TryGetValue(id, out var value)) { return value; } @@ -1029,7 +1028,6 @@ namespace MediaBrowser.Providers.Manager private async Task StartProcessingRefreshQueue() { - Tuple refreshItem; var libraryManager = _libraryManagerFactory(); if (_disposed) @@ -1039,7 +1037,7 @@ namespace MediaBrowser.Providers.Manager var cancellationToken = _disposeCancellationTokenSource.Token; - while (_refreshQueue.TryDequeue(out refreshItem)) + while (_refreshQueue.TryDequeue(out var refreshItem)) { if (_disposed) { diff --git a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs b/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs index 71e979e2c..b67edf50a 100644 --- a/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs +++ b/MediaBrowser.Providers/Manager/SimplePriorityQueue.cs @@ -133,8 +133,7 @@ namespace Priority_Queue return false; } - SimpleNode node; - if (_queue.TryDequeue(out node)) + if (_queue.TryDequeue(out var node)) { item = node.Data; return true; diff --git a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs index 45d3b11b6..80c93f157 100644 --- a/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs +++ b/MediaBrowser.Providers/MediaInfo/FFProbeVideoInfo.cs @@ -251,12 +251,10 @@ namespace MediaBrowser.Providers.MediaInfo foreach (var chapter in chapters) { - TimeSpan time; - // Check if the name is empty and/or if the name is a time // Some ripping programs do that. if (string.IsNullOrWhiteSpace(chapter.Name) || - TimeSpan.TryParse(chapter.Name, out time)) + TimeSpan.TryParse(chapter.Name, out var time)) { chapter.Name = string.Format(_localization.GetLocalizedString("ChapterNameValue"), index.ToString(CultureInfo.InvariantCulture)); } diff --git a/MediaBrowser.Providers/Movies/FanartMovieImageProvider.cs b/MediaBrowser.Providers/Movies/FanartMovieImageProvider.cs index 79e61f6a7..63d99db9b 100644 --- a/MediaBrowser.Providers/Movies/FanartMovieImageProvider.cs +++ b/MediaBrowser.Providers/Movies/FanartMovieImageProvider.cs @@ -168,7 +168,6 @@ namespace MediaBrowser.Providers.Movies if (!string.IsNullOrEmpty(url)) { var likesString = i.likes; - int likes; var info = new RemoteImageInfo { @@ -181,7 +180,7 @@ namespace MediaBrowser.Providers.Movies Language = i.lang }; - if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out likes)) + if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out var likes)) { info.CommunityRating = likes; } diff --git a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs index ff294966b..10d3e5e9d 100644 --- a/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs +++ b/MediaBrowser.Providers/Movies/GenericMovieDbInfo.cs @@ -161,10 +161,9 @@ namespace MediaBrowser.Providers.Movies } } - float rating; string voteAvg = movieData.vote_average.ToString(CultureInfo.InvariantCulture); - if (float.TryParse(voteAvg, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out rating)) + if (float.TryParse(voteAvg, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var rating)) { movie.CommunityRating = rating; } @@ -195,10 +194,8 @@ namespace MediaBrowser.Providers.Movies if (!string.IsNullOrWhiteSpace(movieData.release_date)) { - DateTime r; - // These dates are always in this exact format - if (DateTime.TryParse(movieData.release_date, _usCulture, DateTimeStyles.None, out r)) + if (DateTime.TryParse(movieData.release_date, _usCulture, DateTimeStyles.None, out var r)) { movie.PremiereDate = r.ToUniversalTime(); movie.ProductionYear = movie.PremiereDate.Value.Year; diff --git a/MediaBrowser.Providers/Movies/MovieDbProvider.cs b/MediaBrowser.Providers/Movies/MovieDbProvider.cs index 88d9a346b..a1ad57ea5 100644 --- a/MediaBrowser.Providers/Movies/MovieDbProvider.cs +++ b/MediaBrowser.Providers/Movies/MovieDbProvider.cs @@ -86,10 +86,8 @@ namespace MediaBrowser.Providers.Movies if (!string.IsNullOrWhiteSpace(obj.release_date)) { - DateTime r; - // These dates are always in this exact format - if (DateTime.TryParse(obj.release_date, _usCulture, DateTimeStyles.None, out r)) + if (DateTime.TryParse(obj.release_date, _usCulture, DateTimeStyles.None, out var r)) { remoteResult.PremiereDate = r.ToUniversalTime(); remoteResult.ProductionYear = remoteResult.PremiereDate.Value.Year; diff --git a/MediaBrowser.Providers/Movies/MovieDbSearch.cs b/MediaBrowser.Providers/Movies/MovieDbSearch.cs index 95f1935a3..47d3d21bd 100644 --- a/MediaBrowser.Providers/Movies/MovieDbSearch.cs +++ b/MediaBrowser.Providers/Movies/MovieDbSearch.cs @@ -180,10 +180,8 @@ namespace MediaBrowser.Providers.Movies if (!string.IsNullOrWhiteSpace(i.release_date)) { - DateTime r; - // These dates are always in this exact format - if (DateTime.TryParseExact(i.release_date, "yyyy-MM-dd", EnUs, DateTimeStyles.None, out r)) + if (DateTime.TryParseExact(i.release_date, "yyyy-MM-dd", EnUs, DateTimeStyles.None, out var r)) { remoteResult.PremiereDate = r.ToUniversalTime(); remoteResult.ProductionYear = remoteResult.PremiereDate.Value.Year; @@ -235,10 +233,8 @@ namespace MediaBrowser.Providers.Movies if (!string.IsNullOrWhiteSpace(i.first_air_date)) { - DateTime r; - // These dates are always in this exact format - if (DateTime.TryParseExact(i.first_air_date, "yyyy-MM-dd", EnUs, DateTimeStyles.None, out r)) + if (DateTime.TryParseExact(i.first_air_date, "yyyy-MM-dd", EnUs, DateTimeStyles.None, out var r)) { remoteResult.PremiereDate = r.ToUniversalTime(); remoteResult.ProductionYear = remoteResult.PremiereDate.Value.Year; diff --git a/MediaBrowser.Providers/Music/Extensions.cs b/MediaBrowser.Providers/Music/Extensions.cs index 4753e8ea4..68020b9de 100644 --- a/MediaBrowser.Providers/Music/Extensions.cs +++ b/MediaBrowser.Providers/Music/Extensions.cs @@ -47,8 +47,7 @@ namespace MediaBrowser.Providers.Music public static string GetMusicBrainzArtistId(this AlbumInfo info) { - string id; - info.ProviderIds.TryGetValue(MetadataProviders.MusicBrainzAlbumArtist.ToString(), out id); + info.ProviderIds.TryGetValue(MetadataProviders.MusicBrainzAlbumArtist.ToString(), out var id); if (string.IsNullOrEmpty(id)) { @@ -66,8 +65,7 @@ namespace MediaBrowser.Providers.Music public static string GetMusicBrainzArtistId(this ArtistInfo info) { - string id; - info.ProviderIds.TryGetValue(MetadataProviders.MusicBrainzArtist.ToString(), out id); + info.ProviderIds.TryGetValue(MetadataProviders.MusicBrainzArtist.ToString(), out var id); if (string.IsNullOrEmpty(id)) { diff --git a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs b/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs index 09c11899b..3a87c2778 100644 --- a/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs +++ b/MediaBrowser.Providers/Music/FanArtAlbumProvider.cs @@ -163,7 +163,6 @@ namespace MediaBrowser.Providers.Music if (!string.IsNullOrEmpty(url)) { var likesString = i.likes; - int likes; var info = new RemoteImageInfo { @@ -176,7 +175,7 @@ namespace MediaBrowser.Providers.Music Language = i.lang }; - if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out likes)) + if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out var likes)) { info.CommunityRating = likes; } diff --git a/MediaBrowser.Providers/Music/FanArtArtistProvider.cs b/MediaBrowser.Providers/Music/FanArtArtistProvider.cs index 9d63484a8..a7456bdc0 100644 --- a/MediaBrowser.Providers/Music/FanArtArtistProvider.cs +++ b/MediaBrowser.Providers/Music/FanArtArtistProvider.cs @@ -161,7 +161,6 @@ namespace MediaBrowser.Providers.Music if (!string.IsNullOrEmpty(url)) { var likesString = i.likes; - int likes; var info = new RemoteImageInfo { @@ -174,7 +173,7 @@ namespace MediaBrowser.Providers.Music Language = i.lang }; - if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out likes)) + if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out var likes)) { info.CommunityRating = likes; } diff --git a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs index 3c54b2d2f..3ad968449 100644 --- a/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs +++ b/MediaBrowser.Providers/Music/MusicBrainzAlbumProvider.cs @@ -413,8 +413,7 @@ namespace MediaBrowser.Providers.Music case "date": { var val = reader.ReadElementContentAsString(); - DateTime date; - if (DateTime.TryParse(val, out date)) + if (DateTime.TryParse(val, out var date)) { result.Year = date.Year; } diff --git a/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs b/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs index 5dab978c0..646d0a5be 100644 --- a/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbItemProvider.cs @@ -161,16 +161,14 @@ namespace MediaBrowser.Providers.Omdb item.SetProviderId(MetadataProviders.Imdb, result.imdbID); - int parsedYear; if (result.Year.Length > 0 - && int.TryParse(result.Year.Substring(0, Math.Min(result.Year.Length, 4)), NumberStyles.Integer, CultureInfo.InvariantCulture, out parsedYear)) + && int.TryParse(result.Year.Substring(0, Math.Min(result.Year.Length, 4)), NumberStyles.Integer, CultureInfo.InvariantCulture, out var parsedYear)) { item.ProductionYear = parsedYear; } - DateTime released; if (!string.IsNullOrEmpty(result.Released) - && DateTime.TryParse(result.Released, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out released)) + && DateTime.TryParse(result.Released, CultureInfo.InvariantCulture, DateTimeStyles.AllowWhiteSpaces, out var released)) { item.PremiereDate = released; } diff --git a/MediaBrowser.Providers/Omdb/OmdbProvider.cs b/MediaBrowser.Providers/Omdb/OmdbProvider.cs index 618e5eb2d..44e4202bf 100644 --- a/MediaBrowser.Providers/Omdb/OmdbProvider.cs +++ b/MediaBrowser.Providers/Omdb/OmdbProvider.cs @@ -58,10 +58,8 @@ namespace MediaBrowser.Providers.Omdb } } - int year; - if (!string.IsNullOrEmpty(result.Year) && result.Year.Length >= 4 - && int.TryParse(result.Year.Substring(0, 4), NumberStyles.Number, _usCulture, out year) + && int.TryParse(result.Year.Substring(0, 4), NumberStyles.Number, _usCulture, out var year) && year >= 0) { item.ProductionYear = year; @@ -74,19 +72,15 @@ namespace MediaBrowser.Providers.Omdb item.CriticRating = tomatoScore; } - int voteCount; - if (!string.IsNullOrEmpty(result.imdbVotes) - && int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount) + && int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out var voteCount) && voteCount >= 0) { //item.VoteCount = voteCount; } - float imdbRating; - if (!string.IsNullOrEmpty(result.imdbRating) - && float.TryParse(result.imdbRating, NumberStyles.Any, _usCulture, out imdbRating) + && float.TryParse(result.imdbRating, NumberStyles.Any, _usCulture, out var imdbRating) && imdbRating >= 0) { item.CommunityRating = imdbRating; @@ -165,10 +159,8 @@ namespace MediaBrowser.Providers.Omdb } } - int year; - if (!string.IsNullOrEmpty(result.Year) && result.Year.Length >= 4 - && int.TryParse(result.Year.Substring(0, 4), NumberStyles.Number, _usCulture, out year) + && int.TryParse(result.Year.Substring(0, 4), NumberStyles.Number, _usCulture, out var year) && year >= 0) { item.ProductionYear = year; @@ -181,19 +173,15 @@ namespace MediaBrowser.Providers.Omdb item.CriticRating = tomatoScore; } - int voteCount; - if (!string.IsNullOrEmpty(result.imdbVotes) - && int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out voteCount) + && int.TryParse(result.imdbVotes, NumberStyles.Number, _usCulture, out var voteCount) && voteCount >= 0) { //item.VoteCount = voteCount; } - float imdbRating; - if (!string.IsNullOrEmpty(result.imdbRating) - && float.TryParse(result.imdbRating, NumberStyles.Any, _usCulture, out imdbRating) + && float.TryParse(result.imdbRating, NumberStyles.Any, _usCulture, out var imdbRating) && imdbRating >= 0) { item.CommunityRating = imdbRating; @@ -254,8 +242,7 @@ namespace MediaBrowser.Providers.Omdb internal static bool IsValidSeries(Dictionary seriesProviderIds) { - string id; - if (seriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out id) && !string.IsNullOrEmpty(id)) + if (seriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out var id) && !string.IsNullOrEmpty(id)) { // This check should ideally never be necessary but we're seeing some cases of this and haven't tracked them down yet. if (!string.IsNullOrWhiteSpace(id)) @@ -515,8 +502,7 @@ namespace MediaBrowser.Providers.Omdb if (rating != null && rating.Value != null) { var value = rating.Value.TrimEnd('%'); - float score; - if (float.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out score)) + if (float.TryParse(value, NumberStyles.Any, CultureInfo.InvariantCulture, out var score)) { return score; } diff --git a/MediaBrowser.Providers/People/MovieDbPersonProvider.cs b/MediaBrowser.Providers/People/MovieDbPersonProvider.cs index 9d9d8fef3..dc6ce842e 100644 --- a/MediaBrowser.Providers/People/MovieDbPersonProvider.cs +++ b/MediaBrowser.Providers/People/MovieDbPersonProvider.cs @@ -167,9 +167,7 @@ namespace MediaBrowser.Providers.People } item.Overview = info.biography; - DateTime date; - - if (DateTime.TryParseExact(info.birthday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out date)) + if (DateTime.TryParseExact(info.birthday, "yyyy-MM-dd", new CultureInfo("en-US"), DateTimeStyles.None, out var date)) { item.PremiereDate = date.ToUniversalTime(); } diff --git a/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs b/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs index 9d537f3df..493729446 100644 --- a/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs +++ b/MediaBrowser.Providers/TV/FanArt/FanArtSeasonProvider.cs @@ -161,15 +161,12 @@ namespace MediaBrowser.Providers.TV var url = i.url; var season = i.season; - int imageSeasonNumber; - if (!string.IsNullOrEmpty(url) && !string.IsNullOrEmpty(season) && - int.TryParse(season, NumberStyles.Integer, _usCulture, out imageSeasonNumber) && + int.TryParse(season, NumberStyles.Integer, _usCulture, out var imageSeasonNumber) && seasonNumber == imageSeasonNumber) { var likesString = i.likes; - int likes; var info = new RemoteImageInfo { @@ -182,7 +179,7 @@ namespace MediaBrowser.Providers.TV Language = i.lang }; - if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out likes)) + if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out var likes)) { info.CommunityRating = likes; } diff --git a/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs b/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs index abdd0c7bf..7f3bc323e 100644 --- a/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/FanArt/FanartSeriesProvider.cs @@ -179,7 +179,6 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrEmpty(url) && isSeasonValid) { var likesString = i.likes; - int likes; var info = new RemoteImageInfo { @@ -192,7 +191,7 @@ namespace MediaBrowser.Providers.TV Language = i.lang }; - if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out likes)) + if (!string.IsNullOrEmpty(likesString) && int.TryParse(likesString, NumberStyles.Integer, _usCulture, out var likes)) { info.CommunityRating = likes; } diff --git a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs index 945d9777d..8da6d4523 100644 --- a/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/MissingEpisodeProvider.cs @@ -76,13 +76,9 @@ namespace MediaBrowser.Providers.TV if (parts.Length == 3) { - int seasonNumber; - - if (int.TryParse(parts[1], NumberStyles.Integer, _usCulture, out seasonNumber)) + if (int.TryParse(parts[1], NumberStyles.Integer, _usCulture, out var seasonNumber)) { - int episodeNumber; - - if (int.TryParse(parts[2], NumberStyles.Integer, _usCulture, out episodeNumber)) + if (int.TryParse(parts[2], NumberStyles.Integer, _usCulture, out var episodeNumber)) { return new ValueTuple(seasonNumber, episodeNumber); } @@ -506,8 +502,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - if (DateTime.TryParse(val, out date)) + if (DateTime.TryParse(val, out var date)) { airDate = date.ToUniversalTime(); } diff --git a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs index e37e867e5..38bb83694 100644 --- a/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/Omdb/OmdbEpisodeProvider.cs @@ -56,8 +56,7 @@ namespace MediaBrowser.Providers.TV return result; } - string seriesImdbId; - if (info.SeriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out seriesImdbId) && !string.IsNullOrEmpty(seriesImdbId)) + if (info.SeriesProviderIds.TryGetValue(MetadataProviders.Imdb.ToString(), out var seriesImdbId) && !string.IsNullOrEmpty(seriesImdbId)) { if (info.IndexNumber.HasValue && info.ParentIndexNumber.HasValue) { diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs index 49f73286d..08e541ecf 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbEpisodeProvider.cs @@ -71,8 +71,7 @@ namespace MediaBrowser.Providers.TV return result; } - string seriesTmdbId; - info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out seriesTmdbId); + info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out var seriesTmdbId); if (string.IsNullOrEmpty(seriesTmdbId)) { diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs index a29fd46df..3a40aed7b 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeasonProvider.cs @@ -44,8 +44,7 @@ namespace MediaBrowser.Providers.TV { var result = new MetadataResult(); - string seriesTmdbId; - info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out seriesTmdbId); + info.SeriesProviderIds.TryGetValue(MetadataProviders.Tmdb.ToString(), out var seriesTmdbId); var seasonNumber = info.IndexNumber; diff --git a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs index 0844862db..2cadaec86 100644 --- a/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TheMovieDb/MovieDbSeriesProvider.cs @@ -219,9 +219,8 @@ namespace MediaBrowser.Providers.TV //series.VoteCount = seriesInfo.vote_count; string voteAvg = seriesInfo.vote_average.ToString(CultureInfo.InvariantCulture); - float rating; - if (float.TryParse(voteAvg, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out rating)) + if (float.TryParse(voteAvg, NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var rating)) { series.CommunityRating = rating; } diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs index c594cb923..39d2fa77a 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeImageProvider.cs @@ -94,10 +94,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { width = rval; } @@ -111,10 +109,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { height = rval; } diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs index dc0a785ec..c4edb43ff 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbEpisodeProvider.cs @@ -401,8 +401,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - if (DateTime.TryParse(val, out date)) + if (DateTime.TryParse(val, out var date)) { date = date.ToUniversalTime(); @@ -482,10 +481,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { episodeNumber = rval; } @@ -500,10 +497,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { seasonNumber = rval; } @@ -518,9 +513,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - float num; - - if (float.TryParse(val, NumberStyles.Any, _usCulture, out num)) + if (float.TryParse(val, NumberStyles.Any, _usCulture, out var num)) { combinedEpisodeNumber = Convert.ToInt32(num); } @@ -535,9 +528,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - float num; - - if (float.TryParse(val, NumberStyles.Any, _usCulture, out num)) + if (float.TryParse(val, NumberStyles.Any, _usCulture, out var num)) { combinedSeasonNumber = Convert.ToInt32(num); } @@ -552,10 +543,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { item.AirsBeforeEpisodeNumber = rval; } @@ -570,10 +559,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { item.AirsAfterSeasonNumber = rval; } @@ -588,10 +575,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { item.AirsBeforeSeasonNumber = rval; } @@ -631,10 +616,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - float rval; - // float.TryParse is local aware, so it can be probamatic, force us culture - if (float.TryParse(val, NumberStyles.AllowDecimalPoint, _usCulture, out rval)) + if (float.TryParse(val, NumberStyles.AllowDecimalPoint, _usCulture, out var rval)) { item.CommunityRating = rval; } @@ -647,10 +630,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { //item.VoteCount = rval; } @@ -665,8 +646,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - if (DateTime.TryParse(val, out date)) + if (DateTime.TryParse(val, out var date)) { date = date.ToUniversalTime(); diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbPrescanTask.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbPrescanTask.cs index 33fefc29c..c4a132d45 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbPrescanTask.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbPrescanTask.cs @@ -161,9 +161,7 @@ namespace MediaBrowser.Providers.TV newUpdateTime = seriesToUpdate.Item2; - long lastUpdateValue; - - long.TryParse(lastUpdateTime, NumberStyles.Any, UsCulture, out lastUpdateValue); + long.TryParse(lastUpdateTime, NumberStyles.Any, UsCulture, out var lastUpdateValue); var nullableUpdateValue = lastUpdateValue == 0 ? (long?)null : lastUpdateValue; diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs index 4cdfb4b11..af36d1ebf 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeasonImageProvider.cs @@ -201,9 +201,7 @@ namespace MediaBrowser.Providers.TV { var val = reader.ReadElementContentAsString() ?? string.Empty; - double rval; - - if (double.TryParse(val, NumberStyles.Any, UsCulture, out rval)) + if (double.TryParse(val, NumberStyles.Any, UsCulture, out var rval)) { rating = rval; } @@ -215,9 +213,7 @@ namespace MediaBrowser.Providers.TV { var val = reader.ReadElementContentAsString() ?? string.Empty; - int rval; - - if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, UsCulture, out var rval)) { voteCount = rval; } @@ -252,9 +248,7 @@ namespace MediaBrowser.Providers.TV if (resolutionParts.Length == 2) { - int rval; - - if (int.TryParse(resolutionParts[0], NumberStyles.Integer, UsCulture, out rval)) + if (int.TryParse(resolutionParts[0], NumberStyles.Integer, UsCulture, out var rval)) { width = rval; } diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs index 3ee1bf7dc..82fa14f49 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesImageProvider.cs @@ -197,9 +197,7 @@ namespace MediaBrowser.Providers.TV { var val = reader.ReadElementContentAsString() ?? string.Empty; - double rval; - - if (double.TryParse(val, NumberStyles.Any, _usCulture, out rval)) + if (double.TryParse(val, NumberStyles.Any, _usCulture, out var rval)) { rating = rval; } @@ -211,9 +209,7 @@ namespace MediaBrowser.Providers.TV { var val = reader.ReadElementContentAsString() ?? string.Empty; - int rval; - - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { voteCount = rval; } @@ -255,9 +251,7 @@ namespace MediaBrowser.Providers.TV if (resolutionParts.Length == 2) { - int rval; - - if (int.TryParse(resolutionParts[0], NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(resolutionParts[0], NumberStyles.Integer, _usCulture, out var rval)) { width = rval; } diff --git a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs index 958312633..f55c52b5b 100644 --- a/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs +++ b/MediaBrowser.Providers/TV/TheTVDB/TvdbSeriesProvider.cs @@ -137,8 +137,7 @@ namespace MediaBrowser.Providers.TV { var series = result.Item; - string id; - if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out id) && !string.IsNullOrEmpty(id)) + if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out var id) && !string.IsNullOrEmpty(id)) { series.SetProviderId(MetadataProviders.Tvdb, id); } @@ -389,8 +388,7 @@ namespace MediaBrowser.Providers.TV internal static bool IsValidSeries(Dictionary seriesProviderIds) { - string id; - if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out id)) + if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out var id)) { // This check should ideally never be necessary but we're seeing some cases of this and haven't tracked them down yet. if (!string.IsNullOrWhiteSpace(id)) @@ -426,8 +424,7 @@ namespace MediaBrowser.Providers.TV try { - string seriesId; - if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out seriesId) && !string.IsNullOrWhiteSpace(seriesId)) + if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out var seriesId) && !string.IsNullOrWhiteSpace(seriesId)) { var seriesDataPath = GetSeriesDataPath(_config.ApplicationPaths, seriesProviderIds); @@ -721,8 +718,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - if (DateTime.TryParse(val, out date)) + if (DateTime.TryParse(val, out var date)) { searchResult.ProductionYear = date.Year; } @@ -926,8 +922,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - if (DateTime.TryParse(val, out date)) + if (DateTime.TryParse(val, out var date)) { airDate = date.ToUniversalTime(); } @@ -942,10 +937,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { seasonNumber = rval; } @@ -1086,10 +1079,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { personInfo.SortOrder = rval; } @@ -1195,10 +1186,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - float rval; - // float.TryParse is local aware, so it can be probamatic, force us culture - if (float.TryParse(val, NumberStyles.AllowDecimalPoint, _usCulture, out rval)) + if (float.TryParse(val, NumberStyles.AllowDecimalPoint, _usCulture, out var rval)) { item.CommunityRating = rval; } @@ -1211,10 +1200,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { //item.VoteCount = rval; } @@ -1253,9 +1240,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - SeriesStatus seriesStatus; - - if (Enum.TryParse(val, true, out seriesStatus)) + if (Enum.TryParse(val, true, out SeriesStatus seriesStatus)) item.Status = seriesStatus; } @@ -1268,8 +1253,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - if (DateTime.TryParse(val, out date)) + if (DateTime.TryParse(val, out var date)) { date = date.ToUniversalTime(); @@ -1287,10 +1271,8 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var rval)) { item.RunTimeTicks = TimeSpan.FromMinutes(rval).Ticks; } @@ -1455,8 +1437,7 @@ namespace MediaBrowser.Providers.TV var val = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(val)) { - int num; - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var num)) { episodeNumber = num; } @@ -1470,9 +1451,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - float num; - - if (float.TryParse(val, NumberStyles.Any, _usCulture, out num)) + if (float.TryParse(val, NumberStyles.Any, _usCulture, out var num)) { dvdEpisodeNumber = num; } @@ -1487,9 +1466,7 @@ namespace MediaBrowser.Providers.TV if (!string.IsNullOrWhiteSpace(val)) { - float num; - - if (float.TryParse(val, NumberStyles.Any, _usCulture, out num)) + if (float.TryParse(val, NumberStyles.Any, _usCulture, out var num)) { dvdSeasonNumber = Convert.ToInt32(num); } @@ -1503,8 +1480,7 @@ namespace MediaBrowser.Providers.TV var val = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(val)) { - int num; - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var num)) { absoluteNumber = num; } @@ -1517,8 +1493,7 @@ namespace MediaBrowser.Providers.TV var val = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(val)) { - int num; - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out num)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var num)) { seasonNumber = num; } @@ -1542,8 +1517,7 @@ namespace MediaBrowser.Providers.TV var hasEpisodeChanged = true; if (!string.IsNullOrWhiteSpace(lastUpdateString) && lastTvDbUpdateTime.HasValue) { - long num; - if (long.TryParse(lastUpdateString, NumberStyles.Any, _usCulture, out num)) + if (long.TryParse(lastUpdateString, NumberStyles.Any, _usCulture, out var num)) { hasEpisodeChanged = num >= lastTvDbUpdateTime.Value; } @@ -1618,8 +1592,7 @@ namespace MediaBrowser.Providers.TV /// System.String. internal static string GetSeriesDataPath(IApplicationPaths appPaths, Dictionary seriesProviderIds) { - string seriesId; - if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out seriesId) && !string.IsNullOrEmpty(seriesId)) + if (seriesProviderIds.TryGetValue(MetadataProviders.Tvdb.ToString(), out var seriesId) && !string.IsNullOrEmpty(seriesId)) { var seriesDataPath = Path.Combine(GetSeriesDataPath(appPaths), seriesId); diff --git a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs index 3744df9b4..47cad3e1b 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/BaseNfoParser.cs @@ -239,8 +239,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (index != -1) { var tmdbId = xml.Substring(index + srch.Length).TrimEnd('/').Split('-')[0]; - int value; - if (!string.IsNullOrWhiteSpace(tmdbId) && int.TryParse(tmdbId, NumberStyles.Integer, CultureInfo.InvariantCulture, out value)) + if (!string.IsNullOrWhiteSpace(tmdbId) && int.TryParse(tmdbId, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value)) { item.SetProviderId(MetadataProviders.Tmdb, value.ToString(_usCulture)); } @@ -255,8 +254,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (index != -1) { var tvdbId = xml.Substring(index + srch.Length).TrimEnd('/'); - int value; - if (!string.IsNullOrWhiteSpace(tvdbId) && int.TryParse(tvdbId, NumberStyles.Integer, CultureInfo.InvariantCulture, out value)) + if (!string.IsNullOrWhiteSpace(tvdbId) && int.TryParse(tvdbId, NumberStyles.Integer, CultureInfo.InvariantCulture, out var value)) { item.SetProviderId(MetadataProviders.Tvdb, value.ToString(_usCulture)); } @@ -277,8 +275,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - DateTime added; - if (DateTime.TryParseExact(val, BaseNfoSaver.DateAddedFormat, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out added)) + if (DateTime.TryParseExact(val, BaseNfoSaver.DateAddedFormat, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out var added)) { item.DateCreated = added.ToUniversalTime(); } @@ -316,8 +313,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrEmpty(text)) { - float value; - if (float.TryParse(text, NumberStyles.Any, _usCulture, out value)) + if (float.TryParse(text, NumberStyles.Any, _usCulture, out var value)) { item.CriticRating = value; } @@ -377,9 +373,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers { item.LockedFields = val.Split('|').Select(i => { - MetadataFields field; - - if (Enum.TryParse(i, true, out field)) + if (Enum.TryParse(i, true, out MetadataFields field)) { return (MetadataFields?)field; } @@ -445,8 +439,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(text)) { - int runtime; - if (int.TryParse(text.Split(' ')[0], NumberStyles.Integer, _usCulture, out runtime)) + if (int.TryParse(text.Split(' ')[0], NumberStyles.Integer, _usCulture, out var runtime)) { item.RunTimeTicks = TimeSpan.FromMinutes(runtime).Ticks; } @@ -599,8 +592,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int productionYear; - if (int.TryParse(val, out productionYear) && productionYear > 1850) + if (int.TryParse(val, out var productionYear) && productionYear > 1850) { item.ProductionYear = productionYear; } @@ -616,9 +608,8 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(rating)) { - float val; // All external meta is saving this as '.' for decimal I believe...but just to be sure - if (float.TryParse(rating.Replace(',', '.'), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out val)) + if (float.TryParse(rating.Replace(',', '.'), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out var val)) { item.CommunityRating = val; } @@ -637,9 +628,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - - if (DateTime.TryParseExact(val, formatString, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out date) && date.Year > 1850) + if (DateTime.TryParseExact(val, formatString, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out var date) && date.Year > 1850) { item.PremiereDate = date.ToUniversalTime(); item.ProductionYear = date.Year; @@ -657,9 +646,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - DateTime date; - - if (DateTime.TryParseExact(val, formatString, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out date) && date.Year > 1850) + if (DateTime.TryParseExact(val, formatString, CultureInfo.InvariantCulture, DateTimeStyles.AssumeLocal, out var date) && date.Year > 1850) { item.EndDate = date.ToUniversalTime(); } @@ -715,8 +702,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers default: string readerName = reader.Name; - string providerIdValue; - if (_validProviderIds.TryGetValue(readerName, out providerIdValue)) + if (_validProviderIds.TryGetValue(readerName, out var providerIdValue)) { var id = reader.ReadElementContentAsString(); if (!string.IsNullOrWhiteSpace(id)) @@ -906,8 +892,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int intVal; - if (int.TryParse(val, NumberStyles.Integer, _usCulture, out intVal)) + if (int.TryParse(val, NumberStyles.Integer, _usCulture, out var intVal)) { sortOrder = intVal; } diff --git a/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs index 5ba695cc3..c76f8345a 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/EpisodeNfoParser.cs @@ -97,9 +97,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(number)) { - int num; - - if (int.TryParse(number, out num)) + if (int.TryParse(number, out var num)) { item.ParentIndexNumber = num; } @@ -113,9 +111,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(number)) { - int num; - - if (int.TryParse(number, out num)) + if (int.TryParse(number, out var num)) { item.IndexNumber = num; } @@ -129,9 +125,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(number)) { - int num; - - if (int.TryParse(number, out num)) + if (int.TryParse(number, out var num)) { item.IndexNumberEnd = num; } @@ -145,10 +139,8 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, UsCulture, out var rval)) { item.AirsBeforeEpisodeNumber = rval; } @@ -163,10 +155,8 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, UsCulture, out var rval)) { item.AirsAfterSeasonNumber = rval; } @@ -181,10 +171,8 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, UsCulture, out var rval)) { item.AirsBeforeSeasonNumber = rval; } @@ -199,10 +187,8 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, UsCulture, out var rval)) { item.AirsBeforeSeasonNumber = rval; } @@ -217,10 +203,8 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(val)) { - int rval; - // int.TryParse is local aware, so it can be probamatic, force us culture - if (int.TryParse(val, NumberStyles.Integer, UsCulture, out rval)) + if (int.TryParse(val, NumberStyles.Integer, UsCulture, out var rval)) { item.AirsBeforeEpisodeNumber = rval; } diff --git a/MediaBrowser.XbmcMetadata/Parsers/SeasonNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/SeasonNfoParser.cs index 57aea88a3..17f36d82d 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/SeasonNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/SeasonNfoParser.cs @@ -28,9 +28,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(number)) { - int num; - - if (int.TryParse(number, NumberStyles.Integer, CultureInfo.InvariantCulture, out num)) + if (int.TryParse(number, NumberStyles.Integer, CultureInfo.InvariantCulture, out var num)) { item.IndexNumber = num; } diff --git a/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs b/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs index 571fc5035..700656b65 100644 --- a/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs +++ b/MediaBrowser.XbmcMetadata/Parsers/SeriesNfoParser.cs @@ -75,8 +75,7 @@ namespace MediaBrowser.XbmcMetadata.Parsers if (!string.IsNullOrWhiteSpace(status)) { - SeriesStatus seriesStatus; - if (Enum.TryParse(status, true, out seriesStatus)) + if (Enum.TryParse(status, true, out SeriesStatus seriesStatus)) { item.Status = seriesStatus; } diff --git a/SocketHttpListener/Ext.cs b/SocketHttpListener/Ext.cs index 1251d19c0..b9894ca8f 100644 --- a/SocketHttpListener/Ext.cs +++ b/SocketHttpListener/Ext.cs @@ -932,9 +932,8 @@ namespace SocketHttpListener /// public static Uri ToUri(this string uriString) { - Uri res; return Uri.TryCreate( - uriString, uriString.MaybeUri() ? UriKind.Absolute : UriKind.Relative, out res) + uriString, uriString.MaybeUri() ? UriKind.Absolute : UriKind.Relative, out var res) ? res : null; } diff --git a/SocketHttpListener/Net/CookieHelper.cs b/SocketHttpListener/Net/CookieHelper.cs index c59756c77..3ad76ff23 100644 --- a/SocketHttpListener/Net/CookieHelper.cs +++ b/SocketHttpListener/Net/CookieHelper.cs @@ -43,13 +43,12 @@ namespace SocketHttpListener.Net if (i < pairs.Length - 1) buffer.AppendFormat(", {0}", pairs[++i].Trim()); - DateTime expires; if (!DateTime.TryParseExact( buffer.ToString(), new[] { "ddd, dd'-'MMM'-'yyyy HH':'mm':'ss 'GMT'", "r" }, new CultureInfo("en-US"), DateTimeStyles.AdjustToUniversal | DateTimeStyles.AssumeUniversal, - out expires)) + out var expires)) expires = DateTime.Now; if (cookie != null && cookie.Expires == DateTime.MinValue) diff --git a/SocketHttpListener/Net/HttpEndPointListener.cs b/SocketHttpListener/Net/HttpEndPointListener.cs index d002c13b2..c78d186c5 100644 --- a/SocketHttpListener/Net/HttpEndPointListener.cs +++ b/SocketHttpListener/Net/HttpEndPointListener.cs @@ -277,8 +277,7 @@ namespace SocketHttpListener.Net public bool BindContext(HttpListenerContext context) { var req = context.Request; - ListenerPrefix prefix; - var listener = SearchListener(req.Url, out prefix); + var listener = SearchListener(req.Url, out var prefix); if (listener == null) return false; diff --git a/SocketHttpListener/Net/HttpEndPointManager.cs b/SocketHttpListener/Net/HttpEndPointManager.cs index 98986333b..07b6331f2 100644 --- a/SocketHttpListener/Net/HttpEndPointManager.cs +++ b/SocketHttpListener/Net/HttpEndPointManager.cs @@ -57,8 +57,7 @@ namespace SocketHttpListener.Net int root = p.IndexOf('/', colon, p.Length - colon); string portString = p.Substring(colon + 1, root - colon - 1); - int port; - if (!int.TryParse(portString, out port) || port <= 0 || port >= 65536) + if (!int.TryParse(portString, out var port) || port <= 0 || port >= 65536) { throw new HttpListenerException((int)HttpStatusCode.BadRequest, "net_invalid_port"); } diff --git a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs index 310c71a0d..52e70b68b 100644 --- a/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs +++ b/SocketHttpListener/Net/HttpListenerRequestUriBuilder.cs @@ -232,8 +232,7 @@ namespace SocketHttpListener.Net { // http.sys only supports %uXXXX (4 hex-digits), even though unicode code points could have up to // 6 hex digits. Therefore we parse always 4 characters after %u and convert them to an int. - int codePointValue; - if (!int.TryParse(codePoint, NumberStyles.HexNumber, null, out codePointValue)) + if (!int.TryParse(codePoint, NumberStyles.HexNumber, null, out var codePointValue)) { //if (NetEventSource.IsEnabled) // NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_percent_value, codePoint)); @@ -264,8 +263,7 @@ namespace SocketHttpListener.Net private bool AddPercentEncodedOctetToRawOctetsList(Encoding encoding, string escapedCharacter) { - byte encodedValue; - if (!byte.TryParse(escapedCharacter, NumberStyles.HexNumber, null, out encodedValue)) + if (!byte.TryParse(escapedCharacter, NumberStyles.HexNumber, null, out var encodedValue)) { //if (NetEventSource.IsEnabled) NetEventSource.Error(this, SR.Format(SR.net_log_listener_cant_convert_percent_value, escapedCharacter)); return false; diff --git a/SocketHttpListener/Net/WebHeaderCollection.cs b/SocketHttpListener/Net/WebHeaderCollection.cs index 02d3cf61f..c56d2ef38 100644 --- a/SocketHttpListener/Net/WebHeaderCollection.cs +++ b/SocketHttpListener/Net/WebHeaderCollection.cs @@ -208,8 +208,7 @@ namespace SocketHttpListener.Net if (!IsHeaderName(headerName)) throw new ArgumentException("Invalid character in header"); - HeaderInfo info; - if (!headers.TryGetValue(headerName, out info)) + if (!headers.TryGetValue(headerName, out var info)) return false; var flag = response ? HeaderInfo.Response : HeaderInfo.Request; @@ -313,8 +312,7 @@ namespace SocketHttpListener.Net if (headerName == null) return false; - HeaderInfo info; - return headers.TryGetValue(headerName, out info) && (info & HeaderInfo.MultiValue) != 0; + return headers.TryGetValue(headerName, out var info) && (info & HeaderInfo.MultiValue) != 0; } internal static bool IsHeaderValue(string value) diff --git a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs index f51f72dba..5f77ff565 100644 --- a/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs +++ b/SocketHttpListener/Net/WebSockets/HttpWebSocket.Managed.cs @@ -26,12 +26,11 @@ namespace SocketHttpListener.Net.WebSockets string origin = request.Headers[HttpKnownHeaderNames.Origin]; string[] secWebSocketProtocols = null; - string outgoingSecWebSocketProtocolString; bool shouldSendSecWebSocketProtocolHeader = ProcessWebSocketProtocolHeader( request.Headers[HttpKnownHeaderNames.SecWebSocketProtocol], subProtocol, - out outgoingSecWebSocketProtocolString); + out var outgoingSecWebSocketProtocolString); if (shouldSendSecWebSocketProtocolHeader) { -- cgit v1.2.3