parse-torrent-name icon indicating copy to clipboard operation
parse-torrent-name copied to clipboard

Added some other language recognition

Open Spriteware opened this issue 10 years ago • 10 comments

I met some files comportants the language uppercased, and I thought it 'll be useful to directly modify this project to allow the language to be better recognized and not wrapped in the movie title.

Spriteware avatar Feb 11 '15 17:02 Spriteware

Cannot merge this pull request since it breaks existing tests (see here). Also, new tests for your changes would be appreciated. Sorry for non-existent guidelines for contributing yet.

jzjzjzj avatar Feb 13 '15 08:02 jzjzjzj

I met some files comportants the language uppercased

Could you post these torrent names here so I can take a look?

jzjzjzj avatar Feb 13 '15 09:02 jzjzjzj

You can find here some torrents name with explicit language (randomly found in a french popular website) : http://pastie.org/9944928

I will push a new commit soon to fix this problem. Also, I wanted to know what kind of torrents names contains rus.eng ?

Spriteware avatar Feb 13 '15 16:02 Spriteware

Link you posted seems to be wrong. :)

You can view test file to find torrent names for existing patterns. Here's the actual commits how I like to do it - by separating whole test case (with existing/wrong results) and just the fix for it into distinct commits.

jzjzjzj avatar Feb 14 '15 04:02 jzjzjzj

Oups, I haven't been paying attention, here is the good one : http://pastie.org/9944928 Edit : '(A)' at line's end have to be ignored, it's just a cp/cv error I made.

Spriteware avatar Feb 14 '15 09:02 Spriteware

Unit tests passed ! I've modified language detection to ensure that we're not detecting the group, title or episode name using separator detection (usually, they are . - _ + and \s). Now there is more than 1 language possibly extracted, as in Community.s02e20.rus.eng.720p.Kybik.v.Kybe which contains RUS and ENG. A second language could be returned as 'language2' for example (but still 'language' for the first). A better idea would be to provide an array for language part but it breaks everything else in excess.js and title.js so I've preferred to return new parts.

And, my apologies about my bad english.

Spriteware avatar Feb 14 '15 16:02 Spriteware

Can this be merged? It would be absolutely awesome

f10et avatar Feb 25 '16 00:02 f10et

Any update about this ?

yadomi avatar Oct 13 '16 19:10 yadomi

Is the project still maintained? I'd like this PR to be merged.

FezVrasta avatar Dec 31 '17 10:12 FezVrasta

Maybe you wanna use https://github.com/tetreum/parse-torrent-name This PR got merged + more changes like: GameOfThrones => Game Of Thrones if year is present but title not, set year as title (ex: 2012.DVD.XviD.[www.DivxTotaL.com], 2012 is movie's name)

I personally don't like the base code, but i also didn't want to start from scratch.

tetreum avatar Oct 27 '18 18:10 tetreum