Kodi Community Forum
Help with XML generation - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Supplementary Tools for Kodi (https://forum.kodi.tv/forumdisplay.php?fid=116)
+---- Forum: TinyMediaManager (https://forum.kodi.tv/forumdisplay.php?fid=204)
+---- Thread: Help with XML generation (/showthread.php?tid=306924)



Help with XML generation - moonchild_it - 2017-02-13

Hello Big Grin

I made this jmte script: XML Generator

I have these problems:

- I'd like generate a list of production countries, i have not found the attribute for that.
- I'd like to understand how .isDisc works, if I use it in varoius way i receive error, i used the workaraund of ${if movie.mediaSource="Unknown"}
- If the movie is a disc I'd like to access to resolution (i can specify it inside the gui) in order to distinguish the 4k blueray

Can anyone help me ? Thanks in advance and sorry for bad english.

Cordially Marco. Cool


RE: Help with XML generation - mlaggner - 2017-02-25

- the productions countries are all together in one string ${movie.country}
- if you write ${if movie.isDisc}..${end} that should work
- maybe that should work
Code:
${if movie.isDisc}
  ${foreach movie.mediaFiles file}
    ${if file.type="VIDEO"}
      <format>${file.videoFormat}</format>
    ${end}
  ${end}
${end}


btw: just put a note that I have to enhance the wiki Wink


RE: Help with XML generation - moonchild_it - 2017-02-25

Hello,

thanks to the reply Tongue

I am just a bit idiot, but i modified the script in this way: New Script (isDisc)

and I receive this error: Error Log Confused

Where i mistake ? Angel

Thanks in advance. Cordially Marco. Tongue


RE: Help with XML generation - mlaggner - 2017-02-25

ah okay - my mistake.
please just try
Code:
${if movie.disc}



RE: Help with XML generation - moonchild_it - 2017-02-25

(2017-02-25, 15:44)mlaggner Wrote: ah okay - my mistake.
please just try
Code:
${if movie.disc}

movie.disc returns everytime true.
the problem is it that the .disc attribute is related to a file, not a movie.
is the file who have name pippopippo.disc (that is a disc video file).
In any case the help file is not correct.

I found a valid solution: Working Script

Thanks for your time.

Best regards.

Marco.


RE: Help with XML generation - mlaggner - 2017-02-25

I've updated the wiki with a generated list of all properties from the various classes at
https://github.com/tinyMediaManager/tinyMediaManager/wiki/Export-Templates