Help with XML generation

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
moonchild_it Offline
Junior Member
Posts: 8
Joined: Oct 2016
Reputation: 0
Post: #1
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
find quote
mlaggner Offline
Moderator
Posts: 1,183
Joined: Oct 2012
Reputation: 35
Post: #2
- 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

tinyMediaManager - THE media manager of your choice - available for Windows, Mac OSX and Linux
Wanna help translate TMM? Join us at transifex
[Image: project_thin_badge.gif]
find quote
moonchild_it Offline
Junior Member
Posts: 8
Joined: Oct 2016
Reputation: 0
Post: #3
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
find quote
mlaggner Offline
Moderator
Posts: 1,183
Joined: Oct 2012
Reputation: 35
Post: #4
ah okay - my mistake.
please just try
Code:
${if movie.disc}

tinyMediaManager - THE media manager of your choice - available for Windows, Mac OSX and Linux
Wanna help translate TMM? Join us at transifex
[Image: project_thin_badge.gif]
find quote
moonchild_it Offline
Junior Member
Posts: 8
Joined: Oct 2016
Reputation: 0
Post: #5
(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.
find quote
mlaggner Offline
Moderator
Posts: 1,183
Joined: Oct 2012
Reputation: 35
Post: #6
I've updated the wiki with a generated list of all properties from the various classes at
https://github.com/tinyMediaManager/tiny...-Templates

tinyMediaManager - THE media manager of your choice - available for Windows, Mac OSX and Linux
Wanna help translate TMM? Join us at transifex
[Image: project_thin_badge.gif]
find quote