library

package
v0.1.102 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: MIT Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// MovieType ...
	MovieType = iota
	// ShowType ...
	ShowType
	// SeasonType ...
	SeasonType
	// EpisodeType ...
	EpisodeType
)
View Source
const (
	// StateDeleted ...
	StateDeleted = iota
	// StateActive ...
	StateActive
)
View Source
const (
	// ActionUpdate ...
	ActionUpdate = iota
	// ActionDelete ...
	ActionDelete
	// ActionSafeDelete ...
	ActionSafeDelete
)
View Source
const (
	// TVDBScraper ...
	TVDBScraper = iota
	// TMDBScraper ...
	TMDBScraper
	// TraktScraper ...
	TraktScraper
	// IMDBScraper ...
	IMDBScraper
)
View Source
const (
	// Active ...
	Active = iota
	// Deleted ...
	Deleted
)
View Source
const (
	// Delete ...
	Delete = iota
	// Update ...
	Update
	// Batch ...
	Batch
	// BatchDelete ...
	BatchDelete
	// DeleteTorrent ...
	DeleteTorrent
)

Variables

View Source
var (
	ErrVideoRemoved = errors.New("Video is marked as removed")
	ErrNoContainer  = errors.New("Container is not found")
)
View Source
var (
	// IsTraktInitialized used to mark if we need only incremental updates from Trakt
	IsTraktInitialized bool
)
View Source
var (
	ItemTypes = []string{
		"Movie",
		"Show",
		"Season",
		"Episode",
	}
)

Functions

func AddMovie

func AddMovie(tmdbID string, force bool) (*tmdb.Movie, error)

AddMovie is adding movie to the library

func AddShow

func AddShow(tmdbID string, force bool) (*tmdb.Show, error)

AddShow is adding show to the library

func ClearCacheKey

func ClearCacheKey(key string)

ClearCacheKey deletes specific key

func ClearPageCache

func ClearPageCache(xbmcHost *xbmc.XBMCHost)

ClearPageCache deletes cached page listings

func ClearResolveCache

func ClearResolveCache()

ClearResolveCache deletes cached IDs resolve

func ClearTmdbCache

func ClearTmdbCache(xbmcHost *xbmc.XBMCHost)

ClearTmdbCache deletes cached tmdb data

func ClearTraktCache

func ClearTraktCache(xbmcHost *xbmc.XBMCHost)

ClearTraktCache deletes cached trakt data

func CloseLibrary

func CloseLibrary()

CloseLibrary ...

func DiffTraktMovies

func DiffTraktMovies(previous, current []*trakt.Movies, isInitialized bool) []*trakt.Movies

DiffTraktMovies ...

func DiffTraktShows

func DiffTraktShows(previous, current []*trakt.Shows, isInitialized bool) []*trakt.Shows

DiffTraktShows ...

func GetDuplicateStats

func GetDuplicateStats() (movies, shows, episodes int, err error)

func Init

func Init()

Init makes preparations on program start

func InitDB

func InitDB()

InitDB ...

func IsInLibrary

func IsInLibrary(id int, mediaType int) (res bool)

IsInLibrary checks for LibraryItem in Elementum database

func MarkKodiAdded

func MarkKodiAdded()

MarkKodiAdded ...

func MarkKodiRefresh

func MarkKodiRefresh()

MarkKodiRefresh ...

func MarkKodiUpdated

func MarkKodiUpdated()

MarkKodiUpdated ...

func MoviesLibraryPath

func MoviesLibraryPath() string

MoviesLibraryPath contains calculated path for saving Movies strm files

func MoviesToUID

func MoviesToUID(containerType uid.ContainerType, movies []*trakt.Movies)

func MoviesToUIDLocked

func MoviesToUIDLocked(containerType uid.ContainerType, movies []*trakt.Movies)

func PlanKodiShowsUpdate

func PlanKodiShowsUpdate()

PlanKodiShowsUpdate ...

func PlanKodiUpdate

func PlanKodiUpdate()

PlanKodiUpdate ...

func PlanMoviesUpdate

func PlanMoviesUpdate()

PlanMoviesUpdate ...

func PlanOverallUpdate

func PlanOverallUpdate()

PlanOverallUpdate ...

func PlanShowUpdate

func PlanShowUpdate(showID int)

PlanShowUpdate ...

func PlanShowsUpdate

func PlanShowsUpdate()

PlanShowsUpdate ...

func PlanTraktUpdate

func PlanTraktUpdate()

PlanTraktUpdate ...

func Refresh

func Refresh() error

Refresh is updating library from Kodi

func RefreshEpisode

func RefreshEpisode(kodiID, action int)

RefreshEpisode ...

func RefreshEpisodes

func RefreshEpisodes() error

RefreshEpisodes updates episodes list for selected show in the library

func RefreshKodi

func RefreshKodi() error

RefreshKodi runs Kodi library refresh

func RefreshLocal

func RefreshLocal() error

RefreshLocal checks media directory to save up-to-date strm library

func RefreshMovie

func RefreshMovie(kodiID, action int)

RefreshMovie ...

func RefreshMovies

func RefreshMovies() error

RefreshMovies updates movies in the library

func RefreshOnScan

func RefreshOnScan() error

RefreshOnScan is launched when scan is finished

func RefreshSeasons

func RefreshSeasons() error

RefreshSeasons updates seasons list for selected show in the library

func RefreshShow

func RefreshShow(kodiID, action int)

RefreshShow ...

func RefreshShows

func RefreshShows() error

RefreshShows updates shows in the library

func RefreshTrakt

func RefreshTrakt() error

RefreshTrakt gets user activities from Trakt to see if we need to add movies/set watched status and so on

func RefreshTraktCollected

func RefreshTraktCollected(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error

RefreshTraktCollected ...

func RefreshTraktHidden

func RefreshTraktHidden(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error

RefreshTraktHidden ...

func RefreshTraktLists

func RefreshTraktLists(xbmcHost *xbmc.XBMCHost, isRefreshNeeded bool) error

RefreshTraktLists ...

func RefreshTraktPaused

func RefreshTraktPaused(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error

RefreshTraktPaused ...

func RefreshTraktWatched

func RefreshTraktWatched(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error

RefreshTraktWatched ...

func RefreshTraktWatchlisted

func RefreshTraktWatchlisted(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error

RefreshTraktWatchlisted ...

func RefreshUIDs

func RefreshUIDs() error

RefreshUIDs updates unique IDs for each library item This collects already saved UIDs for easier access

func RefreshUIDsRunner

func RefreshUIDsRunner(force bool) error

RefreshUIDsRunner completes RefreshUIDs target

func RemoveDuplicates

func RemoveDuplicates() error

func RemoveEpisode

func RemoveEpisode(tmdbID int, showID int, seasonNumber int, episodeNumber int) error

RemoveEpisode removes episode from the library

func RemoveMovie

func RemoveMovie(tmdbID int, purge bool) (*tmdb.Movie, []string, error)

RemoveMovie removes movie from the library

func RemoveShow

func RemoveShow(tmdbID string, purge bool) (*tmdb.Show, []string, error)

RemoveShow removes show from the library

func ShowsLibraryPath

func ShowsLibraryPath() string

ShowsLibraryPath contains calculated path for saving Shows strm files

func ShowsToUID

func ShowsToUID(containerType uid.ContainerType, shows []*trakt.Shows)

func ShowsToUIDLocked

func ShowsToUIDLocked(containerType uid.ContainerType, shows []*trakt.Shows)

func SyncMoviesList

func SyncMoviesList(listID string, updating bool, isUpdateNeeded bool) (err error)

SyncMoviesList updates trakt movie collections in cache

func SyncMoviesListAdded

func SyncMoviesListAdded(movies []*trakt.Movies, updating, isUpdateNeeded bool, label, listID string) (err error)

SyncMoviesListAdded updates added movies

func SyncShowsList

func SyncShowsList(listID string, updating bool, isUpdateNeeded bool) (err error)

SyncShowsList updates trakt collections in cache

func SyncShowsListAdded

func SyncShowsListAdded(shows []*trakt.Shows, updating, isUpdateNeeded bool, label, listID string) (err error)

SyncShowsListAdded updates added shows

func URLForHTTP

func URLForHTTP(pattern string, args ...interface{}) string

URLForHTTP ...

func URLForXBMC

func URLForXBMC(pattern string, args ...interface{}) string

URLForXBMC ...

func URLQuery

func URLQuery(route string, query ...string) string

URLQuery ...

Types

type DBItem

type DBItem struct {
	ID       int `json:"id"`
	State    int `json:"state"`
	Type     int `json:"type"`
	TVShowID int `json:"showid"`
}

DBItem ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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