platelminto / parse-torrent-title

Extract media information from a torrent-like filename
MIT License
84 stars 13 forks source link

Add support for other language torrents #64

Open mhdzumair opened 7 months ago

mhdzumair commented 7 months ago

Description

I would like to add the support for other languages like Chinese, Arabic, Russian etc to parse the data. I found Node.js library which did more heavy lifting, we can utilize the code from https://github.com/TheBeastLT/parse-torrent-title

@platelminto apart from this, Any design decision for making this library support to other language? I'm looking forward to adding support to other language but haven't thought of any plan yet.

Originally posted by @mhdzumair in https://github.com/platelminto/parse-torrent-title/issues/63#issuecomment-1945502732

platelminto commented 6 months ago

Ahh got it, though I'm unsure what exactly needs to change for this - do you have some example torrent names that don't currently work?

mhdzumair commented 6 months ago

For the moment, i have the following example:

"杀手之王 [港版原盘/国粤双语中字].Hitman.1998.1080p.HKG.Blu-ray.AVC.TrueHD.7.1-TAG" Parser title from this library. image

This is from above nodejs library parser image

I will add more samples down the road.

mhdzumair commented 6 months ago

Another example:

"[www.arabp2p.net]_-_تركي مترجم ومدبلج Last.Call.for.Istanbul.2023.1080p.NF.WEB-DL.DDP5.1.H.264.MKV.torrent"
In [6]: PTN.parse("[www.arabp2p.net]_-_تركي مترجم ومدبلج Last.Call.for.Istanbul.2023.1080p.NF.WEB-DL.DDP
   ...: 5.1.H.264.MKV.torrent")
Out[6]: 
{'resolution': '1080p',
 'quality': 'WEB-DL',
 'year': 2023,
 'codec': 'H.264',
 'audio': 'Dolby Digital Plus 5.1',
 'filetype': 'MKV',
 'site': 'www.arabp2p.net',
 'network': 'Netflix',
 'title': 'تركي مترجم ومدبلج Last.Call.for.Istanbul.',
 'encoder': 'torrent'}
> ptt.parse("[www.arabp2p.net]_-_تركي مترجم ومدبلج Last.Call.for.Istanbul.2023.1080p.NF.WEB-DL.DDP5.1.H.264.MKV.torrent")
{
  resolution: '1080p',
  year: 2023,
  source: 'WEB-DL',
  codec: 'h264',
  container: 'mkv',
  group: 'www.arabp2p.net',
  title: 'Last.Call.for.Istanbul.'
}
mhdzumair commented 4 months ago

Any plan to tackle this? Need your suggestion, So I can work on implementation.