Documentation
¶
Index ¶
- Constants
- func AuthFilePath(dbPath string) string
- func BootstrapAuthFile(dbPath string, username string, password string) error
- func SaveCLIConfig(dbPath string, cfg CLIConfig) error
- type Backend
- func (b *Backend) BrowseDirectory(path string, mode string) (api.BrowseDirectoryResponse, error)
- func (b *Backend) BrowseDirectoryWithinRoot(path string, mode string, root string) (api.BrowseDirectoryResponse, error)
- func (b *Backend) BrowseDirectoryWithinRoots(path string, mode string, roots []string) (api.BrowseDirectoryResponse, error)
- func (b *Backend) CancelDupeCheck(sessionID string, jobID string) error
- func (b *Backend) CancelTrackerUpload(sessionID string, jobID string) error
- func (b *Backend) CheckDupes(path string, overrides api.ExternalIDOverrides, ...) (api.DupeCheckSummary, error)
- func (b *Backend) Close() error
- func (b *Backend) DeleteHistoryRelease(sourcePath string) error
- func (b *Backend) DeleteScreenshot(path string, overrides api.ExternalIDOverrides, ...) error
- func (b *Backend) DeleteTrackerImageURL(path string, overrides api.ExternalIDOverrides, ...) error
- func (b *Backend) DeleteUploadedImage(path string, imagePath string, host string) error
- func (b *Backend) DetectDiscType(ctx context.Context, path string) (string, error)
- func (b *Backend) DiscoverPlaylists(path string) ([]api.PlaylistInfo, error)
- func (b *Backend) ExportConfig() (string, error)
- func (b *Backend) FetchDescriptionBuilder(path string, overrides api.ExternalIDOverrides, ...) (api.DescriptionBuilderPreview, error)
- func (b *Backend) FetchMetadata(sessionID string, path string, sourceLookupURL string, ...) (api.MetadataPreview, error)
- func (b *Backend) FetchPreparation(sessionID string, path string, overrides api.ExternalIDOverrides, ...) (api.PreparationPreview, error)
- func (b *Backend) FetchScreenshotPlan(path string, overrides api.ExternalIDOverrides, ...) (api.ScreenshotPlan, error)
- func (b *Backend) FetchTrackerDryRun(sessionID string, path string, overrides api.ExternalIDOverrides, ...) (api.TrackerDryRunPreview, error)
- func (b *Backend) GenerateScreenshots(path string, overrides api.ExternalIDOverrides, ...) (api.ScreenshotResult, error)
- func (b *Backend) GetApplicationInfo() (api.ApplicationInfo, error)
- func (b *Backend) GetConfig() (string, error)
- func (b *Backend) GetDefaultConfig() (string, error)
- func (b *Backend) GetDupeCheckSnapshot(sessionID string, jobID string) (DupeCheckSnapshot, error)
- func (b *Backend) GetHistoryOverview(sourcePath string) (api.HistoryOverview, error)
- func (b *Backend) GetImageHostPolicyMetadata() (imagehostpolicy.Metadata, error)
- func (b *Backend) GetLogExclusions() ([]string, error)
- func (b *Backend) GetLogPath() (string, error)
- func (b *Backend) GetRecentLogs(limit int) ([]logging.Entry, error)
- func (b *Backend) GetTrackerUploadSnapshot(sessionID string, jobID string) (TrackerUploadSnapshot, error)
- func (b *Backend) ImportConfig(fileName, fileContent string) (string, []string, error)
- func (b *Backend) ImportMenuImages(path string, overrides api.ExternalIDOverrides, ...) error
- func (b *Backend) ListHistory() ([]api.HistoryEntry, error)
- func (b *Backend) ListKnownTrackers() ([]string, error)
- func (b *Backend) ListUploadCandidates(path string, overrides api.ExternalIDOverrides, ...) ([]api.ScreenshotImage, error)
- func (b *Backend) ListUploadedImages(path string, overrides api.ExternalIDOverrides, ...) ([]api.UploadedImageLink, error)
- func (b *Backend) LoadPlaylistSelection(path string) (api.PlaylistSelection, error)
- func (b *Backend) PreviewScreenshotFrame(path string, overrides api.ExternalIDOverrides, ...) (string, error)
- func (b *Backend) ReadScreenshotImage(path string) (string, error)
- func (b *Backend) RenderDescription(raw string) (string, error)
- func (b *Backend) ResetMetadata(sessionID string, path string, sourceLookupURL string, ...) (api.MetadataPreview, error)
- func (b *Backend) RetryFailedTrackerUpload(sessionID string, jobID string) (string, error)
- func (b *Backend) SaveConfig(payload string) error
- func (b *Backend) SaveDescriptionOverride(path string, groupKey string, raw string, trackers []string, ...) (api.DescriptionBuilderGroup, error)
- func (b *Backend) SaveFinalScreenshotSelections(path string, overrides api.ExternalIDOverrides, ...) error
- func (b *Backend) SavePlaylistSelection(path string, playlists []string, useAll bool) error
- func (b *Backend) SelectBlurayCandidate(path string, releaseID string) (api.MetadataPreview, error)
- func (b *Backend) StartDupeCheck(sessionID string, path string, overrides api.ExternalIDOverrides, ...) (string, error)
- func (b *Backend) StartLogStream(sessionID string) (string, error)
- func (b *Backend) StartTrackerUpload(sessionID string, path string, overrides api.ExternalIDOverrides, ...) (string, error)
- func (b *Backend) StopLogStream(sessionID string, streamID string) error
- func (b *Backend) StopSessionLogStreams(sessionID string)
- func (b *Backend) UpdateLogExclusions(patterns []string) error
- func (b *Backend) UploadImages(path string, overrides api.ExternalIDOverrides, ...) (api.UploadImagesResult, error)
- type CLIConfig
- type DupeCheckSnapshot
- type DupeCheckTrackerState
- type Options
- type Server
- type TrackerUploadSnapshot
- type TrackerUploadTrackerState
Constants ¶
const AuthFileName = authmaterial.WebAuthFileName
AuthFileName is the canonical web auth file name stored beside the database.
const AuthPasswordMinLength = authmaterial.AuthPasswordMinLength
AuthPasswordMinLength defines the minimum web auth password length.
Variables ¶
This section is empty.
Functions ¶
func AuthFilePath ¶
AuthFilePath returns the auth file path colocated with dbPath.
func BootstrapAuthFile ¶
BootstrapAuthFile creates the canonical auth file beside dbPath.
func SaveCLIConfig ¶
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
func NewBackendWithContext ¶
func (*Backend) BrowseDirectory ¶
func (*Backend) BrowseDirectoryWithinRoot ¶
func (*Backend) BrowseDirectoryWithinRoots ¶
func (*Backend) CancelDupeCheck ¶
CancelDupeCheck requests cancellation only for a dupe job owned by sessionID.
func (*Backend) CancelTrackerUpload ¶
CancelTrackerUpload requests cancellation only for an upload job owned by sessionID.
func (*Backend) CheckDupes ¶
func (b *Backend) CheckDupes(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackersList []string) (api.DupeCheckSummary, error)
func (*Backend) DeleteHistoryRelease ¶
func (*Backend) DeleteScreenshot ¶
func (b *Backend) DeleteScreenshot(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, imagePath string) error
func (*Backend) DeleteTrackerImageURL ¶
func (b *Backend) DeleteTrackerImageURL(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, imageURL string) error
func (*Backend) DeleteUploadedImage ¶
func (*Backend) DetectDiscType ¶
func (*Backend) DiscoverPlaylists ¶
func (b *Backend) DiscoverPlaylists(path string) ([]api.PlaylistInfo, error)
func (*Backend) ExportConfig ¶
func (*Backend) FetchDescriptionBuilder ¶
func (b *Backend) FetchDescriptionBuilder(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackersList []string, ignoreDupesFor []string) (api.DescriptionBuilderPreview, error)
func (*Backend) FetchMetadata ¶
func (b *Backend) FetchMetadata(sessionID string, path string, sourceLookupURL string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackersList []string, confirmBDMVRescan bool) (api.MetadataPreview, error)
func (*Backend) FetchPreparation ¶
func (b *Backend) FetchPreparation(sessionID string, path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackersList []string, ignoreDupesFor []string) (api.PreparationPreview, error)
func (*Backend) FetchScreenshotPlan ¶
func (b *Backend) FetchScreenshotPlan(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides) (api.ScreenshotPlan, error)
func (*Backend) FetchTrackerDryRun ¶
func (b *Backend) FetchTrackerDryRun(sessionID string, path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackersList []string, ignoreDupesFor []string, questionnaireAnswers map[string]map[string]string, descriptionGroups []api.DescriptionBuilderGroup, debug bool, noSeed bool, runLogLevel string) (api.TrackerDryRunPreview, error)
func (*Backend) GenerateScreenshots ¶
func (b *Backend) GenerateScreenshots(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, selections []api.ScreenshotSelection, purpose api.ScreenshotPurpose) (api.ScreenshotResult, error)
func (*Backend) GetApplicationInfo ¶
func (b *Backend) GetApplicationInfo() (api.ApplicationInfo, error)
func (*Backend) GetDefaultConfig ¶
func (*Backend) GetDupeCheckSnapshot ¶
func (b *Backend) GetDupeCheckSnapshot(sessionID string, jobID string) (DupeCheckSnapshot, error)
GetDupeCheckSnapshot returns a dupe job snapshot only to the session that started the job.
func (*Backend) GetHistoryOverview ¶
func (b *Backend) GetHistoryOverview(sourcePath string) (api.HistoryOverview, error)
func (*Backend) GetImageHostPolicyMetadata ¶
func (b *Backend) GetImageHostPolicyMetadata() (imagehostpolicy.Metadata, error)
func (*Backend) GetLogExclusions ¶
func (*Backend) GetLogPath ¶
func (*Backend) GetTrackerUploadSnapshot ¶
func (b *Backend) GetTrackerUploadSnapshot(sessionID string, jobID string) (TrackerUploadSnapshot, error)
GetTrackerUploadSnapshot returns an upload job snapshot only to the session that started the job.
func (*Backend) ImportConfig ¶
func (*Backend) ImportMenuImages ¶
func (b *Backend) ImportMenuImages(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, paths []string) error
func (*Backend) ListHistory ¶
func (b *Backend) ListHistory() ([]api.HistoryEntry, error)
func (*Backend) ListKnownTrackers ¶
func (*Backend) ListUploadCandidates ¶
func (b *Backend) ListUploadCandidates(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides) ([]api.ScreenshotImage, error)
func (*Backend) ListUploadedImages ¶
func (b *Backend) ListUploadedImages(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides) ([]api.UploadedImageLink, error)
func (*Backend) LoadPlaylistSelection ¶
func (b *Backend) LoadPlaylistSelection(path string) (api.PlaylistSelection, error)
func (*Backend) PreviewScreenshotFrame ¶
func (b *Backend) PreviewScreenshotFrame(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, timestampSeconds float64) (string, error)
func (*Backend) ReadScreenshotImage ¶
func (*Backend) ResetMetadata ¶
func (b *Backend) ResetMetadata(sessionID string, path string, sourceLookupURL string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackersList []string, confirmBDMVRescan bool) (api.MetadataPreview, error)
func (*Backend) RetryFailedTrackerUpload ¶
RetryFailedTrackerUpload starts a retry job for failed trackers only when sessionID owns the original upload job.
func (*Backend) SaveConfig ¶
func (*Backend) SaveDescriptionOverride ¶
func (b *Backend) SaveDescriptionOverride(path string, groupKey string, raw string, trackers []string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides) (api.DescriptionBuilderGroup, error)
func (*Backend) SaveFinalScreenshotSelections ¶
func (b *Backend) SaveFinalScreenshotSelections(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, images []api.ScreenshotImage) error
func (*Backend) SavePlaylistSelection ¶
func (*Backend) SelectBlurayCandidate ¶
func (*Backend) StartDupeCheck ¶
func (b *Backend) StartDupeCheck(sessionID string, path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackers []string) (string, error)
func (*Backend) StartTrackerUpload ¶
func (b *Backend) StartTrackerUpload(sessionID string, path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackers []string, ignoreDupesFor []string, questionnaireAnswers map[string]map[string]string, descriptionGroups []api.DescriptionBuilderGroup, debug bool, noSeed bool, runLogLevel string) (string, error)
func (*Backend) StopLogStream ¶
StopLogStream stops streamID only when it belongs to sessionID. Unknown streams and streams owned by other sessions are treated as no-ops.
func (*Backend) StopSessionLogStreams ¶
StopSessionLogStreams closes all active log streams owned by sessionID.
func (*Backend) UpdateLogExclusions ¶
func (*Backend) UploadImages ¶
func (b *Backend) UploadImages(path string, overrides api.ExternalIDOverrides, nameOverrides api.ReleaseNameOverrides, trackersList []string, host string, images []api.ScreenshotImage) (api.UploadImagesResult, error)
type CLIConfig ¶
type CLIConfig struct {
Host string `json:"host"`
Port int `json:"port"`
OpenBrowser bool `json:"open_browser"`
TrustedProxies []string `json:"trusted_proxies"`
BaseURL string `json:"base_url"`
SessionTTL int `json:"session_ttl"`
}
func DefaultCLIConfig ¶
func DefaultCLIConfig() CLIConfig
func LoadCLIConfig ¶
type DupeCheckSnapshot ¶
type DupeCheckSnapshot struct {
JobID string `json:"jobID"`
SourcePath string `json:"sourcePath"`
Status string `json:"status"`
Trackers []DupeCheckTrackerState `json:"trackers"`
CompletedCount int `json:"completedCount"`
TotalCount int `json:"totalCount"`
Summary api.DupeCheckSummary `json:"summary"`
Error string `json:"error"`
StartedAt string `json:"startedAt"`
FinishedAt string `json:"finishedAt"`
}
type DupeCheckTrackerState ¶
type TrackerUploadSnapshot ¶
type TrackerUploadSnapshot struct {
JobID string `json:"jobID"`
SourcePath string `json:"sourcePath"`
Status string `json:"status"`
CurrentTask string `json:"currentTask"`
CurrentTaskStatus string `json:"currentTaskStatus"`
CurrentMessage string `json:"currentMessage"`
CurrentCompletedPieces int `json:"currentCompletedPieces"`
CurrentTotalPieces int `json:"currentTotalPieces"`
CurrentPercent int `json:"currentPercent"`
CurrentHashRateMiB float64 `json:"currentHashRateMiB"`
Trackers []TrackerUploadTrackerState `json:"trackers"`
FailedTrackers []string `json:"failedTrackers"`
UploadedCount int `json:"uploadedCount"`
Error string `json:"error"`
StartedAt string `json:"startedAt"`
FinishedAt string `json:"finishedAt"`
}
type TrackerUploadTrackerState ¶
type TrackerUploadTrackerState struct {
Tracker string `json:"tracker"`
Status string `json:"status"`
Task string `json:"task"`
TaskStatus string `json:"taskStatus"`
Message string `json:"message"`
CompletedPieces int `json:"completedPieces"`
TotalPieces int `json:"totalPieces"`
Percent int `json:"percent"`
HashRateMiB float64 `json:"hashRateMiB"`
UploadedCount int `json:"uploadedCount"`
StartedAt string `json:"startedAt"`
FinishedAt string `json:"finishedAt"`
}