Nocturnal Prancing Mosquito

    @ctrl/video-filename-parser
    TypeScript icon, indicating that this package has built-in type declarations

    4.1.1 • Public • Published

    video-filename-parser npm CircleCI coverage

    A simple file / release name parser based heavily on radarr's movie parsing

    DEMO: https://video-filename-parser.vercel.app

    Install

    npm install @ctrl/video-filename-parser

    Use

    parameters:

    title string - The title or filename to be parsed
    isTv boolean - parsed as a tv show (default false)

    import { filenameParse } from '@ctrl/video-filename-parser';
    
    const title = 'This.is.40.2012.PROPER.UNRATED.720p.BluRay.x264-Felony';
    console.log(filenameParse(title));
    // {
    //   "title": "This is 40",
    //   "year": "2012",
    //   "resolution": "720P",
    //   "sources": [
    //     "BLURAY"
    //   ],
    //   "videoCodec": "x264",
    //   "revision": {
    //     "version": 2,
    //     "real": 0
    //   },
    //   "group": "Felony",
    //   "edition": {
    //     "unrated": true
    //   },
    //   "languages": [
    //     "English"
    //   ],
    // }
    
    console.log(filenameParse('The Office US S09E06 HDTV XviD-AFG', true));
    // {
    //   "title": "The Office US",
    //   "year": null,
    //   "resolution": "480P",
    //   "sources": [
    //     "TV"
    //   ],
    //   "videoCodec": "xvid",
    //   "revision": {
    //     "version": 1,
    //     "real": 0
    //   },
    //   "group": "AFG",
    //   "edition": {},
    //   "languages": [
    //     "English"
    //   ],
    //   "seasons": [
    //     9
    //   ],
    //   "episodeNumbers": [
    //     6
    //   ],
    //   "airDate": null,
    //   "fullSeason": false,
    //   "isPartialSeason": false,
    //   "isMultiSeason": false,
    //   "isSeasonExtra": false,
    //   "isSpecial": false,
    //   "seasonPart": 0,
    //   "isTv": true
    // }

    See also

    Radarr movie parser
    sonarr tv parser
    guessit

    Install

    npm i @ctrl/video-filename-parser

    DownloadsWeekly Downloads

    116

    Version

    4.1.1

    License

    MIT

    Unpacked Size

    80.1 kB

    Total Files

    37

    Last publish

    Collaborators

    • scttcper