parse-torrent-name
parse-torrent-name copied to clipboard
Added some other language recognition
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.
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.
I met some files comportants the language uppercased
Could you post these torrent names here so I can take a look?
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 ?
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.
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.
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.
Can this be merged? It would be absolutely awesome
Any update about this ?
Is the project still maintained? I'd like this PR to be merged.
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.