Documentation ¶
Index ¶
- func CheckUser(ctx context.Context, username, password string) error
- func Close() error
- func ConvertSQL(sql string) map[string]string
- func CreateIndexer(name string, userID int, baseUrl, apiKey string, forMovies, forSeries bool, ...) (id int, err error)
- func CreateMigrationsFor(dbmsKey, inputDir string) (string, error)
- func CreateProfile(name string) error
- func DeleteDownloader(id int) error
- func DeleteIndexer(id int) error
- func DeleteMedia(id int) error
- func DeleteMediaServer(id int) error
- func DeletePath(id int) error
- func DeleteProfile(id int) error
- func DeleteReleaseHistory(releaseID string) error
- func GetMonitoringMedia() (*[]Media, error)
- func GetPoster(mediaID int) (poster []byte, err error)
- func Init() error
- func NewDownload(mediaID int, downloaderID int, ...) (id int, err error)
- func NewDownloader(downloaderType, name, fileAction string, config map[string]interface{}) (id int, err error)
- func NewMediaServer(mediaServerType, name string, config map[string]interface{}) (id int, err error)
- func NewPath(path string, moviesDefault, seriesDefault bool) error
- func NewTx(ctx context.Context, opts sql.TxOptions) (*sql.Tx, error)
- func RestoreDownloaders(tx *sql.Tx, downloaders []*Downloader) error
- func RestoreDownloads(tx *sql.Tx, downloads []*Download) error
- func RestoreIndexers(tx *sql.Tx, indexers []*Indexer) error
- func RestoreMediaServers(tx *sql.Tx, mediaServers []*MediaServer) error
- func RestoreMedias(tx *sql.Tx, medias []*Media) error
- func RestorePaths(tx *sql.Tx, paths []*Path) error
- func RestoreProfiles(tx *sql.Tx, profiles []*Profile) error
- func SelectAllCols(sb *sqlbuilder.SelectBuilder) *sqlbuilder.SelectBuilder
- func SetIndexerLastRSSID(id int, rssID string) error
- func SetMediaPath(id int, path string) error
- func SetUser(ctx context.Context, username, password string) error
- func UpdateDownloadStatusByIdentifier(identifier, status string) error
- func UpdateDownloader(id int, name, fileAction string, config map[string]interface{}) error
- func UpdateIndexer(id int, name string, userID int, baseUrl, apiKey string, ...) error
- func UpdateMedia(id int, profileID, pathID int) (err error)
- func UpdateMediaMonitoring(id int, monitoring bool) error
- func UpdateMediaServer(id int, name string, config map[string]interface{}) error
- func UpdatePath(id int, path string, moviesDefault, seriesDefault bool) error
- func UpdateProfile(id int, name, filter, sorter string) error
- func UpdateReleaseHistory(mediaID int, releaseID string) error
- func UpsertMedia(title *string, description *string, releasedAt *time.Time, endedAt *time.Time, ...) (id int, err error)
- type DateInterval
- type Download
- type Downloader
- type Indexer
- type Media
- func DumpMedias(tx *sql.Tx) ([]*Media, error)
- func GetAllMedia() ([]*Media, error)
- func GetMediaByID(id int) (Media, error)
- func GetMediaByImdbID(imdbID string) (Media, error)
- func GetMediaInIntervals(ctx context.Context, dateIntervals []DateInterval) ([]Media, error)
- func GetMediaReferencing(parentID int) ([]*Media, error)
- func GetRecentlyAddedMedia(max int) ([]Media, error)
- func SearchMedia(title string, contentType string, page int) ([]Media, int, error)
- type MediaServer
- type Path
- type Profile
- type ReleaseHistory
- type Scannable
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertSQL ¶
ConvertSQL takes a commented SQL string and returns a map of DBMS systems to their respective sql
func CreateIndexer ¶
func CreateMigrationsFor ¶
CreateMigrationsFor takes a path to a migrations folder. Outputs a path to a temporary directory containing the same migrations but with the requested dbms's conversion applied
func CreateProfile ¶
func DeleteDownloader ¶
func DeleteIndexer ¶
func DeleteMedia ¶
func DeleteMediaServer ¶
func DeletePath ¶
func DeleteProfile ¶
func DeleteReleaseHistory ¶
func GetMonitoringMedia ¶
func NewDownload ¶
func NewDownloader ¶
func NewMediaServer ¶
func RestoreDownloaders ¶
func RestoreDownloaders(tx *sql.Tx, downloaders []*Downloader) error
func RestoreMediaServers ¶
func RestoreMediaServers(tx *sql.Tx, mediaServers []*MediaServer) error
func SelectAllCols ¶
func SelectAllCols(sb *sqlbuilder.SelectBuilder) *sqlbuilder.SelectBuilder
func SetIndexerLastRSSID ¶
func SetMediaPath ¶
func UpdateDownloader ¶
func UpdateIndexer ¶
func UpdateMedia ¶
func UpdateMediaMonitoring ¶
func UpdateMediaServer ¶
func UpdateProfile ¶
func UpdateReleaseHistory ¶
func UpsertMedia ¶
func UpsertMedia(title *string, description *string, releasedAt *time.Time, endedAt *time.Time, contentType *string, parentMediaID *int, tmdbID *int, imdbID *string, tvdbID *int, tmdbRating *int, imdbRating *int, runtime *int, poster *[]byte, genres []string, profileID, pathID *int, number *int, monitoring bool) (id int, err error)
UpsertMedia inserts the new media described by the parameters, and on a conflict of the item_number
and parent_media_id, it will only update the metadata
Types ¶
type Download ¶
type Download struct { ID int MediaID sql.NullInt32 DownloaderID sql.NullInt32 Status string FriendlyName string Identifier string ReleaseID sql.NullString }
func GetActiveDownloads ¶
func GetDownloadByIdentifier ¶
func GetDownloads ¶
func GetFinishedDownloads ¶
type Downloader ¶
type Downloader struct { ID int Name string DownloaderType string FileAction string Config map[string]interface{} }
func DumpDownloaders ¶
func DumpDownloaders(tx *sql.Tx) ([]*Downloader, error)
func GetDownloader ¶
func GetDownloader(id int) (downloader Downloader, err error)
func GetDownloaders ¶
func GetDownloaders() (downloaders []Downloader, err error)
type Indexer ¶
type Indexer struct { ID int Name string UserID int BaseUrl string ApiKey string ForMovies bool ForSeries bool DownloadType string LastRSSID string }
func GetIndexerByID ¶
func GetIndexers ¶
type Media ¶
type Media struct { ID int Title sql.NullString Description sql.NullString ReleasedAt sql.NullTime EndedAt sql.NullTime ContentType sql.NullString Poster *[]byte ParentMediaID sql.NullInt32 TmdbID sql.NullInt32 ImdbID sql.NullString TvdbID sql.NullInt32 TmdbRating sql.NullInt32 ImdbRating sql.NullInt32 Runtime sql.NullInt32 Status string Path sql.NullString Size sql.NullInt64 ProfileID sql.NullInt32 PathID sql.NullInt32 ItemNumber sql.NullInt32 Monitoring bool Added time.Time }
func GetAllMedia ¶
func GetMediaByID ¶
func GetMediaByImdbID ¶
func GetMediaInIntervals ¶
func GetMediaInIntervals(ctx context.Context, dateIntervals []DateInterval) ([]Media, error)
GetMediaInIntervals select an array of media within a date range. Includes all series and season medias
func GetMediaReferencing ¶
func GetRecentlyAddedMedia ¶
type MediaServer ¶
func DumpMediaServers ¶
func DumpMediaServers(tx *sql.Tx) (mediaServers []*MediaServer, err error)
func GetMediaServer ¶
func GetMediaServer(id int) (mediaServer MediaServer, err error)
func GetMediaServers ¶
func GetMediaServers() (mediaServers []MediaServer, err error)
type Profile ¶
type Profile struct { ID int Name sql.NullString Filter sql.NullString Sorter sql.NullString }
func GetProfileByID ¶
func GetProfileByName ¶
func GetProfiles ¶
type ReleaseHistory ¶
func GetReleaseHistoryForMedia ¶
func GetReleaseHistoryForMedia(mediaID int) ([]ReleaseHistory, error)
Click to show internal directories.
Click to hide internal directories.