parse-torrent-title
parse-torrent-title copied to clipboard
Support multi-episode torrents?
Thanks for the library!
I need to extract the episodes contained into a single torrent name, for example:
Marvel\'s.Agents.of.S.H.I.E.L.D.S02E01-03.Shadows.1080p.WEB-DL.DD5.1
This should, ideally, return as season
an array like [1, 2, 3]
, but right now it returns just 1
.
I use this RegExp in my own code right now but I think it would make sense to have this built into the library:
/[Eex]([0-9]{2})(?:\-)?([0-9]{2})?(?:[^0-9]|$)/g
// result: 1, 3 - which can then be used to infer the episodes in the middle of the sequence