https://github.com/markmals/downpour-js
☔️ Get TV & Movie info from downloaded file names
https://github.com/markmals/downpour-js
Last synced: 12 days ago
JSON representation
☔️ Get TV & Movie info from downloaded file names
- Host: GitHub
- URL: https://github.com/markmals/downpour-js
- Owner: markmals
- License: mit
- Created: 2022-11-13T17:29:30.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-12-18T08:54:51.000Z (over 3 years ago)
- Last Synced: 2025-10-28T02:19:44.546Z (8 months ago)
- Language: TypeScript
- Size: 404 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Downpour
Downpour is a TypeScript port of the [Swift library of the same name](https://github.com/Ponyboy47/Downpour).
Downpour can gather the following from a raw video name:
* TV or movie title
* Year of release
* TV season number
* TV episode number
**Note:** None of the fields are guaranteed to be there or even picked up, since it's kind of hard to extract metadata from file names with only a few clever regular expressions. Please open an issue if you know the data is there, but it's not being picked up. Pull requests are welcome, as well. This also means a lot of members are optional, so be sure to check that the property isn't undefined or nullish coalescing operator (`??`) to program safely 😄
## Installation
```sh
# npm
npm install downpour
# yarn
yarn add downpour
# pnpm
pnpm install downpour
```
## Usage
Using Downpour is easy. Just create a new instance and Downpour will do the rest.
```typescript
import Downpour from "downpour"
let metadata = new Downpour("filenameWithoutExtension")
let title = metadata.title
let year = metadata.year
if (metadata.type === "tv") {
let season = metadata.season
let episode = metadata.episode
}
let plexName = metadata.basicPlexName
```
## License
Published under the [MIT License](./LICENSE).