database

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AgentRegExMap = map[string]string{
	"hama": `//(.* ?)-(\d+ ?)`,
	"mal":  `.(m.*)://(\d+ ?)`,
}

Functions

func GetShowID added in v0.1.1

func GetShowID(p *plex.PlexClient, key string) (*plex.GUID, error)

Types

type Anime

type Anime struct {
	MainTitle    string `json:"title"`
	EnglishTitle string `json:"enTitle"`
	MalID        int    `json:"malid"`
	AnidbID      int    `json:"anidbid"`
	TvdbID       int    `json:"tvdbid"`
	TmdbID       int    `json:"tmdbid"`
	Type         string `json:"type"`
	ReleaseDate  string `json:"releaseDate"`
}

type DB

type DB struct {
	Handler *sql.DB
	// contains filtered or unexported fields
}

func NewDB

func NewDB(dir string, log *zerolog.Logger) *DB

func (*DB) Close

func (db *DB) Close()

func (*DB) CreateDB

func (db *DB) CreateDB()

func (*DB) GetMalCreds

func (db *DB) GetMalCreds(ctx context.Context) (map[string]string, error)

func (*DB) MigrateDB added in v0.1.2

func (db *DB) MigrateDB()

func (*DB) UpdateAnime

func (db *DB) UpdateAnime()

func (*DB) UpdateMalAuth

func (db *DB) UpdateMalAuth(m map[string]string)

type Media

type Media struct {
	Type     string
	Title    string
	Agent    string
	IdSource string
	Id       int
	Season   int
	Ep       int
}

func NewMedia

func NewMedia(pw *plex.PlexWebhook, agent string, pc *plex.PlexClient, usePlex bool) (*Media, error)

func (*Media) ConvertToTVDB added in v0.1.2

func (m *Media) ConvertToTVDB(ctx context.Context, db *DB)

func (*Media) GetMalID

func (m *Media) GetMalID(ctx context.Context, db *DB) (int, error)

Jump to

Keyboard shortcuts

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