Code: Select all
{n} {episode.special?'00':s.pad(2)}x{es*.pad(2).join('-')}{fn.match(/x[0-9][0-9]\.1|x[0-9][0-9][0-9]\.1|x[0-9][0-9]\.a|x[0-9][0-9][0-9]\.a|x[0-9][0-9]a|x[0-9][0-9][0-9]a/)?'.1':''} {t}{'.'+lang}
- I would use just {sxe} for the episode number but I can't get it to pad the season. and {s00e00} does pad and is only 1 more character but starts being more on multiepisodes (ie S01E01-E02-E03)
- But the main question is on how to turn these functions in regular expression into one?
Code: Select all
{fn.match(/x[0-9][0-9]\.1|x[0-9][0-9][0-9]\.1|x[0-9][0-9]\.a|x[0-9][0-9][0-9]\.a|x[0-9][0-9]a|x[0-9][0-9][0-9]a/)?'.1':''}
{fn.match(/x[0-9][0-9]\.2|x[0-9][0-9][0-9]\.2|x[0-9][0-9]\.b|x[0-9][0-9][0-9]\.b|x[0-9][0-9]b|x[0-9][0-9][0-9]b/)?'.2':''}
{fn.match(/x[0-9][0-9]\.3|x[0-9][0-9][0-9]\.3|x[0-9][0-9]\.c|x[0-9][0-9][0-9]\.c|x[0-9][0-9]c|x[0-9][0-9][0-9]c/)?'.3':''}
{fn.match(/x[0-9][0-9]\.4|x[0-9][0-9][0-9]\.4|x[0-9][0-9]\.d|x[0-9][0-9][0-9]\.d|x[0-9][0-9]d|x[0-9][0-9][0-9]d/)?'.4':''}
{fn.match(/x[0-9][0-9]\.5|x[0-9][0-9][0-9]\.5|x[0-9][0-9]\.e|x[0-9][0-9][0-9]\.e|x[0-9][0-9]e|x[0-9][0-9][0-9]e/)?'.5':''}
{fn.match(/x[0-9][0-9]\.6|x[0-9][0-9][0-9]\.6|x[0-9][0-9]\.f|x[0-9][0-9][0-9]\.f|x[0-9][0-9]f|x[0-9][0-9][0-9]f/)?'.6':''}
{fn.match(/x[0-9][0-9]\.7|x[0-9][0-9][0-9]\.7|x[0-9][0-9]\.g|x[0-9][0-9][0-9]\.g|x[0-9][0-9]g|x[0-9][0-9][0-9]g/)?'.7':''}
{fn.match(/x[0-9][0-9]\.8|x[0-9][0-9][0-9]\.8|x[0-9][0-9]\.h|x[0-9][0-9][0-9]\.h|x[0-9][0-9]h|x[0-9][0-9][0-9]h/)?'.8':''}
{fn.match(/x[0-9][0-9]\.9|x[0-9][0-9][0-9]\.9|x[0-9][0-9]\.i|x[0-9][0-9][0-9]\.i|x[0-9][0-9]i|x[0-9][0-9][0-9]i/)?'.9':''}
Extra comments:Macross Frontier 01x03.1 > Macross Frontier 01x03.1 On Your Marks
Macross Frontier 01x03.2 > Macross Frontier 01x03.2 On Your Marks
Macross Frontier 01x03.A > Macross Frontier 01x03.1 On Your Marks
Macross Frontier 01x03.B > Macross Frontier 01x03.2 On Your Marks
Macross Frontier 01x03A > Macross Frontier 01x03.1 On Your Marks
Macross Frontier 01x03B > Macross Frontier 01x03.2 On Your Marks
-Something as simple as
Code: Select all
{dc > 1 ? ", Part $di" : null}
-I tried using "\d" to be a digit for the [0-9] but that doesn't seem to work, not that it would unify the lines of code.
-Kodi info on this (same as Plex from what I know): https://kodi.wiki/view/Naming_video_fil ... t_Episodes