Documentation ¶
Index ¶
- Constants
- Variables
- func AddMovie(tmdbID string, force bool) (*tmdb.Movie, error)
- func AddShow(tmdbID string, force bool) (*tmdb.Show, error)
- func ClearCacheKey(key string)
- func ClearPageCache(xbmcHost *xbmc.XBMCHost)
- func ClearResolveCache()
- func ClearTmdbCache(xbmcHost *xbmc.XBMCHost)
- func ClearTraktCache(xbmcHost *xbmc.XBMCHost)
- func CloseLibrary()
- func DiffTraktMovies(previous, current []*trakt.Movies, isInitialized bool) []*trakt.Movies
- func DiffTraktShows(previous, current []*trakt.Shows, isInitialized bool) []*trakt.Shows
- func GetDuplicateStats() (movies, shows, episodes int, err error)
- func Init()
- func InitDB()
- func IsInLibrary(id int, mediaType int) (res bool)
- func MarkKodiAdded()
- func MarkKodiRefresh()
- func MarkKodiUpdated()
- func MoviesLibraryPath() string
- func MoviesToUID(containerType uid.ContainerType, movies []*trakt.Movies)
- func MoviesToUIDLocked(containerType uid.ContainerType, movies []*trakt.Movies)
- func PlanKodiShowsUpdate()
- func PlanKodiUpdate()
- func PlanMoviesUpdate()
- func PlanOverallUpdate()
- func PlanShowUpdate(showID int)
- func PlanShowsUpdate()
- func PlanTraktUpdate()
- func Refresh() error
- func RefreshEpisode(kodiID, action int)
- func RefreshEpisodes() error
- func RefreshKodi() error
- func RefreshLocal() error
- func RefreshMovie(kodiID, action int)
- func RefreshMovies() error
- func RefreshOnScan() error
- func RefreshSeasons() error
- func RefreshShow(kodiID, action int)
- func RefreshShows() error
- func RefreshTrakt() error
- func RefreshTraktCollected(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error
- func RefreshTraktHidden(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error
- func RefreshTraktLists(xbmcHost *xbmc.XBMCHost, isRefreshNeeded bool) error
- func RefreshTraktPaused(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error
- func RefreshTraktWatched(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error
- func RefreshTraktWatchlisted(xbmcHost *xbmc.XBMCHost, itemType int, isRefreshNeeded bool) error
- func RefreshUIDs() error
- func RefreshUIDsRunner(force bool) error
- func RemoveDuplicates() error
- func RemoveEpisode(tmdbID int, showID int, seasonNumber int, episodeNumber int) error
- func RemoveMovie(tmdbID int, purge bool) (*tmdb.Movie, []string, error)
- func RemoveShow(tmdbID string, purge bool) (*tmdb.Show, []string, error)
- func ShowsLibraryPath() string
- func ShowsToUID(containerType uid.ContainerType, shows []*trakt.Shows)
- func ShowsToUIDLocked(containerType uid.ContainerType, shows []*trakt.Shows)
- func SyncMoviesList(listID string, updating bool, isUpdateNeeded bool) (err error)
- func SyncMoviesListAdded(movies []*trakt.Movies, updating, isUpdateNeeded bool, label, listID string) (err error)
- func SyncShowsList(listID string, updating bool, isUpdateNeeded bool) (err error)
- func SyncShowsListAdded(shows []*trakt.Shows, updating, isUpdateNeeded bool, label, listID string) (err error)
- func URLForHTTP(pattern string, args ...interface{}) string
- func URLForXBMC(pattern string, args ...interface{}) string
- func URLQuery(route string, query ...string) string
- type DBItem
Constants ¶
const ( // MovieType ... MovieType = iota // ShowType ... ShowType // SeasonType ... SeasonType // EpisodeType ... EpisodeType )
const ( // StateDeleted ... StateDeleted = iota // StateActive ... StateActive )
const ( // ActionUpdate ... ActionUpdate = iota // ActionDelete ... ActionDelete // ActionSafeDelete ... ActionSafeDelete )
const ( // TVDBScraper ... TVDBScraper = iota // TMDBScraper ... TMDBScraper // TraktScraper ... TraktScraper // IMDBScraper ... IMDBScraper )
const ( // Active ... Active = iota // Deleted ... Deleted )
const ( // Delete ... Delete = iota // Update ... Update // Batch ... Batch // BatchDelete ... BatchDelete // DeleteTorrent ... DeleteTorrent )
Variables ¶
var ( ErrVideoRemoved = errors.New("Video is marked as removed") ErrNoContainer = errors.New("Container is not found") )
var ( // IsTraktInitialized used to mark if we need only incremental updates from Trakt IsTraktInitialized bool )
var (
ItemTypes = []string{
"Movie",
"Show",
"Season",
"Episode",
}
)
Functions ¶
func ClearPageCache ¶
ClearPageCache deletes cached page listings
func ClearTmdbCache ¶
ClearTmdbCache deletes cached tmdb data
func ClearTraktCache ¶
ClearTraktCache deletes cached trakt data
func DiffTraktMovies ¶
DiffTraktMovies ...
func DiffTraktShows ¶
DiffTraktShows ...
func GetDuplicateStats ¶
func IsInLibrary ¶
IsInLibrary checks for LibraryItem in Elementum database
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 RefreshEpisodes ¶
func RefreshEpisodes() error
RefreshEpisodes updates episodes list for selected show in the library
func RefreshLocal ¶
func RefreshLocal() error
RefreshLocal checks media directory to save up-to-date strm library
func RefreshSeasons ¶
func RefreshSeasons() error
RefreshSeasons updates seasons list for selected show 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 ¶
RefreshTraktCollected ...
func RefreshTraktHidden ¶
RefreshTraktHidden ...
func RefreshTraktLists ¶
RefreshTraktLists ...
func RefreshTraktPaused ¶
RefreshTraktPaused ...
func RefreshTraktWatched ¶
RefreshTraktWatched ...
func RefreshTraktWatchlisted ¶
RefreshTraktWatchlisted ...
func RefreshUIDs ¶
func RefreshUIDs() error
RefreshUIDs updates unique IDs for each library item This collects already saved UIDs for easier access
func RefreshUIDsRunner ¶
RefreshUIDsRunner completes RefreshUIDs target
func RemoveDuplicates ¶
func RemoveDuplicates() error
func RemoveEpisode ¶
RemoveEpisode removes episode from the library
func RemoveMovie ¶
RemoveMovie removes movie from the library
func RemoveShow ¶
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 ¶
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 ¶
SyncShowsList updates trakt collections in cache