mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-22 00:35:26 +03:00
Use ArgumentException.ThrowIfNullOrEmpty
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user