Closed ClintEsteMadera closed 8 years ago
Hi, thank you for reporting this, you're right, the regex didn't accept two digit season numbers. I didn't want to add a new regex just for that, so I choose to use this regex "(.-)(%d?%d)xX.*". This makes the first parentheses non-greedy by using '(.-)' instead of '(.+)'. Thank you again for your support.
I've noticed that, for example, for Family Guy Season 14, the season/episode detection algorithm fails to parse a two-digit number, wrongly recognizing the season as 4, instead of 14 (see screenshot below)
I'm a developer and even though I have no experience with Lua, I believe the issue is at the line 1478 (seeing master here), more precisely with this regex:
"(.+)(%d)[xX](%d%d).*"
The problem should be resolved by just adding a "+" after the first
%d
bit, to consider potential two-digit seasons. For some reason, I've done this locally and it didn't work (even though this is a valid wildcard according to Lua's documentation, maybe VLC uses an old version?)So, the code that actually works (and it's definitively not ideal at all, but it does the trick...) is this one:
This deals well with things like this:
The.Man.In.The.High.Castle.1x09.720p.WEBRip.x264-SERIOUSLY
(one digit for the season)Family Guy - 14x15 - A Lot Going On Upstairs
(two digits for the season)I humbly suggest to consider a fix to this (small, granted) issue, either by merging this solution or even better, getting LUA to accept the "+" symbol in the original regexp.
I am a big fan of this incredible extension and I'm glad to try to put my two cents here.
Kind Regards.