Documentation ¶
Index ¶
- func Escape(sql string) string
- func FromSlash(path string) string
- func Startup(ctx context.Context, starrs *Starrs, log *logs.Logger, app mnd.App)
- type AppConfig
- type AppTable
- type DataReply
- type Entry
- type Instances
- type MigratorInfo
- type RootFolders
- type Starrs
- func (s *Starrs) AppProfiles(config *AppConfig) (any, error)
- func (s *Starrs) BlockList(config *AppConfig, pageSize, page int, sortKey, sortDir string) (any, error)
- func (s *Starrs) CustomFilters(config *AppConfig) (any, error)
- func (s *Starrs) DeleteBlockList(config *AppConfig, listID int64) (any, error)
- func (s *Starrs) DeleteDownloader(config *AppConfig, clientID int64) (any, error)
- func (s *Starrs) DeleteExclusion(config *AppConfig, exclusionID int64) (any, error)
- func (s *Starrs) DeleteImportList(config *AppConfig, listID int64) (any, error)
- func (s *Starrs) DeleteIndexer(config *AppConfig, indexerID int64) (any, error)
- func (s *Starrs) DeleteQualityProfile(config *AppConfig, profileID int64) (any, error)
- func (s *Starrs) DeleteRootFolder(config *AppConfig, folder string) (*RootFolders, error)
- func (s *Starrs) Downloaders(config *AppConfig) (any, error)
- func (s *Starrs) Exclusions(config *AppConfig) (any, error)
- func (s *Starrs) ImportLists(config *AppConfig) (any, error)
- func (s *Starrs) Indexers(config *AppConfig) (any, error)
- func (s *Starrs) MetadataProfiles(config *AppConfig) (any, error)
- func (s *Starrs) MigratorInfo(config *AppConfig) (*MigratorInfo, error)
- func (s *Starrs) QualityProfiles(config *AppConfig) (any, error)
- func (s *Starrs) RootFolders(config *AppConfig) (any, error)
- func (s *Starrs) Tags(config *AppConfig) (map[int]string, error)
- func (s *Starrs) TestInstance(config *AppConfig) (string, error)
- func (s *Starrs) TestLidarrDownloadClient(config *AppConfig, client *lidarr.DownloadClientInput) (string, error)
- func (s *Starrs) TestLidarrImportList(config *AppConfig, list *lidarr.ImportListInput) (string, error)
- func (s *Starrs) TestLidarrIndexer(config *AppConfig, indexer *lidarr.IndexerInput) (string, error)
- func (s *Starrs) TestProwlarrDownloadClient(config *AppConfig, client *prowlarr.DownloadClientInput) (string, error)
- func (s *Starrs) TestProwlarrIndexer(config *AppConfig, indexer *prowlarr.IndexerInput) (string, error)
- func (s *Starrs) TestRadarrDownloadClient(config *AppConfig, client *radarr.DownloadClientInput) (string, error)
- func (s *Starrs) TestRadarrImportList(config *AppConfig, list *radarr.ImportListInput) (string, error)
- func (s *Starrs) TestRadarrIndexer(config *AppConfig, indexer *radarr.IndexerInput) (string, error)
- func (s *Starrs) TestReadarrDownloadClient(config *AppConfig, client *readarr.DownloadClientInput) (string, error)
- func (s *Starrs) TestReadarrImportList(config *AppConfig, list *readarr.ImportListInput) (string, error)
- func (s *Starrs) TestReadarrIndexer(config *AppConfig, indexer *readarr.IndexerInput) (string, error)
- func (s *Starrs) TestSonarrDownloadClient(config *AppConfig, client *sonarr.DownloadClientInput) (string, error)
- func (s *Starrs) TestSonarrImportList(config *AppConfig, list *sonarr.ImportListInput) (string, error)
- func (s *Starrs) TestSonarrIndexer(config *AppConfig, indexer *sonarr.IndexerInput) (string, error)
- func (s *Starrs) TestWhisparrDownloadClient(config *AppConfig, client *sonarr.DownloadClientInput) (string, error)
- func (s *Starrs) TestWhisparrImportList(config *AppConfig, list *sonarr.ImportListInput) (string, error)
- func (s *Starrs) TestWhisparrIndexer(config *AppConfig, indexer *sonarr.IndexerInput) (string, error)
- func (s *Starrs) UpdateInvalidItems(config *AppConfig, table string, newPath string, ids map[int64]bool) (*RootFolders, error)
- func (s *Starrs) UpdateLidarrDownloadClient(config *AppConfig, force bool, downloader *lidarr.DownloadClientInput) (*DataReply, error)
- func (s *Starrs) UpdateLidarrExclusion(config *AppConfig, exclusion *lidarr.Exclusion) (*DataReply, error)
- func (s *Starrs) UpdateLidarrImportList(config *AppConfig, force bool, list *lidarr.ImportListInput) (*DataReply, error)
- func (s *Starrs) UpdateLidarrIndexer(config *AppConfig, force bool, indexer *lidarr.IndexerInput) (*DataReply, error)
- func (s *Starrs) UpdateLidarrQualityProfile(config *AppConfig, profile *lidarr.QualityProfile) (*DataReply, error)
- func (s *Starrs) UpdateProwlarrDownloadClient(config *AppConfig, force bool, downloader *prowlarr.DownloadClientInput) (*DataReply, error)
- func (s *Starrs) UpdateProwlarrIndexer(config *AppConfig, force bool, indexer *prowlarr.IndexerInput) (*DataReply, error)
- func (s *Starrs) UpdateRadarrDownloadClient(config *AppConfig, force bool, downloader *radarr.DownloadClientInput) (*DataReply, error)
- func (s *Starrs) UpdateRadarrExclusion(config *AppConfig, exclusion *radarr.Exclusion) (*DataReply, error)
- func (s *Starrs) UpdateRadarrImportList(config *AppConfig, force bool, list *radarr.ImportListInput) (*DataReply, error)
- func (s *Starrs) UpdateRadarrIndexer(config *AppConfig, force bool, indexer *radarr.IndexerInput) (*DataReply, error)
- func (s *Starrs) UpdateRadarrQualityProfile(config *AppConfig, profile *radarr.QualityProfile) (*DataReply, error)
- func (s *Starrs) UpdateReadarrDownloadClient(config *AppConfig, force bool, downloader *readarr.DownloadClientInput) (*DataReply, error)
- func (s *Starrs) UpdateReadarrExclusion(config *AppConfig, exclusion *readarr.Exclusion) (*DataReply, error)
- func (s *Starrs) UpdateReadarrImportList(config *AppConfig, force bool, list *readarr.ImportListInput) (*DataReply, error)
- func (s *Starrs) UpdateReadarrIndexer(config *AppConfig, force bool, indexer *readarr.IndexerInput) (*DataReply, error)
- func (s *Starrs) UpdateReadarrQualityProfile(config *AppConfig, profile *readarr.QualityProfile) (*DataReply, error)
- func (s *Starrs) UpdateRecycleBin(config *AppConfig, newPath string) (*RootFolders, error)
- func (s *Starrs) UpdateRootFolder(config *AppConfig, oldPath, newPath string) (*RootFolders, error)
- func (s *Starrs) UpdateSonarrDownloadClient(config *AppConfig, force bool, downloader *sonarr.DownloadClientInput) (*DataReply, error)
- func (s *Starrs) UpdateSonarrExclusion(config *AppConfig, exclusion *sonarr.Exclusion) (*DataReply, error)
- func (s *Starrs) UpdateSonarrImportList(config *AppConfig, force bool, list *sonarr.ImportListInput) (*DataReply, error)
- func (s *Starrs) UpdateSonarrIndexer(config *AppConfig, force bool, indexer *sonarr.IndexerInput) (*DataReply, error)
- func (s *Starrs) UpdateSonarrQualityProfile(config *AppConfig, profile *sonarr.QualityProfile) (*DataReply, error)
- func (s *Starrs) UpdateWhisparrDownloadClient(config *AppConfig, force bool, downloader *sonarr.DownloadClientInput) (*DataReply, error)
- func (s *Starrs) UpdateWhisparrExclusion(config *AppConfig, exclusion *sonarr.Exclusion) (*DataReply, error)
- func (s *Starrs) UpdateWhisparrImportList(config *AppConfig, force bool, list *sonarr.ImportListInput) (*DataReply, error)
- func (s *Starrs) UpdateWhisparrIndexer(config *AppConfig, force bool, indexer *sonarr.IndexerInput) (*DataReply, error)
- func (s *Starrs) UpdateWhisparrQualityProfile(config *AppConfig, profile *sonarr.QualityProfile) (*DataReply, error)
- type TableColumn
- type TableCountMap
- type TableFileMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AppConfig ¶
type AppConfig struct { SSL bool // verify ssl cert? Form bool // Use form login instead of basic auth? Timeout time.Duration // How long to wait for the app's API. App string // Radarr, Sonarr, etc Name string // Custom name: Radarr2, Radarr4k, etc. URL string // url to app. User string // username for app. Pass string // password for app. Key string // api key for app. DBPath string // path to database for app. }
AppConfig is the configuration for an instance.
type Instances ¶
Instances is the configured list of instances. The map key is the instance type, e.g. Lidarr.
type MigratorInfo ¶
type MigratorInfo struct { Table AppTable // Names of main and sub tables. RootFolders []string // Configured Root Folders. Invalid map[string][]*Entry // Derived from items not located in root folders. Folders TableCountMap // Derived from both tables. Recycle string // Recycle Bin }
MigratorInfo is full of info about the current root folders. This data gets sent to the front end any time there is a change.
type RootFolders ¶
type RootFolders struct { Msg string Info *MigratorInfo }
RootFolders is the response to the front end when changing or deleting root folders.
type Starrs ¶
type Starrs struct {
// contains filtered or unexported fields
}
Starrs holds the running data and provides the frontend a place to interact with starr instances and their databases.
func (*Starrs) DeleteBlockList ¶
func (*Starrs) DeleteDownloader ¶
func (*Starrs) DeleteExclusion ¶
func (*Starrs) DeleteImportList ¶
func (*Starrs) DeleteIndexer ¶
func (*Starrs) DeleteQualityProfile ¶
func (*Starrs) DeleteRootFolder ¶
func (s *Starrs) DeleteRootFolder(config *AppConfig, folder string) (*RootFolders, error)
DeleteRootFolder removes a root folder.
func (*Starrs) MigratorInfo ¶
func (s *Starrs) MigratorInfo(config *AppConfig) (*MigratorInfo, error)
MigratorInfo returns the current info about root folders.
func (*Starrs) TestLidarrDownloadClient ¶
func (*Starrs) TestLidarrImportList ¶
func (*Starrs) TestLidarrIndexer ¶
func (*Starrs) TestProwlarrDownloadClient ¶
func (*Starrs) TestProwlarrIndexer ¶
func (*Starrs) TestRadarrDownloadClient ¶
func (*Starrs) TestRadarrImportList ¶
func (*Starrs) TestRadarrIndexer ¶
func (*Starrs) TestReadarrDownloadClient ¶
func (*Starrs) TestReadarrImportList ¶
func (*Starrs) TestReadarrIndexer ¶
func (*Starrs) TestSonarrDownloadClient ¶
func (*Starrs) TestSonarrImportList ¶
func (*Starrs) TestSonarrIndexer ¶
func (*Starrs) TestWhisparrDownloadClient ¶
func (*Starrs) TestWhisparrImportList ¶
func (*Starrs) TestWhisparrIndexer ¶
func (*Starrs) UpdateInvalidItems ¶
func (*Starrs) UpdateLidarrDownloadClient ¶
func (*Starrs) UpdateLidarrExclusion ¶
func (*Starrs) UpdateLidarrImportList ¶
func (*Starrs) UpdateLidarrIndexer ¶
func (*Starrs) UpdateLidarrQualityProfile ¶
func (*Starrs) UpdateProwlarrDownloadClient ¶
func (*Starrs) UpdateProwlarrIndexer ¶
func (*Starrs) UpdateRadarrDownloadClient ¶
func (*Starrs) UpdateRadarrExclusion ¶
func (*Starrs) UpdateRadarrImportList ¶
func (*Starrs) UpdateRadarrIndexer ¶
func (*Starrs) UpdateRadarrQualityProfile ¶
func (*Starrs) UpdateReadarrDownloadClient ¶
func (*Starrs) UpdateReadarrExclusion ¶
func (*Starrs) UpdateReadarrImportList ¶
func (*Starrs) UpdateReadarrIndexer ¶
func (*Starrs) UpdateReadarrQualityProfile ¶
func (*Starrs) UpdateRecycleBin ¶
func (s *Starrs) UpdateRecycleBin(config *AppConfig, newPath string) (*RootFolders, error)
func (*Starrs) UpdateRootFolder ¶
func (s *Starrs) UpdateRootFolder(config *AppConfig, oldPath, newPath string) (*RootFolders, error)
UpdateRootFolder changes the path for a root folder. It updates all the items with the folder.
func (*Starrs) UpdateSonarrDownloadClient ¶
func (*Starrs) UpdateSonarrExclusion ¶
func (*Starrs) UpdateSonarrImportList ¶
func (*Starrs) UpdateSonarrIndexer ¶
func (*Starrs) UpdateSonarrQualityProfile ¶
func (*Starrs) UpdateWhisparrDownloadClient ¶
func (*Starrs) UpdateWhisparrExclusion ¶
func (*Starrs) UpdateWhisparrImportList ¶
func (*Starrs) UpdateWhisparrIndexer ¶
func (*Starrs) UpdateWhisparrQualityProfile ¶
type TableColumn ¶
TableColumn is used to pull paths from specific columns in specific tables.
type TableCountMap ¶
TableCountMap is a map of table name => root folder => count. Used to count items mapped to a root folder from a specific table.
type TableFileMap ¶
type TableFileMap map[TableColumn][]*Entry
TableFileMap is a map of table name => item ID => item Path Used to display info or update paths on a table. XXX: This is too complicated.