video

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2023 License: AGPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FieldBudget     = "budget"
	FieldCast       = "cast"
	FieldCharacter  = "character"
	FieldCollection = "collection"
	FieldCrew       = "crew"
	FieldDate       = "date"
	FieldGenre      = "genre"
	FieldKeyword    = "keyword"
	FieldName       = "name"
	FieldRating     = "rating"
	FieldRevenue    = "revenue"
	FieldRuntime    = "runtime"
	FieldTagline    = "tagline"
	FieldTitle      = "title"
	FieldVote       = "vote"
	FieldVoteCount  = "vote_count"

	JobDirector   = "Director"
	JobNovel      = "Novel"
	JobScreenplay = "Screenplay"
	JobStory      = "Story"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Cast

type Cast struct {
	gorm.Model
	TMID      int64 `gorm:"index:idx_cast_tmid"`
	PEID      int64 `gorm:"index:idx_cast_peid"`
	Character string
	Rank      int
	Person    Person `gorm:"-"`
}

func (Cast) TableName

func (Cast) TableName() string

type Collection

type Collection struct {
	gorm.Model
	Name     string
	SortName string
	TMID     int64
}

type Crew

type Crew struct {
	gorm.Model
	TMID       int64
	PEID       int64
	Department string
	Job        string
	Person     Person `gorm:"-"`
}

func (Crew) TableName

func (Crew) TableName() string

type Episode

type Episode struct {
	gorm.Model
	EPID         int64 `gorm:"uniqueIndex:idx_episode_epid"`
	TVID         int64
	Name         string
	Overview     string
	Date         string
	StillPath    string
	Season       int
	Episode      int
	VoteAverage  float32
	VoteCount    int
	Key          string
	Size         int64
	ETag         string
	LastModified time.Time
}

type Genre

type Genre struct {
	gorm.Model
	TMID int64
	Name string
}

type Keyword

type Keyword struct {
	gorm.Model
	TMID int64
	Name string
}

type Movie

type Movie struct {
	gorm.Model
	UUID             string `gorm:"index:idx_movie_uuid" json:"-"`
	TMID             int64  `gorm:"uniqueIndex:idx_movie_tmid"`
	IMID             string
	Title            string
	Date             time.Time
	Rating           string
	Tagline          string
	OriginalTitle    string
	OriginalLanguage string
	Overview         string
	Budget           int64
	Revenue          int64
	Runtime          int
	VoteAverage      float32
	VoteCount        int
	BackdropPath     string
	PosterPath       string
	SortTitle        string
	Key              string
	Size             int64
	ETag             string
	LastModified     time.Time
}

func (*Movie) BeforeCreate

func (m *Movie) BeforeCreate(tx *g.DB) (err error)

type Person

type Person struct {
	gorm.Model
	PEID        int64 `gorm:"uniqueIndex:idx_person_peid"`
	IMID        string
	Name        string
	ProfilePath string
	Bio         string
	Birthplace  string
	Birthday    time.Time
	Deathday    time.Time
}

func (Person) TableName

func (Person) TableName() string

type Recommend

type Recommend struct {
	Name   string
	Movies []Movie
}

type TVShow

type TVShow struct {
	gorm.Model
	TVID             int64 `gorm:"uniqueIndex:idx_tvshow_tvid"`
	Name             string
	SortName         string
	Date             time.Time
	EndDate          time.Time
	Tagline          string
	OriginalName     string
	OriginalLanguage string
	Overview         string
	BackdropPath     string
	PosterPath       string
	SeasonCount      int
	EpisodeCount     int
	VoteAverage      float32
	VoteCount        int
}

type Video

type Video struct {
	// contains filtered or unexported fields
}

func NewVideo

func NewVideo(config *config.Config) *Video

func (*Video) Cast

func (v *Video) Cast(m Movie) []Cast

func (*Video) Close

func (v *Video) Close()

func (*Video) CollectionMovies

func (v *Video) CollectionMovies(c *Collection) []Movie

func (*Video) Collections

func (v *Video) Collections() []Collection

func (*Video) Crew

func (v *Video) Crew(m Movie) []Crew

func (*Video) Directing

func (v *Video) Directing(p Person) []Movie

func (*Video) FindMovie

func (v *Video) FindMovie(identifier string) (Movie, error)

func (*Video) FindMovies

func (v *Video) FindMovies(identifiers []string) []Movie

func (*Video) Genre

func (v *Video) Genre(name string) []Movie

func (*Video) Genres

func (v *Video) Genres(m Movie) []string

func (*Video) HasMovies

func (v *Video) HasMovies() bool

func (*Video) Keyword

func (v *Video) Keyword(name string) []Movie

func (*Video) Keywords

func (v *Video) Keywords(m Movie) []string

func (*Video) LastModified

func (v *Video) LastModified() time.Time

func (*Video) LookupCollectionName

func (v *Video) LookupCollectionName(name string) (*Collection, error)

func (*Video) LookupETag

func (v *Video) LookupETag(etag string) (*Movie, error)

func (*Video) LookupIMID

func (v *Video) LookupIMID(imid string) (Movie, error)

func (*Video) LookupMovie

func (v *Video) LookupMovie(id int) (Movie, error)

func (*Video) LookupPerson

func (v *Video) LookupPerson(id int) (Person, error)

func (*Video) LookupTMID

func (v *Video) LookupTMID(tmid int) (Movie, error)

func (*Video) LookupUUID

func (v *Video) LookupUUID(uuid string) (Movie, error)

func (*Video) Movie

func (v *Video) Movie(tmid int) (*Movie, error)

func (*Video) MovieBackdrop

func (v *Video) MovieBackdrop(m Movie) string

func (*Video) MovieCollection

func (v *Video) MovieCollection(m Movie) *Collection

func (*Video) MovieCount

func (v *Video) MovieCount() int64

func (*Video) MoviePoster

func (v *Video) MoviePoster(m Movie) string

func (*Video) MoviePosterSmall

func (v *Video) MoviePosterSmall(m Movie) string

func (*Video) MovieURL

func (v *Video) MovieURL(m Movie) *url.URL

func (*Video) Movies

func (v *Video) Movies() []Movie

func (*Video) Open

func (v *Video) Open() (err error)

func (*Video) Person

func (v *Video) Person(peid int) (*Person, error)

func (*Video) PersonProfile

func (v *Video) PersonProfile(p Person) string

func (*Video) Producing

func (v *Video) Producing(p Person) []Movie

func (*Video) RecentlyAdded

func (v *Video) RecentlyAdded() []Movie

func (*Video) RecentlyReleased

func (v *Video) RecentlyReleased() []Movie

func (*Video) Recommend

func (v *Video) Recommend() []Recommend

func (*Video) Search

func (v *Video) Search(q string, limit ...int) []Movie

func (*Video) Starring

func (v *Video) Starring(p Person) []Movie

func (*Video) Sync

func (v *Video) Sync() error

func (*Video) SyncBackdrops

func (v *Video) SyncBackdrops(client client.Getter)

func (*Video) SyncPosters

func (v *Video) SyncPosters(client client.Getter)

func (*Video) SyncProfileImages

func (v *Video) SyncProfileImages(client client.Getter)

func (*Video) SyncSince

func (v *Video) SyncSince(lastSync time.Time) error

func (*Video) TMDBMovieBackdrop

func (v *Video) TMDBMovieBackdrop(m Movie) string

func (*Video) TMDBMoviePoster

func (v *Video) TMDBMoviePoster(m Movie) string

func (*Video) TMDBMoviePosterSmall

func (v *Video) TMDBMoviePosterSmall(m Movie) string

func (*Video) TMDBPersonProfile

func (v *Video) TMDBPersonProfile(p Person) string

func (*Video) UpdateMovie

func (v *Video) UpdateMovie(m *Movie) error

func (*Video) Writing

func (v *Video) Writing(p Person) []Movie

Jump to

Keyboard shortcuts

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