igorcmoura / anitopy

Anime video filename parser in Python, based on Anitomy
Mozilla Public License 2.0
72 stars 19 forks source link

Feat: support 4k resolution detection #17

Closed tylergibbs2 closed 1 year ago

tylergibbs2 commented 1 year ago

Adds support for detecting 4k and 4K video resolutions.

I also added test cases for two inputs I found that were missing the video_resolution key in the result due to them being 4k. I noticed that this test case existed already in the tests table:

[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][4K]

But when I parsed this input, the video_resolution key was missing despite the test case showing that it should be there.

>>> import anitopy
>>> anitopy.parse("[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][4K]")
{
    'file_name': '[GM-Team][国漫][诛仙][Jade Dynasty][2022][11][HEVC][GB][4K]',
    'video_term': 'HEVC',
    'anime_year': '2022',
    'episode_number': '11',
    'anime_title': 'Jade Dynasty',
    'release_group': 'GM-Team'
}
tylergibbs2 commented 1 year ago

Oops - I just noticed this was implemented in #14.

Going to close this for now, but I would suggest changing the regex added in that PR to support both upper and lowercase K.