diff options
| author | Shadowghost <Shadowghost@users.noreply.github.com> | 2024-11-19 15:43:18 -0500 |
|---|---|---|
| committer | Joshua M. Boniface <joshua@boniface.me> | 2024-11-19 15:43:18 -0500 |
| commit | 6e7118eff1e6bc9c5ca70d80e5ff5e6eff7c90e5 (patch) | |
| tree | 3bd1be51beb405825eb2a6ceaa49ecdd591f3b72 /MediaBrowser.Controller | |
| parent | 27b044493a24df6abe92c811c8e6dbdcb316b6aa (diff) | |
Backport pull request #12934 from jellyfin/release-10.10.z
Fix playlists
Original-merge: 8bee67f1f8dab604d745b3d077330085f7f111d4
Merged-by: crobibero <cody@robibe.ro>
Backported-by: Joshua M. Boniface <joshua@boniface.me>
Diffstat (limited to 'MediaBrowser.Controller')
| -rw-r--r-- | MediaBrowser.Controller/Entities/LinkedChild.cs | 7 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs | 13 | ||||
| -rw-r--r-- | MediaBrowser.Controller/Playlists/IPlaylistManager.cs | 3 |
3 files changed, 4 insertions, 19 deletions
diff --git a/MediaBrowser.Controller/Entities/LinkedChild.cs b/MediaBrowser.Controller/Entities/LinkedChild.cs index fd5fef3dc..98e4f525f 100644 --- a/MediaBrowser.Controller/Entities/LinkedChild.cs +++ b/MediaBrowser.Controller/Entities/LinkedChild.cs @@ -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, diff --git a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs index f8049cd48..e4806109a 100644 --- a/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs +++ b/MediaBrowser.Controller/Extensions/ConfigurationExtensions.cs @@ -50,11 +50,6 @@ namespace MediaBrowser.Controller.Extensions 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> public const string BindToUnixSocketKey = "kestrel:socket"; @@ -121,14 +116,6 @@ namespace MediaBrowser.Controller.Extensions => 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> /// <param name="configuration">The configuration to read the setting from.</param> diff --git a/MediaBrowser.Controller/Playlists/IPlaylistManager.cs b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs index 038cbd2d6..497c4a511 100644 --- a/MediaBrowser.Controller/Playlists/IPlaylistManager.cs +++ b/MediaBrowser.Controller/Playlists/IPlaylistManager.cs @@ -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. |
