2019-06-05, 21:23
Hi all,
As I did in another post where I did a template to export all avaible fields for movies into Excel, now I want to build a template to export information from a TV Show.
As a TV Show, I have take out single episode xml, so I am going to generate just a Sum Up of the TV Show in itself, and a detail XML with the information off every episode.
First, this is the template I have used for TV Show general information (list.jmte)
Second, I have began to work into the detail template (detail.jmte), which it is right now as follow:
This last syntax is working properly getting information from the TvShowEpisode list that I got from Wiki template page
Now... what I want is to include to that detail.jmte file, a list with the mediafile information of every episode of the show, and here is where I got stacked.
Let's say I just want to get "filesize" information. Knowing that, it would be easy to guess how to get the other fields.
I need help in doing this.... This is what I thought, but it is not working, so any help would be appreciated.
As you can see, I have completely "invented" how to go through all mediafiles for each episode.
How should I do it? It didn't worked as supposed.
Thanks in advanced.
As I did in another post where I did a template to export all avaible fields for movies into Excel, now I want to build a template to export information from a TV Show.
As a TV Show, I have take out single episode xml, so I am going to generate just a Sum Up of the TV Show in itself, and a detail XML with the information off every episode.
First, this is the template I have used for TV Show general information (list.jmte)
Code:
<?xml version="1.0" encoding="utf-8"?>
<tvshows>
<!-- iterate over all TV shows -->
${foreach tvShows show}
<tvshow>
<Title>${show.title}</Title>
<Year>${show.year}</Year>
<Seasons>${show.seasonCount}</Seasons>
<Episodes>${show.episodeCount}</Episodes>
<Plot>${show.plot}</Plot>
<Path>${show.path}</Path>
<tvdbId>${show.tvdbId}</tvdbId>
<imdbId>${show.imdbId}</imdbId>
<Genres>${show.genresAsString}</Genres>
<certificacion>${show.certification}</certificacion>
</tvshow>
${end}
</tvshows>
Second, I have began to work into the detail template (detail.jmte), which it is right now as follow:
Code:
<?xml version="1.0" encoding="utf-8"?>
<tvshow>
<TVShow>${tvShow.title}</TVShow>
<seasons>${tvShow.seasonCount}</seasons>
<episodes>${tvShow.episodeCount}</episodes>
<!-- iterate over all episodes -->
${foreach tvShow.episodes episode}
<episode>
<title>${episode.title}</title>
<season>${episode.season}</season>
<episode>${episode.episode}</episode>
<Audio>${episode.mediaInfoAudioCodecAndChannels}</Audio>
<VideoCodec>${episode.mediaInfoVideoCodec}</VideoCodec>
<Formato>${episode.mediaInfoVideoFormat}</Formato>
<Duracion>${episode.runtimeFromMediaFiles}</Duracion>
</episode>
${end}
</tvshow>
This last syntax is working properly getting information from the TvShowEpisode list that I got from Wiki template page
Now... what I want is to include to that detail.jmte file, a list with the mediafile information of every episode of the show, and here is where I got stacked.
Let's say I just want to get "filesize" information. Knowing that, it would be easy to guess how to get the other fields.
I need help in doing this.... This is what I thought, but it is not working, so any help would be appreciated.
Code:
<?xml version="1.0" encoding="utf-8"?>
<tvshow>
<TVShow>${tvShow.title}</TVShow>
<seasons>${tvShow.seasonCount}</seasons>
<episodes>${tvShow.episodeCount}</episodes>
<!-- iterate over all episodes -->
${foreach tvShow.episodes episode}
<episode>
<title>${episode.title}</title>
<season>${episode.season}</season>
<episode>${episode.episode}</episode>
<Audio>${episode.mediaInfoAudioCodecAndChannels}</Audio>
<VideoCodec>${episode.mediaInfoVideoCodec}</VideoCodec>
<Formato>${episode.mediaInfoVideoFormat}</Formato>
<Duracion>${episode.runtimeFromMediaFiles}</Duracion>
</episode>
${end}
<!-- iterate over all mediaFiles -->
${foreach tvShow.mediaFiles mediafiles}
<mediafiles>
<filesize>${episodeFile.filesize}</filesize>
</mediafiles>
</tvshow>
As you can see, I have completely "invented" how to go through all mediafiles for each episode.
Code:
<!-- iterate over all mediaFiles -->
${foreach tvShow.mediaFiles mediafiles}
<mediafiles>
<filesize>${episodeFile.filesize}</filesize>
</mediafiles>
How should I do it? It didn't worked as supposed.
Thanks in advanced.