database

package
v0.0.0-...-6079cd8 Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2021 License: AGPL-3.0 Imports: 25 Imported by: 0

Documentation

Overview

movies

Index

Constants

This section is empty.

Variables

View Source
var DB *sqlx.DB
View Source
var DBImdb *sqlx.DB
View Source
var DBVersion string
View Source
var Getaudios []QualitiesRegex
View Source
var Getcodecs []QualitiesRegex
View Source
var Getqualities []QualitiesRegex
View Source
var Getresolutions []QualitiesRegex
View Source
var ListAudio = []Qualities{
	{Type: 4, Name: "mp3", Priority: 10, Regex: "(\\b|_)mp3(\\b|_)", Strings: "mp3"},
	{Type: 4, Name: "aac", Priority: 20, Regex: "(\\b|_)aac(s)?(\\b|_)", Strings: "aac,aacs"},
	{Type: 4, Name: "dd5.1", Priority: 30, Regex: "(\\b|_)dd[0-9\\.]+(\\b|_)"},
	{Type: 4, Name: "ac3", Priority: 40, Regex: "(\\b|_)ac3(s)?(\\b|_)", Strings: "ac3,ac3s"},
	{Type: 4, Name: "dd+5.1", Priority: 50, Regex: "(\\b|_)dd[p+][0-9\\.]+(\\b|_)"},
	{Type: 4, Name: "flac", Priority: 60, Regex: "(\\b|_)flac(s)?(\\b|_)", Strings: "flac,flacs"},
	{Type: 4, Name: "dtshd", Priority: 70, Regex: "(\\b|_)dts[^a-zA-Z0-9]?hd(?:[^a-zA-Z0-9]?ma)?(s)?(\\b|_)"},
	{Type: 4, Name: "dts", Priority: 80, Regex: "(\\b|_)dts(s)?(\\b|_)", Strings: "dts,dtss"},
	{Type: 4, Name: "truehd", Priority: 90, Regex: "(\\b|_)truehd(s)?(\\b|_)", Strings: "truehd"}}
View Source
var ListCodecs = []Qualities{
	{Type: 3, Name: "divx", Priority: 100, Regex: "(\\b|_)divx(\\b|_)", Strings: "divx"},
	{Type: 3, Name: "xvid", Priority: 200, Regex: "(\\b|_)xvid(\\b|_)", Strings: "xvid"},
	{Type: 3, Name: "h264", Priority: 300, Regex: "(\\b|_)(h|x)264(\\b|_)", Strings: "h264,x264"},
	{Type: 3, Name: "vp9", Priority: 400, Regex: "(\\b|_)vp9(\\b|_)", Strings: "vp9"},
	{Type: 3, Name: "h265", Priority: 500, Regex: "(\\b|_)((h|x)265|hevc)(\\b|_)", Strings: "h265,x265,hevc"},
	{Type: 3, Name: "10bit", Priority: 600, Regex: "(\\b|_)(10bit|hi10p)(\\b|_)", Strings: "10bit,hi10p"}}
View Source
var ListQualities = []Qualities{
	{Type: 2, Name: "workprint", Priority: 1000, Regex: "(\\b|_)workprint(\\b|_)", Strings: "workprint"},
	{Type: 2, Name: "cam", Priority: 1300, Regex: "(\\b|_)(?:web)?cam(\\b|_)", Strings: "webcam,cam"},
	{Type: 2, Name: "ts", Priority: 2000, Regex: "(\\b|_)(?:hd)?ts|telesync(\\b|_)", Strings: "hdts,ts,telesync"},
	{Type: 2, Name: "tc", Priority: 2300, Regex: "(\\b|_)(tc|telecine)(\\b|_)", Strings: "tc,telecine"},
	{Type: 2, Name: "r5", Priority: 3000, Regex: "(\\b|_)r[2-8c](\\b|_)", Strings: "r5,r6"},
	{Type: 2, Name: "hdrip", Priority: 3300, Regex: "(\\b|_)hd[^a-zA-Z0-9]?rip(\\b|_)", Strings: "hdrip,hd.rip,hd rip,hd-rip,hd_rip"},
	{Type: 2, Name: "ppvrip", Priority: 4000, Regex: "(\\b|_)ppv[^a-zA-Z0-9]?rip(\\b|_)", Strings: "ppvrip,ppv.rip,ppv rip,ppv-rip,ppv_rip"},
	{Type: 2, Name: "preair", Priority: 4300, Regex: "(\\b|_)preair(\\b|_)", Strings: "preair"},
	{Type: 2, Name: "tvrip", Priority: 5000, Regex: "(\\b|_)tv[^a-zA-Z0-9]?rip(\\b|_)", Strings: "tvrip,tv.rip,tv rip,tv-rip,tv_rip"},
	{Type: 2, Name: "dsr", Priority: 5300, Regex: "(\\b|_)(dsr|ds)[^a-zA-Z0-9]?rip(\\b|_)", Strings: "dsrip,ds.rip,ds rip,ds-rip,ds_rip,dsrrip,dsr.rip,dsr rip,dsr-rip,dsr_rip"},
	{Type: 2, Name: "sdtv", Priority: 6000, Regex: "(\\b|_)(?:[sp]dtv|dvb)(?:[^a-zA-Z0-9]?rip)?(\\b|_)", Strings: "sdtv,pdtv,dvb,sdtvrip,sdtv.rip,sdtv rip,sdtv-rip,sdtv_rip,pdtvrip,pdtv.rip,pdtv rip,pdtv-rip,pdtv_rip,dvbrip,dvb.rip,dvb rip,dvb-rip,dvb_rip"},
	{Type: 2, Name: "dvdscr", Priority: 6300, Regex: "(\\b|_)(?:(?:dvd|web)[^a-zA-Z0-9]?)?scr(?:eener)?(\\b|_)", Strings: "webscr,webscreener,web.scr,web.screener,web-scr,web-screener,web scr,web screener,web_scr,web_screener,dvdscr,dvdscreener,dvd.scr,dvd.screener,dvd-scr,dvd-screener,dvd scr,dvd screener,dvd_scr,dvd_screener"},
	{Type: 2, Name: "bdscr", Priority: 7000, Regex: "(\\b|_)bdscr(?:eener)?(\\b|_)", Strings: "bdscr,bdscreener"},
	{Type: 2, Name: "webrip", Priority: 7300, Regex: "(\\b|_)web[^a-zA-Z0-9]?rip(\\b|_)", Strings: "webrip,web.rip,web rip,web-rip,web_rip"},
	{Type: 2, Name: "hdtv", Priority: 8000, Regex: "(\\b|_)a?hdtv(?:[^a-zA-Z0-9]?rip)?(\\b|_)", Strings: "hdtv,hdtvrip,hdtv.rip,hdtv rip,hdtv-rip,hdtv_rip"},
	{Type: 2, Name: "webdl", Priority: 8300, Regex: "(\\b|_)web(?:[^a-zA-Z0-9]?(dl|hd))?(\\b|_)", Strings: "webdl,web dl,web.dl,web-dl,web_dl,webhd,web.hd,web hd,web-hd,web_hd"},
	{Type: 2, Name: "dvdrip", Priority: 9000, Regex: "(\\b|_)(dvd[^a-zA-Z0-9]?rip|hddvd)(\\b|_)", Strings: "dvdrip,dvd.rip,dvd rip,dvd-rip,dvd_rip,hddvd,dvd"},
	{Type: 2, Name: "remux", Priority: 9100, Regex: "(\\b|_)remux(\\b|_)", Strings: "remux"},
	{Type: 2, Name: "bluray", Priority: 9300, Regex: "(\\b|_)(?:b[dr][^a-zA-Z0-9]?rip|blu[^a-zA-Z0-9]?ray(?:[^a-zA-Z0-9]?rip)?)(\\b|_)", Strings: "bdrip,bd.rip,bd rip,bd-rip,bd_rip,brrip,br.rip,br rip,br-rip,br_rip,bluray,blu ray,blu.ray,blu-ray,blu_ray"}}
View Source
var ListResolutions = []Qualities{
	{Type: 1, Name: "360p", Priority: 10000, Regex: "(\\b|_)360p(\\b|_)", Strings: "360p,360i"},
	{Type: 1, Name: "368p", Priority: 20000, Regex: "(\\b|_)368p(\\b|_)", Strings: "368p,368i"},
	{Type: 1, Name: "480p", Priority: 30000, Regex: "(\\b|_)480p(\\b|_)", Strings: "480p,480i"},
	{Type: 1, Name: "576p", Priority: 40000, Regex: "(\\b|_)576p(\\b|_)", Strings: "576p,576i"},
	{Type: 1, Name: "720p", Priority: 50000, Regex: "(\\b|_)(1280x)?720(i|p)(\\b|_)", Strings: "720p,720i"},
	{Type: 1, Name: "1080p", Priority: 60000, Regex: "(\\b|_)(1920x)?1080(i|p)(\\b|_)", Strings: "1080p,1080i"},
	{Type: 1, Name: "2160p", Priority: 70000, Regex: "(\\b|_)((3840x)?2160p|4k)(\\b|_)", Strings: "2160p,2160i"}}
View Source
var ReadWriteMu *sync.Mutex
View Source
var WriteMu *sync.RWMutex

Functions

func Backup

func Backup(db *sqlx.DB, backupPath string, maxbackups int) error

Backup the database. If db is nil, then uses the existing database connection.

func CountRows

func CountRows(table string, qu Query) (int, error)

Uses column id

func DbIntegrityCheck

func DbIntegrityCheck() string

func DbQuickCheck

func DbQuickCheck() string

func DeleteRow

func DeleteRow(table string, qu Query) (sql.Result, error)

func GetVars

func GetVars()

func ImdbCountRows

func ImdbCountRows(table string, qu Query) (int, error)

Uses column id

func ImdbDeleteRow

func ImdbDeleteRow(table string, qu Query) (sql.Result, error)

func ImdbInsertArray

func ImdbInsertArray(table string, columns []string, values []interface{}) (sql.Result, error)

func ImdbInsertRowMap

func ImdbInsertRowMap(table string, insert map[string]interface{}) (sql.Result, error)

func ImdbUpdateArray

func ImdbUpdateArray(table string, columns []string, values []interface{}, qu Query) (sql.Result, error)

func ImdbUpdateColumn

func ImdbUpdateColumn(table string, column string, value interface{}, qu Query) (sql.Result, error)

func ImdbUpdateRowMap

func ImdbUpdateRowMap(table string, update map[string]interface{}, qu Query) (sql.Result, error)

func ImdbUpsert

func ImdbUpsert(table string, update map[string]interface{}, qu Query) (sql.Result, error)

func InitDb

func InitDb(dbloglevel string)

func InitImdbdb

func InitImdbdb(dbloglevel string, dbfile string) *sqlx.DB

func InsertArray

func InsertArray(table string, columns []string, values []interface{}) (sql.Result, error)

func InsertRowMap

func InsertRowMap(table string, insert map[string]interface{}) (sql.Result, error)

func RemoveOldDbBackups

func RemoveOldDbBackups(max int) error

func UpdateArray

func UpdateArray(table string, columns []string, values []interface{}, qu Query) (sql.Result, error)

func UpdateColumn

func UpdateColumn(table string, column string, value interface{}, qu Query) (sql.Result, error)

func UpdateRowMap

func UpdateRowMap(table string, update map[string]interface{}, qu Query) (sql.Result, error)

func Upgrade

func Upgrade(c *gin.Context)

func UpgradeDB

func UpgradeDB()

func UpgradeIMDBMovies

func UpgradeIMDBMovies(url string, listname string, qualityProfile string)

func Upsert

func Upsert(table string, update map[string]interface{}, qu Query) (sql.Result, error)

Types

type Dbmovie

type Dbmovie struct {
	ID               uint
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	Title            string
	ReleaseDate      sql.NullTime `db:"release_date" json:"release_date" time_format:"2006-01-02" time_utc:"1"`
	Year             int
	Adult            bool
	Budget           int
	Genres           string
	OriginalLanguage string `db:"original_language"`
	OriginalTitle    string `db:"original_title"`
	Overview         string
	Popularity       float32
	Revenue          int
	Runtime          int
	SpokenLanguages  string `db:"spoken_languages"`
	Status           string
	Tagline          string
	VoteAverage      float32 `db:"vote_average"`
	VoteCount        int     `db:"vote_count"`
	TraktID          int     `db:"trakt_id"`
	MoviedbID        int     `db:"moviedb_id"`
	ImdbID           string  `db:"imdb_id"`
	FreebaseMID      string  `db:"freebase_m_id"`
	FreebaseID       string  `db:"freebase_id"`
	FacebookID       string  `db:"facebook_id"`
	InstagramID      string  `db:"instagram_id"`
	TwitterID        string  `db:"twitter_id"`
	URL              string
	Backdrop         string
	Poster           string
	Slug             string
}

func GetDbmovie

func GetDbmovie(qu Query) (Dbmovie, error)

func GetIMDBMovies

func GetIMDBMovies(imdb []string, listname string, qualityProfile string) []Dbmovie

func GetMissingIMDBMovies

func GetMissingIMDBMovies(urls []string, listname string, qualityProfile string, ignorelistname string) []Dbmovie

func QueryDbmovie

func QueryDbmovie(qu Query) ([]Dbmovie, error)

func (*Dbmovie) AddMissingMoviesMapping

func (dbmovie *Dbmovie) AddMissingMoviesMapping(listname string, quality string) []Movie

func (*Dbmovie) ClearAndGetTitles

func (movie *Dbmovie) ClearAndGetTitles(allowed []string, queryimdb bool, querytmdb bool, querytrakt bool) []DbmovieTitle

func (*Dbmovie) GetImdbMetadata

func (movie *Dbmovie) GetImdbMetadata(overwrite bool)

func (*Dbmovie) GetMetadata

func (movie *Dbmovie) GetMetadata(queryimdb bool, querytmdb bool, queryomdb bool, querytrakt bool)

func (*Dbmovie) GetOmdbMetadata

func (movie *Dbmovie) GetOmdbMetadata(overwrite bool)

func (*Dbmovie) GetTitles

func (movie *Dbmovie) GetTitles(allowed []string, queryimdb bool, querytmdb bool, querytrakt bool) []DbmovieTitle

func (*Dbmovie) GetTmdbMetadata

func (movie *Dbmovie) GetTmdbMetadata(overwrite bool)

func (*Dbmovie) GetTraktMetadata

func (movie *Dbmovie) GetTraktMetadata(overwrite bool)

type DbmovieJson

type DbmovieJson struct {
	ID               uint
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	Title            string
	ReleaseDate      time.Time `db:"release_date" json:"release_date" time_format:"2006-01-02" time_utc:"1"`
	Year             int
	Adult            bool
	Budget           int
	Genres           string
	OriginalLanguage string `db:"original_language"`
	OriginalTitle    string `db:"original_title"`
	Overview         string
	Popularity       float32
	Revenue          int
	Runtime          int
	SpokenLanguages  string `db:"spoken_languages"`
	Status           string
	Tagline          string
	VoteAverage      float32 `db:"vote_average"`
	VoteCount        int     `db:"vote_count"`
	TraktID          int     `db:"trakt_id"`
	MoviedbID        int     `db:"moviedb_id"`
	ImdbID           string  `db:"imdb_id"`
	FreebaseMID      string  `db:"freebase_m_id"`
	FreebaseID       string  `db:"freebase_id"`
	FacebookID       string  `db:"facebook_id"`
	InstagramID      string  `db:"instagram_id"`
	TwitterID        string  `db:"twitter_id"`
	URL              string
	Backdrop         string
	Poster           string
	Slug             string
}

func QueryDbmovieJson

func QueryDbmovieJson(qu Query) ([]DbmovieJson, error)

type DbmovieTitle

type DbmovieTitle struct {
	ID        uint
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	DbmovieID uint      `db:"dbmovie_id"`
	Title     string
	Slug      string
	Region    string
}

func GetDbmovieTitle

func GetDbmovieTitle(qu Query) (DbmovieTitle, error)

func QueryDbmovieTitle

func QueryDbmovieTitle(qu Query) ([]DbmovieTitle, error)

type Dbserie

type Dbserie struct {
	ID              uint
	CreatedAt       time.Time `db:"created_at"`
	UpdatedAt       time.Time `db:"updated_at"`
	Seriename       string
	Aliases         string
	Season          string
	Status          string
	Firstaired      string
	Network         string
	Runtime         string
	Language        string
	Genre           string
	Overview        string
	Rating          string
	Siterating      string
	SiteratingCount string `db:"siterating_count"`
	Slug            string
	TraktID         int    `db:"trakt_id"`
	ImdbID          string `db:"imdb_id"`
	ThetvdbID       int    `db:"thetvdb_id"`
	FreebaseMID     string `db:"freebase_m_id"`
	FreebaseID      string `db:"freebase_id"`
	TvrageID        int    `db:"tvrage_id"`
	Facebook        string
	Instagram       string
	Twitter         string
	Banner          string
	Poster          string
	Fanart          string
	Identifiedby    string
}

func GetDbserie

func GetDbserie(qu Query) (Dbserie, error)

func QueryDbserie

func QueryDbserie(qu Query) ([]Dbserie, error)

func (*Dbserie) GetEpisodes

func (serie *Dbserie) GetEpisodes(language string, querytrakt bool) []DbserieEpisode

func (*Dbserie) GetMetadata

func (serie *Dbserie) GetMetadata(language string, querytmdb bool, allowed []string, querytrakt bool, overwrite bool) []string

func (*Dbserie) GetTitles

func (serie *Dbserie) GetTitles(allowed []string, queryimdb bool, querytrakt bool) []DbserieAlternate

type DbserieAlternate

type DbserieAlternate struct {
	ID        uint
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	Title     string
	Slug      string
	Region    string
	DbserieID uint `db:"dbserie_id"`
}

func GetDbserieAlternates

func GetDbserieAlternates(qu Query) (DbserieAlternate, error)

func QueryDbserieAlternates

func QueryDbserieAlternates(qu Query) ([]DbserieAlternate, error)

type DbserieEpisode

type DbserieEpisode struct {
	ID         uint
	CreatedAt  time.Time `db:"created_at"`
	UpdatedAt  time.Time `db:"updated_at"`
	Episode    string
	Season     string
	Identifier string
	Title      string
	FirstAired sql.NullTime `db:"first_aired" json:"first_aired" time_format:"2006-01-02" time_utc:"1"`
	Overview   string
	Poster     string
	Runtime    int
	DbserieID  uint `db:"dbserie_id"`
}

func GetDbserieEpisodes

func GetDbserieEpisodes(qu Query) (DbserieEpisode, error)

func QueryDbserieEpisodes

func QueryDbserieEpisodes(qu Query) ([]DbserieEpisode, error)

type DbserieEpisodeJson

type DbserieEpisodeJson struct {
	ID         uint
	CreatedAt  time.Time `db:"created_at"`
	UpdatedAt  time.Time `db:"updated_at"`
	Episode    string
	Season     string
	Identifier string
	Title      string
	FirstAired time.Time `db:"first_aired" json:"first_aired" time_format:"2006-01-02" time_utc:"1"`
	Overview   string
	Poster     string
	DbserieID  uint `db:"dbserie_id"`
}

type ImdbAka

type ImdbAka struct {
	ID              uint
	CreatedAt       time.Time `db:"created_at"`
	UpdatedAt       time.Time `db:"updated_at"`
	Tconst          string
	Ordering        int
	Title           string
	Slug            string
	Region          string
	Language        string
	Types           string
	Attributes      string
	IsOriginalTitle bool `db:"is_original_title"`
}

func GetImdbAka

func GetImdbAka(qu Query) (ImdbAka, error)

func QueryImdbAka

func QueryImdbAka(qu Query) ([]ImdbAka, error)

type ImdbGenres

type ImdbGenres struct {
	ID        uint
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	Tconst    string
	Genre     string
}

func GetImdbGenre

func GetImdbGenre(qu Query) (ImdbGenres, error)

func QueryImdbGenre

func QueryImdbGenre(qu Query) ([]ImdbGenres, error)

type ImdbRatings

type ImdbRatings struct {
	ID            uint
	CreatedAt     time.Time `db:"created_at"`
	UpdatedAt     time.Time `db:"updated_at"`
	Tconst        string
	NumVotes      int     `db:"num_votes"`
	AverageRating float32 `db:"average_rating"`
}

func GetImdbRating

func GetImdbRating(qu Query) (ImdbRatings, error)

func QueryImdbRating

func QueryImdbRating(qu Query) ([]ImdbRatings, error)

type ImdbTitle

type ImdbTitle struct {
	Tconst         string
	TitleType      string `db:"title_type"`
	PrimaryTitle   string `db:"primary_title"`
	Slug           string
	OriginalTitle  string `db:"original_title"`
	IsAdult        bool   `db:"is_adult"`
	StartYear      int    `db:"start_year"`
	EndYear        int    `db:"end_year"`
	RuntimeMinutes int    `db:"runtime_minutes"`
	Genres         string
}

func GetImdbTitle

func GetImdbTitle(qu Query) (ImdbTitle, error)

func QueryImdbTitle

func QueryImdbTitle(qu Query) ([]ImdbTitle, error)

type IndexerFail

type IndexerFail struct {
	ID        uint
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	Indexer   string
	LastFail  sql.NullTime `db:"last_fail"`
}

func GetIndexerFails

func GetIndexerFails(qu Query) (IndexerFail, error)

func QueryIndexerFails

func QueryIndexerFails(qu Query) ([]IndexerFail, error)

type JobHistory

type JobHistory struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	JobType     string    `db:"job_type"`
	JobCategory string    `db:"job_category"`
	JobGroup    string    `db:"job_group"`
	Started     sql.NullTime
	Ended       sql.NullTime
}

func GetJobHistory

func GetJobHistory(qu Query) (JobHistory, error)

func QueryJobHistory

func QueryJobHistory(qu Query) ([]JobHistory, error)

type JobHistoryJson

type JobHistoryJson struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	JobType     string    `db:"job_type"`
	JobCategory string    `db:"job_category"`
	JobGroup    string    `db:"job_group"`
	Started     time.Time
	Ended       time.Time
}

type Movie

type Movie struct {
	ID             uint
	CreatedAt      time.Time `db:"created_at"`
	UpdatedAt      time.Time `db:"updated_at"`
	Lastscan       sql.NullTime
	Blacklisted    bool
	QualityReached bool   `db:"quality_reached"`
	QualityProfile string `db:"quality_profile"`
	Missing        bool
	DontUpgrade    bool `db:"dont_upgrade"`
	DontSearch     bool `db:"dont_search"`
	Listname       string
	Rootpath       string
	DbmovieID      uint `db:"dbmovie_id"`
}

func GetMovies

func GetMovies(qu Query) (Movie, error)

func QueryMovies

func QueryMovies(qu Query) ([]Movie, error)

func (*Movie) UpdateMoviesMapping

func (movie *Movie) UpdateMoviesMapping(listname string, quality string)

type MovieFile

type MovieFile struct {
	ID             uint
	CreatedAt      time.Time `db:"created_at"`
	UpdatedAt      time.Time `db:"updated_at"`
	Location       string
	Filename       string
	Extension      string
	QualityProfile string `db:"quality_profile"`
	Proper         bool
	Extended       bool
	Repack         bool
	Height         int
	Width          int
	ResolutionID   uint `db:"resolution_id"`
	QualityID      uint `db:"quality_id"`
	CodecID        uint `db:"codec_id"`
	AudioID        uint `db:"audio_id"`
	MovieID        uint `db:"movie_id"`
	DbmovieID      uint `db:"dbmovie_id"`
}

func GetMovieFiles

func GetMovieFiles(qu Query) (MovieFile, error)

func QueryMovieFiles

func QueryMovieFiles(qu Query) ([]MovieFile, error)

type MovieFileUnmatched

type MovieFileUnmatched struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	Listname    string
	Filepath    string
	LastChecked sql.NullTime `db:"last_checked"`
	ParsedData  string       `db:"parsed_data"`
}

func GetMovieFileUnmatched

func GetMovieFileUnmatched(qu Query) (MovieFileUnmatched, error)

func QueryMovieFileUnmatched

func QueryMovieFileUnmatched(qu Query) ([]MovieFileUnmatched, error)

type MovieFileUnmatchedJson

type MovieFileUnmatchedJson struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	Listname    string
	Filepath    string
	LastChecked time.Time `db:"last_checked" json:"last_checked" time_format:"2006-01-02 22:00" time_utc:"1"`
	ParsedData  string    `db:"parsed_data"`
}

type MovieHistory

type MovieHistory struct {
	ID             uint
	CreatedAt      time.Time `db:"created_at"`
	UpdatedAt      time.Time `db:"updated_at"`
	Title          string
	URL            string
	Indexer        string
	Type           string
	Target         string
	DownloadedAt   time.Time `db:"downloaded_at"`
	Blacklisted    bool
	QualityProfile string `db:"quality_profile"`
	ResolutionID   uint   `db:"resolution_id"`
	QualityID      uint   `db:"quality_id"`
	CodecID        uint   `db:"codec_id"`
	AudioID        uint   `db:"audio_id"`
	MovieID        uint   `db:"movie_id"`
	DbmovieID      uint   `db:"dbmovie_id"`
}

func GetMovieHistory

func GetMovieHistory(qu Query) (MovieHistory, error)

func QueryMovieHistory

func QueryMovieHistory(qu Query) ([]MovieHistory, error)

type MovieJson

type MovieJson struct {
	ID             uint
	CreatedAt      time.Time `db:"created_at"`
	UpdatedAt      time.Time `db:"updated_at"`
	Lastscan       time.Time `db:"lastscan" json:"lastscan" time_format:"2006-01-02 22:00" time_utc:"1"`
	Blacklisted    bool
	QualityReached bool   `db:"quality_reached"`
	QualityProfile string `db:"quality_profile"`
	Missing        bool
	DontUpgrade    bool `db:"dont_upgrade"`
	DontSearch     bool `db:"dont_search"`
	Listname       string
	Rootpath       string
	DbmovieID      uint `db:"dbmovie_id"`
}

type Qualities

type Qualities struct {
	ID        uint
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	Type      int
	Name      string
	Regex     string
	Strings   string
	Priority  int
	UseRegex  bool `db:"use_regex"`
}

type 1 reso 2 qual 3 codec 4 audio

func GetQualities

func GetQualities(qu Query) (Qualities, error)

func QueryQualities

func QueryQualities(qu Query) ([]Qualities, error)

type QualitiesRegex

type QualitiesRegex struct {
	Regexp *regexp.Regexp
	Qualities
}

type Query

type Query struct {
	Select    string
	Where     string
	WhereArgs []interface{}
	OrderBy   string
	Limit     uint64
	Offset    uint64
	InnerJoin string
}

type RSSHistory

type RSSHistory struct {
	ID        uint
	CreatedAt time.Time `db:"created_at"`
	UpdatedAt time.Time `db:"updated_at"`
	Config    string
	List      string
	Indexer   string
	LastID    string `db:"last_id"`
}

func GetRssHistory

func GetRssHistory(qu Query) (RSSHistory, error)

func QueryRssHistory

func QueryRssHistory(qu Query) ([]RSSHistory, error)

type ResultMovies

type ResultMovies struct {
	Dbmovie
	Listname       string
	Lastscan       sql.NullTime
	Blacklisted    bool
	QualityReached bool   `db:"quality_reached"`
	QualityProfile string `db:"quality_profile"`
	Rootpath       string
	Missing        bool
	DbmovieID      uint `db:"dbmovie_id"`
}

func GetResultMovies

func GetResultMovies(qu Query) (ResultMovies, error)

func QueryResultMovies

func QueryResultMovies(qu Query) ([]ResultMovies, error)

type ResultMoviesJson

type ResultMoviesJson struct {
	DbmovieJson
	Listname       string
	Lastscan       time.Time `db:"lastscan" json:"lastscan" time_format:"2006-01-02 22:00" time_utc:"1"`
	Blacklisted    bool
	QualityReached bool   `db:"quality_reached"`
	QualityProfile string `db:"quality_profile"`
	Rootpath       string
	Missing        bool
	DbmovieID      uint `db:"dbmovie_id"`
}

type ResultSerieEpisodes

type ResultSerieEpisodes struct {
	DbserieEpisode
	Listname         string
	Rootpath         string
	Lastscan         sql.NullTime
	Blacklisted      bool
	QualityReached   bool   `db:"quality_reached"`
	QualityProfile   string `db:"quality_profile"`
	Missing          bool
	DbserieEpisodeID uint `db:"dbserie_episode_id"`
}

func GetResultSerieEpisodes

func GetResultSerieEpisodes(qu Query) (ResultSerieEpisodes, error)

func QueryResultSerieEpisodes

func QueryResultSerieEpisodes(qu Query) ([]ResultSerieEpisodes, error)

type ResultSerieEpisodesJson

type ResultSerieEpisodesJson struct {
	DbserieEpisodeJson
	Listname         string
	Rootpath         string
	Lastscan         time.Time `db:"lastscan" json:"lastscan" time_format:"2006-01-02 22:00" time_utc:"1"`
	Blacklisted      bool
	QualityReached   bool   `db:"quality_reached"`
	QualityProfile   string `db:"quality_profile"`
	Missing          bool
	DbserieEpisodeID uint `db:"dbserie_episode_id"`
}

type ResultSeries

type ResultSeries struct {
	Dbserie
	Listname  string
	Rootpath  string
	DbserieID uint `db:"dbserie_id"`
}

func GetResultSeries

func GetResultSeries(qu Query) (ResultSeries, error)

func QueryResultSeries

func QueryResultSeries(qu Query) ([]ResultSeries, error)

type Serie

type Serie struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	Listname    string
	Rootpath    string
	DbserieID   uint `db:"dbserie_id"`
	DontUpgrade bool `db:"dont_upgrade"`
	DontSearch  bool `db:"dont_search"`
}

func GetSeries

func GetSeries(qu Query) (Serie, error)

func QuerySeries

func QuerySeries(qu Query) ([]Serie, error)

type SerieEpisode

type SerieEpisode struct {
	ID               uint
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	Lastscan         sql.NullTime
	Blacklisted      bool
	QualityReached   bool   `db:"quality_reached"`
	QualityProfile   string `db:"quality_profile"`
	Missing          bool
	DontUpgrade      bool `db:"dont_upgrade"`
	DontSearch       bool `db:"dont_search"`
	DbserieEpisodeID uint `db:"dbserie_episode_id"`
	SerieID          uint `db:"serie_id"`
	DbserieID        uint `db:"dbserie_id"`
}

func GetSerieEpisodes

func GetSerieEpisodes(qu Query) (SerieEpisode, error)

func QuerySerieEpisodes

func QuerySerieEpisodes(qu Query) ([]SerieEpisode, error)

type SerieEpisodeFile

type SerieEpisodeFile struct {
	ID               uint
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	Location         string
	Filename         string
	Extension        string
	QualityProfile   string `db:"quality_profile"`
	Proper           bool
	Extended         bool
	Repack           bool
	Height           int
	Width            int
	ResolutionID     uint `db:"resolution_id"`
	QualityID        uint `db:"quality_id"`
	CodecID          uint `db:"codec_id"`
	AudioID          uint `db:"audio_id"`
	SerieID          uint `db:"serie_id"`
	SerieEpisodeID   uint `db:"serie_episode_id"`
	DbserieEpisodeID uint `db:"dbserie_episode_id"`
	DbserieID        uint `db:"dbserie_id"`
}

func GetSerieEpisodeFiles

func GetSerieEpisodeFiles(qu Query) (SerieEpisodeFile, error)

func QuerySerieEpisodeFiles

func QuerySerieEpisodeFiles(qu Query) ([]SerieEpisodeFile, error)

type SerieEpisodeHistory

type SerieEpisodeHistory struct {
	ID               uint
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	Title            string
	URL              string
	Indexer          string
	Type             string
	Target           string
	DownloadedAt     time.Time `db:"downloaded_at"`
	Blacklisted      bool
	QualityProfile   string `db:"quality_profile"`
	ResolutionID     uint   `db:"resolution_id"`
	QualityID        uint   `db:"quality_id"`
	CodecID          uint   `db:"codec_id"`
	AudioID          uint   `db:"audio_id"`
	SerieID          uint   `db:"serie_id"`
	SerieEpisodeID   uint   `db:"serie_episode_id"`
	DbserieEpisodeID uint   `db:"dbserie_episode_id"`
	DbserieID        uint   `db:"dbserie_id"`
}

func GetSerieEpisodeHistory

func GetSerieEpisodeHistory(qu Query) (SerieEpisodeHistory, error)

func QuerySerieEpisodeHistory

func QuerySerieEpisodeHistory(qu Query) ([]SerieEpisodeHistory, error)

type SerieEpisodeJson

type SerieEpisodeJson struct {
	ID               uint
	CreatedAt        time.Time `db:"created_at"`
	UpdatedAt        time.Time `db:"updated_at"`
	Lastscan         time.Time `db:"lastscan" json:"lastscan" time_format:"2006-01-02 22:00" time_utc:"1"`
	Blacklisted      bool
	QualityReached   bool   `db:"quality_reached"`
	QualityProfile   string `db:"quality_profile"`
	Missing          bool
	DontUpgrade      bool `db:"dont_upgrade"`
	DontSearch       bool `db:"dont_search"`
	DbserieEpisodeID uint `db:"dbserie_episode_id"`
	SerieID          uint `db:"serie_id"`
	DbserieID        uint `db:"dbserie_id"`
}

type SerieFileUnmatched

type SerieFileUnmatched struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	Listname    string
	Filepath    string
	LastChecked sql.NullTime `db:"last_checked"`
	ParsedData  string       `db:"parsed_data"`
}

func GetSerieFileUnmatched

func GetSerieFileUnmatched(qu Query) (SerieFileUnmatched, error)

func QuerySerieFileUnmatched

func QuerySerieFileUnmatched(qu Query) ([]SerieFileUnmatched, error)

type SerieFileUnmatchedJson

type SerieFileUnmatchedJson struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	Listname    string
	Filepath    string
	LastChecked time.Time `db:"last_checked" json:"last_checked" time_format:"2006-01-02 22:00" time_utc:"1"`
	ParsedData  string    `db:"parsed_data"`
}

type SerieJson

type SerieJson struct {
	ID          uint
	CreatedAt   time.Time `db:"created_at"`
	UpdatedAt   time.Time `db:"updated_at"`
	Listname    string
	Rootpath    string
	DbserieID   uint `db:"dbserie_id"`
	DontUpgrade bool `db:"dont_upgrade"`
	DontSearch  bool `db:"dont_search"`
}

Jump to

Keyboard shortcuts

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