1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Fix redirect after deleting item (#5930)

* 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 6e36915f5e.

* Fix redirect after deleting item

Redirects to the parent of an item instead of homepage
after deleting the item
This commit is contained in:
DrWarpMan 2024-08-23 20:17:59 +02:00 committed by GitHub
parent 18ddf4956a
commit 5bd61d82a3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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);
}