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

Support multi-episode torrents?

Open FezVrasta opened this issue 6 years ago • 2 comments

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

FezVrasta avatar Jan 02 '18 12:01 FezVrasta