guessit-io / guessit

GuessIt is a python library that extracts as much information as possible from a video filename.
https://guessit-io.github.io/guessit
GNU Lesser General Public License v3.0
824 stars 91 forks source link

Ensure `episode_title` is still populated for repacks #788

Open noxxusnx opened 2 months ago

noxxusnx commented 2 months ago

Resolves https://github.com/guessit-io/guessit/issues/775

The issue was the matches.previous(hole) would contain [<Proper:(19, 25)+name=other+tags=['streaming_service.prefix', 'streaming_service.suffix']>] which didn't match the previous names we were looking for.

Adding other to the previous names broke other tests so I opted for adding a repack tag for this case since it felt more appropriate than using streaming_service.prefix or streaming_service.suffix for this condition.

From there I just added another case to the lamda to also match it when the hole had the repack tag which resolved my case and didn't break any other tests.