xbmc/xbmc — pull request #3568 by jmarshallnz (2013-11-05 00:09:28+00:00)
Title: Fixes for ListItem.IsFoo from outside containers

Currently we have special-casing in place for ListItem.IsSelected, ListItem.IsPlaying and ListItem.IsFolder being called outside a list (thus, no listitem object) which feeds these infobools through GetMultiInfoBool() (even if they don't have associated information) in order to fetch a listitem object to call them on. GetMultiInfoBool grabs the current media window, then the current container, and fetches the listitem to proceed with the call to GetItemBool().

The changes here mean that any ListItem.IsFoo infobool will be instead filtered through GetItemBool() by grabbing the current listitem from the window.

Potentially this may change things if the paths window1->GetCurrentListItem() and window2->GetViewContainerID()->GetListItem() return different items, where window1 is fetched conditioning on having listitems, and window2 conditioned on being a media window.

IMO these should not be different, except in cases where we're doing things we shouldn't be.

@ronie: any ideas where this might be the case? (e.g. maybe where ListItem.IsPlaying/Selected/Folder is being called from inside a dialog perhaps?)