Home Manual Reference Source Test Repository
public class | source

Helper

Class for saving movies.

Constructor Summary

Public Constructor
public

Create an helper object for movie content.

Member Summary

Public Members
public

The name of the torrent provider.

Private Members
private

The util object with general functions.

Method Summary

Public Methods
public

addTorrents(movie: Movie, torrents: Object): Movie

Adds torrents to a movie.

public

Get info from Trakt and make a new movie object.

Private Methods
private

_getImages(tmdb_id: Integer, imdb_id: String): Object

Get images from themoviedb.org or omdbapi.com.

private
private

_updateTorrent(movie: Movie, found: Movie, language: String, quality: String): Movie

Update the torrents for an existing movie.

Public Constructors

public constructor(name: String) source

Create an helper object for movie content.

Params:

NameTypeAttributeDescription
name String

The name of the content provider.

Public Members

public name: String source

The name of the torrent provider.

Private Members

private _util: Util source

The util object with general functions.

Public Methods

public addTorrents(movie: Movie, torrents: Object): Movie source

Adds torrents to a movie.

Params:

NameTypeAttributeDescription
movie Movie

The movie to add the torrents to.

torrents Object

The torrents to add to the movie.

Return:

Movie

A movie with torrents attached.

public getTraktInfo(slug: String): Movie source

Get info from Trakt and make a new movie object.

Params:

NameTypeAttributeDescription
slug String

The slug to query trakt.tv.

Return:

Movie

A new movie.

Private Methods

private _getImages(tmdb_id: Integer, imdb_id: String): Object source

Get images from themoviedb.org or omdbapi.com.

Params:

NameTypeAttributeDescription
tmdb_id Integer

The tmdb id of the movie you want the images from.

imdb_id String

The imdb id of the movie you want the images from.

Return:

Object

Object with a banner, fanart and poster images.

private _updateMovie(movie: Movie): Movie source

Params:

NameTypeAttributeDescription
movie Movie

The movie to update its torrent.

Return:

Movie

A newly updated movie.

private _updateTorrent(movie: Movie, found: Movie, language: String, quality: String): Movie source

Update the torrents for an existing movie.

Params:

NameTypeAttributeDescription
movie Movie

The new movie.

found Movie

The existing movie.

language String

The language of the torrent.

quality String

The quality of the torrent.

Return:

Movie

A movie with merged torrents.