adameste / anidbcli

AniDB UDP API client written in Python
MIT License
34 stars 8 forks source link

[in progress] add extra helper tags #22

Closed Andy2244 closed 4 years ago

Andy2244 commented 4 years ago

Try to resolve my #21 .

PS: The UDP list delimiter gets lost after parse import, so i replaced it by the unused AniDB char §. This way later on we can safely operate on list.

adameste commented 4 years ago

Thanks for your work, will have to merge this after the weekend as it needs some updates. If you are interested, you can do them yourself to save my time a little :)

Andy2244 commented 4 years ago

you can do them yourself to save my time a little

Sure np, just getting my rusty python script skills back on.

* resolution should be parsed using regex capture groups like `x([0-9]*)`, you should be then able to get any possible vertical resolution easily, then just add string "p" and you are done

Was my first instinct, yet on badly encoded files i did not want to end-up with something like "724p" or "366p", so only "correct" vertical scene resolutions should be mapped, otherwise just copy the full resolution to make it clear that the file is "off".

NOTE: I'm still working on the alternative list field names, what i need is a way to get "good" alternative series names, which i want to use as foldername or extra symlink, so tools like taiga have more options to work/match with. Yet that's hard without a extra series_lookup, which i want to avoid.

I'm experimenting with fuzzywuzzy atm so i can extract "good" alternative names from the a_other, a_synonyms lists, which are close to the english name, but do not match.

As example Fate/Stay Night The a_english name we end-up with is Gekijouban Fate Stay Night Heaven's Feel. Yet most lists (Anilist, Kitsu, AP) use Fate/stay night [Heaven's Feel] I. presage flower, i can construct the episode name with special movie handling code, but i need the clear alternative name Fate/stay night [Heaven's Feel] or Fate/stay night Heaven's Feel. Those do exist in the a_other, a_synonyms lists, but i need to find the "good" english version.

Andy2244 commented 4 years ago

ok new version is up and so far i'm happy with the new fuzzy results.

Examples: a_english = Attack on Titan Season 3 a_english_short = AoT S3 a_romaji = Shingeki no Kyojin Season 3 a_romaji_short = Shingeki no Kyojin S3

a_english = The Misfit of Demon King Academy: History's Strongest Demon King Reincarnates and Goes to School with His Descendants a_english_short = The Misfit of Demon King Academy

a_english = Gekijouban Fate Stay Night Heaven's Feel a_english_alt = Fate stay night [Heaven's Feel] a_english_shorter = FSN HF

Andy2244 commented 4 years ago

ok after "much" more testing, i came to the conclusion that what i want is not possible, without mayor additions. I also noticed i basically try to copy FileBot logic, so instead i now use anidbcli for the basic initial file hashing + unique renameing and run filebot afterwards on it with all the complicated naming stuff i want.

Will setup a new PR with only the minimal changes and fixes.