From 210c64facecfe2527decb5a6bc65b2b9fe2d7b31 Mon Sep 17 00:00:00 2001 From: ksooo <3226626+ksooo@users.noreply.github.com> Date: Tue, 13 Aug 2024 23:22:05 +0200 Subject: [video][windows] Fix videos provided by plugins not played from info dialog for certain settings combination. --- xbmc/video/VideoUtils.cpp | 13 ++++++++----- xbmc/windows/GUIMediaWindow.cpp | 8 ++++++-- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/xbmc/video/VideoUtils.cpp b/xbmc/video/VideoUtils.cpp index 8f54b248ec..6b3edf0bf7 100644 --- a/xbmc/video/VideoUtils.cpp +++ b/xbmc/video/VideoUtils.cpp @@ -133,12 +133,15 @@ void CAsyncGetItemsForPlaylist::GetItemsForPlaylist(const std::shared_ptrm_bIsFolder) { - // check if it's a folder with dvd or bluray files, then just add the relevant file - const std::string mediapath = item->GetOpticalMediaPath(); - if (!mediapath.empty()) + if (!item->IsPlugin()) { - m_queuedItems.Add(std::make_shared(mediapath, false)); - return; + // check if it's a folder with dvd or bluray files, then just add the relevant file + const std::string mediapath = item->GetOpticalMediaPath(); + if (!mediapath.empty()) + { + m_queuedItems.Add(std::make_shared(mediapath, false)); + return; + } } // Check if we add a locked share diff --git a/xbmc/windows/GUIMediaWindow.cpp b/xbmc/windows/GUIMediaWindow.cpp index 5dacf417a1..6881bc9f3e 100644 --- a/xbmc/windows/GUIMediaWindow.cpp +++ b/xbmc/windows/GUIMediaWindow.cpp @@ -767,6 +767,12 @@ bool CGUIMediaWindow::GetDirectory(const std::string &strDirectory, CFileItemLis m_history.RemoveParentPath(); } + // Store parent path along with item as parent path cannot safely be calculated from item's path. + for (const auto& item : items) + { + item->SetProperty("ParentPath", m_vecItems->GetPath()); + } + // update the view state's reference to the current items m_guiState.reset(CGUIViewState::GetViewState(GetID(), items)); @@ -1756,8 +1762,6 @@ bool CGUIMediaWindow::OnPopupMenu(int itemIdx) if (!item) return false; - item->SetProperty("ParentPath", m_vecItems->GetPath()); - CContextButtons buttons; //Add items from plugin -- cgit v1.2.3