app

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 58 Imported by: 0

Documentation

Overview

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Code generated by github.com/dashotv/golem. DO NOT EDIT.

Index

Constants

This section is empty.

Variables

View Source
var KINDS = []string{"movies", "movies3d", "movies4k", "movies4h", "kids", "tv", "anime", "donghua", "ecchi"}
View Source
var TYPES = []string{"Movie", "Series", "Episode"}

Functions

func Background

func Background(m Medium) string

func Cover

func Cover(m Medium) string

func Destination added in v0.3.0

func Destination(m *Medium) (string, error)

func FileCopy added in v0.3.0

func FileCopy(srcpath, dstpath string) (err error)

https://stackoverflow.com/questions/21060945/simple-way-to-copy-a-file Copy copies the contents of the file at srcpath to a regular file at dstpath. If dstpath already exists and is not a directory, the function truncates it. The function does not copy file modes or file attributes.

func FileDir added in v0.3.0

func FileDir(file string) error
func FileLink(srcpath, dstpath string, force bool) error

FileLink creates hard link, if destination exists and force is true, it will remove the destination before linking

func Good added in v0.3.0

func Good(opt *SearchOptions, r *search.Release) bool

func PlexSessionUpdates added in v0.3.0

func PlexSessionUpdates() error

func PopularReleases added in v0.3.0

func PopularReleases() error

func Preferred added in v0.3.0

func Preferred(opt *SearchOptions, r *search.Release) bool

func QueryBool added in v0.3.0

func QueryBool(c echo.Context, name string) bool

QueryBool retrieves a boolean param from the gin request querystring

func QueryDefaultInteger added in v0.3.0

func QueryDefaultInteger(c echo.Context, name string, def int) (int, error)

QueryDefaultInt retrieves an integer param from the gin request querystring defaults to def argument if not found

func QueryDefaultString added in v0.3.0

func QueryDefaultString(c echo.Context, name, def string) string

func QueryInt added in v0.3.0

func QueryInt(c echo.Context, name string) int

QueryInt retrieves an integer param from the gin request querystring

func QueryString added in v0.3.0

func QueryString(c echo.Context, name string) string

QueryString retrieves a string param from the gin request querystring

func Setup added in v0.3.0

func Setup() error

func Shell added in v0.3.0

func Shell(command string, options ShellOptions) (cmd.Status, error)

func Start added in v0.3.0

func Start() error

func WithTimeout added in v0.3.0

func WithTimeout(delegate func() interface{}, timeout time.Duration) (ret interface{}, ok bool)

WithTimeout runs a delegate function with a timeout,

Example: Wait for a channel

if value, ok := WithTimeout(func()interface{}{return <- inbox}, time.Second); ok {
    // returned
} else {
    // didn't return
}

Example: To send to a channel

_, ok := WithTimeout(func()interface{}{outbox <- myValue; return nil}, time.Second)
if !ok {
    // didn't send
}

Types

type Application

type Application struct {
	Config *Config
	Log    *zap.SugaredLogger

	//golem:template:app/app_partial_definitions
	// DO NOT EDIT. This section is managed by github.com/dashotv/golem.
	// Routes
	Engine  *echo.Echo
	Default *echo.Group
	Router  *echo.Group

	// Models
	DB *Connector

	// Events
	Events *Events

	// Workers
	Workers *minion.Minion

	//Cache
	Cache *Cache

	Fanart   *Fanart
	Flame    *Flame
	Scry     *Scry
	Plex     *plex.Client
	Tmdb     *tmdb.Client
	Tvdb     *tvdb.Client
	Importer *importer.Importer
}

func (*Application) CollectionsCreate added in v0.3.0

func (a *Application) CollectionsCreate(c echo.Context) error

func (*Application) CollectionsCreateHandler added in v0.3.0

func (a *Application) CollectionsCreateHandler(c echo.Context) error

func (*Application) CollectionsDelete added in v0.3.0

func (a *Application) CollectionsDelete(c echo.Context, id string) error

func (*Application) CollectionsDeleteHandler added in v0.3.0

func (a *Application) CollectionsDeleteHandler(c echo.Context) error

func (*Application) CollectionsIndex added in v0.3.0

func (a *Application) CollectionsIndex(c echo.Context, page int, limit int) error

func (*Application) CollectionsIndexHandler added in v0.3.0

func (a *Application) CollectionsIndexHandler(c echo.Context) error

Collections (/collections)

func (*Application) CollectionsSettings added in v0.3.0

func (a *Application) CollectionsSettings(c echo.Context, id string) error

func (*Application) CollectionsSettingsHandler added in v0.3.0

func (a *Application) CollectionsSettingsHandler(c echo.Context) error

func (*Application) CollectionsShow added in v0.3.0

func (a *Application) CollectionsShow(c echo.Context, id string) error

func (*Application) CollectionsShowHandler added in v0.3.0

func (a *Application) CollectionsShowHandler(c echo.Context) error

func (*Application) CollectionsUpdate added in v0.3.0

func (a *Application) CollectionsUpdate(c echo.Context, id string) error

func (*Application) CollectionsUpdateHandler added in v0.3.0

func (a *Application) CollectionsUpdateHandler(c echo.Context) error

func (*Application) CombinationsCreate added in v0.3.0

func (a *Application) CombinationsCreate(c echo.Context) error

func (*Application) CombinationsCreateHandler added in v0.3.0

func (a *Application) CombinationsCreateHandler(c echo.Context) error

func (*Application) CombinationsDelete added in v0.3.0

func (a *Application) CombinationsDelete(c echo.Context, id string) error

func (*Application) CombinationsDeleteHandler added in v0.3.0

func (a *Application) CombinationsDeleteHandler(c echo.Context) error

func (*Application) CombinationsIndex added in v0.3.0

func (a *Application) CombinationsIndex(c echo.Context, page int, limit int) error

func (*Application) CombinationsIndexHandler added in v0.3.0

func (a *Application) CombinationsIndexHandler(c echo.Context) error

Combinations (/combinations)

func (*Application) CombinationsSettings added in v0.3.0

func (a *Application) CombinationsSettings(c echo.Context, id string) error

func (*Application) CombinationsSettingsHandler added in v0.3.0

func (a *Application) CombinationsSettingsHandler(c echo.Context) error

func (*Application) CombinationsShow added in v0.3.0

func (a *Application) CombinationsShow(c echo.Context, name string) error

func (*Application) CombinationsShowHandler added in v0.3.0

func (a *Application) CombinationsShowHandler(c echo.Context) error

func (*Application) CombinationsUpdate added in v0.3.0

func (a *Application) CombinationsUpdate(c echo.Context, id string) error

func (*Application) CombinationsUpdateHandler added in v0.3.0

func (a *Application) CombinationsUpdateHandler(c echo.Context) error

func (*Application) ConfigCreate added in v0.3.0

func (a *Application) ConfigCreate(c echo.Context) error

POST /config/

func (*Application) ConfigCreateHandler added in v0.3.0

func (a *Application) ConfigCreateHandler(c echo.Context) error

func (*Application) ConfigDelete added in v0.3.0

func (a *Application) ConfigDelete(c echo.Context, id string) error

DELETE /config/:id

func (*Application) ConfigDeleteHandler added in v0.3.0

func (a *Application) ConfigDeleteHandler(c echo.Context) error

func (*Application) ConfigIndex added in v0.3.0

func (a *Application) ConfigIndex(c echo.Context, page int, limit int) error

GET /config/

func (*Application) ConfigIndexHandler added in v0.3.0

func (a *Application) ConfigIndexHandler(c echo.Context) error

Config (/config)

func (*Application) ConfigSettings added in v0.3.0

func (a *Application) ConfigSettings(c echo.Context, id string) error

PATCH /config/:id

func (*Application) ConfigSettingsHandler added in v0.3.0

func (a *Application) ConfigSettingsHandler(c echo.Context) error

func (*Application) ConfigShow added in v0.3.0

func (a *Application) ConfigShow(c echo.Context, id string) error

GET /config/:id

func (*Application) ConfigShowHandler added in v0.3.0

func (a *Application) ConfigShowHandler(c echo.Context) error

func (*Application) ConfigUpdate added in v0.3.0

func (a *Application) ConfigUpdate(c echo.Context, id string) error

PUT /config/:id

func (*Application) ConfigUpdateHandler added in v0.3.0

func (a *Application) ConfigUpdateHandler(c echo.Context) error

func (*Application) DownloadsCreate added in v0.3.0

func (a *Application) DownloadsCreate(c echo.Context) error

func (*Application) DownloadsCreateHandler added in v0.3.0

func (a *Application) DownloadsCreateHandler(c echo.Context) error

func (*Application) DownloadsDelete added in v0.3.0

func (a *Application) DownloadsDelete(c echo.Context, id string) error

func (*Application) DownloadsDeleteHandler added in v0.3.0

func (a *Application) DownloadsDeleteHandler(c echo.Context) error

func (*Application) DownloadsIndex added in v0.3.0

func (a *Application) DownloadsIndex(c echo.Context, page, limit int) error

func (*Application) DownloadsIndexHandler added in v0.3.0

func (a *Application) DownloadsIndexHandler(c echo.Context) error

Downloads (/downloads)

func (*Application) DownloadsLast added in v0.3.0

func (a *Application) DownloadsLast(c echo.Context) error

func (*Application) DownloadsLastHandler added in v0.3.0

func (a *Application) DownloadsLastHandler(c echo.Context) error

func (*Application) DownloadsMedium added in v0.3.0

func (a *Application) DownloadsMedium(c echo.Context, id string) error

func (*Application) DownloadsMediumHandler added in v0.3.0

func (a *Application) DownloadsMediumHandler(c echo.Context) error

func (*Application) DownloadsRecent added in v0.3.0

func (a *Application) DownloadsRecent(c echo.Context) error

func (*Application) DownloadsRecentHandler added in v0.3.0

func (a *Application) DownloadsRecentHandler(c echo.Context) error

func (*Application) DownloadsSelect added in v0.3.0

func (a *Application) DownloadsSelect(c echo.Context, id string) error

func (*Application) DownloadsSelectHandler added in v0.3.0

func (a *Application) DownloadsSelectHandler(c echo.Context) error

func (*Application) DownloadsSettings added in v0.3.0

func (a *Application) DownloadsSettings(c echo.Context, id string) error

func (*Application) DownloadsSettingsHandler added in v0.3.0

func (a *Application) DownloadsSettingsHandler(c echo.Context) error

func (*Application) DownloadsShow added in v0.3.0

func (a *Application) DownloadsShow(c echo.Context, id string) error

func (*Application) DownloadsShowHandler added in v0.3.0

func (a *Application) DownloadsShowHandler(c echo.Context) error

func (*Application) DownloadsTorrent added in v0.3.0

func (a *Application) DownloadsTorrent(c echo.Context, id string) error

func (*Application) DownloadsTorrentHandler added in v0.3.0

func (a *Application) DownloadsTorrentHandler(c echo.Context) error

func (*Application) DownloadsUpdate added in v0.3.0

func (a *Application) DownloadsUpdate(c echo.Context, id string) error

func (*Application) DownloadsUpdateHandler added in v0.3.0

func (a *Application) DownloadsUpdateHandler(c echo.Context) error

func (*Application) EpisodesSetting added in v0.3.0

func (a *Application) EpisodesSetting(c echo.Context, id string) error

func (*Application) EpisodesSettingHandler added in v0.3.0

func (a *Application) EpisodesSettingHandler(c echo.Context) error

Episodes (/episodes)

func (*Application) EpisodesSettings added in v0.3.0

func (a *Application) EpisodesSettings(c echo.Context) error

func (*Application) EpisodesSettingsHandler added in v0.3.0

func (a *Application) EpisodesSettingsHandler(c echo.Context) error

func (*Application) EpisodesUpdate added in v0.3.0

func (a *Application) EpisodesUpdate(c echo.Context, id string) error

func (*Application) EpisodesUpdateHandler added in v0.3.0

func (a *Application) EpisodesUpdateHandler(c echo.Context) error

func (*Application) FeedsCreate added in v0.3.0

func (a *Application) FeedsCreate(c echo.Context) error

func (*Application) FeedsCreateHandler added in v0.3.0

func (a *Application) FeedsCreateHandler(c echo.Context) error

func (*Application) FeedsDelete added in v0.3.0

func (a *Application) FeedsDelete(c echo.Context, id string) error

func (*Application) FeedsDeleteHandler added in v0.3.0

func (a *Application) FeedsDeleteHandler(c echo.Context) error

func (*Application) FeedsIndex added in v0.3.0

func (a *Application) FeedsIndex(c echo.Context, page, limit int) error

func (*Application) FeedsIndexHandler added in v0.3.0

func (a *Application) FeedsIndexHandler(c echo.Context) error

Feeds (/feeds)

func (*Application) FeedsSettings added in v0.3.0

func (a *Application) FeedsSettings(c echo.Context, id string) error

func (*Application) FeedsSettingsHandler added in v0.3.0

func (a *Application) FeedsSettingsHandler(c echo.Context) error

func (*Application) FeedsShow added in v0.3.0

func (a *Application) FeedsShow(c echo.Context, id string) error

func (*Application) FeedsShowHandler added in v0.3.0

func (a *Application) FeedsShowHandler(c echo.Context) error

func (*Application) FeedsUpdate added in v0.3.0

func (a *Application) FeedsUpdate(c echo.Context, id string) error

func (*Application) FeedsUpdateHandler added in v0.3.0

func (a *Application) FeedsUpdateHandler(c echo.Context) error

func (*Application) Health added in v0.3.0

func (a *Application) Health() (map[string]bool, error)

func (*Application) HooksPlex added in v0.3.0

func (a *Application) HooksPlex(c echo.Context) error

func (*Application) HooksPlexHandler added in v0.3.0

func (a *Application) HooksPlexHandler(c echo.Context) error

Hooks (/hooks)

func (*Application) JobsCreate added in v0.3.0

func (a *Application) JobsCreate(c echo.Context, job string) error

func (*Application) JobsCreateHandler added in v0.3.0

func (a *Application) JobsCreateHandler(c echo.Context) error

func (*Application) JobsDelete added in v0.3.0

func (a *Application) JobsDelete(c echo.Context, id string, hard bool) error

func (*Application) JobsDeleteHandler added in v0.3.0

func (a *Application) JobsDeleteHandler(c echo.Context) error

func (*Application) JobsIndex added in v0.3.0

func (a *Application) JobsIndex(c echo.Context, page int, limit int) error

func (*Application) JobsIndexHandler added in v0.3.0

func (a *Application) JobsIndexHandler(c echo.Context) error

Jobs (/jobs)

func (*Application) MessagesCreate added in v0.3.0

func (a *Application) MessagesCreate(c echo.Context) error

func (*Application) MessagesCreateHandler added in v0.3.0

func (a *Application) MessagesCreateHandler(c echo.Context) error

func (*Application) MessagesIndex added in v0.3.0

func (a *Application) MessagesIndex(c echo.Context) error

func (*Application) MessagesIndexHandler added in v0.3.0

func (a *Application) MessagesIndexHandler(c echo.Context) error

Messages (/messages)

func (*Application) MinionNotification added in v0.3.0

func (a *Application) MinionNotification(n *minion.Notification)

This allows you to notify other services as jobs change status.

func (*Application) MinionStats added in v0.3.0

func (a *Application) MinionStats(stats minion.Stats)

func (*Application) MoviesCreate added in v0.3.0

func (a *Application) MoviesCreate(c echo.Context) error

func (*Application) MoviesCreateHandler added in v0.3.0

func (a *Application) MoviesCreateHandler(c echo.Context) error

func (*Application) MoviesDelete added in v0.3.0

func (a *Application) MoviesDelete(c echo.Context, id string) error

func (*Application) MoviesDeleteHandler added in v0.3.0

func (a *Application) MoviesDeleteHandler(c echo.Context) error

func (*Application) MoviesIndex added in v0.3.0

func (a *Application) MoviesIndex(c echo.Context, page, limit int) error

func (*Application) MoviesIndexHandler added in v0.3.0

func (a *Application) MoviesIndexHandler(c echo.Context) error

Movies (/movies)

func (*Application) MoviesPaths added in v0.3.0

func (a *Application) MoviesPaths(c echo.Context, id string) error

func (*Application) MoviesPathsHandler added in v0.3.0

func (a *Application) MoviesPathsHandler(c echo.Context) error

func (*Application) MoviesRefresh added in v0.3.0

func (a *Application) MoviesRefresh(c echo.Context, id string) error

func (*Application) MoviesRefreshHandler added in v0.3.0

func (a *Application) MoviesRefreshHandler(c echo.Context) error

func (*Application) MoviesSettings added in v0.3.0

func (a *Application) MoviesSettings(c echo.Context, id string) error

func (*Application) MoviesSettingsHandler added in v0.3.0

func (a *Application) MoviesSettingsHandler(c echo.Context) error

func (*Application) MoviesShow added in v0.3.0

func (a *Application) MoviesShow(c echo.Context, id string) error

func (*Application) MoviesShowHandler added in v0.3.0

func (a *Application) MoviesShowHandler(c echo.Context) error

func (*Application) MoviesUpdate added in v0.3.0

func (a *Application) MoviesUpdate(c echo.Context, id string) error

func (*Application) MoviesUpdateHandler added in v0.3.0

func (a *Application) MoviesUpdateHandler(c echo.Context) error

func (*Application) PlexAuth added in v0.3.0

func (a *Application) PlexAuth(c echo.Context) error

func (*Application) PlexAuthHandler added in v0.3.0

func (a *Application) PlexAuthHandler(c echo.Context) error

Plex (/plex)

func (*Application) PlexClients added in v0.3.0

func (a *Application) PlexClients(c echo.Context) error

func (*Application) PlexClientsHandler added in v0.3.0

func (a *Application) PlexClientsHandler(c echo.Context) error

func (*Application) PlexCollectionsIndex added in v0.3.0

func (a *Application) PlexCollectionsIndex(c echo.Context, section string) error

func (*Application) PlexCollectionsIndexHandler added in v0.3.0

func (a *Application) PlexCollectionsIndexHandler(c echo.Context) error

func (*Application) PlexCollectionsShow added in v0.3.0

func (a *Application) PlexCollectionsShow(c echo.Context, section, ratingKey string) error

func (*Application) PlexCollectionsShowHandler added in v0.3.0

func (a *Application) PlexCollectionsShowHandler(c echo.Context) error

func (*Application) PlexDevices added in v0.3.0

func (a *Application) PlexDevices(c echo.Context) error

func (*Application) PlexDevicesHandler added in v0.3.0

func (a *Application) PlexDevicesHandler(c echo.Context) error

func (*Application) PlexIndex added in v0.3.0

func (a *Application) PlexIndex(c echo.Context) error

func (*Application) PlexIndexHandler added in v0.3.0

func (a *Application) PlexIndexHandler(c echo.Context) error

func (*Application) PlexLibraries added in v0.3.0

func (a *Application) PlexLibraries(c echo.Context) error

func (*Application) PlexLibrariesHandler added in v0.3.0

func (a *Application) PlexLibrariesHandler(c echo.Context) error

func (*Application) PlexMetadata added in v0.3.0

func (a *Application) PlexMetadata(c echo.Context, key string) error

func (*Application) PlexMetadataHandler added in v0.3.0

func (a *Application) PlexMetadataHandler(c echo.Context) error

func (*Application) PlexPlay added in v0.3.0

func (a *Application) PlexPlay(c echo.Context, ratingKey, player string) error

func (*Application) PlexPlayHandler added in v0.3.0

func (a *Application) PlexPlayHandler(c echo.Context) error

func (*Application) PlexResources added in v0.3.0

func (a *Application) PlexResources(c echo.Context) error

func (*Application) PlexResourcesHandler added in v0.3.0

func (a *Application) PlexResourcesHandler(c echo.Context) error

func (*Application) PlexSearch added in v0.3.0

func (a *Application) PlexSearch(c echo.Context, query, section string) error

func (*Application) PlexSearchHandler added in v0.3.0

func (a *Application) PlexSearchHandler(c echo.Context) error

func (*Application) PlexSessions added in v0.3.0

func (a *Application) PlexSessions(c echo.Context) error

func (*Application) PlexSessionsHandler added in v0.3.0

func (a *Application) PlexSessionsHandler(c echo.Context) error

func (*Application) PlexStop added in v0.3.0

func (a *Application) PlexStop(c echo.Context, session string) error

func (*Application) PlexStopHandler added in v0.3.0

func (a *Application) PlexStopHandler(c echo.Context) error

func (*Application) PlexUpdate added in v0.3.0

func (a *Application) PlexUpdate(c echo.Context) error

func (*Application) PlexUpdateHandler added in v0.3.0

func (a *Application) PlexUpdateHandler(c echo.Context) error

func (*Application) ReleasesCreate added in v0.3.0

func (a *Application) ReleasesCreate(c echo.Context) error

func (*Application) ReleasesCreateHandler added in v0.3.0

func (a *Application) ReleasesCreateHandler(c echo.Context) error

func (*Application) ReleasesDelete added in v0.3.0

func (a *Application) ReleasesDelete(c echo.Context, id string) error

func (*Application) ReleasesDeleteHandler added in v0.3.0

func (a *Application) ReleasesDeleteHandler(c echo.Context) error

func (*Application) ReleasesIndex added in v0.3.0

func (a *Application) ReleasesIndex(c echo.Context, page, limit int) error

func (*Application) ReleasesIndexHandler added in v0.3.0

func (a *Application) ReleasesIndexHandler(c echo.Context) error

Releases (/releases)

func (*Application) ReleasesPopular added in v0.3.0

func (a *Application) ReleasesPopular(c echo.Context, interval string) error

func (*Application) ReleasesPopularHandler added in v0.3.0

func (a *Application) ReleasesPopularHandler(c echo.Context) error

func (*Application) ReleasesSettings added in v0.3.0

func (a *Application) ReleasesSettings(c echo.Context, id string) error

func (*Application) ReleasesSettingsHandler added in v0.3.0

func (a *Application) ReleasesSettingsHandler(c echo.Context) error

func (*Application) ReleasesShow added in v0.3.0

func (a *Application) ReleasesShow(c echo.Context, id string) error

func (*Application) ReleasesShowHandler added in v0.3.0

func (a *Application) ReleasesShowHandler(c echo.Context) error

func (*Application) ReleasesUpdate added in v0.3.0

func (a *Application) ReleasesUpdate(c echo.Context, id string) error

func (*Application) ReleasesUpdateHandler added in v0.3.0

func (a *Application) ReleasesUpdateHandler(c echo.Context) error

func (*Application) RequestsCreate added in v0.3.0

func (a *Application) RequestsCreate(c echo.Context) error

func (*Application) RequestsCreateHandler added in v0.3.0

func (a *Application) RequestsCreateHandler(c echo.Context) error

func (*Application) RequestsDelete added in v0.3.0

func (a *Application) RequestsDelete(c echo.Context, id string) error

func (*Application) RequestsDeleteHandler added in v0.3.0

func (a *Application) RequestsDeleteHandler(c echo.Context) error

func (*Application) RequestsIndex added in v0.3.0

func (a *Application) RequestsIndex(c echo.Context, page, limit int) error

func (*Application) RequestsIndexHandler added in v0.3.0

func (a *Application) RequestsIndexHandler(c echo.Context) error

Requests (/requests)

func (*Application) RequestsSettings added in v0.3.0

func (a *Application) RequestsSettings(c echo.Context, id string) error

func (*Application) RequestsSettingsHandler added in v0.3.0

func (a *Application) RequestsSettingsHandler(c echo.Context) error

func (*Application) RequestsShow added in v0.3.0

func (a *Application) RequestsShow(c echo.Context, id string) error

func (*Application) RequestsShowHandler added in v0.3.0

func (a *Application) RequestsShowHandler(c echo.Context) error

func (*Application) RequestsUpdate added in v0.3.0

func (a *Application) RequestsUpdate(c echo.Context, id string) error

func (*Application) RequestsUpdateHandler added in v0.3.0

func (a *Application) RequestsUpdateHandler(c echo.Context) error

func (*Application) Routes added in v0.3.0

func (a *Application) Routes()

func (*Application) SeriesBackgrounds added in v0.3.0

func (a *Application) SeriesBackgrounds(c echo.Context, id string) error

func (*Application) SeriesBackgroundsHandler added in v0.3.0

func (a *Application) SeriesBackgroundsHandler(c echo.Context) error

func (*Application) SeriesCovers added in v0.3.0

func (a *Application) SeriesCovers(c echo.Context, id string) error

func (*Application) SeriesCoversHandler added in v0.3.0

func (a *Application) SeriesCoversHandler(c echo.Context) error

func (*Application) SeriesCreate added in v0.3.0

func (a *Application) SeriesCreate(c echo.Context) error

func (*Application) SeriesCreateHandler added in v0.3.0

func (a *Application) SeriesCreateHandler(c echo.Context) error

func (*Application) SeriesCurrentSeason added in v0.3.0

func (a *Application) SeriesCurrentSeason(c echo.Context, id string) error

func (*Application) SeriesCurrentSeasonHandler added in v0.3.0

func (a *Application) SeriesCurrentSeasonHandler(c echo.Context) error

func (*Application) SeriesDelete added in v0.3.0

func (a *Application) SeriesDelete(c echo.Context, id string) error

func (*Application) SeriesDeleteHandler added in v0.3.0

func (a *Application) SeriesDeleteHandler(c echo.Context) error

func (*Application) SeriesIndex added in v0.3.0

func (a *Application) SeriesIndex(c echo.Context, page, limit int) error

func (*Application) SeriesIndexHandler added in v0.3.0

func (a *Application) SeriesIndexHandler(c echo.Context) error

Series (/series)

func (*Application) SeriesJobs added in v0.3.0

func (a *Application) SeriesJobs(c echo.Context, id string, name string) error

func (*Application) SeriesJobsHandler added in v0.3.0

func (a *Application) SeriesJobsHandler(c echo.Context) error

func (*Application) SeriesPaths added in v0.3.0

func (a *Application) SeriesPaths(c echo.Context, id string) error

func (*Application) SeriesPathsHandler added in v0.3.0

func (a *Application) SeriesPathsHandler(c echo.Context) error

func (*Application) SeriesRefresh added in v0.3.0

func (a *Application) SeriesRefresh(c echo.Context, id string) error

func (*Application) SeriesRefreshHandler added in v0.3.0

func (a *Application) SeriesRefreshHandler(c echo.Context) error

func (*Application) SeriesSeasonEpisodes added in v0.3.0

func (a *Application) SeriesSeasonEpisodes(c echo.Context, id string, season string) error

func (*Application) SeriesSeasonEpisodesAll added in v0.3.0

func (a *Application) SeriesSeasonEpisodesAll(c echo.Context, id string) error

func (*Application) SeriesSeasonEpisodesAllHandler added in v0.3.0

func (a *Application) SeriesSeasonEpisodesAllHandler(c echo.Context) error

func (*Application) SeriesSeasonEpisodesHandler added in v0.3.0

func (a *Application) SeriesSeasonEpisodesHandler(c echo.Context) error

func (*Application) SeriesSeasons added in v0.3.0

func (a *Application) SeriesSeasons(c echo.Context, id string) error

func (*Application) SeriesSettings added in v0.3.0

func (a *Application) SeriesSettings(c echo.Context, id string) error

func (*Application) SeriesSettingsHandler added in v0.3.0

func (a *Application) SeriesSettingsHandler(c echo.Context) error

func (*Application) SeriesShow added in v0.3.0

func (a *Application) SeriesShow(c echo.Context, id string) error

func (*Application) SeriesShowHandler added in v0.3.0

func (a *Application) SeriesShowHandler(c echo.Context) error

func (*Application) SeriesUpdate added in v0.3.0

func (a *Application) SeriesUpdate(c echo.Context, id string) error

func (*Application) SeriesUpdateHandler added in v0.3.0

func (a *Application) SeriesUpdateHandler(c echo.Context) error

func (*Application) SeriesWatches added in v0.3.0

func (a *Application) SeriesWatches(c echo.Context, id string) error

func (*Application) SeriesWatchesHandler added in v0.3.0

func (a *Application) SeriesWatchesHandler(c echo.Context) error

func (*Application) TvdbSeriesBackgrounds added in v0.3.0

func (a *Application) TvdbSeriesBackgrounds(id int64) ([]string, error)

func (*Application) TvdbSeriesBackgroundsFanart added in v0.3.0

func (a *Application) TvdbSeriesBackgroundsFanart(id string) ([]string, error)

func (*Application) TvdbSeriesBackgroundsTmdb added in v0.3.0

func (a *Application) TvdbSeriesBackgroundsTmdb(id int64) ([]string, error)

func (*Application) TvdbSeriesCovers added in v0.3.0

func (a *Application) TvdbSeriesCovers(id int64) ([]string, error)

func (*Application) TvdbSeriesCoversFanart added in v0.3.0

func (a *Application) TvdbSeriesCoversFanart(id string) ([]string, error)

func (*Application) TvdbSeriesCoversTmdb added in v0.3.0

func (a *Application) TvdbSeriesCoversTmdb(id int64) ([]string, error)

func (*Application) UpcomingIndex added in v0.3.0

func (a *Application) UpcomingIndex(c echo.Context) error

func (*Application) UpcomingIndexHandler added in v0.3.0

func (a *Application) UpcomingIndexHandler(c echo.Context) error

Upcoming (/upcoming)

func (*Application) UsersIndex added in v0.3.0

func (a *Application) UsersIndex(c echo.Context) error

func (*Application) UsersIndexHandler added in v0.3.0

func (a *Application) UsersIndexHandler(c echo.Context) error

Users (/users)

func (*Application) WatchesIndex added in v0.3.0

func (a *Application) WatchesIndex(c echo.Context, mediumId, username string) error

func (*Application) WatchesIndexHandler added in v0.3.0

func (a *Application) WatchesIndexHandler(c echo.Context) error

Watches (/watches)

type Cache

type Cache struct {
	// contains filtered or unexported fields
}

func NewCache

func NewCache(log *zap.SugaredLogger, options kv.Options) (*Cache, error)

func (*Cache) Close

func (c *Cache) Close() error

func (*Cache) Delete

func (c *Cache) Delete(k string) error

func (*Cache) Fetch

func (c *Cache) Fetch(k string, v interface{}, f func() (interface{}, error)) (bool, error)

func (*Cache) Get

func (c *Cache) Get(k string, v interface{}) (bool, error)

func (*Cache) Set

func (c *Cache) Set(k string, v interface{}) error

type CleanPlexPins added in v0.3.0

type CleanPlexPins struct {
	minion.WorkerDefaults[*CleanPlexPins]
}

CleanPlexPins removes old pins

func (*CleanPlexPins) Kind added in v0.3.0

func (j *CleanPlexPins) Kind() string

func (*CleanPlexPins) Work added in v0.3.0

func (j *CleanPlexPins) Work(ctx context.Context, job *minion.Job[*CleanPlexPins]) error

type CleanupJobs added in v0.3.0

type CleanupJobs struct {
	minion.WorkerDefaults[*CleanupJobs]
}

func (*CleanupJobs) Kind added in v0.3.0

func (j *CleanupJobs) Kind() string

func (*CleanupJobs) Work added in v0.3.0

func (j *CleanupJobs) Work(ctx context.Context, job *minion.Job[*CleanupJobs]) error

type CleanupLogs added in v0.3.0

type CleanupLogs struct {
	minion.WorkerDefaults[*CleanupLogs]
}

func (*CleanupLogs) Kind added in v0.3.0

func (j *CleanupLogs) Kind() string

func (*CleanupLogs) Work added in v0.3.0

func (j *CleanupLogs) Work(ctx context.Context, job *minion.Job[*CleanupLogs]) error

type Collection added in v0.3.0

type Collection struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Name      string             `bson:"name" json:"name"`
	Library   string             `bson:"library" json:"library"`
	RatingKey string             `bson:"rating_key" json:"rating_key"`
	SyncedAt  time.Time          `bson:"synced_at" json:"synced_at"`
	Media     []*CollectionMedia `bson:"media" json:"media"`
}

type CollectionMedia added in v0.3.0

type CollectionMedia struct {
	RatingKey string `bson:"rating_key" json:"rating_key"`
	Title     string `bson:"title" json:"title"`
}

type Combination added in v0.3.0

type Combination struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Name        string   `bson:"name" json:"name"`
	Collections []string `bson:"collections" json:"collections"`
}

type CombinationChild added in v0.3.0

type CombinationChild struct {
	RatingKey    string `json:"ratingKey"`
	Key          string `json:"key"`
	GUID         string `json:"guid"`
	Type         string `json:"type"`
	Title        string `json:"title"`
	LibraryID    int64  `json:"librarySectionID"`
	LibraryTitle string `json:"librarySectionTitle"`
	LibraryKey   string `json:"librarySectionKey"`
	Summary      string `json:"summary"`
	Thumb        string `json:"thumb"`
	Total        int    `json:"total"`
	Viewed       int    `json:"viewed"`
	Link         string `json:"link"`
	Next         string `json:"next"`
	LastViewedAt int64  `json:"lastViewedAt"`
	AddedAt      int64  `json:"addedAt"`
	UpdatedAt    int64  `json:"updatedAt"`
}

type Config

type Config struct {
	Production            bool     `env:"PRODUCTION" envDefault:"false"`
	Logger                string   `env:"LOGGER" envDefault:"dev"`
	Port                  int      `env:"PORT" envDefault:"9000"`
	FlameURL              string   `env:"FLAME_URL"`
	Plex                  string   `env:"PLEX"`
	PlexToken             string   `env:"PLEX_TOKEN"`
	PlexAppName           string   `env:"PLEX_APP_NAME"`
	PlexMachineIdentifier string   `env:"PLEX_MACHINE_IDENTIFIER"`
	PlexClientIdentifier  string   `env:"PLEX_CLIENT_IDENTIFIER"`
	PlexDevice            string   `env:"PLEX_DEVICE"`
	PlexServerURL         string   `env:"PLEX_SERVER_URL"`
	PlexMetaURL           string   `env:"PLEX_META_URL"`
	PlexTvURL             string   `env:"PLEX_TV_URL"`
	DirectoriesImages     string   `env:"DIRECTORIES_IMAGES"`
	DirectoriesIncoming   string   `env:"DIRECTORIES_INCOMING"`
	DirectoriesCompleted  string   `env:"DIRECTORIES_COMPLETED"`
	DirectoriesNzbget     string   `env:"DIRECTORIES_NZBGET"`
	DirectoriesMetube     string   `env:"DIRECTORIES_METUBE"`
	FanartApiKey          string   `env:"FANART_API_KEY"`
	FanartApiURL          string   `env:"FANART_API_URL"`
	TmdbToken             string   `env:"TMDB_TOKEN"`
	TmdbImages            string   `env:"TMDB_IMAGES"`
	TvdbKey               string   `env:"TVDB_KEY"`
	ScryURL               string   `env:"SCRY_URL"`
	DownloadsPreferred    []string `env:"DOWNLOADS_PREFERRED" envSeparator:","`
	DownloadsGroups       []string `env:"DOWNLOADS_GROUPS" envSeparator:","`
	ExtensionsVideo       []string `env:"EXTENSIONS_VIDEO" envSeparator:","`
	ExtensionsAudio       []string `env:"EXTENSIONS_AUDIO" envSeparator:","`
	ExtensionsSubtitles   []string `env:"EXTENSIONS_SUBTITLES" envSeparator:","`

	ProcessRunicEvents bool `env:"PROCESS_RUNIC_EVENTS" envDefault:"true"`
	//golem:template:app/config_partial_struct
	// DO NOT EDIT. This section is managed by github.com/dashotv/golem.
	// Models (Database)
	Connections ConnectionSet `env:"CONNECTIONS"`

	// Cache
	RedisAddress string `env:"REDIS_ADDRESS"`

	// Router Auth
	Auth           bool   `env:"AUTH" envDefault:"false"`
	ClerkSecretKey string `env:"CLERK_SECRET_KEY"`

	// Events
	NatsURL string `env:"NATS_URL"`

	// Workers
	MinionConcurrency int    `env:"MINION_CONCURRENCY" envDefault:"10"`
	MinionDebug       bool   `env:"MINION_DEBUG" envDefault:"false"`
	MinionBufferSize  int    `env:"MINION_BUFFER_SIZE" envDefault:"100"`
	MinionURI         string `env:"MINION_URI"`
	MinionDatabase    string `env:"MINION_DATABASE"`
	MinionCollection  string `env:"MINION_COLLECTION"`
}

func (*Config) ConnectionFor added in v0.3.0

func (c *Config) ConnectionFor(name string) (*Connection, error)

func (*Config) Extensions added in v0.3.0

func (c *Config) Extensions() []string

func (*Config) Validate

func (c *Config) Validate() error

type Connection

type Connection struct {
	URI        string `yaml:"uri,omitempty"`
	Database   string `yaml:"database,omitempty"`
	Collection string `yaml:"collection,omitempty"`
}

func (*Connection) UnmarshalText added in v0.3.0

func (c *Connection) UnmarshalText(text []byte) error

type ConnectionSet added in v0.3.0

type ConnectionSet map[string]*Connection

func (*ConnectionSet) UnmarshalText added in v0.3.0

func (c *ConnectionSet) UnmarshalText(text []byte) error

type Connector

type Connector struct {
	Log         *zap.SugaredLogger
	Collection  *grimoire.Store[*Collection]
	Combination *grimoire.Store[*Combination]
	Download    *grimoire.Store[*Download]
	Episode     *grimoire.Store[*Episode]
	Feed        *grimoire.Store[*Feed]
	File        *grimoire.Store[*File]
	Medium      *grimoire.Store[*Medium]
	Message     *grimoire.Store[*Message]
	Minion      *grimoire.Store[*Minion]
	Movie       *grimoire.Store[*Movie]
	Pin         *grimoire.Store[*Pin]
	Release     *grimoire.Store[*Release]
	Request     *grimoire.Store[*Request]
	Series      *grimoire.Store[*Series]
	User        *grimoire.Store[*User]
	Watch       *grimoire.Store[*Watch]
}

func NewConnector

func NewConnector(app *Application) (*Connector, error)

func (*Connector) ActiveDownloads

func (c *Connector) ActiveDownloads() ([]*Download, error)

func (*Connector) CollectionGet added in v0.3.0

func (c *Connector) CollectionGet(id string) (*Collection, error)

func (*Connector) CollectionList added in v0.3.0

func (c *Connector) CollectionList(limit, skip int) ([]*Collection, error)

func (*Connector) CombinationByName added in v0.3.0

func (c *Connector) CombinationByName(name string) (*Combination, error)

func (*Connector) CombinationChildren added in v0.3.0

func (c *Connector) CombinationChildren(name string) ([]*CombinationChild, error)

func (*Connector) CombinationGet added in v0.3.0

func (c *Connector) CombinationGet(id string) (*Combination, error)

func (*Connector) CombinationList added in v0.3.0

func (c *Connector) CombinationList(page, limit int) ([]*Combination, error)

func (*Connector) DownloadByStatus added in v0.3.0

func (c *Connector) DownloadByStatus(status string) ([]*Download, error)

func (*Connector) DownloadGet added in v0.3.0

func (c *Connector) DownloadGet(id string) (*Download, error)

func (*Connector) DownloadSelect added in v0.2.0

func (c *Connector) DownloadSelect(id, mediumId string, num int) error

func (*Connector) DownloadSetting added in v0.2.0

func (c *Connector) DownloadSetting(id, setting string, value bool) error

func (*Connector) EpisodeGet added in v0.3.0

func (c *Connector) EpisodeGet(id string) (*Episode, error)

func (*Connector) EpisodePaths added in v0.2.0

func (c *Connector) EpisodePaths(id string) ([]*Path, error)

func (*Connector) EpisodeSetting

func (c *Connector) EpisodeSetting(id, setting string, value bool) error

func (*Connector) FeedSetting added in v0.3.0

func (c *Connector) FeedSetting(id, setting string, value bool) error

func (*Connector) FeedUpdate added in v0.3.0

func (c *Connector) FeedUpdate(id string, data *Feed) error

func (*Connector) FileByPath added in v0.3.0

func (c *Connector) FileByPath(path string) (*File, error)

func (*Connector) FileCount added in v0.3.0

func (c *Connector) FileCount() (int64, error)

func (*Connector) FileGet added in v0.3.0

func (c *Connector) FileGet(id string) (*File, error)

func (*Connector) FileList added in v0.3.0

func (c *Connector) FileList() ([]*File, error)

func (*Connector) MediumBy added in v0.3.0

func (c *Connector) MediumBy(kind, name, file, ext string) (*Medium, bool, error)

func (*Connector) MediumByFile added in v0.3.0

func (c *Connector) MediumByFile(f *File) (*Medium, error)

func (*Connector) MediumByFilePartsAnime added in v0.3.0

func (c *Connector) MediumByFilePartsAnime(kind, name, file string) (*Medium, error)

func (*Connector) MediumByFilePartsMovie added in v0.3.0

func (c *Connector) MediumByFilePartsMovie(kind, name string) (*Medium, error)

func (*Connector) MediumByFilePartsTv added in v0.3.0

func (c *Connector) MediumByFilePartsTv(kind, name, file string) (*Medium, error)

func (*Connector) MediumWatched added in v0.2.0

func (c *Connector) MediumWatched(id primitive.ObjectID) bool

func (*Connector) MediumWatchedAny added in v0.3.0

func (c *Connector) MediumWatchedAny(id primitive.ObjectID) bool

func (*Connector) MessageCreate added in v0.3.0

func (c *Connector) MessageCreate(level string, message string, facility string, t time.Time) (*Message, error)

func (*Connector) MessageList added in v0.3.0

func (c *Connector) MessageList() ([]*Message, error)

func (*Connector) MinionList added in v0.3.0

func (c *Connector) MinionList() ([]*Minion, error)

func (*Connector) MoviePaths added in v0.2.0

func (c *Connector) MoviePaths(id string) ([]*Path, error)

func (*Connector) MovieSetting added in v0.2.0

func (c *Connector) MovieSetting(id, setting string, value bool) error

func (*Connector) MovieUpdate added in v0.3.0

func (c *Connector) MovieUpdate(id string, data *Movie) error

func (*Connector) MoviesAll added in v0.3.0

func (c *Connector) MoviesAll() ([]*Movie, error)

func (*Connector) PinList added in v0.3.0

func (c *Connector) PinList() ([]*Pin, error)

func (*Connector) ProcessFeeds added in v0.3.0

func (c *Connector) ProcessFeeds() error

func (*Connector) RecentDownloads added in v0.2.0

func (c *Connector) RecentDownloads(mid string, page int) ([]*Download, int64, error)

func (*Connector) ReleaseSetting added in v0.2.0

func (c *Connector) ReleaseSetting(id, setting string, value bool) error

func (*Connector) ReleasesAll added in v0.3.0

func (c *Connector) ReleasesAll() ([]*Release, error)

func (*Connector) ReleasesPopularQuery added in v0.3.0

func (c *Connector) ReleasesPopularQuery(t string, date time.Time, count int) ([]*Popular, error)

func (*Connector) RequestList added in v0.3.0

func (c *Connector) RequestList() ([]*Request, error)

func (*Connector) SeriesActive

func (c *Connector) SeriesActive() ([]*Series, error)

func (*Connector) SeriesAll

func (c *Connector) SeriesAll() ([]*Series, error)

func (*Connector) SeriesBySearch added in v0.3.0

func (c *Connector) SeriesBySearch(title string) (*Series, error)

func (*Connector) SeriesCurrentSeason added in v0.2.0

func (c *Connector) SeriesCurrentSeason(id string) (int, error)

func (*Connector) SeriesDownloadCounts added in v0.3.0

func (c *Connector) SeriesDownloadCounts() (map[string]int, error)

func (*Connector) SeriesEpisodeBy added in v0.3.0

func (c *Connector) SeriesEpisodeBy(s *Series, season, episode int) (*Episode, error)

func (*Connector) SeriesPaths added in v0.2.0

func (c *Connector) SeriesPaths(id string) ([]*Path, error)

func (*Connector) SeriesSeasonEpisodes

func (c *Connector) SeriesSeasonEpisodes(id string, season string) ([]*Episode, error)

func (*Connector) SeriesSeasonEpisodesAll added in v0.2.0

func (c *Connector) SeriesSeasonEpisodesAll(id string) ([]*Episode, error)

func (*Connector) SeriesSeasons

func (c *Connector) SeriesSeasons(id string) ([]int, error)

func (*Connector) SeriesSetting

func (c *Connector) SeriesSetting(id, setting string, value bool) error

func (*Connector) SeriesUnwatched added in v0.3.0

func (c *Connector) SeriesUnwatched(s *Series, user string) (int, error)

func (*Connector) SeriesUnwatchedByID added in v0.3.0

func (c *Connector) SeriesUnwatchedByID(id string) (int, error)

func (*Connector) SeriesUpdate added in v0.3.0

func (c *Connector) SeriesUpdate(id string, data *Series) error

func (*Connector) SeriesUserUnwatched added in v0.3.0

func (c *Connector) SeriesUserUnwatched(s *Series) (int, error)

func (*Connector) SeriesWatches added in v0.2.0

func (c *Connector) SeriesWatches(id string) ([]*Watch, error)

func (*Connector) Upcoming

func (c *Connector) Upcoming() ([]*Episode, error)

func (*Connector) UpcomingFrom added in v0.3.0

func (c *Connector) UpcomingFrom(query *grimoire.QueryBuilder[*Episode]) ([]*Episode, error)

func (*Connector) UpcomingNow added in v0.3.0

func (c *Connector) UpcomingNow() ([]*Episode, error)

func (*Connector) UpcomingQuery added in v0.3.0

func (c *Connector) UpcomingQuery() *grimoire.QueryBuilder[*Episode]

func (*Connector) UserList added in v0.3.0

func (c *Connector) UserList() ([]*User, error)

func (*Connector) Watches added in v0.3.0

func (c *Connector) Watches(mediumId, username string) ([]*Watch, error)

type Count added in v0.3.0

type Count struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*Count) Inc added in v0.3.0

func (c *Count) Inc()

type CreateMediaFromRequests added in v0.3.0

type CreateMediaFromRequests struct {
	minion.WorkerDefaults[*CreateMediaFromRequests]
}

CreateMediaFromRequests creates media from approved requests

func (*CreateMediaFromRequests) Kind added in v0.3.0

func (j *CreateMediaFromRequests) Kind() string

func (*CreateMediaFromRequests) Work added in v0.3.0

type CreateRequest added in v0.3.0

type CreateRequest struct {
	ID          string `json:"id"`
	Title       string `json:"title"`
	Type        string `json:"type"`
	Kind        string `json:"kind"`
	Description string `json:"description"`
	Source      string `json:"source"`
	Date        string `json:"date"`
}

type Download

type Download struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	MediumId  primitive.ObjectID `bson:"medium_id" json:"medium_id"`
	Auto      bool               `bson:"auto" json:"auto"`
	Multi     bool               `bson:"multi" json:"multi"`
	Force     bool               `bson:"force" json:"force"`
	Url       string             `bson:"url" json:"url"`
	ReleaseId string             `bson:"tdo_id" json:"release_id"`
	Thash     string             `bson:"thash" json:"thash"`
	Selected  string             `bson:"selected" json:"selected"`
	Status    string             `bson:"status" json:"status"`
	Files     []*DownloadFile    `bson:"download_files" json:"download_files"`
	Medium    *Medium            `bson:"-" json:"medium"`
}

func (*Download) Created added in v0.3.0

func (d *Download) Created(ctx context.Context) error

func (*Download) GetURL added in v0.3.0

func (d *Download) GetURL() (string, error)

func (*Download) IsMetube added in v0.3.0

func (d *Download) IsMetube() bool

func (*Download) IsNzb added in v0.3.0

func (d *Download) IsNzb() bool

func (*Download) Saving added in v0.3.0

func (d *Download) Saving() error

func (*Download) Updated added in v0.3.0

func (d *Download) Updated(ctx context.Context, result *mongo.UpdateResult) error

type DownloadFile added in v0.2.0

type DownloadFile struct {
	Id       primitive.ObjectID `bson:"_id" json:"id"`
	MediumId primitive.ObjectID `bson:"medium_id" json:"medium_id"`
	Medium   *Medium            `bson:"medium" json:"medium"`
	Num      int                `bson:"num" json:"num"`
}

type DownloadRequest added in v0.3.0

type DownloadRequest struct {
	MediumId string `json:"medium_id"`
}

type DownloadSelector added in v0.2.0

type DownloadSelector struct {
	MediumId string
	Num      int
}

type Downloading added in v0.3.0

type Downloading struct {
	ID           string           `json:"id,omitempty"`
	MediumID     string           `json:"medium_id,omitempty"`
	Multi        bool             `json:"multi,omitempty"`
	Infohash     string           `json:"infohash,omitempty"`
	Torrent      *qbt.TorrentJSON `json:"torrent,omitempty"`
	Queue        float64          `json:"queue"`
	Progress     float64          `json:"progress"`
	Eta          string           `json:"eta,omitempty"`
	TorrentState string           `json:"torrent_state,omitempty"`
	Files        struct {
		Completed int `json:"completed,omitempty"`
		Selected  int `json:"selected,omitempty"`
	} `json:"files,omitempty"`
}

type DownloadsProcess added in v0.3.0

type DownloadsProcess struct {
	minion.WorkerDefaults[*DownloadsProcess]
}

func (*DownloadsProcess) Create added in v0.3.0

func (j *DownloadsProcess) Create() error

func (*DownloadsProcess) Kind added in v0.3.0

func (j *DownloadsProcess) Kind() string

func (*DownloadsProcess) Load added in v0.3.0

func (j *DownloadsProcess) Load() error

func (*DownloadsProcess) Manage added in v0.3.0

func (j *DownloadsProcess) Manage() error

func (*DownloadsProcess) MetubeMove added in v0.3.0

func (j *DownloadsProcess) MetubeMove(download *Download) error

func (*DownloadsProcess) Move added in v0.3.0

func (j *DownloadsProcess) Move() error

func (*DownloadsProcess) Search added in v0.3.0

func (j *DownloadsProcess) Search() error

func (*DownloadsProcess) Work added in v0.3.0

type Episode

type Episode struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Type           string             `bson:"_type" json:"type"`
	SeriesId       primitive.ObjectID `bson:"series_id" json:"series_id"`
	SourceId       string             `bson:"source_id" json:"source_id"`
	Title          string             `bson:"title" json:"title"`
	Description    string             `bson:"description" json:"description"`
	Directory      string             `bson:"directory" json:"directory"`
	Search         string             `bson:"search" json:"search"`
	SeasonNumber   int                `bson:"season_number" json:"season_number"`
	EpisodeNumber  int                `bson:"episode_number" json:"episode_number"`
	AbsoluteNumber int                `bson:"absolute_number" json:"absolute_number"`
	Downloaded     bool               `bson:"downloaded" json:"downloaded"`
	Completed      bool               `bson:"completed" json:"completed"`
	Skipped        bool               `bson:"skipped" json:"skipped"`
	Missing        *time.Time         `bson:"missing" json:"missing"`
	ReleaseDate    time.Time          `bson:"release_date" json:"release_date"`
	Paths          []*Path            `bson:"paths,omitempty" json:"paths"`
	Cover          string             `bson:"-" json:"cover"`
	Background     string             `bson:"-" json:"background"`
	Watched        bool               `bson:"-" json:"watched"`
	WatchedAny     bool               `bson:"-" json:"watched_any"`
	Active         bool               `bson:"-" json:"active"`
	Favorite       bool               `bson:"-" json:"favorite"`
	Unwatched      int                `bson:"-" json:"unwatched"`
	Display        string             `bson:"-" json:"display"`
	Kind           primitive.Symbol   `bson:"-" json:"kind"`
	Source         string             `bson:"-" json:"source"`
}

func (*Episode) Created added in v0.3.0

func (e *Episode) Created(ctx context.Context) error

func (*Episode) Saving added in v0.3.0

func (e *Episode) Saving() error

func (*Episode) Updated added in v0.3.0

func (e *Episode) Updated(ctx context.Context, result *mongo.UpdateResult) error

type EpisodeSettingsBatch added in v0.3.0

type EpisodeSettingsBatch struct {
	IDs   []primitive.ObjectID `json:"ids"`
	Field string               `json:"field"`
	Value bool                 `json:"value"`
}

type EventDownloading added in v0.3.0

type EventDownloading struct {
	Downloads map[string]*Downloading `bson:"downloads" json:"downloads"`
	Hashes    map[string]string       `bson:"hashes" json:"hashes"`
	Metrics   *flame.Metrics          `bson:"metrics" json:"metrics"`
}

type EventDownloads added in v0.3.0

type EventDownloads struct {
	Event    string    `bson:"event" json:"event"`
	Id       string    `bson:"id" json:"id"`
	Download *Download `bson:"download" json:"download"`
}

type EventEpisodes added in v0.3.0

type EventEpisodes struct {
	Event   string   `bson:"event" json:"event"`
	Id      string   `bson:"id" json:"id"`
	Episode *Episode `bson:"episode" json:"episode"`
}

type EventJobs added in v0.3.0

type EventJobs struct {
	Event string  `bson:"event" json:"event"`
	Id    string  `bson:"id" json:"id"`
	Job   *Minion `bson:"job" json:"job"`
}

type EventLogs added in v0.3.0

type EventLogs struct {
	Event string   `bson:"event" json:"event"`
	Id    string   `bson:"id" json:"id"`
	Log   *Message `bson:"log" json:"log"`
}

type EventMovies added in v0.3.0

type EventMovies struct {
	Event string `bson:"event" json:"event"`
	Id    string `bson:"id" json:"id"`
	Movie *Movie `bson:"movie" json:"movie"`
}

type EventNotices added in v0.3.0

type EventNotices struct {
	Event   string `bson:"event" json:"event"`
	Time    string `bson:"time" json:"time"`
	Class   string `bson:"class" json:"class"`
	Level   string `bson:"level" json:"level"`
	Message string `bson:"message" json:"message"`
}

type EventPlexSessions added in v0.3.0

type EventPlexSessions struct {
	Sessions []*plex.PlexSessionMetadata `bson:"sessions" json:"sessions"`
}

type EventRequests added in v0.3.0

type EventRequests struct {
	Event   string   `bson:"event" json:"event"`
	Id      string   `bson:"id" json:"id"`
	Request *Request `bson:"request" json:"request"`
}

type EventSeerDownload added in v0.3.0

type EventSeerDownload struct {
	Event    string    `json:"event,omitempty"`
	ID       string    `json:"id,omitempty"`
	Download *Download `json:"download,omitempty"`
}

type EventSeerEpisode added in v0.3.0

type EventSeerEpisode struct {
	Event string `json:"event,omitempty"`
	ID    string `json:"id,omitempty"`
}

type EventSeerLog added in v0.3.0

type EventSeerLog struct {
	Time     time.Time `json:"time,omitempty"`
	Message  string    `json:"message,omitempty"`
	Level    string    `json:"level,omitempty"`
	Facility string    `json:"facility,omitempty"`
}

type EventSeerNotice added in v0.3.0

type EventSeerNotice struct {
	Event   string `json:"event,omitempty"`
	Time    string `json:"time,omitempty"`
	Class   string `json:"class,omitempty"`
	Level   string `json:"level,omitempty"`
	Message string `json:"message,omitempty"`
}

type EventSeries added in v0.3.0

type EventSeries struct {
	Event  string  `bson:"event" json:"event"`
	Id     string  `bson:"id" json:"id"`
	Series *Series `bson:"series" json:"series"`
}

type Events added in v0.3.0

type Events struct {
	App           *Application
	Merc          *mercury.Mercury
	Log           *zap.SugaredLogger
	Downloading   chan *EventDownloading
	Downloads     chan *EventDownloads
	Episodes      chan *EventEpisodes
	FlameCombined chan *FlameCombined
	Jobs          chan *EventJobs
	Logs          chan *EventLogs
	Movies        chan *EventMovies
	Notices       chan *EventNotices
	PlexSessions  chan *EventPlexSessions
	Releases      chan *Release
	Requests      chan *EventRequests
	RunicReleases chan *runic.Release
	SeerDownloads chan *EventSeerDownload
	SeerEpisodes  chan *EventSeerEpisode
	SeerLogs      chan *EventSeerLog
	SeerNotices   chan *EventSeerNotice
	Series        chan *EventSeries
	Stats         chan *minion.Stats
}

func NewEvents added in v0.3.0

func NewEvents(app *Application) (*Events, error)

func (*Events) Send added in v0.3.0

func (e *Events) Send(topic EventsTopic, data any) error

func (*Events) Start added in v0.3.0

func (e *Events) Start() error

type EventsChannel added in v0.3.0

type EventsChannel string

type EventsTopic added in v0.3.0

type EventsTopic string

type Fanart added in v0.3.0

type Fanart struct {
	ApiKey string
	// contains filtered or unexported fields
}

func NewFanart added in v0.3.0

func NewFanart(url, apiKey string) *Fanart

func (*Fanart) GetMovieImages added in v0.3.0

func (f *Fanart) GetMovieImages(id string) (*FanartShowImages, error)

func (*Fanart) GetShowImages added in v0.3.0

func (f *Fanart) GetShowImages(id string) (*FanartShowImages, error)

type FanartImage added in v0.3.0

type FanartImage struct {
	ID    string `json:"id"`
	URL   string `json:"url"`
	Lang  string `json:"lang"`
	Likes string `json:"likes"`
}

type FanartMovieImages added in v0.3.0

type FanartMovieImages struct {
	Name        string        `json:"name"`
	TmdbID      string        `json:"tmdb_id"`
	ImdbID      string        `json:"imdb_id"`
	Posters     []FanartImage `json:"movieposter"`
	Backgrounds []FanartImage `json:"moviebackground"`
	Status      string        `json:"status"`
	Erorr       string        `json:"error message"`
}

type FanartShowImages added in v0.3.0

type FanartShowImages struct {
	Name        string        `json:"name"`
	TvdbID      string        `json:"thetvdb_id"`
	Posters     []FanartImage `json:"tvposter"`
	Backgrounds []FanartImage `json:"showbackground"`
	Status      string        `json:"status"`
	Erorr       string        `json:"error message"`
}

type Feed added in v0.2.0

type Feed struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Name      string    `bson:"name" json:"name"`
	Url       string    `bson:"url" json:"url"`
	Source    string    `bson:"source" json:"source"`
	Type      string    `bson:"type" json:"type"`
	Active    bool      `bson:"active" json:"active"`
	Processed time.Time `bson:"processed" json:"processed"`
}

type File added in v0.3.0

type File struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Type       string             `bson:"type" json:"type"`
	Path       string             `bson:"path" json:"path"`
	Size       int64              `bson:"size" json:"size"`
	ModifiedAt int64              `bson:"modified_at" json:"modified_at"`
	MediumId   primitive.ObjectID `bson:"medium_id" json:"medium_id"`
}

func (*File) Parts added in v0.3.0

func (f *File) Parts() (string, string, string)

type FileMatch added in v0.3.0

type FileMatch struct {
	minion.WorkerDefaults[*FileMatch]
}

func (*FileMatch) Kind added in v0.3.0

func (j *FileMatch) Kind() string

func (*FileMatch) Timeout added in v0.3.0

func (j *FileMatch) Timeout(job *minion.Job[*FileMatch]) time.Duration

func (*FileMatch) Work added in v0.3.0

func (j *FileMatch) Work(ctx context.Context, job *minion.Job[*FileMatch]) error

type FileMatchDir added in v0.3.0

type FileMatchDir struct {
	minion.WorkerDefaults[*FileMatchDir]
	Dir string
}

func (*FileMatchDir) Kind added in v0.3.0

func (j *FileMatchDir) Kind() string

func (*FileMatchDir) Timeout added in v0.3.0

func (j *FileMatchDir) Timeout(job *minion.Job[*FileMatchDir]) time.Duration

func (*FileMatchDir) Work added in v0.3.0

func (j *FileMatchDir) Work(ctx context.Context, job *minion.Job[*FileMatchDir]) error

type FileMatchMedium added in v0.3.0

type FileMatchMedium struct {
	minion.WorkerDefaults[*FileMatchMedium]
	ID string
}

func (*FileMatchMedium) Kind added in v0.3.0

func (j *FileMatchMedium) Kind() string

func (*FileMatchMedium) Timeout added in v0.3.0

func (*FileMatchMedium) Work added in v0.3.0

type FileWalk added in v0.3.0

type FileWalk struct {
	minion.WorkerDefaults[*FileWalk]
}

func (*FileWalk) Kind added in v0.3.0

func (j *FileWalk) Kind() string

func (*FileWalk) Timeout added in v0.3.0

func (j *FileWalk) Timeout(job *minion.Job[*FileWalk]) time.Duration

func (*FileWalk) Work added in v0.3.0

func (j *FileWalk) Work(ctx context.Context, job *minion.Job[*FileWalk]) error

type Flame added in v0.3.0

type Flame struct {
	URL string
	// contains filtered or unexported fields
}

func (*Flame) LoadMetube added in v0.3.0

func (c *Flame) LoadMetube(name string, url string) error

func (*Flame) LoadNzb added in v0.3.0

func (c *Flame) LoadNzb(d *Download, url string) (string, error)

func (*Flame) LoadTorrent added in v0.3.0

func (c *Flame) LoadTorrent(_ *Download, url string) (string, error)

func (*Flame) MetubeHistory added in v0.3.0

func (c *Flame) MetubeHistory() (*metube.HistoryResponse, error)

func (*Flame) RemoveTorrent added in v0.3.0

func (c *Flame) RemoveTorrent(thash string) error

func (*Flame) Torrent added in v0.3.0

func (c *Flame) Torrent(thash string) (*qbt.Torrent, error)

type FlameCombined added in v0.3.0

type FlameCombined struct {
	Torrents  []*qbt.TorrentJSON
	Nzbs      []nzbget.Group
	NzbStatus nzbget.Status
	Metrics   *flame.Metrics
}

type FlameNzbAddResponse added in v0.3.0

type FlameNzbAddResponse struct {
	Error bool `json:"error"`
	ID    int  `json:"id"`
}

type H added in v0.3.0

type H map[string]any

stolen from gin gonic H is a shortcut for map[string]any

func (H) MarshalXML added in v0.3.0

func (h H) MarshalXML(e *xml.Encoder, start xml.StartElement) error

MarshalXML allows type H to be used with xml.Marshal.

type Medium

type Medium struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Type           string             `bson:"_type" json:"type"`
	Kind           primitive.Symbol   `bson:"kind" json:"kind"`
	Source         string             `bson:"source" json:"source"`
	SourceId       string             `bson:"source_id" json:"source_id"`
	ImdbId         string             `bson:"imdb_id" json:"imdb_id"`
	Title          string             `bson:"title" json:"title"`
	Description    string             `bson:"description" json:"description"`
	Display        string             `bson:"display" json:"display"`
	Directory      string             `bson:"directory" json:"directory"`
	Search         string             `bson:"search" json:"search"`
	SearchParams   *SearchParams      `bson:"search_params" json:"search_params"`
	Active         bool               `bson:"active" json:"active"`
	Downloaded     bool               `bson:"downloaded" json:"downloaded"`
	Completed      bool               `bson:"completed" json:"completed"`
	Skipped        bool               `bson:"skipped" json:"skipped"`
	Watched        bool               `bson:"watched" json:"watched"`
	Broken         bool               `bson:"broken" json:"broken"`
	Favorite       bool               `bson:"favorite" json:"favorite"`
	Unwatched      int                `bson:"unwatched" json:"unwatched"`
	ReleaseDate    time.Time          `bson:"release_date" json:"release_date"`
	Paths          []*Path            `bson:"paths,omitempty" json:"paths"`
	Cover          string             `bson:"-" json:"cover"`
	Background     string             `bson:"-" json:"background"`
	SeriesId       primitive.ObjectID `bson:"series_id" json:"series_id"`
	SeasonNumber   int                `bson:"season_number" json:"season_number"`
	EpisodeNumber  int                `bson:"episode_number" json:"episode_number"`
	AbsoluteNumber int                `bson:"absolute_number" json:"absolute_number"`
}

func (*Medium) Destination added in v0.3.0

func (m *Medium) Destination() string

func (*Medium) Saving added in v0.3.0

func (m *Medium) Saving() error

type Message added in v0.3.0

type Message struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Level    string `bson:"level" json:"level"`
	Facility string `bson:"facility" json:"facility"`
	Message  string `bson:"message" json:"message"`
}

type MetubeAddResponse added in v0.3.0

type MetubeAddResponse struct {
	Error   bool   `json:"error"`
	Message string `json:"message"`
}

type MetubeHistory added in v0.3.0

type MetubeHistory struct {
	Error   bool                    `json:"error"`
	History *metube.HistoryResponse `json:"history"`
}

type Minion added in v0.3.0

type Minion struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Kind     string           `bson:"kind" json:"kind"`
	Args     string           `bson:"args" json:"args"`
	Status   string           `bson:"status" json:"status"`
	Queue    string           `bson:"queue" json:"queue"`
	Attempts []*MinionAttempt `bson:"attempts" json:"attempts"`
}

type MinionAttempt added in v0.3.0

type MinionAttempt struct {
	StartedAt  time.Time `bson:"started_at" json:"started_at"`
	Duration   float64   `bson:"duration" json:"duration"`
	Status     string    `bson:"status" json:"status"`
	Error      string    `bson:"error" json:"error"`
	Stacktrace []string  `bson:"stacktrace" json:"stacktrace"`
}

type Movie added in v0.2.0

type Movie struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Type         string           `bson:"_type" json:"type"`
	Kind         primitive.Symbol `bson:"kind" json:"kind"`
	Source       string           `bson:"source" json:"source"`
	SourceId     string           `bson:"source_id" json:"source_id"`
	ImdbId       string           `bson:"imdb_id" json:"imdb_id"`
	Title        string           `bson:"title" json:"title"`
	Description  string           `bson:"description" json:"description"`
	Slug         string           `bson:"slug" json:"slug"`
	Text         []string         `bson:"text" json:"text"`
	Display      string           `bson:"display" json:"display"`
	Directory    string           `bson:"directory" json:"directory"`
	Search       string           `bson:"search" json:"search"`
	SearchParams *SearchParams    `bson:"search_params" json:"search_params"`
	Active       bool             `bson:"active" json:"active"`
	Downloaded   bool             `bson:"downloaded" json:"downloaded"`
	Completed    bool             `bson:"completed" json:"completed"`
	Skipped      bool             `bson:"skipped" json:"skipped"`
	Watched      bool             `bson:"watched" json:"watched"`
	Broken       bool             `bson:"broken" json:"broken"`
	Favorite     bool             `bson:"favorite" json:"favorite"`
	ReleaseDate  time.Time        `bson:"release_date" json:"release_date"`
	Paths        []*Path          `bson:"paths,omitempty" json:"paths"`
	Cover        string           `bson:"-" json:"cover"`
	Background   string           `bson:"-" json:"background"`
}

func (*Movie) Created added in v0.3.0

func (m *Movie) Created(ctx context.Context) error

func (*Movie) Saving added in v0.3.0

func (m *Movie) Saving() error

func (*Movie) Updated added in v0.3.0

func (m *Movie) Updated(ctx context.Context, result *mongo.UpdateResult) error

type Notifier added in v0.3.0

type Notifier struct {
	Log    *NotifierLog
	Notice *NotifierNotice
}

func (*Notifier) Error added in v0.3.0

func (n *Notifier) Error(title, message string)

func (*Notifier) Info added in v0.3.0

func (n *Notifier) Info(title, message string)

func (*Notifier) Notify added in v0.3.0

func (n *Notifier) Notify(level, title, message string)

func (*Notifier) Success added in v0.3.0

func (n *Notifier) Success(title, message string)

func (*Notifier) Warn added in v0.3.0

func (n *Notifier) Warn(title, message string)

type NotifierLog added in v0.3.0

type NotifierLog struct{}

func (*NotifierLog) Error added in v0.3.0

func (n *NotifierLog) Error(title, message string)

func (*NotifierLog) Info added in v0.3.0

func (n *NotifierLog) Info(title, message string)

func (*NotifierLog) Success added in v0.3.0

func (n *NotifierLog) Success(title, message string)

func (*NotifierLog) Warn added in v0.3.0

func (n *NotifierLog) Warn(title, message string)

type NotifierNotice added in v0.3.0

type NotifierNotice struct{}

func (*NotifierNotice) Error added in v0.3.0

func (n *NotifierNotice) Error(title, message string)

func (*NotifierNotice) Info added in v0.3.0

func (n *NotifierNotice) Info(title, message string)

func (*NotifierNotice) Success added in v0.3.0

func (n *NotifierNotice) Success(title, message string)

func (*NotifierNotice) Warn added in v0.3.0

func (n *NotifierNotice) Warn(title, message string)

type Path added in v0.2.0

type Path struct {
	Id         primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	Type       primitive.Symbol   `bson:"type" json:"type"`
	Remote     string             `bson:"remote" json:"remote"`
	Local      string             `bson:"local" json:"local"`
	Extension  string             `bson:"extension" json:"extension"`
	Size       int                `bson:"size" json:"size"`
	Resolution int                `bson:"resolution" json:"resolution"`
	Bitrate    int                `bson:"bitrate" json:"bitrate"`
	Checksum   string             `bson:"checksum" json:"checksum"`
	UpdatedAt  time.Time          `bson:"updated_at" json:"updated_at"`
}

func (*Path) Exists added in v0.3.0

func (p *Path) Exists() bool

func (*Path) IsImage added in v0.3.0

func (p *Path) IsImage() bool

func (*Path) IsVideo added in v0.3.0

func (p *Path) IsVideo() bool

func (*Path) LocalPath added in v0.3.0

func (p *Path) LocalPath() string

type PathCleanup added in v0.3.0

type PathCleanup struct {
	minion.WorkerDefaults[*PathCleanup]
	ID string // medium
}

func (*PathCleanup) Kind added in v0.3.0

func (j *PathCleanup) Kind() string

func (*PathCleanup) Work added in v0.3.0

func (j *PathCleanup) Work(ctx context.Context, job *minion.Job[*PathCleanup]) error

type PathCleanupAll added in v0.3.0

type PathCleanupAll struct {
	minion.WorkerDefaults[*PathCleanupAll]
}

func (*PathCleanupAll) Kind added in v0.3.0

func (j *PathCleanupAll) Kind() string

func (*PathCleanupAll) Work added in v0.3.0

type PathImport added in v0.3.0

type PathImport struct {
	minion.WorkerDefaults[*PathImport]
	ID     string `bson:"id" json:"id"`           // medium
	PathID string `bson:"path_id" json:"path_id"` // path
	Title  string `bson:"title" json:"title"`
}

func (*PathImport) Kind added in v0.3.0

func (j *PathImport) Kind() string

func (*PathImport) Timeout added in v0.3.0

func (j *PathImport) Timeout(job *minion.Job[*PathImport]) time.Duration

func (*PathImport) Work added in v0.3.0

func (j *PathImport) Work(ctx context.Context, job *minion.Job[*PathImport]) error

type Pin added in v0.3.0

type Pin struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Pin        int    `bson:"pin" json:"id"`
	Code       string `bson:"code" json:"code"`
	Token      string `bson:"token" json:"authToken"`
	Product    string `bson:"product" json:"product"`
	Identifier string `bson:"identifier" json:"clientIdentifier"`
}

type PlexCollectionUpdate added in v0.3.0

type PlexCollectionUpdate struct {
	minion.WorkerDefaults[*PlexCollectionUpdate]
	Id string `bson:"id" json:"id"`
}

func (*PlexCollectionUpdate) Kind added in v0.3.0

func (j *PlexCollectionUpdate) Kind() string

func (*PlexCollectionUpdate) Work added in v0.3.0

type PlexPinToUsers added in v0.3.0

type PlexPinToUsers struct {
	minion.WorkerDefaults[*PlexPinToUsers]
}

PlexPinToUsers ensures users are created from athorized pins

func (*PlexPinToUsers) Kind added in v0.3.0

func (j *PlexPinToUsers) Kind() string

func (*PlexPinToUsers) Work added in v0.3.0

type PlexUserUpdates added in v0.3.0

type PlexUserUpdates struct {
	minion.WorkerDefaults[*PlexUserUpdates]
}

PlexUserUpdates updates users from plex

func (*PlexUserUpdates) Kind added in v0.3.0

func (j *PlexUserUpdates) Kind() string

func (*PlexUserUpdates) Work added in v0.3.0

type PlexWatchlistUpdates added in v0.3.0

type PlexWatchlistUpdates struct {
	minion.WorkerDefaults[*PlexWatchlistUpdates]
}

PlexWatchlistUpdates updates watchlist from plex

func (*PlexWatchlistUpdates) Kind added in v0.3.0

func (j *PlexWatchlistUpdates) Kind() string

func (*PlexWatchlistUpdates) Work added in v0.3.0

type Popular struct {
	Name  string `json:"name" bson:"_id"`
	Year  int    `json:"year" bson:"year"`
	Type  string `json:"type" bson:"type"`
	Count int    `json:"count" bson:"count"`
}

func ReleasesPopularQuery added in v0.3.0

func ReleasesPopularQuery(coll *mgm.Collection, t string, date time.Time, count int) ([]*Popular, error)

ReleasesPopular returns the most popular releases for a given type and date.

Equivalent to the following MongoDB query: db.torrents.aggregate([

{ $project: {name: 1, type: 1, published: "$published_at"} },
{ $match: { type: "tv", published: { $gte: new Date("2023-09-24 12:25:00") } } },
{ $group: {_id: "$name", count: {$sum: 1}} },
{ $sort: {count: -1} },
{ $limit: 25 }

])

type Release

type Release struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Type        string    `bson:"type" json:"type"`
	Source      string    `bson:"source" json:"source"`
	Raw         string    `bson:"raw" json:"raw"`
	Title       string    `bson:"title" json:"title"`
	Description string    `bson:"description" json:"description"`
	Size        string    `bson:"size" json:"size"`
	View        string    `bson:"view" json:"view"`
	Download    string    `bson:"download" json:"download"`
	Infohash    string    `bson:"infohash" json:"infohash"`
	Name        string    `bson:"name" json:"name"`
	Season      int       `bson:"season" json:"season"`
	Episode     int       `bson:"episode" json:"episode"`
	Volume      int       `bson:"volume" json:"volume"`
	Checksum    string    `bson:"checksum" json:"checksum"`
	Group       string    `bson:"group" json:"group"`
	Author      string    `bson:"author" json:"author"`
	Verified    bool      `bson:"verified" json:"verified"`
	Widescreen  bool      `bson:"widescreen" json:"widescreen"`
	Uncensored  bool      `bson:"uncensored" json:"uncensored"`
	Bluray      bool      `bson:"bluray" json:"bluray"`
	Nzb         bool      `bson:"nzb" json:"nzb"`
	Resolution  string    `bson:"resolution" json:"resolution"`
	Encoding    string    `bson:"encoding" json:"encoding"`
	Quality     string    `bson:"quality" json:"quality"`
	PublishedAt time.Time `bson:"published_at" json:"published_at"`
}

func (*Release) Updated added in v0.3.0

func (t *Release) Updated(ctx context.Context, result *mongo.UpdateResult) error

type Request added in v0.3.0

type Request struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Title    string `bson:"title" json:"title"`
	User     string `bson:"user" json:"user"`
	Type     string `bson:"type" json:"type"`
	Source   string `bson:"source" json:"source"`
	SourceId string `bson:"source_id" json:"source_id"`
	Status   string `bson:"status" json:"status"`
}

type Scry added in v0.3.0

type Scry struct {
	URL string
	// contains filtered or unexported fields
}

func (*Scry) ScrySearchEpisode added in v0.3.0

func (s *Scry) ScrySearchEpisode(ep *Medium) (*search.Release, error)

func (*Scry) Search added in v0.3.0

func (s *Scry) Search(options *SearchOptions) (*search.ReleaseSearchResponse, error)

type SearchOptions added in v0.3.0

type SearchOptions struct {
	Text       string
	Source     string
	Type       string
	Author     string
	Group      string
	Year       int
	Season     int
	Episode    int
	Resolution int
	Verified   bool
	Uncensored bool
	Bluray     bool
	Exact      bool
}

type SearchParams added in v0.2.0

type SearchParams struct {
	Type       string `bson:"type" json:"type"`
	Verified   bool   `bson:"verified" json:"verified"`
	Group      string `bson:"group" json:"group"`
	Author     string `bson:"author" json:"author"`
	Resolution int    `bson:"resolution" json:"resolution"`
	Source     string `bson:"source" json:"source"`
	Uncensored bool   `bson:"uncensored" json:"uncensored"`
	Bluray     bool   `bson:"bluray" json:"bluray"`
}

type Series

type Series struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Type          string           `bson:"_type" json:"type"`
	Kind          primitive.Symbol `bson:"kind" json:"kind"`
	Source        string           `bson:"source" json:"source"`
	SourceId      string           `bson:"source_id" json:"source_id"`
	ImdbId        string           `bson:"imdb_id" json:"imdb_id"`
	Title         string           `bson:"title" json:"title"`
	Description   string           `bson:"description" json:"description"`
	Slug          string           `bson:"slug" json:"slug"`
	Text          []string         `bson:"text" json:"text"`
	Display       string           `bson:"display" json:"display"`
	Directory     string           `bson:"directory" json:"directory"`
	Search        string           `bson:"search" json:"search"`
	SearchParams  *SearchParams    `bson:"search_params" json:"search_params"`
	Status        string           `bson:"status" json:"status"`
	Active        bool             `bson:"active" json:"active"`
	Downloaded    bool             `bson:"downloaded" json:"downloaded"`
	Completed     bool             `bson:"completed" json:"completed"`
	Skipped       bool             `bson:"skipped" json:"skipped"`
	Watched       bool             `bson:"watched" json:"watched"`
	Broken        bool             `bson:"broken" json:"broken"`
	Favorite      bool             `bson:"favorite" json:"favorite"`
	Unwatched     int              `bson:"-" json:"unwatched"`
	UnwatchedAll  int              `bson:"-" json:"unwatched_all"`
	ReleaseDate   time.Time        `bson:"release_date" json:"release_date"`
	Paths         []*Path          `bson:"paths,omitempty" json:"paths"`
	Cover         string           `bson:"-" json:"cover"`
	Background    string           `bson:"-" json:"background"`
	CurrentSeason int              `bson:"-" json:"currentSeason"`
	Seasons       []int            `bson:"-" json:"seasons"`
	Episodes      []*Episode       `bson:"-" json:"episodes"`
	Watches       []*Watch         `bson:"-" json:"watches"`
}

func (*Series) Created added in v0.3.0

func (s *Series) Created(ctx context.Context) error

func (*Series) GetBackground added in v0.3.0

func (s *Series) GetBackground() *Path

func (*Series) GetCover added in v0.3.0

func (s *Series) GetCover() *Path

func (*Series) Saving added in v0.3.0

func (s *Series) Saving() error

func (*Series) Updated added in v0.3.0

func (s *Series) Updated(ctx context.Context, result *mongo.UpdateResult) error

type SeriesImage added in v0.3.0

type SeriesImage struct {
	minion.WorkerDefaults[*SeriesImage]
	ID    string
	Type  string
	Path  string
	Ratio float32
}

func (*SeriesImage) Kind added in v0.3.0

func (j *SeriesImage) Kind() string

func (*SeriesImage) Work added in v0.3.0

func (j *SeriesImage) Work(ctx context.Context, job *minion.Job[*SeriesImage]) error

type SeriesUpdate

type SeriesUpdate struct {
	minion.WorkerDefaults[*SeriesUpdate]
	ID         string `bson:"id" json:"id"`
	Title      string `bson:"title" json:"title"`
	SkipImages bool   `bson:"skip_images" json:"skip_images"`
}

func (*SeriesUpdate) Kind added in v0.3.0

func (j *SeriesUpdate) Kind() string

func (*SeriesUpdate) Work added in v0.3.0

func (j *SeriesUpdate) Work(ctx context.Context, job *minion.Job[*SeriesUpdate]) error

type SeriesUpdateAll added in v0.3.0

type SeriesUpdateAll struct {
	minion.WorkerDefaults[*SeriesUpdateAll]
}

func (*SeriesUpdateAll) Kind added in v0.3.0

func (j *SeriesUpdateAll) Kind() string

func (*SeriesUpdateAll) Work added in v0.3.0

type SeriesUpdateDonghua added in v0.3.0

type SeriesUpdateDonghua struct {
	minion.WorkerDefaults[*SeriesUpdateDonghua]
}

func (*SeriesUpdateDonghua) Kind added in v0.3.0

func (j *SeriesUpdateDonghua) Kind() string

func (*SeriesUpdateDonghua) Work added in v0.3.0

type SeriesUpdateKind added in v0.3.0

type SeriesUpdateKind struct {
	minion.WorkerDefaults[*SeriesUpdateKind]
	SeriesKind string
}

func (*SeriesUpdateKind) Kind added in v0.3.0

func (j *SeriesUpdateKind) Kind() string

func (*SeriesUpdateKind) Work added in v0.3.0

type SeriesUpdateRecent added in v0.3.0

type SeriesUpdateRecent struct {
	minion.WorkerDefaults[*SeriesUpdateRecent]
}

func (*SeriesUpdateRecent) Kind added in v0.3.0

func (j *SeriesUpdateRecent) Kind() string

func (*SeriesUpdateRecent) Work added in v0.3.0

type Setting

type Setting struct {
	Setting string
	Value   bool
}

type ShellOptions added in v0.3.0

type ShellOptions struct {
	Out func(string, string)
	Err func(string, string)
}

type TmdbUpdateAll added in v0.3.0

type TmdbUpdateAll struct {
	minion.WorkerDefaults[*TmdbUpdateAll]
}

func (*TmdbUpdateAll) Kind added in v0.3.0

func (j *TmdbUpdateAll) Kind() string

func (*TmdbUpdateAll) Work added in v0.3.0

func (j *TmdbUpdateAll) Work(ctx context.Context, job *minion.Job[*TmdbUpdateAll]) error

type TmdbUpdateMovie added in v0.3.0

type TmdbUpdateMovie struct {
	minion.WorkerDefaults[*TmdbUpdateMovie]
	ID        string
	JustMedia bool
}

TmdbUpdateMovie

func (*TmdbUpdateMovie) Kind added in v0.3.0

func (j *TmdbUpdateMovie) Kind() string

func (*TmdbUpdateMovie) Work added in v0.3.0

type TmdbUpdateMovieImage added in v0.3.0

type TmdbUpdateMovieImage struct {
	minion.WorkerDefaults[*TmdbUpdateMovieImage]
	ID    string
	Type  string
	Path  string
	Ratio float32
}

TmdbUpdateMovieImage

func (*TmdbUpdateMovieImage) Kind added in v0.3.0

func (j *TmdbUpdateMovieImage) Kind() string

func (*TmdbUpdateMovieImage) Work added in v0.3.0

type UpdateIndexes added in v0.3.0

type UpdateIndexes struct {
	minion.WorkerDefaults[*UpdateIndexes]
}

func (*UpdateIndexes) Kind added in v0.3.0

func (j *UpdateIndexes) Kind() string

func (*UpdateIndexes) Timeout added in v0.3.0

func (j *UpdateIndexes) Timeout(job *minion.Job[*UpdateIndexes]) time.Duration

func (*UpdateIndexes) Work added in v0.3.0

func (j *UpdateIndexes) Work(ctx context.Context, job *minion.Job[*UpdateIndexes]) error

type User added in v0.3.0

type User struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Name  string `bson:"name" json:"name"`
	Email string `bson:"email" json:"email"`
	Token string `bson:"token" json:"token"`
	Thumb string `bson:"thumb" json:"thumb"`
	Home  bool   `bson:"home" json:"home"`
	Admin bool   `bson:"admin" json:"admin"`
}

type Walker added in v0.3.0

type Walker struct {
	Libraries []*plex.PlexLibrary
	// contains filtered or unexported fields
}

func (*Walker) Walk added in v0.3.0

func (w *Walker) Walk() error

type Watch

type Watch struct {
	grimoire.Document `bson:",inline"` // includes default model settings
	//ID        primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	//CreatedAt time.Time          `bson:"created_at" json:"created_at"`
	//UpdatedAt time.Time          `bson:"updated_at" json:"updated_at"`
	Username  string             `bson:"username" json:"username"`
	Player    string             `bson:"player" json:"player"`
	WatchedAt time.Time          `bson:"watched_at" json:"watched_at"`
	MediumId  primitive.ObjectID `bson:"medium_id" json:"medium_id"`
	Medium    *Medium            `bson:"-" json:"medium"`
}

Jump to

Keyboard shortcuts

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