Skip to content

Commit

Permalink
Fix redirect after deleting item (jellyfin#5930)
Browse files Browse the repository at this point in the history
* Fix redirect after deleting item

Redirects to the parent of an item instead of homepage after deleting the item

* Revert "Fix redirect after deleting item"

This reverts commit 6e36915.

* Fix redirect after deleting item

Redirects to the parent of an item instead of homepage
after deleting the item
  • Loading branch information
DrWarpMan authored and kevgrig committed Jan 7, 2025
1 parent af9a217 commit b195f4f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/controllers/itemDetails/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2021,7 +2021,13 @@ export default function (view, params) {
itemContextMenu.show(getContextMenuOptions(selectedItem, user, button))
.then(function (result) {
if (result.deleted) {
appRouter.goHome();
const parentId = selectedItem.SeasonId || selectedItem.SeriesId || selectedItem.ParentId;

if (parentId) {
appRouter.showItem(parentId, item.ServerId);
} else {
appRouter.goHome();
}
} else if (result.updated) {
reload(self, view, params);
}
Expand Down

0 comments on commit b195f4f

Please sign in to comment.