mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 01:54:42 +01:00
Fix playlists (#12934)
This commit is contained in:
@@ -4,7 +4,6 @@
|
||||
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
@@ -12,7 +11,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
public LinkedChild()
|
||||
{
|
||||
Id = Guid.NewGuid().ToString("N", CultureInfo.InvariantCulture);
|
||||
}
|
||||
|
||||
public string Path { get; set; }
|
||||
@@ -21,9 +19,6 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public string LibraryItemId { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the linked item id.
|
||||
/// </summary>
|
||||
@@ -31,6 +26,8 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
public static LinkedChild Create(BaseItem item)
|
||||
{
|
||||
ArgumentNullException.ThrowIfNull(item);
|
||||
|
||||
var child = new LinkedChild
|
||||
{
|
||||
Path = item.Path,
|
||||
|
||||
@@ -49,11 +49,6 @@ namespace MediaBrowser.Controller.Extensions
|
||||
/// </summary>
|
||||
public const string FfmpegPathKey = "ffmpeg";
|
||||
|
||||
/// <summary>
|
||||
/// The key for a setting that indicates whether playlists should allow duplicate entries.
|
||||
/// </summary>
|
||||
public const string PlaylistsAllowDuplicatesKey = "playlists:allowDuplicates";
|
||||
|
||||
/// <summary>
|
||||
/// The key for a setting that indicates whether kestrel should bind to a unix socket.
|
||||
/// </summary>
|
||||
@@ -120,14 +115,6 @@ namespace MediaBrowser.Controller.Extensions
|
||||
public static bool GetFFmpegImgExtractPerfTradeoff(this IConfiguration configuration)
|
||||
=> configuration.GetValue<bool>(FfmpegImgExtractPerfTradeoffKey);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether playlists should allow duplicate entries from the <see cref="IConfiguration"/>.
|
||||
/// </summary>
|
||||
/// <param name="configuration">The configuration to read the setting from.</param>
|
||||
/// <returns>True if playlists should allow duplicates, otherwise false.</returns>
|
||||
public static bool DoPlaylistsAllowDuplicates(this IConfiguration configuration)
|
||||
=> configuration.GetValue<bool>(PlaylistsAllowDuplicatesKey);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a value indicating whether kestrel should bind to a unix socket from the <see cref="IConfiguration" />.
|
||||
/// </summary>
|
||||
|
||||
@@ -92,8 +92,9 @@ namespace MediaBrowser.Controller.Playlists
|
||||
/// <param name="playlistId">The playlist identifier.</param>
|
||||
/// <param name="entryId">The entry identifier.</param>
|
||||
/// <param name="newIndex">The new index.</param>
|
||||
/// <param name="callingUserId">The calling user.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task MoveItemAsync(string playlistId, string entryId, int newIndex);
|
||||
Task MoveItemAsync(string playlistId, string entryId, int newIndex, Guid callingUserId);
|
||||
|
||||
/// <summary>
|
||||
/// Removed all playlists of a user.
|
||||
|
||||
Reference in New Issue
Block a user