erengy / anitomy

Anime video filename parser
Mozilla Public License 2.0
278 stars 22 forks source link

Anime Title Inconsistent Parsing Given Anime Type #15

Closed Jaliborc closed 10 months ago

Jaliborc commented 4 years ago

I was running some tests (https://runkit.com/jaliborc/5c13d05e6ba83b0012bfbcf2) and I noticed this issue with the parser: if you look at the last two tests, you see that Piano no Mori 2 (TV) gives the anime_title Piano no Mori, with season 2 and anime_type TV. But Piano no Mori (TV) 2nd Season gives anime_title Piano no Mori (TV), with the anime_type TV remaining the same.

erengy commented 10 months ago

This behavior is now changed in the development branch. Both cases return Piano no Mori as the title:

┌─────────────────────────┐
│ Element │ Value         │
│─────────────────────────│
│ title   │ Piano no Mori │
│ episode │ 2             │
│ type    │ TV            │
└─────────────────────────┘
┌─────────────────────────┐
│ Element │ Value         │
│─────────────────────────│
│ title   │ Piano no Mori │
│ type    │ TV            │
│ season  │ 2             │
└─────────────────────────┘