ANIME_TITLE Season X ANIME_TYPE [round, square or curly brackets] EXACT_SAME_ANIME_TYPE Episode Y
— anitopy fails to parse it and throws an exception.
It only triggers when the same anime_type is repeated once or more and there's something (or nothing) in brackets between them. The error doesn't happen when I omit the season or episode number.
Example
>>> anitopy.parse("One-Punch Man Season 1 OVA [Judas] OVA - 05.mkv")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/lib/python3.9/site-packages/anitopy/anitopy.py", line 48, in parse
if not parser.parse():
File "/usr/lib/python3.9/site-packages/anitopy/parser.py", line 33, in parse
self.validate_elements()
File "/usr/lib/python3.9/site-packages/anitopy/parser.py", line 302, in validate_elements
Elements.erase(ElementCategory.EPISODE_TITLE)
File "/usr/lib/python3.9/site-packages/anitopy/element.py", line 107, in erase
del cls.instance()._elements[category.value]
KeyError: 'episode_title'
When there's a filename in the following format —
—
anitopy
fails to parse it and throws an exception.It only triggers when the same
anime_type
is repeated once or more and there's something (or nothing) in brackets between them. The error doesn't happen when I omit the season or episode number.Example