mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-17 19:54:47 +01:00
@@ -1,5 +1,3 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System.Text.Json.Serialization;
|
||||
@@ -13,7 +11,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public abstract class BasePluginFolder : Folder, ICollectionFolder
|
||||
{
|
||||
[JsonIgnore]
|
||||
public virtual string CollectionType => null;
|
||||
public virtual string? CollectionType => null;
|
||||
|
||||
[JsonIgnore]
|
||||
public override bool SupportsInheritedParentImages => false;
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
using Jellyfin.Extensions;
|
||||
@@ -19,9 +17,11 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <param name="url">Trailer URL.</param>
|
||||
public static void AddTrailerUrl(this BaseItem item, string url)
|
||||
{
|
||||
if (string.IsNullOrEmpty(url))
|
||||
ArgumentNullException.ThrowIfNull(url, nameof(url));
|
||||
|
||||
if (url.Length == 0)
|
||||
{
|
||||
throw new ArgumentNullException(nameof(url));
|
||||
throw new ArgumentException("String can't be empty", nameof(url));
|
||||
}
|
||||
|
||||
var current = item.RemoteTrailers.FirstOrDefault(i => string.Equals(i.Url, url, StringComparison.OrdinalIgnoreCase));
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#nullable disable
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Jellyfin.Data.Entities;
|
||||
@@ -50,7 +48,7 @@ namespace MediaBrowser.Controller
|
||||
/// <param name="itemId">The item id.</param>
|
||||
/// <param name="client">The client string.</param>
|
||||
/// <returns>The dictionary of custom item display preferences.</returns>
|
||||
Dictionary<string, string> ListCustomItemDisplayPreferences(Guid userId, Guid itemId, string client);
|
||||
Dictionary<string, string?> ListCustomItemDisplayPreferences(Guid userId, Guid itemId, string client);
|
||||
|
||||
/// <summary>
|
||||
/// Sets the custom item display preference for the user and client.
|
||||
@@ -59,7 +57,7 @@ namespace MediaBrowser.Controller
|
||||
/// <param name="itemId">The item id.</param>
|
||||
/// <param name="client">The client id.</param>
|
||||
/// <param name="customPreferences">A dictionary of custom item display preferences.</param>
|
||||
void SetCustomItemDisplayPreferences(Guid userId, Guid itemId, string client, Dictionary<string, string> customPreferences);
|
||||
void SetCustomItemDisplayPreferences(Guid userId, Guid itemId, string client, Dictionary<string, string?> customPreferences);
|
||||
|
||||
/// <summary>
|
||||
/// Saves changes made to the database.
|
||||
|
||||
Reference in New Issue
Block a user