From 40074c643356afa50c93794fcd32a85766fdc70e Mon Sep 17 00:00:00 2001 From: Kevin G Date: Mon, 24 Jun 2024 18:06:16 -0500 Subject: [PATCH] Fix playlist item count variable name Signed-off-by: Kevin G --- src/components/itemContextMenu.js | 4 ++-- src/components/shortcuts.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/components/itemContextMenu.js b/src/components/itemContextMenu.js index 4bf5bf9b85..ee70af15cf 100644 --- a/src/components/itemContextMenu.js +++ b/src/components/itemContextMenu.js @@ -299,7 +299,7 @@ export function getCommands(options) { }); } - if (item.PlaylistItemId && options.playlistId && item.PlaylistIndex < (item.PlaylistItems - 1)) { + if (item.PlaylistItemId && options.playlistId && item.PlaylistIndex < (item.PlaylistItemCount - 1)) { commands.push({ name: globalize.translate('MoveToBottom'), id: 'movetobottom', @@ -585,7 +585,7 @@ function executeCommand(item, id, options) { break; case 'movetobottom': apiClient.ajax({ - url: apiClient.getUrl('Playlists/' + options.playlistId + '/Items/' + item.PlaylistItemId + '/Move/' + (item.PlaylistItems - 1)), + url: apiClient.getUrl('Playlists/' + options.playlistId + '/Items/' + item.PlaylistItemId + '/Move/' + (item.PlaylistItemCount - 1)), type: 'POST' }).then(function () { getResolveFunction(resolve, id, true)(); diff --git a/src/components/shortcuts.js b/src/components/shortcuts.js index 7de8ef2aa9..d76fa0c811 100644 --- a/src/components/shortcuts.js +++ b/src/components/shortcuts.js @@ -121,7 +121,7 @@ function showContextMenu(card, options = {}) { } index++; } - item.PlaylistItems = index; + item.PlaylistItemCount = index; } }