mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-12-16 22:13:06 +03:00
Use ArgumentException.ThrowIfNullOrEmpty
This commit is contained in:
@@ -17,12 +17,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="url">Trailer URL.</param>
|
||||
public static void AddTrailerUrl(this BaseItem item, string url)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(url);
|
||||
|
||||
if (url.Length == 0)
|
||||
{
|
||||
throw new ArgumentException("String can't be empty", nameof(url));
|
||||
}
|
||||
ArgumentException.ThrowIfNullOrEmpty(url);
|
||||
|
||||
var current = item.RemoteTrailers.FirstOrDefault(i => string.Equals(i.Url, url, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user