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()
- func ClearResolveCache()
- func ClearTmdbCache()
- func ClearTraktCache()
- func CloseLibrary()
- func DiffTraktShows(previous, current []*trakt.Shows, isInitialized bool) []*trakt.Shows
- func GetLibraryEpisode(kodiID int) (*Show, *Episode)
- func GetLibrarySeason(kodiID int) (*Show, *Season)
- func GetShowForEpisode(kodiID int) (*Show, *Episode)
- func Init()
- func InitDB()
- func IsAddedToLibrary(id string, mediaType int) (isAdded bool)
- func IsDuplicateEpisode(tmdbShowID int, seasonNumber int, episodeNumber int) bool
- func IsDuplicateMovie(tmdbID string) bool
- func IsDuplicateShow(tmdbID string) bool
- func IsDuplicateShowByInt(tmdbID int) bool
- func MarkKodiAdded()
- func MarkKodiRefresh()
- func MarkKodiUpdated()
- func MoviesLibraryPath() string
- 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(itemType int, isRefreshNeeded bool) error
- func RefreshTraktHidden(itemType int, isRefreshNeeded bool) error
- func RefreshTraktLists(isRefreshNeeded bool) error
- func RefreshTraktPaused(itemType int, isRefreshNeeded bool) error
- func RefreshTraktWatched(itemType int, isRefreshNeeded bool) error
- func RefreshTraktWatchlisted(itemType int, isRefreshNeeded bool) error
- func RefreshUIDs() error
- func RefreshUIDsRunner(force bool) error
- func RemoveEpisode(tmdbID int, showID int, seasonNumber int, episodeNumber int) error
- func RemoveMovie(tmdbID int) (*tmdb.Movie, error)
- func RemoveShow(tmdbID string) (*tmdb.Show, error)
- func ShowsLibraryPath() string
- func SyncMoviesList(listID string, updating bool, isUpdateNeeded bool) (err error)
- func SyncShowsList(listID string, updating bool, isUpdateNeeded bool) (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
- type Episode
- type Library
- type Movie
- type Resume
- type Season
- type Show
- type Status
- type UniqueIDs
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 ( // IsTraktInitialized used to mark if we need only incremental updates from Trakt IsTraktInitialized bool )
Functions ¶
func DiffTraktShows ¶
DiffTraktShows ...
func GetLibraryEpisode ¶
GetLibraryEpisode finds Show/Episode from library
func GetLibrarySeason ¶
GetLibrarySeason finds Show/Season from library
func GetShowForEpisode ¶
GetShowForEpisode returns 'show' and 'episode'
func IsAddedToLibrary ¶
IsAddedToLibrary checks if specific TMDB exists in the library
func IsDuplicateEpisode ¶
IsDuplicateEpisode checks if episode exists in the library
func IsDuplicateMovie ¶
IsDuplicateMovie checks if movie exists in the library
func IsDuplicateShow ¶
IsDuplicateShow checks if show exists in the library
func IsDuplicateShowByInt ¶
IsDuplicateShowByInt checks if show exists in the library
func MoviesLibraryPath ¶
func MoviesLibraryPath() string
MoviesLibraryPath contains calculated path for saving Movies strm files
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 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 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 SyncMoviesList ¶
SyncMoviesList updates trakt movie collections in cache
func SyncShowsList ¶
SyncShowsList updates trakt collections in cache
Types ¶
type DBItem ¶
type DBItem struct { ID int `json:"id"` State int `json:"state"` Type int `json:"type"` TVShowID int `json:"showid"` }
DBItem ...
type Episode ¶
type Episode struct { ID int Title string Season int Episode int File string DateAdded time.Time UIDs *UniqueIDs XbmcUIDs *xbmc.UniqueIDs Resume *Resume }
Episode represents Episode content type
type Library ¶
type Library struct { // Stores all the unique IDs collected UIDs []*UniqueIDs Movies []*Movie Shows []*Show WatchedTrakt []uint64 Pending Status Running Status // contains filtered or unexported fields }
Library represents library
type Movie ¶
type Movie struct { ID int Title string File string Year int DateAdded time.Time UIDs *UniqueIDs XbmcUIDs *xbmc.UniqueIDs Resume *Resume }
Movie represents Movie content type
func GetLibraryMovie ¶
GetLibraryMovie finds Movie from library
type Resume ¶
Resume shows watched progress information
func GetEpisodeResume ¶
GetEpisodeResume returns Resume info for kodi id
func GetMovieResume ¶
GetMovieResume returns Resume info for kodi id
type Season ¶
type Season struct { ID int Title string Season int Episodes int UIDs *UniqueIDs XbmcUIDs *xbmc.UniqueIDs }
Season represents Season content type
type Show ¶
type Show struct { ID int Title string Year int DateAdded time.Time Seasons []*Season Episodes []*Episode UIDs *UniqueIDs XbmcUIDs *xbmc.UniqueIDs }
Show represents Show content type
type Status ¶
type Status struct { IsOverall bool IsMovies bool IsShows bool IsEpisodes bool IsTrakt bool IsKodi bool }
Status represents library bool statuses
type UniqueIDs ¶
type UniqueIDs struct { MediaType int `json:"media"` Kodi int `json:"kodi"` TMDB int `json:"tmdb"` TVDB int `json:"tvdb"` IMDB string `json:"imdb"` Trakt int `json:"trakt"` Playcount int `json:"playcount"` }
UniqueIDs represents all IDs for a library item
func GetUIDsFromKodi ¶
GetUIDsFromKodi returns UIDs object for provided Kodi ID