crunchyroll

package
v0.0.0-...-4c8a2d4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2020 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(c *common.HTTPClient, user, pass string) error

Login logs the user in to Crunchyroll and stores the session on the client

Types

type Episode

type Episode struct {
	ID          int
	SubtitleID  int
	Title       string
	Description string
	Number      float64
	Quality     string
	Path        string
	URL         string
	Filename    string
	StreamURL   string
}

Episode holds all episode metadata needed for downloading

func (*Episode) Download

func (e *Episode) Download(vp *common.VideoProcessor) error

Download downloads entire episode to our temp directory

func (*Episode) DownloadSubtitles

func (episode *Episode) DownloadSubtitles(client *common.HTTPClient, language string, tempDir string) (string, error)

DownloadSubtitles entirely downloads subtitles to our temp directory

func (*Episode) GetEpisodeInfo

func (e *Episode) GetEpisodeInfo(client *common.HTTPClient, quality string) error

GetEpisodeInfo retrieves and populates the metadata on the Episode

func (*Episode) GetFilename

func (e *Episode) GetFilename() string

GetFilename returns the Episodes filename

type Season

type Season struct {
	Title    string
	Number   int
	Length   int
	Episodes []Episode
}

Season contains season metadata and child episodes

func (*Season) GetEpisodes

func (s *Season) GetEpisodes() common.Episodes

GetEpisodes copies the episodes on the Season and returns them as an common.Episodes

func (*Season) GetNumber

func (s *Season) GetNumber() int

GetNumber returns the season number that will be used for folder naming

type Show

type Show struct {
	Title   string
	AdID    string
	Path    string
	URL     string
	Seasons []Season
}

Show contins show metadata and child seasons

func (*Show) GetSeasons

func (show *Show) GetSeasons() common.Seasons

Re-stores seasons belonging to the show and returns them for iteration

func (*Show) GetTitle

func (show *Show) GetTitle() string

Gets the title of the show for referencing outside of this lib

func (*Show) Scrape

func (s *Show) Scrape(client *common.HTTPClient, showURL string) error

Scrape appends all the seasons/episodes found for the show

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL