Merged files named with {AllEpisodes} go missing - Update

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 [^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.

sstteevvee

26-04-2010 14:01:21

I have changed the default in 2.2.0b4 (will be released later today) to the following:


(^|[^a-z])s?(?<s>[0-9]+)[ex](?<e>[0-9]{2,})(e[0-9]{2,})*[^a-z]

Your suggestion shouldn't have any bad side effects, but I'd recommend the above as it specifically looks for (and ignores) additional repeated Enn parts.

Anyone upgrading an existing install to the new version will have to manually edit the RegEx, or reset to the defaults in the new version.

Just for fun, here is the explanation of the new regex:

^ = start of line
| = or
[^a-z] = not any of the characters "a" to "z"
s? = the letter s, or nothing at all
(?<s> .......... ) = this stuff will be called "s" (used internally in the TVRename code for getting the season number)
[0-9]+ = one or more of the characters "0" to "9"
[ex] = an "e" or an "x"
(?<e> .......... ) = this stuff will be called "e"
[0-9]{2,} = two or more of the characters "0" to"9"
(........)* = this bunch of stuff can happen 0 or more times
e[0-9]{2,} = an "e" followed by two or more of the characters "0" to"9"
[^a-z] = not any of the characters "a" to "z"

Ratchet

07-05-2010 03:38:56

I have changed the default in 2.2.0b4 (will be released later today) to the following:


(^|[^a-z])s?(?<s>[0-9]+)[ex](?<e>[0-9]{2,})(e[0-9]{2,})*[^a-z]

Anyone upgrading an existing install to the new version will have to manually edit the RegEx, or reset to the defaults in the new version.
Could you expand on that a bit? How do I manually edit the RegEx, or even rest to the defaults? I'm using the latest beta (2.2.0b5)

edit: I've figured it out I think. For those of you trying to figure this out as well, to use the regex sstteevvee posted click on "Options->Filename processors" and double-click the very first one (the actual regex code) so that you can edit it, then copy/paste in the above regex and click OK. It should work then (does for me in any event).

DedTV

08-05-2010 20:33:31

If you are using 2.2.0b5 then you just need to open Options -> Filename Processors and click the Defaults button, then Ok.

Ratchet

09-05-2010 12:15:47

If you are using 2.2.0b5 then you just need to open Options -> Filename Processors and click the Defaults button, then Ok.
I tried that but it didn't seem to do anything.