DedTV
16-04-2010 14:10:52
Merged files named with the {AllEpisodes} tag show as missing once they're renamed. Seems to be an issue with the default RegEx.
For example in the test view it interprets "Cheers S10E25E26" as Cheers Season 5 Episode 26 but "Cheers S10E25-E26" gets picked up as Cheers Season 10 Episode 25 which lets TV Rename recognize it normally. A file like Cheers - S01E01E02E03E04 gets picked up as Season 3 episode 4 so it looks like it's ignoring everything up until the number before the last "E" in the filename when it needs to match the Sxx and first Exx and ignore the rest for TV Rename to handle it correctly.
I'm useless with RegEx but I'm playing around with it and hopefully I'll stumble across a fix. But if someone better at Regular Expressions has a solution, it'd be appreciated.
Edit: I found dropping
So the code I'm using is:
But as I said, I'm clueless about RegEx so while It seems to work I haven't a clue why it works, what the part I cut off actually does, or what might break as a result of the change so until/unless someone who knows what they're talking about confirms it's safe, use it at your own peril.
For example in the test view it interprets "Cheers S10E25E26" as Cheers Season 5 Episode 26 but "Cheers S10E25-E26" gets picked up as Cheers Season 10 Episode 25 which lets TV Rename recognize it normally. A file like Cheers - S01E01E02E03E04 gets picked up as Season 3 episode 4 so it looks like it's ignoring everything up until the number before the last "E" in the filename when it needs to match the Sxx and first Exx and ignore the rest for TV Rename to handle it correctly.
I'm useless with RegEx but I'm playing around with it and hopefully I'll stumble across a fix. But if someone better at Regular Expressions has a solution, it'd be appreciated.
Edit: I found dropping
[^a-z]
from the end of the default "3x23 s3x23 3e23 s3e23" RegEx seems to work and doesn't appear to break anything.So the code I'm using is:
(^|[^a-z])s?(?<s>[0-9]+)[ex](?<e>[0-9]{2,})
But as I said, I'm clueless about RegEx so while It seems to work I haven't a clue why it works, what the part I cut off actually does, or what might break as a result of the change so until/unless someone who knows what they're talking about confirms it's safe, use it at your own peril.