aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Blake <oak99sky@yahoo.co.uk>2020-11-10 06:28:08 +0000
committerGitHub <noreply@github.com>2020-11-10 06:28:08 +0000
commitb5871f5c48df16f862930773bddbd36dc2e13dc5 (patch)
tree739aa2427ffd8607d842d9381798d8ca89364b0b
parent5b06cdf3e64347085484435f2a4963e919edc8ec (diff)
parentc25313aa970119d1ee116c79f45cdc21029d1d2f (diff)
Merge pull request #18754 from enen92/allseasons
[Artwork] Fix season-all posters and manage context menu item
-rw-r--r--xbmc/video/windows/VideoFileItemListModifier.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/xbmc/video/windows/VideoFileItemListModifier.cpp b/xbmc/video/windows/VideoFileItemListModifier.cpp
index d1677682ca..099cbc1d2e 100644
--- a/xbmc/video/windows/VideoFileItemListModifier.cpp
+++ b/xbmc/video/windows/VideoFileItemListModifier.cpp
@@ -81,9 +81,13 @@ void CVideoFileItemListModifier::AddQueuingFolder(CFileItemList& items)
pItem->SetProperty("numepisodes", watched + unwatched); // will be changed later to reflect watchmode setting
pItem->SetProperty("watchedepisodes", watched);
pItem->SetProperty("unwatchedepisodes", unwatched);
- if (items.Size() && items[0]->GetVideoInfoTag())
+
+ // @note: the items list contains the (..) upper directory navigation fileitem plus all the
+ // season directory fileitems for a given show. We want to assign the "All Seasons" listitem
+ // the infotag of the tv show - so do not use the first item in the list!
+ if (items.Size() && items[items.Size() - 1]->GetVideoInfoTag())
{
- *pItem->GetVideoInfoTag() = *items[0]->GetVideoInfoTag();
+ *pItem->GetVideoInfoTag() = *items[items.Size() - 1]->GetVideoInfoTag();
pItem->GetVideoInfoTag()->m_iSeason = -1;
}
pItem->GetVideoInfoTag()->m_strTitle = strLabel;