Skip to content

Commit

Permalink
Merge pull request xbmc#24652 from ksooo/video-versions-fix-infodialo…
Browse files Browse the repository at this point in the history
…g-playback

[video] Fix video info dialog play button to always play the version …
  • Loading branch information
ksooo committed Feb 6, 2024
2 parents ca059b3 + a5316f7 commit 2237f2c
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions xbmc/video/dialogs/GUIDialogVideoInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -753,11 +753,19 @@ class CVideoPlayActionProcessor : public VIDEO::GUILIB::CVideoPlayActionProcesso
private:
void Play()
{
m_item->SetProperty("playlist_type_hint", PLAYLIST::TYPE_VIDEO);
const ContentUtils::PlayMode mode{m_item->GetProperty("CheckAutoPlayNextItem").asBoolean()
auto item{m_item};
if (item->m_bIsFolder && item->HasVideoVersions())
{
//! @todo get rid of "videos with versions as folder" hack!
item = std::make_shared<CFileItem>(*item);
item->m_bIsFolder = false;
}

item->SetProperty("playlist_type_hint", PLAYLIST::TYPE_VIDEO);
const ContentUtils::PlayMode mode{item->GetProperty("CheckAutoPlayNextItem").asBoolean()
? ContentUtils::PlayMode::CHECK_AUTO_PLAY_NEXT_ITEM
: ContentUtils::PlayMode::PLAY_ONLY_THIS};
VIDEO_UTILS::PlayItem(m_item, "", mode);
VIDEO_UTILS::PlayItem(item, "", mode);
}
};
} // unnamed namespace
Expand Down

0 comments on commit 2237f2c

Please sign in to comment.