mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-10-18 04:20:54 -04:00
Fix playlist move from smaller to larger index (#14794)
This commit is contained in:
parent
eaf33f01e1
commit
091cb1c34a
@ -314,7 +314,7 @@ namespace Emby.Server.Implementations.Playlists
|
||||
return;
|
||||
}
|
||||
|
||||
var newPriorItemIndex = newIndex > oldIndexAccessible ? newIndex : newIndex - 1 < 0 ? 0 : newIndex - 1;
|
||||
var newPriorItemIndex = Math.Max(newIndex - 1, 0);
|
||||
var newPriorItemId = accessibleChildren[newPriorItemIndex].Item1.ItemId;
|
||||
var newPriorItemIndexOnAllChildren = children.FindIndex(c => c.Item1.ItemId.Equals(newPriorItemId));
|
||||
var adjustedNewIndex = DetermineAdjustedIndex(newPriorItemIndexOnAllChildren, newIndex);
|
||||
|
Loading…
x
Reference in New Issue
Block a user