Kodi Community Forum

Full Version: Renamer Pattern in TV Show folder name
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, 

I like to rename my tv shows in a singular way

TV Show folder name:  TV show name (year) [STATUS] [Resolution VideoCodec Audio Codec] [Dual + Subs]
Season folder name:  Season # [Resolution VideoCodec Audio Codec] [Dual + Subs]

For example..
The Night Of (2016) [ENDED] [1080p x265] [Dual + Subs] \ Season 1 [1080p x265 AC3] [Dual + Subs] \ ....

I have realized that I can setup in TMM v.4 the expresion to rename folder, as follow:

Season ${seasonNr} [${if  episode.mediaInfoVideoFormat='2160p'}4K${else}${episode.mediaInfoVideoFormat}${end} ${if episode.mediaInfoVideoCodec='h264'}x264${else}${if episode.mediaInfoVideoCodec='h265'}x265${else}${episode.mediaInfoVideoCodec}${end}${end} ${episode.mediaInfoAudioCodec}]${if episode.mediaInfoAudioCodecList.length = '1' } ${else} [Dual${if episode.mainVideoFile.subtitles} + Subs${end}] ${end}

However, if I try to put this expression in TV show folder name, it keeps ignoring any reference.

For example, if I write this in Season folder name:
${showTitle} (${showYear}) [${showStatus}] -->  It works perfectly
${showTitle} (${showYear}) [${showStatus}] [${if  episode.mediaInfoVideoFormat='2160p'}4K${else}${episode.mediaInfoVideoFormat}${end} ${if episode.mediaInfoVideoCodec='h264'}x264${else}${if episode.mediaInfoVideoCodec='h265'}x265${else}${episode.mediaInfoVideoCodec}${end}${end} ${episode.mediaInfoAudioCodec}] --> It ignores completely everything after "showstatus"

Why regultar expressions doesn't seem to work in the TV show folder name?


And another simple question... If I put ${showStatus} if gives me either "Ended" or either "Continuing".  Is there any way to capitalize the result to have "ENDED" or "CONTINUING"?
(2020-11-11, 21:16)jhoyos Wrote: [ -> ]If I put ${showStatus} if gives me either "Ended" or either "Continuing".  Is there any way to capitalize the result to have "ENDED" or "CONTINUING"?

You can use the pre-built uppercase renderer.

Code:
${showStatus;upper}
well, I think you have a small misunderstanding - in the TV show renamer pattern you may only have tags from the TV show itself (not from episodes, where you have multiple _different values_ per TV show). 
It it funny, that this token works for seasons, because it _should_ not - because one episode of the season will be taken to fill the episode tokens (and if you have different values for the episodes of this season, you get an inconsistent token)

so in short:
- for TV show renamer pattern you can only take TV show tokens
- for season renamer pattern you (obviously) are able to use episode tokens, but this may result in inconsistent results