Bug Collection FanArt selection issue with patch
#1
When I group movies into collections, I can not always change the collection fanart to the one I want. The problem is "fanart://RemoteN" text is not counting all the remote fanarts for every movie. It goes back to 0 when the fanart for the next movie in the collection starts. This patch adds another index to count all fanart to fix it.

This patch is for Helix branch. Same issue on master can be fixed in a similar way.

Code:
diff --git a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
index 02b42e8..b45b2d5 100644
--- a/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
+++ b/xbmc/video/dialogs/GUIDialogVideoInfo.cpp
@@ -1917,15 +1917,15 @@ bool CGUIDialogVideoInfo::OnGetFanart(const CFileItemPtr &videoItem)
     CStdString baseDir = StringUtils::Format("videodb://movies/sets/%d", videoItem->GetVideoInfoTag()->m_iDbId);
     if (videodb.GetMoviesNav(baseDir, movies))
     {
-      for (int i=0; i < movies.Size(); i++)
+      for (int i=0, iFanart=0; i < movies.Size(); i++)
       {
         // ensure the fanart is unpacked
         movies[i]->GetVideoInfoTag()->m_fanart.Unpack();

         // Grab the thumbnails from the web
-        for (unsigned int j = 0; j < movies[i]->GetVideoInfoTag()->m_fanart.GetNumFanarts(); j++)
+        for (unsigned int j = 0; j < movies[i]->GetVideoInfoTag()->m_fanart.GetNumFanarts(); j++, iFanart++)
         {
-          CStdString strItemPath = StringUtils::Format("fanart://Remote%i",j);
+          CStdString strItemPath = StringUtils::Format("fanart://Remote%i",iFanart);
           CFileItemPtr item(new CFileItem(strItemPath, false));
           CStdString thumb = movies[i]->GetVideoInfoTag()->m_fanart.GetPreviewURL(j);
           item->SetArt("thumb", CTextureUtils::GetWrappedThumbURL(thumb));
Reply
#2
Makes sense.
Could you please submit a Pull Request on github?
Reply

Logout Mark Read Team Forum Stats Members Help
Collection FanArt selection issue with patch0