infomanager: fix calls to GetInt() without a valid file item (same as in GetBool()) #5792
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I was looking into the issue brought up by @HitcherUK in http://forum.kodi.tv/showthread.php?tid=209524 and first thought it was a progress control specific issue. The problem basically is that
CGUIProgressControl
doesn't get theCFileItem
object to be able to makeListItem.Foo
lookups inCGUIInfoManager::GetInt()
. But there's no way to pass the item into that code area so I looked at the otherCGUIInfoManager
getters and saw thatCGUIInfoManager::GetBool()
has code that handles the case where aListItem.Foo
info value is looked up but no item is provided. So I've copied the code from there and now it works fine.Disclaimer: I don't really know this code very well (probably nobodoy except @jmarshallnz does) so I just fixed the issue at hand. Not sure if that's the right fix or if there's some different problem but from following the code path it looks like this is the proper thing to do.