Jump to content
OGXbox.com

XBMC skinning/scripting help, retrieving xml tags for each list item on focus


SoftMachine
 Share

Recommended Posts

I've been messing around with Rocky5's script for getting certain tags from a game's _resources/default.xml file like synopsis and release date info. I've trimmed it a bit to set my desired properties when I manually run it: https://pastebin.com/Tp8Ds103

Here's how it displays:

spacer.png

I'm trying to figure out a way to have the script either autorun when focus shifts to a new list item/game, maybe on some kind of delay so that when scrolling through lots of stuff the Xbox doesn't just freeze up, or somehow parse all default.xml files in the library on load so that the info is already ready to go when you scroll to a different game, but that might take forever tbh.

I'm also having a tough time figuring out how to trim a string, say I wanted to cut out "05 NOV " in the release date and just display the year. In the script:

Current_Window.setProperty('Synopsis_release_date', Output.release_year.string)

or in the xml:

<label>[B]$INFO[Window(MyPrograms).Property(Synopsis_year)][/B]</label>

Not sure where in there I'd do that, if I'd need to to load another utility in python, or if I can just do it in the skin's XML, which would be handy for other things.

Some help from someone with more experience with Python would be much appreciated.

Edited by SoftMachine
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

Board Life Status


Board startup date: April 23, 2017 12:45:48
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.