aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Controller/Entities/BaseItem.cs
diff options
context:
space:
mode:
authorBond-009 <bond.009@outlook.com>2022-12-07 17:17:37 +0100
committerGitHub <noreply@github.com>2022-12-07 17:17:37 +0100
commit584c80e323ac2a1386d86ff9f59e50daf174418e (patch)
tree4dbb2861cb79cf418a76a4b8f364fdc5c62b56f7 /MediaBrowser.Controller/Entities/BaseItem.cs
parentf3c57e6a0ae015dc51cf548a0380d1bed33959c2 (diff)
parent227aa0540bf0d6c00848b0efb8a5e0ece86c7412 (diff)
Merge pull request #8547 from Bond-009/net7
Diffstat (limited to 'MediaBrowser.Controller/Entities/BaseItem.cs')
-rw-r--r--MediaBrowser.Controller/Entities/BaseItem.cs10
1 files changed, 2 insertions, 8 deletions
diff --git a/MediaBrowser.Controller/Entities/BaseItem.cs b/MediaBrowser.Controller/Entities/BaseItem.cs
index b7934bc09..32fe1b3b0 100644
--- a/MediaBrowser.Controller/Entities/BaseItem.cs
+++ b/MediaBrowser.Controller/Entities/BaseItem.cs
@@ -1755,10 +1755,7 @@ namespace MediaBrowser.Controller.Entities
/// <exception cref="ArgumentNullException">Throws if name is null.</exception>
public void AddStudio(string name)
{
- if (string.IsNullOrEmpty(name))
- {
- throw new ArgumentNullException(nameof(name));
- }
+ ArgumentException.ThrowIfNullOrEmpty(name);
var current = Studios;
@@ -1791,10 +1788,7 @@ namespace MediaBrowser.Controller.Entities
/// <exception cref="ArgumentNullException">Throwns if name is null.</exception>
public void AddGenre(string name)
{
- if (string.IsNullOrEmpty(name))
- {
- throw new ArgumentNullException(nameof(name));
- }
+ ArgumentException.ThrowIfNullOrEmpty(name);
var genres = Genres;
if (!genres.Contains(name, StringComparison.OrdinalIgnoreCase))