Kodi Community Forum

Full Version: new variables for exporting the movie list
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Would it be possible to add some new variables for exporting the movie list? I am especially interested in audio and subtitle languages.
Well, this is somewhat already possible.

You need to iterate over all MediaFiles (which is basically every file we recognise)
If it is an audio-, or videofile with sound, the audioStream should be filled.
same for subtitle

Code:
${foreach movie.mediaFiles mf}
    ${mf.filename}
    ${foreach mf.audioStreams as}
        ${as.codec}
        ${as.channels}
        ${as.bitrate}
        ${as.language}
    ${end}
    ${foreach mf.subtitles sub}
        ${sub.codec}
        ${sub.language}
        ${sub.forced}
    ${end}
${end}

It's a bit complicated, but imagine a file with multiple audio streams / inline subtitles...
Thanks for the answer. But how can I include that code into the xml template? The code there looks like this:

${foreach movies movie}
<Row>
<Cell><Data ss:Type="String">${movie.title}</Data></Cell>
<Cell><Data ss:Type="Number">${movie.year}</Data></Cell>
</Row>
${end}
well, it depends, how it should look like :p
just wrap rows/cells/data around this example...

To export such many (multiple) information for a single movie into a csv/xml for excel is kinda suboptimal.
(Excel XML describing like this is also weird)
Dunno what you want as output, but originally it was designed for html pages....