Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/scttcper/video-filename-parser
Scene release name parser
https://github.com/scttcper/video-filename-parser
filename media parser release scene
Last synced: 4 months ago
JSON representation
Scene release name parser
- Host: GitHub
- URL: https://github.com/scttcper/video-filename-parser
- Owner: scttcper
- License: mit
- Created: 2019-08-19T16:35:39.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-12-04T17:13:35.000Z (7 months ago)
- Last Synced: 2024-01-04T18:47:03.264Z (6 months ago)
- Topics: filename, media, parser, release, scene
- Language: TypeScript
- Homepage: https://video-filename-parser.vercel.app
- Size: 1.54 MB
- Stars: 49
- Watchers: 4
- Forks: 4
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Lists
- awesome-stars - scttcper/video-filename-parser - `★57` Scene release name parser (TypeScript)
README
# video-filename-parser [![npm](https://img.shields.io/npm/v/@ctrl/video-filename-parser.svg?maxAge=3600)](https://www.npmjs.com/package/@ctrl/video-filename-parser) [![coverage](https://codecov.io/gh/scttcper/video-filename-parser/branch/master/graph/badge.svg)](https://codecov.io/gh/scttcper/video-filename-parser)
> A simple file / release name parser based heavily on radarr's movie parsing
__DEMO__: https://video-filename-parser.vercel.app
## Install
```console
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)```ts
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](https://github.com/Radarr/Radarr/blob/01ad015b1433ce792c24f019f701f3a8a59c4b2c/src/NzbDrone.Core/Parser/Parser.cs)
[sonarr tv parser](https://github.com/Sonarr/Sonarr/blob/phantom-develop/src/NzbDrone.Core/Parser/Parser.cs)
[guessit](https://github.com/guessit-io/guessit)