media

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TraktClientId string = "7eb1023eff72ac4d130e1fb46ae2741fe0f5fd39c367b74c8f37285e09aff23d"

	Tmdb TraktSearchType = "tmdb"
	Tvdb TraktSearchType = "tvdb"
)

Variables

This section is empty.

Functions

func LookupTraktId

func LookupTraktId(mediaType string, providerType TraktSearchType, searchId string) (int, error)

func PruneExistingMedia

func PruneExistingMedia(pvrMediaItems map[string]config.MediaItem, providerMediaItems map[string]config.MediaItem) (map[string]config.MediaItem, error)

func SortedMediaItemSlice

func SortedMediaItemSlice(mediaItems map[string]config.MediaItem, sortType SortType) []config.MediaItem

func ValidateTmdbId

func ValidateTmdbId(idType string, tmdbId string) bool

func ValidateTvdbId

func ValidateTvdbId(tvdbId string) bool

Types

type SortType

type SortType string
const (
	SortTypeReleaseDate SortType = "release"
)

type TraktSearchResponse

type TraktSearchResponse []struct {
	Type  string `json:"type"`
	Score int    `json:"score"`
	Movie *struct {
		Title string `json:"title"`
		Year  int    `json:"year"`
		Ids   struct {
			Trakt int    `json:"trakt"`
			Slug  string `json:"slug"`
			Imdb  string `json:"imdb"`
			Tmdb  int    `json:"tmdb"`
		} `json:"ids"`
	} `json:"movie"`
	Show *struct {
		Title string `json:"title"`
		Year  int    `json:"year"`
		Ids   struct {
			Trakt  int         `json:"trakt"`
			Slug   string      `json:"slug"`
			Tvdb   int         `json:"tvdb"`
			Imdb   string      `json:"imdb"`
			Tmdb   int         `json:"tmdb"`
			Tvrage interface{} `json:"tvrage"`
		} `json:"ids"`
	} `json:"show"`
}

type TraktSearchType

type TraktSearchType string

Jump to

Keyboard shortcuts

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