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 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) (err error)
- func IsDuplicateMovie(tmdbID string) error
- func IsDuplicateShow(tmdbID string) error
- func MoviesLibraryPath() string
- func Refresh() error
- func RefreshEpisode(kodiID, action int)
- func RefreshEpisodes() error
- func RefreshLocal() error
- func RefreshMovie(kodiID, action int)
- func RefreshMovies() error
- func RefreshOnClean() error
- func RefreshOnScan() error
- func RefreshSeasons() error
- func RefreshShow(kodiID, action int)
- func RefreshShows() error
- func RefreshTrakt() error
- func RefreshUIDs() 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) (err error)
- func SyncShowsList(listID string, updating bool) (err error)
- func SyncTraktWatched() (haveChanges 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 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 ( // Scanning shows if Kodi library Scan is in progress Scanning = false // TraktScanning shows if Trakt is working TraktScanning = false )
Functions ¶
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 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 RefreshUIDs ¶
func RefreshUIDs() error
RefreshUIDs updates unique IDs for each library item This collects already saved UIDs for easier access
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
func SyncTraktWatched ¶
SyncTraktWatched gets watched list and updates watched status in the library
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 UIDs *UniqueIDs XbmcUIDs *xbmc.UniqueIDs Resume *Resume }
Episode represents Episode content type
type Library ¶
type Library struct { // Stores all the unique IDs collected UIDs map[uint64]*UniqueIDs // Stores Library Movies Movies map[int]*Movie // Stored Library Shows Shows map[int]*Show WatchedTrakt map[uint64]bool // contains filtered or unexported fields }
Library represents library
type Movie ¶
type Movie struct { ID int Title string File string Year int 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 Seasons map[int]*Season Episodes map[int]*Episode UIDs *UniqueIDs XbmcUIDs *xbmc.UniqueIDs }
Show represents Show content type
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