erengy / taiga

A lightweight anime tracker for Windows
https://taiga.moe
GNU General Public License v3.0
2.1k stars 225 forks source link

support Japanese season and episode patterns #1144

Closed Omar-Abdul-Azeez closed 9 months ago

Omar-Abdul-Azeez commented 1 year ago

This is definitely an anitomy issue. I just had to submit it here because the issues over there look dead (?) so I had to submit here to be seen.

~Considering that this is mainly, or at least originally, an "anime" parser~, it would make sense to support the Japanese equivalent of season/s and episode/ep/e. The Japanese equivalents are 期 for season and 話 for episode, mainly written with 第 before the number to indicate that the numbering is ordinal rather than cardinal but it's also omitted in many cases so it's just a possibility.

Considering that there is almost no one whos use kanji for filenames in the anime scene anywhere outside the title, the issue isn't cleaning up but the identification. So it should be as simple as adding "case 期 case 話" (I already clean up filenames in my library and they follow the "title ##話" pattern, so the 期 is just part of the title)

It has been working for me with Japanese pretty well, ~at least in taiga~, so I don't know if it has some level of support or the process just happens to work with Japanese considering I clean up the name and usually the only token with a number is the episode number. But just how "season 2", "S2" should never be treated as the episode number, "第2期", "2期" should also never be treated as such. but it seems ~anitomy~ taiga catches it and it ignores the "第01話" or the "01話" right after...

~I'm not sure if taiga does something extra or not but~ it seems that "呪術廻戦 第2期 01話", which is jujutsu kaisen 2nd season ep01, is detected as 1st season ep2, but "呪術廻戦 2期 01話" is detected as 2nd season ep01, while "呪術廻戦 第2期 第01話" is still wrongly detected...

erengy commented 1 year ago

Note to self: Anitomy currently supports "第01" and "01話" patterns for episodes. Parsing the season number from "第2期" should resolve this issue.

erengy commented 9 months ago

Anitomy now supports these patterns. Will be available in v2.

>anitomy "呪術廻戦 第2期 第01話"
┌────────────────────────┐
│ Element │ Value        │
│────────────────────────│
│ title   │ 呪術廻戦     │
│ season  │ 2            │
│ episode │ 01           │
└────────────────────────┘
>anitomy "呪術廻戦 第2期 01話"
┌────────────────────────┐
│ Element │ Value        │
│────────────────────────│
│ title   │ 呪術廻戦     │
│ season  │ 2            │
│ episode │ 01           │
└────────────────────────┘
>anitomy "呪術廻戦 2期 01話"
┌────────────────────────┐
│ Element │ Value        │
│────────────────────────│
│ title   │ 呪術廻戦     │
│ season  │ 2            │
│ episode │ 01           │
└────────────────────────┘