diff options
author | ksooo <3226626+ksooo@users.noreply.github.com> | 2023-09-03 13:24:35 +0200 |
---|---|---|
committer | ksooo <3226626+ksooo@users.noreply.github.com> | 2023-09-03 19:09:34 +0200 |
commit | b06f51f3b962f9254a8fcc880d460cf2084c9603 (patch) | |
tree | ec667b316244bcf3b900895463f0b2e1bdb4422d | |
parent | 9b6709e0e694e5651e1028d0b49b103e093a51c8 (diff) | |
download | xbmc-b06f51f3b962f9254a8fcc880d460cf2084c9603.tar.xz |
[video] Fix 'Local art' missing in art selection dialog.
-rw-r--r-- | xbmc/video/dialogs/GUIDialogVideoInfo.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp index 2d662994d4..f33515a2bc 100644 --- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp +++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp @@ -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) @@ -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()) @@ -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 { @@ -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; |