parse-torrent-name icon indicating copy to clipboard operation
parse-torrent-name copied to clipboard

Add 2020 as a possible release year

Open Kihltech opened this issue 4 years ago • 2 comments

pattern.py:

from ('year', '([\[\(]?((?:19[0-9]|20[01])[0-9])[\]\)]?)')

to: ('year', '([\[\(]?((?:19[0-9]|20[012])[0-9])[\]\)]?)')

Kihltech avatar Aug 14 '20 10:08 Kihltech

Rather than keeping 20[012] which restricts the years. Why not keep it 20[0-9] ? It does open the wrong combination. But we can later add a check of strlen in a try block?

YashasviMantha avatar Oct 03 '20 18:10 YashasviMantha

I was running in the same problem and changed your source code as YashasviMantha was suggesting. I simply changed the year pattern in the "pattern.py"file

from: ('year', '([\[\(]?((?:19[0-9]|20[01])[0-9])[\]\)]?)') to: ('year', '([\[\(]?((?:19[0-9]|20[0-9])[0-9])[\]\)]?)')

Like this the code covers years till 2099. Don't understand why the code should be more limiting and in 2099 we can revisit this issue :-).

@divijbindlish please insert this in your code to avoid others running into the same issue ... we are beyond 2019 by now.

bensen9sticks avatar Feb 24 '22 21:02 bensen9sticks