mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-07-16 05:43:54 +03:00
[PR #14794] [MERGED] Fix playlist move from smaller to larger index #14121
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/jellyfin/jellyfin/pull/14794
Author: @kgarner7
Created: 9/13/2025
Status: ✅ Merged
Merged: 9/18/2025
Merged by: @crobibero
Base:
master← Head:fix-playlist-song-reordering📝 Commits (2)
bdfc719Fix playlist move from smaller to larger index2ddee80Update Emby.Server.Implementations/Playlists/PlaylistManager.cs📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
Emby.Server.Implementations/Playlists/PlaylistManager.cs(+1 -1)📄 Description
Changes
When attempting to use the
/moveAPI to move from a smaller index to a larger one, the actual value is one greater.The fix for this is to always remove one from the index (except where it is already zero).
Before:
insertBeforeIndex = newIndex + 1 (from DetermineAdjustedIndex) + 1 (the item is removed from the list) = newIndex + 2After:
insertBeforeIndex = newINdex + 1 (from DetermineAdjustedIndex) - 1 (from this PR) + 1 (item is removed from list, things are offset by 1) = newIndex + 1Issues
Fixes #14792
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.