diff options
author | Kai Sommerfeld <3226626+ksooo@users.noreply.github.com> | 2024-08-15 12:06:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-08-15 12:06:33 +0200 |
commit | 5862da7009e7053462c8ac4d10e012baa3bd038e (patch) | |
tree | 75c46a72023166d02518041f6de46d5ac2cb4a36 | |
parent | 57b1b2a0dbde72a9efc0949f05b92bde95dbfed0 (diff) | |
parent | 210c64facecfe2527decb5a6bc65b2b9fe2d7b31 (diff) |
Merge pull request #25611 from ksooo/video-fix-play-from-info-dialog-omega
[Omega][video][windows] Fix videos provided by plugins not played from info …
-rw-r--r-- | xbmc/video/VideoUtils.cpp | 13 | ||||
-rw-r--r-- | 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_ptr<CFileI if (item->m_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<CFileItem>(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<CFileItem>(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 |