Displaying information from game infoLabes in Kodi UI
#1
I have been scratching my head over this issue for a couple of days. Hopefully someone knows the answer.

How do you get information from game infoLabels to display in Kodi? This is in Kodi v18 Leia using the default Estuary skin. I have tried to assign the infoLabels to the items displayed by the plugin, but they do not show up anywhere. Additional information in the side panel view of the skin displays "No information available" when browsing the list, and it is not possible to bring up the information window.

Minimal working example:
python:

game = {'title': 'Super Mario Bros', 'platform': 'Atari 2600', 'genres': ['Action','Strategy'], 'publisher': 'Nintendo', 'developer': 'Square', 'overview': 'Do you have what it takes to save the Mushroom Princess?', 'year': 1980}, 'gameclient': 'retroarch'}
xbmcplugin.setContent(handle, 'games')
li = xbmcgui.ListItem(Label=game['title'])
li.setInfo('game', infoLabels=game)
xbmcplugin.addDirectoryItem(handle, url,  li, False, 1)
xbmcplugin.endOfDirectory(addon_handle)

Is this feature not yet implemented for game plugins in Leia, or is the information only displayed when using retroplayer?
Reply
#2
(2019-06-26, 13:39)solbero Wrote: I have been scratching my head over this issue for a couple of days. Hopefully someone knows the answer.

How do you get information from game infoLabels to display in Kodi? This is in Kodi v18 Leia using the default Estuary skin. I have tried to assign the infoLabels to the items displayed by the plugin, but they do not show up anywhere. Additional information in the side panel view of the skin displays "No information available" when browsing the list, and it is not possible to bring up the information window.

Minimal working example:
python:

game = {'title': 'Super Mario Bros', 'platform': 'Atari 2600', 'genres': ['Action','Strategy'], 'publisher': 'Nintendo', 'developer': 'Square', 'overview': 'Do you have what it takes to save the Mushroom Princess?', 'year': 1980}, 'gameclient': 'retroarch'}
xbmcplugin.setContent(handle, 'games')
li = xbmcgui.ListItem(Label=game['title'])
li.setInfo('game', infoLabels=game)
xbmcplugin.addDirectoryItem(handle, url,  li, False, 1)
xbmcplugin.endOfDirectory(addon_handle)

Is this feature not yet implemented for game plugins in Leia, or is the information only displayed when using retroplayer?

I think Leia has some game infolabels. However, the games DB is not implemented so NO games infolabels are exposed to the skin at all by the Kodi C++ core.

There are plugins like Advanced Emulator Launcher, Advanced MAME Launcher, IAGL, RCB, that provide game database-like services. Kodi is so flexible that it doesn't matter if the database is implemented in the core or in Python addons, the infolabels the skin sees are exactly the same. Note that the metadata/assets change from addon to addon because each addon games DB is kind of "unofficial".

Your example code is correct. Here you have the equivalent code in AEL, it's more complicated because more metadata and artwork is set, but the essentials are the same. Note that AEL is a program/games addon, and instead of the type 'game' it uses the type 'video' that is more developed and have many infolabels games need.

In the AEL thread you have a test skin I have created, Estuary AEL Mod, that has some views to display game metadata. There are other skins with AEL support and game views. More details in the AEL thread.

EDIT: I just realised... Kodi has no games DB, so there are no game listings equivalent to "Show all albums", "Show all tracks", etc. However, when you are playing a game with retroplayer and you press the key I maybe the metadata of the game is exposed so you can skin for it. Currently, when your press I when playing a game nothing shows.
Reply

Logout Mark Read Team Forum Stats Members Help
Displaying information from game infoLabes in Kodi UI0