Kodi Community Forum

Full Version: [Solved] Help with folder renaming and JMTE
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi all, I'm having a small amount of trouble with the renaming functionality with JMTE. I've basically no experience with scripting languages, etc. so I'm not even sure what I'm asking is achievable.

Below is a diagram of the general sort of naming convention I'm after for my television series.

Image
Essentially I want it to read the TV Show Title from the tvshow.nfo, the first and last available series, and the codec information of the last episode in the last folder. I've managed to get the episodes titled appropriately with:

${showTitle} S${seasonNr2}E${episodeNr2} ${title}  (${videoFormat} ${VideoCodec})

But obviously that won't work here. Is this something that could actually be done within TMM? Any help would be greatly appreciated. Thanks.



EDIT: UPDATE WITH SOLUTION

After consulting a friend, he adjusted my script so that it worked.

Where I got to:

${showTitle}
S
${foreach tvShow.episodes episode}
${if first_episode}
${seasonNr2}
${end}
${end}
-
${foreach tvShow.episodes episode}
${if last_episode}
${seasonNr2}
${end}
${end}
(
${foreach tvShow.episodes episode}
${if first_episode}
${videoFormat}
${end}
${end}
${foreach tvShow.episodes episode}
${if first_episode}
${videoCodec}
${end}
${end}
)


Actual solution:

${showTitle}
 
S
${foreach tvShow.episodes episode}
${if first_episode}
${seasonNr2}
${end}
${end}
${if !tvShow.seasonCount = "1"}
-
${foreach tvShow.episodes episode}
${if last_episode}
${seasonNr2}
${end}
${end}
${end}
 
(
${foreach tvShow.episodes episode}
${if first_episode}
${videoFormat}
${end}
${end}

${foreach tvShow.episodes episode}
${if first_episode}
${videoCodec}
${end}
${end}
)




Copy/paste version:

${showTitle} S${foreach tvShow.episodes episode}${if first_episode}${seasonNr2}${end}${end}${if !tvShow.seasonCount= "1"}-${foreach tvShow.episodes episode}${if last_episode}${seasonNr2}${end}${end}${end} (${foreach tvShow.episodes episode}${if first_episode}${videoFormat}${end}${end} ${foreach tvShow.episodes episode}${if first_episode}${videoCodec}${end}${end})