From c083b29e292c72b65929ea05639e3b5a8a401037 Mon Sep 17 00:00:00 2001 From: crobibero Date: Tue, 1 Dec 2020 11:07:41 -0700 Subject: Use Guid as API parameter type where possible --- Emby.Server.Implementations/Channels/ChannelManager.cs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'Emby.Server.Implementations/Channels') diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 3d97a6ca8d..b8692f0e50 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -538,20 +538,20 @@ namespace Emby.Server.Implementations.Channels return _libraryManager.GetItemIds( new InternalItemsQuery { - IncludeItemTypes = new[] { nameof(Channel) }, - OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) } - }).Select(i => GetChannelFeatures(i.ToString("N", CultureInfo.InvariantCulture))).ToArray(); + IncludeItemTypes = new[] {nameof(Channel)}, + OrderBy = new[] {(ItemSortBy.SortName, SortOrder.Ascending)} + }).Select(i => GetChannelFeatures(i)).ToArray(); } /// - public ChannelFeatures GetChannelFeatures(string id) + public ChannelFeatures GetChannelFeatures(Guid? id) { - if (string.IsNullOrEmpty(id)) + if (!id.HasValue) { throw new ArgumentNullException(nameof(id)); } - var channel = GetChannel(id); + var channel = GetChannel(id.Value); var channelProvider = GetChannelProvider(channel); return GetChannelFeaturesDto(channel, channelProvider, channelProvider.GetChannelFeatures()); -- cgit v1.2.3 From 821ad7999207faf273204500c8c1dcb73f9c3c83 Mon Sep 17 00:00:00 2001 From: crobibero Date: Tue, 1 Dec 2020 11:09:01 -0700 Subject: fix spacing --- Emby.Server.Implementations/Channels/ChannelManager.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Emby.Server.Implementations/Channels') diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index b8692f0e50..57684a4298 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -538,8 +538,8 @@ namespace Emby.Server.Implementations.Channels return _libraryManager.GetItemIds( new InternalItemsQuery { - IncludeItemTypes = new[] {nameof(Channel)}, - OrderBy = new[] {(ItemSortBy.SortName, SortOrder.Ascending)} + IncludeItemTypes = new[] { nameof(Channel) }, + OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) } }).Select(i => GetChannelFeatures(i)).ToArray(); } -- cgit v1.2.3