Home Manual Reference Source Repository
public class | source

Helper

Class for saving movies.

Constructor Summary

Public Constructor
public

Create an helper object.

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
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.

Params:

NameTypeAttributeDescription
name String

The name of the helper.

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 _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.