divijbindlish / parse-torrent-name

Extract media information from a filename
MIT License
217 stars 61 forks source link

Add 2020 as a possible release year #31

Open Kihltech opened 4 years ago

Kihltech commented 4 years ago

pattern.py:

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

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

YashasviMantha commented 4 years ago

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?

bensen9sticks commented 2 years ago

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.