Skip to content

Commit

Permalink
[video] Fix 'Local art' missing in art selection dialog.
Browse files Browse the repository at this point in the history
  • Loading branch information
ksooo committed Sep 3, 2023
1 parent 9b6709e commit b06f51f
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions xbmc/video/dialogs/GUIDialogVideoInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1996,6 +1996,8 @@ bool CGUIDialogVideoInfo::ManageVideoItemArtwork(const std::shared_ptr<CFileItem
}
}

std::string localThumb;

bool local = false;
std::vector<std::string> thumbs;
if (type != MediaTypeArtist)
Expand Down Expand Up @@ -2056,8 +2058,7 @@ bool CGUIDialogVideoInfo::ManageVideoItemArtwork(const std::shared_ptr<CFileItem
else
noneitem->SetArt("icon", "DefaultActor.png");
}

if (type == MediaTypeVideoCollection)
else if (type == MediaTypeVideoCollection)
{
std::string localFile = FindLocalMovieSetArtworkFile(item, artType);
if (!localFile.empty())
Expand All @@ -2071,6 +2072,20 @@ bool CGUIDialogVideoInfo::ManageVideoItemArtwork(const std::shared_ptr<CFileItem
else
noneitem->SetArt("icon", "DefaultVideo.png");
}
else
{
localThumb = CVideoThumbLoader::GetLocalArt(*item, artType);
if (!localThumb.empty())
{
const auto localitem = std::make_shared<CFileItem>("thumb://Local", false);
localitem->SetArt("thumb", localThumb);
localitem->SetArt("icon", "DefaultPicture.png");
localitem->SetLabel(g_localizeStrings.Get(13514));
items.Add(localitem);
}
else
noneitem->SetArt("icon", "DefaultPicture.png");
}
}
else
{
Expand Down Expand Up @@ -2126,6 +2141,9 @@ bool CGUIDialogVideoInfo::ManageVideoItemArtwork(const std::shared_ptr<CFileItem
if (result == "thumb://Current")
result = currentThumb; // user chose the one they have

if (result == "thumb://Local")
result = localThumb;

if (result == "thumb://Embedded")
result = embeddedArt;

Expand Down

0 comments on commit b06f51f

Please sign in to comment.