divijbindlish / parse-torrent-name

Extract media information from a filename
MIT License
217 stars 61 forks source link

How to parse 2012 (2009 movie)? #28

Open lordn-n opened 4 years ago

lordn-n commented 4 years ago

This is a though one... Parsing 2012.2009.BluRay.1080p.x264.YIFY.mp4 produce:

{
    "year": 2012,
    "resolution": "1080p",
    "quality": "BluRay",
    "codec": "x264",
    "container": "mp4",
    "title": "2009",
    "excess": "YIFY"
}

Maybe the order in which takes the thinks? maybe first look for the title (which is always first on the string)

roidayan commented 4 years ago

good idea. look for year after first separator. up to the first separator it must be the title