0.2.14 • Published 2 years ago

@ryanke/apollo v0.2.14

Weekly downloads
-
License
GPL-3.0
Repository
-
Last release
2 years ago

apollo

A tool to organise your media library fastly, using the undocumented IMDb search APi for extremely fast lookups regardless of location without having to download an entire database of media. In most circumstances, this is faster and more reliable than FileBot with the drawback of not having nearly as many features.

installation

there are still lots of bugs to iron out. Stick with the default symlinking behaviour and double-check that it moved everything. If you find a problem, please open an issue.

Requires the current Node.js LTS

command line

npm install -g @ryanke/apollo
# list options
apollo --help
# scan ./torrents and create symlinks to media in ./library
apollo ./torrents ./library

programmatic

# with npm
npm install @ryanke/apollo
# with yarn
yarn add @ryanke/apollo
import { ApolloParser } from "@ryanke/apollo";

const parsed = [];
const input = ["The.Walking.Dead.S01-S07.Season.1-7.1080p.10bit.BluRay.5.1.x265.HEVC", "Bob's Burgers 2011 SE 1 - 8 Complete WEBRIP/SE1/09 Spaghetti Western and Meatballs.mp4"];

for (const title of input) {
  // creating a new instance of the parser on each run is important
  // there is match data attached to the parser instance once you run .parse()
  const parser = new ApolloParser();
  const output = await parser.parse(title);
  parsed.push(output);
}

console.log(output);

// The output of the above script will look similar to this
// [{
//     fileType: 'MEDIA',
//     audio: [ '5.1' ],
//     collection: true,
//     languages: [],
//     resolution: { height: 1080 },
//     seasons: [
//         1, 2, 3, 4,
//         5, 6, 7
//     ],
//     quality: 'BluRay',
//     coding: [ '10bit', 'x265', 'HEVC' ],
//     type: 1,
//     title: 'The Walking Dead',
//     imdb: IMDBTitlePartial<tt1520211>
// },
// {
//     extension: '.mp4',
//     fileType: 'MEDIA',
//     audio: [],
//     collection: true,
//     languages: [],
//     seasonNumber: 1,
//     episodeNumber: [ 9 ],
//     seasons: [
//       1, 2, 3, 4,
//       5, 6, 7, 8
//     ],
//     startYear: 2011,
//     coding: [],
//     type: 2,
//     title: "Bob's Burgers",
//     imdb: IMDBTitlePartial<tt1561755>
// }]

todo

  • Directories with multiple subtitles in different languages for the same file like movie.mp4, movie.eng.sub, movie.rus.sub aren't handled correctly and will move the subtitle file we first see as movie.sub and leave the rest behind. We could handle this by using something like the languagedetect library on the subtitles, as well as trying to extract a title code from the file.
  • Customisable output directory structure, instead of the default Movies/Movie (year)/Movie (year).ext
  • Extraction of episode names. Shouldn't be hard with the current title extraction.
  • Option to preserve file names instead of converting them to a standard format as some programs require the original file names.
  • Support IMDb datasets for faster and more reliable searches. Relying on an internal API is a bad idea.
0.2.14

2 years ago

0.2.13

2 years ago

0.2.12

2 years ago

0.2.11

2 years ago

0.2.10

2 years ago

0.2.9

2 years ago

0.2.8

2 years ago

0.2.7

3 years ago

0.2.6

3 years ago

0.2.5

3 years ago

0.2.4

3 years ago

0.2.3

3 years ago

0.2.2

3 years ago

0.2.1

3 years ago

0.2.0

3 years ago