sharinganthief / tvrename

Automatically exported from code.google.com/p/tvrename
Other
0 stars 0 forks source link

Improve handling of filenames with 4-digit years in the title #109

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Obtain a show with a year in the title. For example, 'Castle (2009) - S02E01'
2. Perform an episode scan for this file's location

What is the expected output? What do you see instead?

Usually, it will be flagged as episode 20x09. In my example, it should be 
episode 2x01.

What version of the product are you using? On what operating system?

2.2.0b7

Please provide any additional information below.

In order to prevent this behavior, I must disable the Filename Processors regex 
entry for 'Show - 323 - Foo'. I believe this regex can be improved. Also, since 
it is one of the least discrete regular expressions, it should be very low in 
priority. The following features would be useful:

1. Allow prioritization (reordering) of regular expressions in the Filename 
Processors.
2. Disable the built-in 'Show - 323 - Foo' rule by default.
3. Add a rule for 'Show - 323 - Foo (only allows 3 digits)': 
"(^|[^a-z0-9])(?<s>[0-9]{1,2})(?<e>[0-9]{2,2})[^a-z0-9]"
4. Add a rule for 'Show - 1323 - Foo (allows 4 digits)': 
"(^|[^a-z0-9])(?<s>[0-9]{1,2})(?<e>[0-9]{2,2})[^a-z0-9]"
5. Make these rules the lowest priority rules.

Because it is rare to have shows of 10 seasons or more, and even rarer to find 
them named without identifying marks between season and episode, I currently 
disable the 4-digit rule. However, if these rules are only processed after all 
other rules fail, then it may not be an issue.

Original issue reported on code.google.com by inar...@gmail.com on 19 Apr 2011 at 2:29