diff options
| author | Cody Robibero <cody@robibe.ro> | 2021-12-24 14:18:24 -0700 |
|---|---|---|
| committer | Cody Robibero <cody@robibe.ro> | 2021-12-27 07:38:06 -0700 |
| commit | 7bfc6b5679308d3ec816e6f34b0dd54cf0cbd07c (patch) | |
| tree | bfc8446ccf2b89b21052281dacf79760c2bed612 /Emby.Server.Implementations/Channels/ChannelManager.cs | |
| parent | 251b9a5235e728f5b755cfd4b95f844e5e6c435f (diff) | |
Remove more warnings
Diffstat (limited to 'Emby.Server.Implementations/Channels/ChannelManager.cs')
| -rw-r--r-- | Emby.Server.Implementations/Channels/ChannelManager.cs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Emby.Server.Implementations/Channels/ChannelManager.cs b/Emby.Server.Implementations/Channels/ChannelManager.cs index 8702691d1..43c8a451b 100644 --- a/Emby.Server.Implementations/Channels/ChannelManager.cs +++ b/Emby.Server.Implementations/Channels/ChannelManager.cs @@ -130,16 +130,14 @@ namespace Emby.Server.Implementations.Channels var internalChannel = _libraryManager.GetItemById(item.ChannelId); if (internalChannel == null) { - throw new ArgumentException(); + throw new ArgumentException(nameof(item.ChannelId)); } var channel = Channels.FirstOrDefault(i => GetInternalChannelId(i.Name).Equals(internalChannel.Id)); - var supportsDelete = channel as ISupportsDelete; - - if (supportsDelete == null) + if (channel is not ISupportsDelete supportsDelete) { - throw new ArgumentException(); + throw new ArgumentException(nameof(channel)); } return supportsDelete.DeleteItem(item.ExternalId, CancellationToken.None); |
