v20 Having Trouble With ListItem.Tag - Printable Version +- Kodi Community Forum (https://forum.kodi.tv) +-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32) +--- Forum: Skinning (https://forum.kodi.tv/forumdisplay.php?fid=12) +--- Thread: v20 Having Trouble With ListItem.Tag (/showthread.php?tid=373090) |
Having Trouble With ListItem.Tag - overwatch2000 - 2023-05-10 So, hoping someone can't help me with this. It is driving me bonkers. I have made a duplicate of the Estuary skin to practice modding. Very simply, I'm trying to print the value of Custom Video Library Tags for movie titles on various windows using the InfoLabel ListItem.Tag. Just about every other ListItem label prints the expected value (Plot, Tagline, AudioCodec, Year, Genre, Etc.). But for some reason I cannot get ListItem.Tag to work on any screen other than the Video Info Screen (DialogVideoInfo.xml). Using the Includes.xml file, modifying this section (Line 6-13) works for the MediaFlags when shown on the Video Info Screen but not on the Home or Movie Library screens.
Not Working on Home Screen Works on Video Info Screen The Video Info screen (controlled by DialogVideoInfo.xml) shows the Custom Tag exists in Kodi for the movie and that the code in Includes.xml displays the "ATMOS" box in the media flags at the bottom. But on the Home Screen that Media Flag won't show. Just for the sake of it, this code shows that trying to place that Custom Tag on Movie Library window also doesn't work but will work when changing the ListItem to something else like Year. (file is MyVideoNav.xml)
Changing the code to ListItem.Tag the value won't show. I hardcoded the visible field to "TRUE" just to show that "Tags:" will show but not the value that should be displayed by ListItem.Tag.
I really hope someone knows what I'm missing here. Thanks for the help. RE: Having Trouble With ListItem.Tag - izprtxqkft - 2023-05-11 fwiw it looks like the tag was not set and is therefor empty you could try to set the tag and then read it to test your code - https://alwinesch.github.io/group__python__xbmcgui__listitem.html RE: Having Trouble With ListItem.Tag - overwatch2000 - 2023-05-11 Thank you jepsizofye. I appreciate the reply, but I'm not sure I quite follow. ListItem.Tag is a built-in Kodi InfoLabel, not custom. I'm trying to use what is already available in Kodi rather than dive into creating python scripts. ListItem.Tag shows the result on the Video Info screen (as default in Estuary) but not on any other screen, in any position. The xml code I am using comes straight from existing Estuary code, just repurposed. Thanks for the help. RE: Having Trouble With ListItem.Tag - izprtxqkft - 2023-05-11 you are copying code from video info dialog which is intended to be used with the video info dialog window - https://github.com/xbmc/xbmc/blob/master/xbmc/video/dialogs/GUIDialogVideoInfo.cpp that window explicitly sets the video info tag for use by the skin as listitem.tag you are pasting that code to a different window video nav - https://github.com/xbmc/xbmc/blob/master/xbmc/video/windows/GUIWindowVideoNav.cpp which may not explicitly set the video info tag i do not believe videoinfowindow is using the selected listitem from videonav "as-is" because of this function - https://github.com/xbmc/xbmc/blob/master/xbmc/video/dialogs/GUIDialogVideoInfo.cpp#L1844 so, what im suggesting, for testing purposes (rather than copy paste code) is that you actually SET the property explicitly to see if your existing code works if you set it and it does not display - your code is at fault if you set it and it does display - the tag is not set by video nav RE: Having Trouble With ListItem.Tag - overwatch2000 - 2023-05-12 Thank you. I do get what you are saying. And that was my first thought, that the property is not being set when using the video nav screen. So, sorry for asking this but would you mind giving me a SET code example and it's location. I know that is such a noob question, it's just that I have a hard time visualizing it without seeing the code inline. I would greatly appreciate it, but no worries if not. Thanks jepsizofye RE: Having Trouble With ListItem.Tag - izprtxqkft - 2023-05-12 (2023-05-11, 07:06)jepsizofye Wrote: fwiw it looks like the tag was not set and is therefor empty there are already examples in the link from my first response ^^^^^ |