Skip to content

Commit

Permalink
Merge pull request xbmc#24336 from ksooo/video-versions-select-highli…
Browse files Browse the repository at this point in the history
…ght-default-version

[video] Video versions select dialog: Highlight default version in list of versions
  • Loading branch information
ksooo authored Dec 27, 2023
2 parents 0ac3c88 + f563089 commit 7a09e7d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions xbmc/video/guilib/VideoVersionHelper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,17 @@ std::shared_ptr<const CFileItem> CVideoChooser::ChooseVideo()
else
m_videoExtras.Clear();

CFileItem defaultVideoVersion;
db.GetDefaultVideoVersion(m_item->GetVideoContentType(), m_item->GetVideoInfoTag()->m_iDbId,
defaultVideoVersion);

// find default version item in list and select it
const int defaultDbId{defaultVideoVersion.GetVideoInfoTag()->m_iDbId};
for (const auto& item : m_videoVersions)
{
item->Select(item->GetVideoInfoTag()->m_iDbId == defaultDbId);
}

VideoAssetType itemType{VideoAssetType::VERSION};
while (true)
{
Expand Down

0 comments on commit 7a09e7d

Please sign in to comment.