diff options
Diffstat (limited to 'MediaBrowser.Api')
| -rw-r--r-- | MediaBrowser.Api/ApiEntryPoint.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/EnvironmentService.cs | 4 | ||||
| -rw-r--r-- | MediaBrowser.Api/Library/LibraryStructureService.cs | 12 | ||||
| -rw-r--r-- | MediaBrowser.Api/LiveTv/LiveTvService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/BaseStreamingService.cs | 8 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/BaseHlsService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/Playback/MediaInfoService.cs | 1 | ||||
| -rw-r--r-- | MediaBrowser.Api/PluginService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/Properties/AssemblyInfo.cs | 21 | ||||
| -rw-r--r-- | MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs | 2 | ||||
| -rw-r--r-- | MediaBrowser.Api/UserLibrary/ItemsService.cs | 10 |
12 files changed, 31 insertions, 37 deletions
diff --git a/MediaBrowser.Api/ApiEntryPoint.cs b/MediaBrowser.Api/ApiEntryPoint.cs index 7f7e48a3a..ef782ddfc 100644 --- a/MediaBrowser.Api/ApiEntryPoint.cs +++ b/MediaBrowser.Api/ApiEntryPoint.cs @@ -388,7 +388,7 @@ namespace MediaBrowser.Api { if (string.IsNullOrEmpty(playSessionId)) { - throw new ArgumentNullException("playSessionId"); + throw new ArgumentNullException(nameof(playSessionId)); } //Logger.LogDebug("PingTranscodingJob PlaySessionId={0} isUsedPaused: {1}", playSessionId, isUserPaused); diff --git a/MediaBrowser.Api/EnvironmentService.cs b/MediaBrowser.Api/EnvironmentService.cs index 6794a9304..d67867820 100644 --- a/MediaBrowser.Api/EnvironmentService.cs +++ b/MediaBrowser.Api/EnvironmentService.cs @@ -124,7 +124,7 @@ namespace MediaBrowser.Api { if (networkManager == null) { - throw new ArgumentNullException("networkManager"); + throw new ArgumentNullException(nameof(networkManager)); } _networkManager = networkManager; @@ -193,7 +193,7 @@ namespace MediaBrowser.Api if (string.IsNullOrEmpty(path)) { - throw new ArgumentNullException("Path"); + throw new ArgumentNullException(nameof(Path)); } var networkPrefix = UncSeparatorString + UncSeparatorString; diff --git a/MediaBrowser.Api/Library/LibraryStructureService.cs b/MediaBrowser.Api/Library/LibraryStructureService.cs index bba89acec..cd839e0f8 100644 --- a/MediaBrowser.Api/Library/LibraryStructureService.cs +++ b/MediaBrowser.Api/Library/LibraryStructureService.cs @@ -192,7 +192,7 @@ namespace MediaBrowser.Api.Library { if (appPaths == null) { - throw new ArgumentNullException("appPaths"); + throw new ArgumentNullException(nameof(appPaths)); } _appPaths = appPaths; @@ -244,12 +244,12 @@ namespace MediaBrowser.Api.Library { if (string.IsNullOrWhiteSpace(request.Name)) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } if (string.IsNullOrWhiteSpace(request.NewName)) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } var rootFolderPath = _appPaths.DefaultUserViewsPath; @@ -322,7 +322,7 @@ namespace MediaBrowser.Api.Library { if (string.IsNullOrWhiteSpace(request.Name)) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } _libraryMonitor.Stop(); @@ -370,7 +370,7 @@ namespace MediaBrowser.Api.Library { if (string.IsNullOrWhiteSpace(request.Name)) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } _libraryManager.UpdateMediaPath(request.Name, request.PathInfo); @@ -384,7 +384,7 @@ namespace MediaBrowser.Api.Library { if (string.IsNullOrWhiteSpace(request.Name)) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } _libraryMonitor.Stop(); diff --git a/MediaBrowser.Api/LiveTv/LiveTvService.cs b/MediaBrowser.Api/LiveTv/LiveTvService.cs index ef9ce9aec..fc645898c 100644 --- a/MediaBrowser.Api/LiveTv/LiveTvService.cs +++ b/MediaBrowser.Api/LiveTv/LiveTvService.cs @@ -1030,7 +1030,7 @@ namespace MediaBrowser.Api.LiveTv query.IsKids = request.IsKids; query.IsSports = request.IsSports; query.SeriesTimerId = request.SeriesTimerId; - query.Genres = (request.Genres ?? String.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); + query.Genres = (request.Genres ?? string.Empty).Split(new[] { ',' }, StringSplitOptions.RemoveEmptyEntries); query.GenreIds = GetGuids(request.GenreIds); if (!request.LibrarySeriesId.Equals(Guid.Empty)) diff --git a/MediaBrowser.Api/Playback/BaseStreamingService.cs b/MediaBrowser.Api/Playback/BaseStreamingService.cs index 9cddcde49..ba7f7070b 100644 --- a/MediaBrowser.Api/Playback/BaseStreamingService.cs +++ b/MediaBrowser.Api/Playback/BaseStreamingService.cs @@ -1,4 +1,4 @@ -using MediaBrowser.Common.Extensions; +using MediaBrowser.Common.Extensions; using MediaBrowser.Controller.Configuration; using MediaBrowser.Controller.Devices; using MediaBrowser.Controller.Dlna; @@ -595,8 +595,10 @@ namespace MediaBrowser.Api.Playback /// <param name="request">The stream request.</param> private void ParseStreamOptions(StreamRequest request) { - foreach (var param in Request.QueryString) { - if (Char.IsLower(param.Name[0])) { + foreach (var param in Request.QueryString) + { + if (char.IsLower(param.Name[0])) + { // This was probably not parsed initially and should be a StreamOptions // TODO: This should be incorporated either in the lower framework for parsing requests // or the generated URL should correctly serialize it diff --git a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs index 954963b2f..3e17d0b74 100644 --- a/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/BaseHlsService.cs @@ -269,7 +269,7 @@ namespace MediaBrowser.Api.Playback.Hls { var outputTsArg = Path.Combine(FileSystem.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d" + GetSegmentFileExtension(state.Request); - var timeDeltaParam = String.Empty; + var timeDeltaParam = string.Empty; var segmentFormat = GetSegmentFileExtension(state.Request).TrimStart('.'); if (string.Equals(segmentFormat, "ts", StringComparison.OrdinalIgnoreCase)) diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index 5361e313c..ff3712f8a 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -934,7 +934,7 @@ namespace MediaBrowser.Api.Playback.Hls var outputTsArg = Path.Combine(FileSystem.GetDirectoryName(outputPath), Path.GetFileNameWithoutExtension(outputPath)) + "%d" + GetSegmentFileExtension(state.Request); - var timeDeltaParam = String.Empty; + var timeDeltaParam = string.Empty; if (isEncoding && startNumber > 0) { diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs index a0b0b2ced..b0154cc7e 100644 --- a/MediaBrowser.Api/Playback/MediaInfoService.cs +++ b/MediaBrowser.Api/Playback/MediaInfoService.cs @@ -262,6 +262,7 @@ namespace MediaBrowser.Api.Playback catch (Exception ex) { mediaSources = new List<MediaSourceInfo>(); + // TODO Log exception // TODO PlaybackException ?? //result.ErrorCode = ex.ErrorCode; } diff --git a/MediaBrowser.Api/PluginService.cs b/MediaBrowser.Api/PluginService.cs index 12488b712..c5a94e77c 100644 --- a/MediaBrowser.Api/PluginService.cs +++ b/MediaBrowser.Api/PluginService.cs @@ -155,7 +155,7 @@ namespace MediaBrowser.Api { if (jsonSerializer == null) { - throw new ArgumentNullException("jsonSerializer"); + throw new ArgumentNullException(nameof(jsonSerializer)); } _appHost = appHost; diff --git a/MediaBrowser.Api/Properties/AssemblyInfo.cs b/MediaBrowser.Api/Properties/AssemblyInfo.cs index 2755924c8..f86723031 100644 --- a/MediaBrowser.Api/Properties/AssemblyInfo.cs +++ b/MediaBrowser.Api/Properties/AssemblyInfo.cs @@ -1,4 +1,5 @@ -using System.Reflection; +using System.Reflection; +using System.Resources; using System.Runtime.InteropServices; // General Information about an assembly is controlled through the following @@ -7,24 +8,14 @@ using System.Runtime.InteropServices; [assembly: AssemblyTitle("MediaBrowser.Api")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("MediaBrowser.Api")] -[assembly: AssemblyCopyright("Copyright © 2012")] +[assembly: AssemblyCompany("Jellyfin Project")] +[assembly: AssemblyProduct("Jellyfin: The Free Software Media System")] +[assembly: AssemblyCopyright("Copyright © 2019 Jellyfin Contributors. Code released under the GNU General Public License Version 2")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] +[assembly: NeutralResourcesLanguage("en")] // Setting ComVisible to false makes the types in this assembly not visible // to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] - -// The following GUID is for the ID of the typelib if this project is exposed to COM -[assembly: Guid("13464b02-f033-48b8-9e1c-d071f8860935")] - -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// diff --git a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs index ef9b3c1ae..719e80082 100644 --- a/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs +++ b/MediaBrowser.Api/ScheduledTasks/ScheduledTaskService.cs @@ -101,7 +101,7 @@ namespace MediaBrowser.Api.ScheduledTasks { if (taskManager == null) { - throw new ArgumentNullException("taskManager"); + throw new ArgumentNullException(nameof(taskManager)); } TaskManager = taskManager; diff --git a/MediaBrowser.Api/UserLibrary/ItemsService.cs b/MediaBrowser.Api/UserLibrary/ItemsService.cs index aa17e85f3..e2febc25d 100644 --- a/MediaBrowser.Api/UserLibrary/ItemsService.cs +++ b/MediaBrowser.Api/UserLibrary/ItemsService.cs @@ -62,19 +62,19 @@ namespace MediaBrowser.Api.UserLibrary { if (userManager == null) { - throw new ArgumentNullException("userManager"); + throw new ArgumentNullException(nameof(userManager)); } if (libraryManager == null) { - throw new ArgumentNullException("libraryManager"); + throw new ArgumentNullException(nameof(libraryManager)); } if (localization == null) { - throw new ArgumentNullException("localization"); + throw new ArgumentNullException(nameof(localization)); } if (dtoService == null) { - throw new ArgumentNullException("dtoService"); + throw new ArgumentNullException(nameof(dtoService)); } _userManager = userManager; @@ -143,7 +143,7 @@ namespace MediaBrowser.Api.UserLibrary { if (request == null) { - throw new ArgumentNullException("request"); + throw new ArgumentNullException(nameof(request)); } var result = GetItems(request); |
