new Episode( config, anime )

Description

Store the datas of an episode

Parameters
Name Type Description
config EpisodeConfig
anime Anime
Details

Members


name :string

Description

The name of the episode

Details
string

<readonly> episodeId :number

Description

The unique id of the episode (define the order between episodes)

Details
number

Description

The uri of the episode poster

Details
string

Description

The episode's stream links

Details
Array.<string>

Description

The local path to episode's file.
To set Episode.localLink, see : Episode.setLocalPath

Details
string

<readonly> anime :Anime

Description

Reference to the Anime

Details
Anime

isLocal :boolean

Description

True when $localLink is set

Details
boolean

hasPoster :boolean

Description

True when $posterLink is set

Details
boolean

path :string

Description

path.join($this.anime.path with :

If there is no local file, use the default local path $this.episodeId)` Else use the $local path

Details
string

Methods


toPublic() → {PublicEpisode}

Description

Return the public information of the episode (= the informations to give to the client)

Returns
Details

<async> getInfo( loadYoutubeInfo ) → {Promise.<EpisodeInfo>}

Description

Get the info of an episode

Parameters
Name Type Default Description
loadYoutubeInfo bool true

Decide or not to call YoutubePlayer.getInfo

Returns
Details

getUrlByPlayer( player ) → {string}

Description

Get the first url corresponding to the Videoplayer

Parameters
Name Type Description
player VideoPlayer
Returns

Return the first url corresponding to the player

Details

setLocalPath( path ) → {Promise.<void>}

Description

Set Episode.localLink and update the anime

Parameters
Name Type Description
path string
Returns
Details

Anime.updateJson


toEpisodeConfig() → {EpisodeConfig}

Description

Return the EpisodeConfig of the Episode

Returns
Details