Documentation
¶
Index ¶
- Constants
- func EmitDupeProgress(ctx context.Context, update DupeProgressUpdate)
- func EmitMetadataProgress(ctx context.Context, update MetadataProgressUpdate)
- func EmitUploadProgress(ctx context.Context, update UploadProgressUpdate)
- func IsDiscMenuSelectionSource(source string) bool
- func ParseLogLevel(value string) (string, error)
- func ReportDVDMenuProgress(ctx context.Context, update DVDMenuProgressUpdate)
- func SetApplicationBuild(version string, buildIdentifier string)
- func WithDVDMenuProgressReporter(ctx context.Context, reporter DVDMenuProgressReporter) context.Context
- func WithDupeProgressReporter(ctx context.Context, reporter DupeProgressReporter) context.Context
- func WithMetadataProgressReporter(ctx context.Context, reporter MetadataProgressReporter) context.Context
- func WithUploadProgressReporter(ctx context.Context, reporter UploadProgressReporter) context.Context
- type AniListAiringEpisode
- type AniListExternalLink
- type AniListMetadata
- type AniListStudio
- type AniListTag
- type AniListTrailer
- type ApplicationInfo
- type BDMVRescanRequiredError
- type BlurayDiscSpec
- type BlurayImage
- type BlurayMetadata
- type BlurayPlaybackSpec
- type BlurayReleaseCandidate
- type BluraySpecs
- type BlurayVideoSpec
- type BrowseDirectoryEntry
- type BrowseDirectoryRequest
- type BrowseDirectoryResponse
- type Category
- type ClientOverrides
- type ClientSearchResult
- type ClientService
- type Config
- type Core
- type CoreDependencies
- type CoreImpl
- type DVDMediaInfo
- type DVDMenuCapabilityProvider
- type DVDMenuCaptureImage
- type DVDMenuCaptureResult
- type DVDMenuCaptureSnapshot
- type DVDMenuCaptureWarning
- type DVDMenuDiscovery
- type DVDMenuEngineInfo
- type DVDMenuProgressReporter
- type DVDMenuProgressUpdate
- type DVDMenuService
- type DescriptionBuilderGroup
- type DescriptionBuilderPreview
- type DescriptionImageHostStatus
- type DescriptionOverride
- type DiscMenuDeleteResult
- type DupeCheckResult
- type DupeCheckSummary
- type DupeEntry
- type DupeEpisodeMatch
- type DupeMatch
- type DupeProgressReporter
- type DupeProgressUpdate
- type DupeService
- type ExecutionOptions
- type ExternalIDCandidate
- type ExternalIDCandidates
- type ExternalIDInfo
- type ExternalIDOverrides
- type ExternalIDSelection
- type ExternalIDs
- type ExternalMetadata
- type ExternalPreview
- type FileMetadata
- type FilesystemService
- type HistoryEntry
- type HistoryOverview
- type IMDBAKA
- type IMDBEditionDetail
- type IMDBEpisode
- type IMDBMetadata
- type IMDBPerson
- type IMDBReleaseDate
- type IMDBSeasonSummary
- type ImageHostFeedback
- type ImageHostOverrides
- type ImageHostWarning
- type ImageHostingService
- type InteractionMode
- type Logger
- type MetadataOverrides
- type MetadataPreview
- type MetadataProgressReporter
- type MetadataProgressUpdate
- type MetadataRepository
- type MetadataService
- type Mode
- type NopLogger
- type PlaylistInfo
- type PlaylistItem
- type PlaylistSelection
- type PreparationDescription
- type PreparationPreview
- type PreparedMetadata
- type ReleaseInfo
- type ReleaseNameOverrides
- type ReleaseNameRequest
- type ReleaseNameResult
- type Request
- type Result
- type RuleFailure
- type Screenshot
- type ScreenshotError
- type ScreenshotFinalSelection
- type ScreenshotImage
- type ScreenshotLifecycleRepository
- type ScreenshotLinkedImage
- type ScreenshotOverrides
- type ScreenshotPlan
- type ScreenshotPreview
- type ScreenshotPurpose
- type ScreenshotResult
- type ScreenshotSelection
- type ScreenshotService
- type ScreenshotSlot
- type ScreenshotSlotVariant
- type ServiceSet
- type TIKOverrides
- type TMDBCompany
- type TMDBCountry
- type TMDBLocalizedData
- type TMDBMetadata
- type TMDBNetwork
- type TVDBEpisodeMetadata
- type TVDBMetadata
- type TVmazeMetadata
- type TagOverride
- type TorrentMatch
- type TorrentOverrides
- type TorrentResult
- type TorrentService
- type TrackerAuthCapability
- type TrackerAuthLoginRequest
- type TrackerAuthStatus
- type TrackerBlockReason
- type TrackerConfigOverrides
- type TrackerDryRunDebugSection
- type TrackerDryRunEntry
- type TrackerDryRunFile
- type TrackerDryRunPreview
- type TrackerMatch
- type TrackerMetadata
- type TrackerPreview
- type TrackerQuestionnaire
- type TrackerQuestionnaireField
- type TrackerReview
- type TrackerRuleFailure
- type TrackerService
- type TrackerSiteOverrides
- type TrackerTimestamp
- type UploadImageHostFailure
- type UploadImagesResult
- type UploadOptions
- type UploadProgressReporter
- type UploadProgressUpdate
- type UploadRecord
- type UploadReview
- type UploadSummary
- type UploadedImageLink
- type UploadedTorrent
Constants ¶
const ErrCodeBDMVRescanRequired = "bdmv_rescan_required"
Variables ¶
This section is empty.
Functions ¶
func EmitDupeProgress ¶
func EmitDupeProgress(ctx context.Context, update DupeProgressUpdate)
func EmitMetadataProgress ¶
func EmitMetadataProgress(ctx context.Context, update MetadataProgressUpdate)
func EmitUploadProgress ¶
func EmitUploadProgress(ctx context.Context, update UploadProgressUpdate)
func IsDiscMenuSelectionSource ¶ added in v0.2.4
IsDiscMenuSelectionSource reports whether a final-selection source belongs to either manually imported or automatically captured disc menus.
func ParseLogLevel ¶
func ReportDVDMenuProgress ¶ added in v0.2.4
func ReportDVDMenuProgress(ctx context.Context, update DVDMenuProgressUpdate)
ReportDVDMenuProgress synchronously sends update to the reporter stored in ctx, if any. A nil context is ignored.
func SetApplicationBuild ¶
SetApplicationBuild stores trimmed build metadata returned by CurrentApplicationInfo.
func WithDVDMenuProgressReporter ¶ added in v0.2.4
func WithDVDMenuProgressReporter(ctx context.Context, reporter DVDMenuProgressReporter) context.Context
WithDVDMenuProgressReporter returns a child context that reports capture progress to reporter. A nil context or reporter is returned unchanged.
func WithDupeProgressReporter ¶
func WithDupeProgressReporter(ctx context.Context, reporter DupeProgressReporter) context.Context
func WithMetadataProgressReporter ¶
func WithMetadataProgressReporter(ctx context.Context, reporter MetadataProgressReporter) context.Context
func WithUploadProgressReporter ¶
func WithUploadProgressReporter(ctx context.Context, reporter UploadProgressReporter) context.Context
Types ¶
type AniListAiringEpisode ¶ added in v0.2.4
type AniListAiringEpisode struct {
// AiringAt is a Unix timestamp in seconds.
AiringAt int
// TimeUntilAiring is seconds from AniList's response time until AiringAt.
TimeUntilAiring int
Episode int
}
AniListAiringEpisode describes the next scheduled episode for an airing anime.
type AniListExternalLink ¶ added in v0.2.4
AniListExternalLink is a public provider or official link attached to AniList media.
type AniListMetadata ¶ added in v0.2.4
type AniListMetadata struct {
// AniListID is the AniList media ID used in AniList URLs.
AniListID int
// MALID is the MyAnimeList media ID used as upbrr's canonical anime ID.
MALID int
// SiteURL is the canonical AniList media page URL.
SiteURL string
// Title* fields preserve AniList's localized title variants.
TitleRomaji string
TitleEnglish string
TitleNative string
TitleUserPreferred string
// Description is AniList's plain-text media description.
Description string
// Format, Status, Season, and Source are AniList enum values.
Format string
Status string
// StartDate is formatted as YYYY, YYYY-MM, or YYYY-MM-DD depending on AniList precision.
StartDate string
// EndDate is formatted as YYYY, YYYY-MM, or YYYY-MM-DD depending on AniList precision.
EndDate string
Season string
SeasonYear int
Episodes int
// Duration is AniList's average episode duration in minutes.
Duration int
CountryOfOrigin string
Source string
// Cover* and BannerImage are AniList image URLs or color metadata used by previews.
CoverExtraLarge string
CoverLarge string
CoverMedium string
CoverColor string
BannerImage string
Genres []string
Synonyms []string
// AverageScore and MeanScore are AniList percentage scores from 0 to 100.
AverageScore int
MeanScore int
Popularity int
Favourites int
IsAdult bool
Tags []AniListTag
Studios []AniListStudio
Trailer AniListTrailer
NextAiringEpisode AniListAiringEpisode
ExternalLinks []AniListExternalLink
}
AniListMetadata is the AniList media snapshot used for MAL/AniList preview.
Date fields keep AniList fuzzy-date precision, score fields are percentages from 0 to 100, and AiringAt fields are Unix timestamps in seconds. Tags keep adult/spoiler flags so consumers can filter them before display.
type AniListStudio ¶ added in v0.2.4
type AniListStudio struct {
ID int
Name string
// SiteURL is the AniList studio page URL.
SiteURL string
}
AniListStudio is a studio attached to an AniList media entry.
type AniListTag ¶ added in v0.2.4
type AniListTag struct {
Name string
// Rank is AniList's tag relevance percentage from 0 to 100.
Rank int
Category string
// IsAdult and Is*Spoiler let UI consumers omit sensitive tag labels.
IsAdult bool
IsGeneralSpoiler bool
IsMediaSpoiler bool
}
AniListTag is a media tag returned by AniList for the selected anime.
type AniListTrailer ¶ added in v0.2.4
type AniListTrailer struct {
ID string
Site string
// Thumbnail is the provider thumbnail URL when AniList supplies one.
Thumbnail string
}
AniListTrailer identifies a media trailer from AniList.
type ApplicationInfo ¶
type ApplicationInfo struct {
Version string `json:"version"`
BuildIdentifier string `json:"buildIdentifier"`
GoVersion string `json:"goVersion"`
GOOS string `json:"goos"`
GOARCH string `json:"goarch"`
Uptime string `json:"uptime"`
UptimeSeconds int64 `json:"uptimeSeconds"`
// DVDMenuEngine contains path-free engine and FFmpeg probe metadata.
DVDMenuEngine DVDMenuEngineInfo `json:"dvdMenuEngine"`
// DVDMenuCapabilityStatus is available, incompatible, or unavailable.
DVDMenuCapabilityStatus string `json:"dvdMenuCapabilityStatus"`
// DVDMenuCapabilityMessage is the user-facing reason for the capability status.
DVDMenuCapabilityMessage string `json:"dvdMenuCapabilityMessage"`
}
ApplicationInfo describes the running build and optional runtime capability probes returned by Wails and embedded web entrypoints.
func CurrentApplicationInfo ¶
func CurrentApplicationInfo() ApplicationInfo
CurrentApplicationInfo returns process build, platform, and uptime metadata. Optional capability fields remain zero until an entrypoint probes them.
type BDMVRescanRequiredError ¶
type BDMVRescanRequiredError struct {
SourcePath string
SelectedPlaylists []string
CachedPlaylists []string
MissingPlaylists []string
}
func (*BDMVRescanRequiredError) Error ¶
func (e *BDMVRescanRequiredError) Error() string
type BlurayDiscSpec ¶
type BlurayImage ¶
type BlurayMetadata ¶
type BlurayMetadata struct {
SourcePath string
IMDBID int
SearchURL string
SelectedReleaseID string
SelectedURL string
AutoSelected bool
SelectionReason string
BestScore float64
Threshold float64
Candidates []BlurayReleaseCandidate
UpdatedAt time.Time `ts_type:"string"`
}
func (*BlurayMetadata) CandidateByID ¶
func (m *BlurayMetadata) CandidateByID(releaseID string) *BlurayReleaseCandidate
func (*BlurayMetadata) SelectCandidate ¶
func (m *BlurayMetadata) SelectCandidate(releaseID string, auto bool, reason string) bool
func (*BlurayMetadata) SelectedCandidate ¶
func (m *BlurayMetadata) SelectedCandidate() *BlurayReleaseCandidate
type BlurayPlaybackSpec ¶
type BlurayReleaseCandidate ¶
type BlurayReleaseCandidate struct {
ReleaseID string
ProductID string
MovieTitle string
MovieYear string
Title string
URL string
Price string
Publisher string
Country string
Region string
Score float64
Accepted bool
Warnings []string
MatchNotes []string
Specs BluraySpecs
CoverImages []BlurayImage
GenericDisc bool
SpecsMissing bool
}
type BluraySpecs ¶
type BluraySpecs struct {
Video BlurayVideoSpec
Audio []string
Subtitles []string
Discs BlurayDiscSpec
Playback BlurayPlaybackSpec
}
type BlurayVideoSpec ¶
type BrowseDirectoryEntry ¶
type BrowseDirectoryRequest ¶
type BrowseDirectoryResponse ¶
type BrowseDirectoryResponse struct {
CurrentPath string `json:"currentPath"`
ParentPath string `json:"parentPath"`
Mode string `json:"mode"`
Entries []BrowseDirectoryEntry `json:"entries"`
}
type ClientOverrides ¶
type ClientSearchResult ¶
type ClientService ¶
type ClientService interface {
Inject(ctx context.Context, meta PreparedMetadata, torrent TorrentResult) error
SearchPathedTorrents(ctx context.Context, meta PreparedMetadata) (ClientSearchResult, error)
}
type Config ¶
type Config interface {
Validate() error
}
Config defines the minimum application configuration contract required by core wiring. Keeping this in pkg/api avoids leaking internal package types into exported APIs.
type Core ¶
type Core interface {
RunUpload(ctx context.Context, req Request) (Result, error)
RunUploadPrepared(ctx context.Context, req Request) (Result, error)
FetchMetadataPreview(ctx context.Context, req Request) (MetadataPreview, error)
// FetchDescriptionBuilderPreview returns editable description groups for one
// source path. Non-empty request trackers limit group generation to that set.
FetchDescriptionBuilderPreview(ctx context.Context, req Request) (DescriptionBuilderPreview, error)
// FetchDescriptionBuilderGroupPreview rebuilds one editable description group
// for the requested source path and selected tracker set.
FetchDescriptionBuilderGroupPreview(ctx context.Context, req Request) (DescriptionBuilderGroup, error)
// FetchPreparationPreview returns tracker preparation details for one source
// path. Non-empty request trackers limit preparation to that set.
FetchPreparationPreview(ctx context.Context, req Request) (PreparationPreview, error)
FetchTrackerDryRunPreview(ctx context.Context, req Request) (TrackerDryRunPreview, error)
CheckDupes(ctx context.Context, req Request) (DupeCheckSummary, error)
BuildUploadReview(ctx context.Context, req Request) (UploadReview, error)
FetchScreenshotPlan(ctx context.Context, req Request) (ScreenshotPlan, error)
GenerateScreenshots(ctx context.Context, req Request, selections []ScreenshotSelection, purpose ScreenshotPurpose) (ScreenshotResult, error)
PreviewScreenshotFrame(ctx context.Context, req Request, timestampSeconds float64) (ScreenshotPreview, error)
DeleteScreenshot(ctx context.Context, req Request, imagePath string) error
DeleteTrackerImageURL(ctx context.Context, req Request, url string) error
SaveFinalScreenshotSelections(ctx context.Context, req Request, images []ScreenshotImage) error
// CaptureDVDMenus captures and persists bounded automatic menu images for one prepared DVD.
CaptureDVDMenus(ctx context.Context, req Request) (DVDMenuCaptureResult, error)
// ListDVDMenuScreenshots lists persisted manual and automatic menu images for one prepared source.
ListDVDMenuScreenshots(ctx context.Context, req Request) ([]ScreenshotImage, error)
// DeleteDVDMenuScreenshot removes one managed menu image and its local references.
DeleteDVDMenuScreenshot(ctx context.Context, req Request, imagePath string) error
ListUploadCandidates(ctx context.Context, req Request) ([]ScreenshotImage, error)
ListUploadedImages(ctx context.Context, req Request) ([]UploadedImageLink, error)
UploadImages(ctx context.Context, req Request, host string, images []ScreenshotImage) (UploadImagesResult, error)
DeleteUploadedImage(ctx context.Context, req Request, imagePath string, host string) error
ImportMenuImages(ctx context.Context, req Request, paths []string) error
DiscoverPlaylists(ctx context.Context, sourcePath string) ([]PlaylistInfo, error)
SavePlaylistSelection(ctx context.Context, sourcePath string, playlists []string, useAll bool) error
LoadPlaylistSelection(ctx context.Context, sourcePath string) (PlaylistSelection, error)
ListHistory(ctx context.Context) ([]HistoryEntry, error)
GetHistoryOverview(ctx context.Context, sourcePath string) (HistoryOverview, error)
DeleteHistoryRelease(ctx context.Context, sourcePath string) error
DeleteAllHistoryReleases(ctx context.Context) (int, error)
RenderDescription(ctx context.Context, raw string) (string, error)
SaveDescriptionOverride(ctx context.Context, req Request, raw string) (DescriptionBuilderGroup, error)
Close() error
}
Core defines the shared upload, preview, history, screenshot, and description operations used by CLI, Wails, and embedded web entrypoints.
type CoreDependencies ¶
type CoreDependencies struct {
// Config is validated before the core is created.
Config Config
// Logger receives core initialization and runtime messages. Nil uses NopLogger.
Logger Logger
// Services supplies optional service overrides; zero values use the core defaults.
Services ServiceSet
// Repository stores metadata and history. Nil opens and owns a SQLite repository from Config.
Repository MetadataRepository
// SkipCookieMigration skips legacy cookie migration for callers that already
// synchronize cookie encryption state with the shared repository.
SkipCookieMigration bool
}
CoreDependencies supplies the externally owned services used to construct a Core.
type CoreImpl ¶
type CoreImpl interface {
Core
}
CoreImpl is the exported concrete-core contract used by packages that accept any current core implementation.
type DVDMediaInfo ¶
type DVDMenuCapabilityProvider ¶ added in v0.2.4
type DVDMenuCapabilityProvider interface {
// DVDMenuCapability probes the current FFmpeg executable without exposing its path.
DVDMenuCapability(ctx context.Context) (DVDMenuEngineInfo, error)
}
DVDMenuCapabilityProvider is an optional Core diagnostic contract. Keeping it separate from Core avoids forcing unrelated test/runtime adapters to implement a capability probe.
type DVDMenuCaptureImage ¶ added in v0.2.4
type DVDMenuCaptureImage struct {
// ScreenshotImage contains the persisted local image metadata.
ScreenshotImage
// Discovery records whether navigation or structural inventory found the screen.
Discovery DVDMenuDiscovery
}
DVDMenuCaptureImage is one stored menu screenshot and its discovery source.
type DVDMenuCaptureResult ¶ added in v0.2.4
type DVDMenuCaptureResult struct {
// SourcePath is the host filesystem path of the prepared DVD source.
SourcePath string
// Images contains captures persisted for SourcePath in display order.
Images []DVDMenuCaptureImage
// SelectedLanguage is the menu language requested from the DVD engine.
SelectedLanguage string
// Region is the DVD region selection used for capture; zero means no override.
Region int
// DiscoveredMenus is the number of structurally inventoried menu programs.
DiscoveredMenus int
// VisitedStates is the number of distinct VM states evaluated during traversal.
VisitedStates int
// VisitedButtons is the number of authored button commands evaluated.
VisitedButtons int
// MaxItems is the configured upper bound on persisted automatic captures.
MaxItems int
// Complete reports that every selected screen was captured without coverage warnings.
Complete bool
// Partial reports that warnings prevented complete navigation or rendering coverage.
Partial bool
// Truncated reports that MaxItems prevented one or more eligible captures.
Truncated bool
// Warnings contains deduplicated, stable, path-free coverage diagnostics.
Warnings []DVDMenuCaptureWarning
// Engine describes the pure-Go engine and FFmpeg capability used for capture.
Engine DVDMenuEngineInfo
}
DVDMenuCaptureResult reports persisted captures plus bounded traversal state.
type DVDMenuCaptureSnapshot ¶ added in v0.2.4
type DVDMenuCaptureSnapshot struct {
// JobID is the opaque identifier used for polling and cancellation.
JobID string `json:"jobID"`
// SourcePath is the host filesystem path associated with the prepared metadata.
SourcePath string `json:"sourcePath"`
// Status is queued, running, completed, failed, or canceled.
Status string `json:"status"`
// Phase is the current capture stage within Status.
Phase string `json:"phase"`
// Message is a user-facing progress or terminal summary.
Message string `json:"message"`
// DiscoveredMenus is the latest structural inventory count.
DiscoveredMenus int `json:"discoveredMenus"`
// VisitedStates is the latest evaluated VM-state count.
VisitedStates int `json:"visitedStates"`
// VisitedButtons is the latest evaluated button-command count.
VisitedButtons int `json:"visitedButtons"`
// CapturedCount is the latest rendered or persisted image count.
CapturedCount int `json:"capturedCount"`
// WarningCount is the latest distinct coverage-warning count.
WarningCount int `json:"warningCount"`
// Result is populated with the final or partial engine result when available.
Result DVDMenuCaptureResult `json:"result"`
// Error contains terminal failure text and is empty for successful jobs.
Error string `json:"error"`
// StartedAt is an RFC3339 UTC timestamp.
StartedAt string `json:"startedAt"`
// FinishedAt is an RFC3339 UTC timestamp, or empty while the job is active.
FinishedAt string `json:"finishedAt"`
}
DVDMenuCaptureSnapshot reports frontend-visible state for one capture job.
type DVDMenuCaptureWarning ¶ added in v0.2.4
type DVDMenuCaptureWarning struct {
// Code is a stable machine-readable warning identifier.
Code string
// Message is a redacted user-facing description of the incomplete coverage.
Message string
}
DVDMenuCaptureWarning is a stable, redacted partial-capture diagnostic.
type DVDMenuDiscovery ¶ added in v0.2.4
type DVDMenuDiscovery string
DVDMenuDiscovery describes how the navigation engine found a menu screen.
const ( // DVDMenuDiscoveryReachable marks a screen reached by deterministic VM navigation. DVDMenuDiscoveryReachable DVDMenuDiscovery = "reachable" // DVDMenuDiscoveryStructural marks an interactive screen found only in the IFO inventory. DVDMenuDiscoveryStructural DVDMenuDiscovery = "structural" )
DVD menu discovery sources serialized across CLI, Wails, and embedded web.
type DVDMenuEngineInfo ¶ added in v0.2.4
type DVDMenuEngineInfo struct {
// EngineVersion identifies the bundled pure-Go DVD navigation engine.
EngineVersion string
// SchemaVersion identifies the capture metadata contract version.
SchemaVersion int
// SupportedFeatures lists the engine stages available in this build.
SupportedFeatures []string
// FFmpegVersion is the bounded first line of FFmpeg version output.
FFmpegVersion string
// FFmpegDVDVideo reports whether the required dvdvideo demuxer options are available.
FFmpegDVDVideo bool
// MissingFFmpegOptions lists required dvdvideo options absent from the probe.
MissingFFmpegOptions []string
}
DVDMenuEngineInfo reports pure-Go engine and external FFmpeg capability.
type DVDMenuProgressReporter ¶ added in v0.2.4
type DVDMenuProgressReporter func(update DVDMenuProgressUpdate)
DVDMenuProgressReporter receives capture progress updates.
type DVDMenuProgressUpdate ¶ added in v0.2.4
type DVDMenuProgressUpdate struct {
// Phase is a stable capture stage such as preflight, discovering, capturing, or persisting.
Phase string `json:"phase"`
// Message is a user-facing summary of the current phase.
Message string `json:"message"`
// DiscoveredMenus is the current structural inventory count.
DiscoveredMenus int `json:"discoveredMenus"`
// VisitedStates is the current count of evaluated VM states.
VisitedStates int `json:"visitedStates"`
// VisitedButtons is the current count of evaluated button commands.
VisitedButtons int `json:"visitedButtons"`
// CapturedCount is the number of rendered menu images so far.
CapturedCount int `json:"capturedCount"`
// WarningCount is the number of distinct coverage warnings so far.
WarningCount int `json:"warningCount"`
}
DVDMenuProgressUpdate reports bounded capture progress without source paths or disc-identifying material.
type DVDMenuService ¶ added in v0.2.4
type DVDMenuService interface {
// Capture replaces automatic captures up to maxItems while preserving manual menus.
Capture(ctx context.Context, meta PreparedMetadata, maxItems int) (DVDMenuCaptureResult, error)
// List returns persisted manual and automatic menu images in selection order.
List(ctx context.Context, meta PreparedMetadata) ([]ScreenshotImage, error)
// Delete removes one managed menu image and its local repository references.
Delete(ctx context.Context, meta PreparedMetadata, imagePath string) error
// Capability reports path-free engine and FFmpeg dvdvideo support.
Capability(ctx context.Context) (DVDMenuEngineInfo, error)
}
DVDMenuService captures and manages persisted menu images for prepared DVD metadata.
type DescriptionBuilderGroup ¶
type DescriptionBuilderGroup struct {
GroupKey string
Trackers []string
Description string
DescriptionHTML string
RawDescription string
RawDescriptionHTML string
HasOverride bool
ImageHost ImageHostFeedback
}
func CloneDescriptionBuilderGroups ¶
func CloneDescriptionBuilderGroups(groups []DescriptionBuilderGroup) []DescriptionBuilderGroup
CloneDescriptionBuilderGroups deep-copies the reference-typed fields used by DescriptionBuilderGroup so callers can safely reuse cached or queued values.
type DescriptionBuilderPreview ¶
type DescriptionBuilderPreview struct {
SourcePath string
Groups []DescriptionBuilderGroup
}
type DescriptionImageHostStatus ¶
type DescriptionImageHostStatus struct {
Trackers []string
ImageHost ImageHostFeedback
}
type DescriptionOverride ¶
type DiscMenuDeleteResult ¶ added in v0.2.4
type DiscMenuDeleteResult struct {
// Selection is the deleted manual or automatic menu selection.
Selection ScreenshotFinalSelection
// Screenshot is the deleted local screenshot record when one existed.
Screenshot *Screenshot
// UploadedImages are deleted local upload records. Remote assets are unchanged.
UploadedImages []UploadedImageLink
// ScreenshotSlots are deleted slot records whose selected image was removed.
ScreenshotSlots []ScreenshotSlot
// ScreenshotSlotVariants are variants deleted with a slot or because they
// referenced the removed image.
ScreenshotSlotVariants []ScreenshotSlotVariant
// UploadedLinks counts local upload records removed with the selection.
UploadedLinks int
}
DiscMenuDeleteResult describes local references removed by one atomic menu deletion and retains the records needed for transactional compensation.
type DupeCheckResult ¶
type DupeCheckResult struct {
Tracker string
Raw []DupeEntry
Filtered []DupeEntry
HasDupes bool
ContentFail bool
Match DupeMatch
Notes []string
Skipped bool
SkipReason string
// SkipCode is a stable machine-readable skip reason.
SkipCode string
// SkipRules are upload rule keys that produced a rule-failure skip.
SkipRules []string
Status string
Error string
CheckedAt time.Time `ts_type:"string"`
}
DupeCheckResult is the duplicate-search outcome for one tracker. Raw contains tracker results before filtering, Filtered contains blocking matches, and skipped or failed checks carry Status plus SkipReason or Error. SkipCode is a stable machine-readable reason, while SkipRules names upload rules that caused rule-failure skips.
type DupeCheckSummary ¶
type DupeCheckSummary struct {
SourcePath string
Results []DupeCheckResult
Notes []string
}
DupeCheckSummary groups duplicate-search results for one prepared source path.
type DupeEntry ¶
type DupeEntry struct {
Name string
SizeBytes int64
SizeKnown bool
SizeText string
Files []string
FileCount int
Trumpable bool
Link string
Download string
Flags []string
ID string
Type string
Res string
Internal bool
BDInfo string
Description string
}
DupeEntry describes one tracker duplicate-search hit before or after local filtering.
type DupeEpisodeMatch ¶
DupeEpisodeMatch identifies an episode-level match found inside a duplicate search result, including season packs that contain the requested episode.
type DupeMatch ¶
type DupeMatch struct {
FilenameMatch string
FileCountMatch int
SizeMatch string
TrumpableID string
MatchedID string
MatchedName string
MatchedLink string
MatchedDownload string
MatchedReason string
SeasonPackExists bool
SeasonPackName string
SeasonPackLink string
SeasonPackID string
SeasonPackContainsEpisode bool
MatchedEpisodeIDs []DupeEpisodeMatch
}
DupeMatch records why duplicate filtering matched an entry and which tracker result can be reused for cross-seed injection.
type DupeProgressReporter ¶
type DupeProgressReporter func(update DupeProgressUpdate)
type DupeProgressUpdate ¶
type DupeService ¶
type DupeService interface {
Check(ctx context.Context, meta PreparedMetadata, trackers []string) (DupeCheckSummary, error)
}
type ExecutionOptions ¶
type ExecutionOptions struct {
QueueName string
QueueLimit int
SiteCheck bool
SiteUploadTracker string
}
ExecutionOptions controls queued and site-check execution behavior.
type ExternalIDCandidate ¶
type ExternalIDCandidates ¶
type ExternalIDCandidates struct {
TMDB []ExternalIDCandidate
IMDB []ExternalIDCandidate
TMDBAutoSelected bool
IMDBAutoSelected bool
}
type ExternalIDInfo ¶
ExternalIDInfo is the user-visible provider ID plus the resolver source label that produced it.
type ExternalIDOverrides ¶
type ExternalIDOverrides struct {
TMDBID *int
IMDBID *int
TVDBID *int
TVmazeID *int
// MALID carries caller intent for the canonical MAL/AniList-compatible
// anime identifier. Nil leaves resolution unchanged; zero clears it.
MALID *int
}
ExternalIDOverrides carries caller-supplied ID intent into metadata resolution. Nil means the resolver may fill the provider; a positive value locks that provider to the supplied ID; zero locks an explicit clear for the current request.
type ExternalIDSelection ¶
type ExternalIDSelection struct {
TMDBID *int
IMDBID *int
TVDBID *int
TVmazeID *int
// MALID stores user selection for the canonical MAL/AniList-compatible
// anime identifier for this source path.
MALID *int
}
ExternalIDSelection records per-source-path user ID choices copied across resolved CLI/UI paths. Nil provider fields mean no user choice; non-nil fields follow ExternalIDOverrides positive-value and zero-clear semantics.
type ExternalIDs ¶
type ExternalIDs struct {
// SourcePath is the content path these resolved IDs belong to. Empty means
// the record is not scoped to a specific source path.
SourcePath string
TMDBID int
IMDBID int
TVDBID int
TVmazeID int
// MALID is the canonical anime identifier used by MAL/AniList-compatible
// tracker fields after metadata resolution.
MALID int
Category string
// Source* fields record the resolver source labels that produced each
// provider ID, for example tracker, mediainfo, tmdb, or scene.
SourceTMDB string
SourceIMDB string
SourceTVDB string
SourceTVmaze string
// SourceMAL records the resolver source label for MALID.
SourceMAL string
UpdatedAt time.Time `ts_type:"string"`
}
ExternalIDs contains canonical IDs finalized by metadata resolution. Downstream search, rule, preview, history, and upload code should use these fields instead of re-reading raw resolver fallback inputs.
type ExternalMetadata ¶
type ExternalMetadata struct {
// SourcePath scopes the metadata to a prepared source path when set.
SourcePath string
TMDB *TMDBMetadata
IMDB *IMDBMetadata
TVDB *TVDBMetadata
TVmaze *TVmazeMetadata
// AniList stores rich anime metadata resolved from the canonical MALID.
AniList *AniListMetadata
Bluray *BlurayMetadata
UpdatedAt time.Time `ts_type:"string"`
}
ExternalMetadata stores provider-specific metadata snapshots resolved for one source path. Nil provider fields mean that provider has no stored snapshot.
type ExternalPreview ¶
type ExternalPreview struct {
Provider string
ID int
Source string
Title string
Year int
Overview string
PosterURL string
BackdropURL string
Category string
OriginalTitle string
ReleaseDate string
FirstAirDate string
LastAirDate string
OriginalLanguage string
TMDBType string
Runtime int
Genres string
Keywords string
YouTube string
IMDBType string
Rating float64
RatingCount int
RuntimeMinutes int
Country string
Premiered string
IMDBID int
TVDBID int
TMDB *TMDBMetadata
IMDB *IMDBMetadata
TVDB *TVDBMetadata
TVmaze *TVmazeMetadata
// AniList contains rich preview metadata when Provider is "mal".
AniList *AniListMetadata
}
type FileMetadata ¶
type FileMetadata struct {
Path string
InfoHash string
UpdatedAt time.Time `ts_type:"string"`
DiscType string
VideoPath string
FileList []string
SourceSize int64
Scene bool
SceneName string
SceneIMDB int
// Category is the normalized movie/TV content category that drives upload
// logic. It is seeded from release parsing but should be overridden by a
// supported TrackerMetadata.Category when that value is available, since a
// site-reported movie/TV category is the authoritative classification for
// the upload.
Category Category
Type string
Artist string
Title string
Subtitle string
Alt string
Year int
Month int
Day int
Source string
Resolution string
Codec []string
Audio []string
HDR []string
Ext string
Language []string
Site string
Genre string
Channels string
Collection string
Region string
Size string
Group string
Disc string
Edition []string
Other []string
}
type FilesystemService ¶
type HistoryEntry ¶
type HistoryOverview ¶
type HistoryOverview struct {
SourcePath string
ReleaseTitle string
ReleaseSource string
ReleaseResolution string
MetadataUpdatedAt time.Time `ts_type:"string"`
LatestUploadStatus string
LatestUploadAt time.Time `ts_type:"string"`
StatusLabel string
Metadata FileMetadata
ExternalIDs ExternalIDs
ExternalMetadata ExternalMetadata
ReleaseNameOverrides ReleaseNameOverrides
DescriptionOverride DescriptionOverride
DescriptionOverrides []DescriptionOverride
PlaylistSelection PlaylistSelection
TrackerMetadata []TrackerMetadata
TrackerRuleFailures []TrackerRuleFailure
Screenshots []Screenshot
FinalSelections []ScreenshotFinalSelection
UploadedImages []UploadedImageLink
UploadHistory []UploadRecord
}
type IMDBEditionDetail ¶
type IMDBEpisode ¶
type IMDBMetadata ¶
type IMDBMetadata struct {
IMDBID int
IMDbIDText string
IMDbURL string
Title string
Year int
EndYear int
AKA string
Type string
Plot string
Rating float64
RatingCount int
RatingText string
RuntimeMinutes int
RuntimeText string
Genres string
Country string
CountryList string
Cover string
Directors []IMDBPerson
Creators []IMDBPerson
Writers []IMDBPerson
Stars []IMDBPerson
Editions []string
EditionDetails map[string]IMDBEditionDetail
Akas []IMDBAKA
Episodes []IMDBEpisode
SeasonsSummary []IMDBSeasonSummary
SoundMixes []string
TVYear int
OriginalLanguage string
}
type IMDBPerson ¶
type IMDBReleaseDate ¶
type IMDBSeasonSummary ¶
type ImageHostFeedback ¶
type ImageHostOverrides ¶
type ImageHostWarning ¶
type ImageHostingService ¶
type ImageHostingService interface {
ListCandidates(ctx context.Context, meta PreparedMetadata) ([]ScreenshotImage, error)
Upload(ctx context.Context, meta PreparedMetadata, host string, usageScope string, images []ScreenshotImage) ([]UploadedImageLink, error)
}
type InteractionMode ¶
type InteractionMode string
const ( InteractionModeInteractive InteractionMode = "interactive" InteractionModeUnattended InteractionMode = "unattended" InteractionModeUnattendedConfirm InteractionMode = "unattended_confirm" )
type MetadataOverrides ¶
type MetadataPreview ¶
type MetadataPreview struct {
SourcePath string
TrackerName string
ReleaseName string
Warnings []string
ReleaseNameOverrides ReleaseNameOverrides
ExternalIDs ExternalIDs
ExternalIDCandidates ExternalIDCandidates
ExternalIDInfo []ExternalIDInfo
ExternalPreview []ExternalPreview
Bluray *BlurayMetadata
TrackerData []TrackerPreview
// TrackerRuleFailures is keyed by normalized tracker code and contains
// upload rule failures known at preview time.
TrackerRuleFailures map[string][]RuleFailure
}
type MetadataProgressReporter ¶
type MetadataProgressReporter func(update MetadataProgressUpdate)
type MetadataProgressUpdate ¶
type MetadataRepository ¶
type MetadataRepository interface {
GetByPath(ctx context.Context, path string) (FileMetadata, error)
Save(ctx context.Context, metadata FileMetadata) error
GetExternalIDs(ctx context.Context, path string) (ExternalIDs, error)
SaveExternalIDs(ctx context.Context, ids ExternalIDs) error
GetExternalMetadata(ctx context.Context, path string) (ExternalMetadata, error)
SaveExternalMetadata(ctx context.Context, metadata ExternalMetadata) error
GetDVDMediaInfo(ctx context.Context, path string) (DVDMediaInfo, error)
SaveDVDMediaInfo(ctx context.Context, info DVDMediaInfo) error
GetReleaseNameOverrides(ctx context.Context, path string) (ReleaseNameOverrides, error)
SaveReleaseNameOverrides(ctx context.Context, path string, overrides ReleaseNameOverrides) error
DeleteReleaseNameOverrides(ctx context.Context, path string) error
GetDescriptionOverride(ctx context.Context, path string, groupKey string) (DescriptionOverride, error)
ListDescriptionOverridesByPath(ctx context.Context, path string) ([]DescriptionOverride, error)
SaveDescriptionOverride(ctx context.Context, override DescriptionOverride) error
DeleteDescriptionOverride(ctx context.Context, path string, groupKey string) error
GetPlaylistSelection(ctx context.Context, sourcePath string) (PlaylistSelection, error)
SavePlaylistSelection(ctx context.Context, sourcePath string, playlists []string, useAll bool) error
DeletePlaylistSelection(ctx context.Context, sourcePath string) error
ListHistoryEntries(ctx context.Context) ([]HistoryEntry, error)
ListUploadHistoryByPath(ctx context.Context, sourcePath string) ([]UploadRecord, error)
ListPendingUploads(ctx context.Context) ([]UploadRecord, error)
CreateUploadRecord(ctx context.Context, record UploadRecord) error
UpdateLatestUploadRecordStatus(ctx context.Context, sourcePath string, tracker string, status string) error
SaveTrackerRuleFailures(ctx context.Context, sourcePath string, tracker string, failures []TrackerRuleFailure) error
ListTrackerRuleFailuresByPath(ctx context.Context, path string) ([]TrackerRuleFailure, error)
GetTrackerTimestamp(ctx context.Context, tracker string) (time.Time, error)
SaveTrackerTimestamp(ctx context.Context, timestamp TrackerTimestamp) error
SaveTrackerMetadata(ctx context.Context, metadata TrackerMetadata) error
ListTrackerMetadataByPath(ctx context.Context, path string) ([]TrackerMetadata, error)
SaveScreenshot(ctx context.Context, screenshot Screenshot) error
ListScreenshotsByPath(ctx context.Context, path string) ([]Screenshot, error)
DeleteScreenshot(ctx context.Context, imagePath string) error
SaveFinalSelections(ctx context.Context, path string, selections []ScreenshotFinalSelection) error
ListFinalSelections(ctx context.Context, path string) ([]ScreenshotFinalSelection, error)
DeleteFinalSelection(ctx context.Context, imagePath string) error
ReplaceScreenshotSlots(ctx context.Context, path string, slots []ScreenshotSlot) error
ListScreenshotSlotsByPath(ctx context.Context, path string) ([]ScreenshotSlot, error)
UpsertScreenshotSlotVariants(ctx context.Context, path string, variants []ScreenshotSlotVariant) error
SaveUploadedImages(ctx context.Context, path string, host string, images []UploadedImageLink) error
ListUploadedImagesByPath(ctx context.Context, path string) ([]UploadedImageLink, error)
DeleteUploadedImage(ctx context.Context, path string, imagePath string, host string) error
ListStoredReleasePaths(ctx context.Context) ([]string, error)
PurgeContentData(ctx context.Context, path string) error
}
type MetadataService ¶
type MetadataService interface {
Prepare(ctx context.Context, req Request) (PreparedMetadata, error)
RefreshPreparedMetadata(ctx context.Context, meta PreparedMetadata) (PreparedMetadata, error)
EnrichTrackerData(ctx context.Context, meta PreparedMetadata) (PreparedMetadata, error)
ApplyMediaInfoIDs(ctx context.Context, meta PreparedMetadata) (PreparedMetadata, error)
ApplyArrData(ctx context.Context, meta PreparedMetadata) (PreparedMetadata, error)
ResolveExternalIDs(ctx context.Context, meta PreparedMetadata) (PreparedMetadata, error)
ApplyMediaDetails(ctx context.Context, meta PreparedMetadata) (PreparedMetadata, error)
// ApplyTrackerClaims applies claim-based tracker blocks using metadata that
// has already been enriched with media details and tracker rule state.
ApplyTrackerClaims(ctx context.Context, meta PreparedMetadata) (PreparedMetadata, error)
}
type PlaylistInfo ¶
type PlaylistInfo struct {
File string `json:"file"`
Duration float64 `json:"duration"`
Items []PlaylistItem `json:"items"`
Score float64 `json:"score"`
Edition string `json:"edition"`
}
PlaylistInfo represents a discovered playlist file with its metrics and scoring.
type PlaylistItem ¶
PlaylistItem represents a single file reference within a playlist.
type PlaylistSelection ¶
type PreparationDescription ¶
type PreparationPreview ¶
type PreparationPreview struct {
SourcePath string
Descriptions []PreparationDescription
}
type PreparedMetadata ¶
type PreparedMetadata struct {
SourcePath string
SourceLookupURL string
SourceLookupActive bool
SourceLookupMode string
SourceLookupTracker string
SourceLookupTrackerID string
LookupWarnings []string
Paths []string
DiscType string
VideoPath string
FileList []string
SourceSize int64
MediaInfoJSONPath string
MediaInfoTextPath string
DVDIFOPath string
DVDVOBPath string
DVDVOBSet string
DVDVOBMediaInfoJSON string
DVDVOBMediaInfoText string
MediaInfoUniqueID string
Scene bool
SceneName string
SceneTMDBID int
SceneIMDB int
SceneTVDBID int
SceneTVmazeID int
SceneMALID int
SceneNFOPath string
SceneNFONew bool
SceneRenamed bool
SceneRenamedReason string
Mode Mode
DescriptionGroups []DescriptionBuilderGroup
Trackers []string
Options UploadOptions
TrackersRemove []string
MatchedTrackers []string
Tag string
Release ReleaseInfo
TagOverride *TagOverride
DescriptionOverride string
MetadataOverrides MetadataOverrides
TrackerConfigOverrides TrackerConfigOverrides
TrackerSiteOverrides TrackerSiteOverrides
ClientOverrides ClientOverrides
ImageHostOverrides ImageHostOverrides
ScreenshotOverrides ScreenshotOverrides
TorrentOverrides TorrentOverrides
DescriptionTemplate string
PersonalRelease bool
InfoHash string
TrackerIDs map[string]string
FoundTrackerMatch bool
TorrentComments []TorrentMatch
PieceSizeConstraint string
FoundPreferredPiece string
StoredInfoHash string
StoredUpdatedAt time.Time `ts_type:"string"`
StoredDataFresh bool
TrackerData []TrackerMetadata
CrossSeedTorrents []UploadedTorrent
ClientTorrentPath string
TorrentPath string
MediaInfoCategory string
MediaInfoTMDBID int
MediaInfoIMDBID int
MediaInfoTVDBID int
ArrSource string
ArrTMDBID int
ArrIMDBID int
ArrTVDBID int
ArrTVmazeID int
ArrYear int
ArrGenres []string
ArrReleaseGroup string
MismatchedMediaInfoTMDBID int
MismatchedMediaInfoIMDBID int
MismatchedMediaInfoTVDBID int
ExternalIDOverrides ExternalIDOverrides
ReleaseNameOverrides ReleaseNameOverrides
TrackerQuestionnaireAnswers map[string]map[string]string
SeasonInt int
EpisodeInt int
SeasonStr string
EpisodeStr string
TVDBAiredDate string
TVDBAirsDays []string
TVDBAirsTime string
TVDBAirsTimezone string
TVDBAirsTimezoneSource string
TVPack bool
DailyEpisodeDate string
TMDBDateMatch bool
Anime bool
MALID int
EpisodeTitle string
EpisodeOverview string
EpisodeYear int
SelectedBDMVPlaylists []PlaylistInfo
ExternalIDs ExternalIDs
ExternalIDCandidates ExternalIDCandidates
ExternalMetadata ExternalMetadata
AudioLanguages []string
SubtitleLanguages []string
Container string
Audio string
Channels string
HasCommentary bool
Is3D string
Source string
Type string
UHD string
HDR string
Distributor string
Region string
VideoCodec string
VideoEncode string
HasEncodeSettings bool
BitDepth string
Edition string
Repack string
WebDV bool
ValidMediaInfo bool
ValidMediaInfoSettings bool
StreamOptimized int
Service string
ServiceLongName string
Filename string
ReleaseName string
ReleaseNameNoTag string
ReleaseNameClean string
ReleaseNameMissing []string
BlockedTrackers map[string][]TrackerBlockReason
IgnoreTrackerRuleFailures bool
TrackerRuleFailures map[string][]RuleFailure
BDInfo map[string]any
}
PreparedMetadata contains the shared metadata snapshot used across CLI, GUI, embedded web, and tracker upload flows. Release preserves parsed release-name data; SeasonInt and EpisodeInt carry canonical TV identity after metadata parsing and provider/date remapping.
func (PreparedMetadata) CanonicalSeasonEpisode ¶ added in v0.2.3
func (m PreparedMetadata) CanonicalSeasonEpisode() (int, int)
CanonicalSeasonEpisode returns the provider-resolved TV season/episode used for upload identity and naming.
func (PreparedMetadata) HasTVSeasonEpisodeSignal ¶ added in v0.2.3
func (m PreparedMetadata) HasTVSeasonEpisodeSignal() bool
HasTVSeasonEpisodeSignal reports whether either canonical metadata or the parsed release name carries a season/episode hint.
func (PreparedMetadata) SeasonEpisodeWithParsedFallback ¶ added in v0.2.3
func (m PreparedMetadata) SeasonEpisodeWithParsedFallback() (int, int)
SeasonEpisodeWithParsedFallback returns canonical season/episode values and falls back to release-name parsed values independently for each missing field. The returned season and episode can come from different sources, so callers must not treat the pair as source-consistent. Use this for TV classification and lookup fallbacks, not for canonical upload naming.
type ReleaseInfo ¶
type ReleaseInfo struct {
Category string
Type string
Artist string
Title string
Subtitle string
Alt string
Year int
Month int
Day int
Source string
Resolution string
Codec []string
Audio []string
HDR []string
Ext string
Language []string
Site string
Genre string
Channels string
Collection string
Region string
Size string
Group string
Disc string
Season int
Episode int
Edition []string
Other []string
}
ReleaseInfo preserves release-name parser output before provider metadata can remap episode identity.
type ReleaseNameOverrides ¶
type ReleaseNameOverrides struct {
Category *string
Type *string
Source *string
Resolution *string
Tag *string
Service *string
Edition *string
Season *string
Episode *string
EpisodeTitle *string
ManualYear *int
ManualDate *string
UseSeasonEpisode *bool
NoSeason *bool
NoYear *bool
NoAKA *bool
NoTag *bool
NoEdition *bool
NoDub *bool
NoDual *bool
DualAudio *bool
Region *string
}
type ReleaseNameRequest ¶
type ReleaseNameRequest struct {
Category string
Type string
Title string
AltTitle string
Year int
ManualYear int
Resolution string
Audio string
Service string
Season string
Episode string
Part string
Repack string
ThreeD string
Tag string
Source string
UHD string
HDR string
WebDV bool
EpisodeTitle string
VideoCodec string
VideoEncode string
DiscType string
Region string
DVDSize string
Edition string
SearchYear string
DailyDate string
ManualDate bool
TMDBDateMatch bool
NoSeason bool
NoYear bool
NoAKA bool
}
type ReleaseNameResult ¶
type Request ¶
type Request struct {
Paths []string
Mode Mode
Options UploadOptions
Execution ExecutionOptions
DescriptionGroups []DescriptionBuilderGroup
Trackers []string
TrackersRemove []string
IgnoreTrackerRuleFailures bool
IgnoreTrackerRuleFailuresFor []string
IgnoreDupesFor []string
SkipDupeCheck bool
SkipDupeAsActual bool
DoubleDupeCheck bool
SourceLookupURL string
DescriptionOverrideRaw string
DescriptionOverrideURL string
DescriptionOverrideGroup string
MetadataOverrides MetadataOverrides
TrackerConfigOverrides TrackerConfigOverrides
TrackerSiteOverrides TrackerSiteOverrides
ClientOverrides ClientOverrides
ImageHostOverrides ImageHostOverrides
ScreenshotOverrides ScreenshotOverrides
TorrentOverrides TorrentOverrides
TrackerIDOverrides map[string]string
ExternalIDOverrides ExternalIDOverrides
ExternalIDSelections map[string]ExternalIDSelection // keyed by source path, value is selected external IDs for that path
ReleaseNameOverrides ReleaseNameOverrides
TrackerQuestionnaireAnswers map[string]map[string]string // keyed by tracker, then questionnaire field key
PlaylistSelections map[string][]string // keyed by source path, value is selected playlist files
PlaylistSelectionsUseAll map[string]bool // keyed by source path, value is use-all flag
ConfirmBDMVRescan bool
}
Request carries one core operation across CLI, Wails, and embedded web. Paths and path-keyed maps use host filesystem source paths as keys.
type Result ¶
type Result struct {
UploadedCount int
}
Result summarizes a completed core upload run.
type RuleFailure ¶
type Screenshot ¶
type ScreenshotError ¶
type ScreenshotImage ¶
type ScreenshotImage struct {
Index int
TimestampSeconds float64
Path string
// Purpose distinguishes preview, normal final, and disc-menu images.
Purpose ScreenshotPurpose
Width int
Height int
SizeBytes int64
// Optional upload information (populated when image has been uploaded)
Host string `json:"Host,omitempty"`
ImgURL string `json:"ImgURL,omitempty"`
RawURL string `json:"RawURL,omitempty"`
WebURL string `json:"WebURL,omitempty"`
UploadedAt time.Time `json:"UploadedAt,omitempty" ts_type:"string"`
}
type ScreenshotLifecycleRepository ¶ added in v0.2.4
type ScreenshotLifecycleRepository interface {
// ReplaceNormalFinalSelections replaces non-menu selections while preserving disc menus.
ReplaceNormalFinalSelections(ctx context.Context, path string, selections []ScreenshotFinalSelection) error
// AppendManualMenuScreenshots atomically appends manual menu records and selections.
AppendManualMenuScreenshots(ctx context.Context, path string, screenshots []Screenshot, selections []ScreenshotFinalSelection) error
// ReplaceDVDMenuScreenshots atomically replaces automatic captures and returns their old local paths.
ReplaceDVDMenuScreenshots(ctx context.Context, path string, screenshots []Screenshot, selections []ScreenshotFinalSelection) ([]string, error)
// DeleteDiscMenuScreenshot atomically removes one manual or automatic menu
// selection and returns the local records needed to compensate the deletion.
DeleteDiscMenuScreenshot(ctx context.Context, path string, imagePath string) (DiscMenuDeleteResult, error)
// RestoreDiscMenuScreenshot atomically restores a result returned by
// DeleteDiscMenuScreenshot for the same source path.
RestoreDiscMenuScreenshot(ctx context.Context, path string, deleted DiscMenuDeleteResult) error
}
ScreenshotLifecycleRepository owns category-aware screenshot mutations that must stay atomic without expanding the general metadata repository contract.
type ScreenshotLinkedImage ¶
type ScreenshotOverrides ¶
type ScreenshotPlan ¶
type ScreenshotPlan struct {
SourcePath string
DiscType string
DurationSeconds float64
FrameRate float64
SuggestedSelections []ScreenshotSelection
ExistingScreenshots []ScreenshotImage
ExistingTrackerScreenshots []ScreenshotImage
FinalSelections []ScreenshotImage
TrackerImageLinks []ScreenshotLinkedImage
PreviewImages []ScreenshotImage
MetadataTimestamp string
RequiresManualFrames bool
}
type ScreenshotPreview ¶
type ScreenshotPurpose ¶
type ScreenshotPurpose string
ScreenshotPurpose classifies an image within preview, final-selection, and disc-menu workflows.
const ( // ScreenshotPurposePreview identifies transient frame previews. ScreenshotPurposePreview ScreenshotPurpose = "preview" // ScreenshotPurposeFinal identifies normal final screenshot selections. ScreenshotPurposeFinal ScreenshotPurpose = "final" // ScreenshotPurposeMenu identifies manual or automatic disc-menu images. ScreenshotPurposeMenu ScreenshotPurpose = "menu" // ScreenshotSelectionSourceMenu identifies manually imported disc-menu selections. ScreenshotSelectionSourceMenu = "menu" // ScreenshotSelectionSourceDVDMenu identifies automatically captured DVD-menu selections. ScreenshotSelectionSourceDVDMenu = "dvd_menu" )
Screenshot purpose and selection-source values shared across persistence and frontend workflows.
type ScreenshotResult ¶
type ScreenshotResult struct {
SourcePath string
Purpose ScreenshotPurpose
Images []ScreenshotImage
Tonemapped bool
UsedLibplacebo bool
Errors []ScreenshotError
}
type ScreenshotSelection ¶
type ScreenshotService ¶
type ScreenshotService interface {
Plan(ctx context.Context, meta PreparedMetadata, count int) (ScreenshotPlan, error)
Capture(ctx context.Context, meta PreparedMetadata, selections []ScreenshotSelection, purpose ScreenshotPurpose) (ScreenshotResult, error)
PreviewFrame(ctx context.Context, meta PreparedMetadata, timestampSeconds float64) (ScreenshotPreview, error)
Delete(ctx context.Context, meta PreparedMetadata, imagePath string) error
SaveFinalSelections(ctx context.Context, meta PreparedMetadata, images []ScreenshotImage) error
}
type ScreenshotSlot ¶
type ScreenshotSlotVariant ¶
type ServiceSet ¶
type ServiceSet struct {
Metadata MetadataService
Trackers TrackerService
Torrents TorrentService
Clients ClientService
Filesystem FilesystemService
Dupes DupeService
Screenshots ScreenshotService
// DVDMenus handles automatic capture and persisted disc-menu lifecycle operations.
DVDMenus DVDMenuService
Images ImageHostingService
}
type TIKOverrides ¶
TIKOverrides carries TIK-specific upload flags selected outside static config.
type TMDBCompany ¶
type TMDBCountry ¶
type TMDBLocalizedData ¶ added in v0.2.0
type TMDBLocalizedData struct {
Title string
Overview string
EpisodeTitle string
EpisodeOverview string
TrailerURL string
Genres string
ContentRating string
Poster string
}
func ExtractLocalizedPTBR ¶ added in v0.2.0
func ExtractLocalizedPTBR(meta PreparedMetadata) TMDBLocalizedData
ExtractLocalizedPTBR returns the pt-BR localized data from the given metadata, or an empty value when none is available.
type TMDBMetadata ¶
type TMDBMetadata struct {
TMDBID int
IMDBID int
TVDBID int
Category string
Title string
OriginalTitle string
Year int
ReleaseDate string
FirstAirDate string
LastAirDate string
OriginCountry []string
OriginalLanguage string
Overview string
Poster string
TMDBPosterPath string
Logo string
TMDBLogo string
Backdrop string
TMDBType string
Runtime int
Genres string
GenreIDs string
Creators []string
Directors []string
Cast []string
MALID int
Anime bool
Demographic string
RetrievedAKA string
Keywords string
// LocalizedTitles maps lowercase language codes and optional regional tags
// such as "de" or "pt-BR" to TMDB translation titles. Nil values marshal as
// an empty JSON object for Wails and embedded-web callers.
LocalizedTitles map[string]string
YouTube string
Certification string
ProductionCompanies []TMDBCompany
ProductionCountries []TMDBCountry
Networks []TMDBNetwork
IMDbMismatch bool
MismatchedIMDbID int
Localized map[string]TMDBLocalizedData
}
TMDBMetadata is the shared TMDB metadata snapshot returned to CLI, Wails, and embedded web callers during upload preparation and review.
func (TMDBMetadata) MarshalJSON ¶ added in v0.2.0
func (m TMDBMetadata) MarshalJSON() ([]byte, error)
MarshalJSON preserves the shared TMDBMetadata shape while emitting LocalizedTitles as an object instead of null.
type TMDBNetwork ¶
type TVDBEpisodeMetadata ¶ added in v0.2.4
type TVDBEpisodeMetadata struct {
ID int
SeasonNumber int
EpisodeNumber int
EpisodeName string
EpisodeNameEnglish string
EpisodeOverview string
EpisodeOverviewEnglish string
// EpisodeAired is the TVDB air date string used in tracker descriptions.
EpisodeAired string
// EpisodeImage is the TVDB episode image URL when the API returned one.
EpisodeImage string
}
TVDBEpisodeMetadata stores one TVDB episode entry for tracker payloads that need single-episode or season-pack episode descriptions.
type TVDBMetadata ¶
type TVDBMetadata struct {
TVDBID int
Name string
NameEnglish string
Overview string
OverviewEnglish string
FirstAired string
Year int
// YearFromAlias reports whether Year is naming-eligible for TV release names.
YearFromAlias bool
// YearSource identifies the TVDB source used for Year, such as first_aired, translation_name, translation_alias, extended_alias, or slug.
YearSource string
// YearConfidence is "high" for explicit TVDB title/alias years and "low" for guarded slug-derived naming years.
YearConfidence string
Type string
Status string
Network string
OriginalCountry string
OriginalLanguage string
HasEnglish bool
Genres string
Poster string
Aliases []string
EpisodeSeason int
EpisodeNumber int
EpisodeName string
EpisodeNameEnglish string
EpisodeOverview string
EpisodeOverviewEnglish string
EpisodeAired string
// EpisodeImage is the selected episode image URL when the API returned one.
EpisodeImage string
// Episodes contains fetched TVDB episode entries, usually the season needed
// by a season-pack upload.
Episodes []TVDBEpisodeMetadata
}
TVDBMetadata stores TVDB series metadata plus the selected episode and any episode list fetched for the selected season.
type TVmazeMetadata ¶
type TVmazeMetadata struct {
TVmazeID int
Name string
Premiered string
Ended string
Summary string
Status string
Type string
Language string
Genres string
Runtime int
AverageRuntime int
Rating float64
Weight int
OfficialSite string
Country string
Network string
NetworkCountry string
NetworkLogo string
WebChannel string
WebCountry string
WebLogo string
Poster string
PosterMedium string
Backdrop string
BackdropMedium string
IMDBID int
TVDBID int
}
type TagOverride ¶
type TorrentMatch ¶
type TorrentOverrides ¶
type TorrentResult ¶
type TorrentService ¶
type TorrentService interface {
Create(ctx context.Context, meta PreparedMetadata) (TorrentResult, error)
}
type TrackerAuthCapability ¶ added in v0.2.1
type TrackerAuthCapability struct {
// TrackerID is the normalized tracker code used in bridge requests.
TrackerID string `json:"trackerID"`
DisplayName string `json:"displayName"`
// AuthKind is a compact capability label such as "cookies", "credential_login", or "api_key_cookies_login".
AuthKind string `json:"authKind"`
SupportsCookieFile bool `json:"supportsCookieFile"`
SupportsLogin bool `json:"supportsLogin"`
SupportsAutoLogin bool `json:"supportsAutoLogin"`
SupportsTOTP bool `json:"supportsTOTP"`
SupportsManual2FA bool `json:"supportsManual2FA"`
RequiresAPIKey bool `json:"requiresAPIKey"`
RequiresPasskey bool `json:"requiresPasskey"`
Notes []string `json:"notes"`
}
TrackerAuthCapability describes the auth operations the UI can offer for one tracker.
type TrackerAuthLoginRequest ¶ added in v0.2.1
type TrackerAuthLoginRequest struct {
// Code is a one-time 2FA code for adapters that accept it during login.
Code string `json:"code"`
}
TrackerAuthLoginRequest carries optional login data for tracker auth flows.
type TrackerAuthStatus ¶ added in v0.2.1
type TrackerAuthStatus struct {
TrackerID string `json:"trackerID"`
DisplayName string `json:"displayName"`
// State is one of the tracker auth state strings returned by the backend, such as "configured", "has_cookies", or "login_required".
State string `json:"state"`
CookieCount int `json:"cookieCount"`
// LastCheckedAt is an RFC3339 UTC timestamp generated when the status is evaluated.
LastCheckedAt string `json:"lastCheckedAt"`
// LastError contains redacted failure detail when a local or remote auth check failed; consumers should display it with Message when distinct.
LastError string `json:"lastError"`
EncryptedStorage bool `json:"encryptedStorage"`
Needs2FA bool `json:"needs2FA"`
// ChallengeID is an opaque manual-2FA continuation token; it is empty unless Needs2FA is true.
ChallengeID string `json:"challengeID"`
// Message contains the stable user-facing status summary or next step.
Message string `json:"message"`
}
TrackerAuthStatus reports the current local tracker auth state after a status, import, login, validation, 2FA, or delete action.
Wails, embedded web, and frontend consumers must expose the same JSON fields so status summaries, remediation messages, and Promise-visible errors stay in parity across GUI entrypoints.
type TrackerBlockReason ¶
type TrackerBlockReason string
const ( TrackerBlockReasonDupe TrackerBlockReason = "dupe" TrackerBlockReasonClaim TrackerBlockReason = "claim" TrackerBlockReasonAudio TrackerBlockReason = "audio" )
type TrackerConfigOverrides ¶
TrackerConfigOverrides supplies optional per-request tracker setting overrides.
type TrackerDryRunDebugSection ¶ added in v0.2.4
type TrackerDryRunDebugSection struct {
Title string
Endpoint string
Payload map[string]string
Files []TrackerDryRunFile
}
TrackerDryRunDebugSection describes one named diagnostic payload inside a dry-run preview. Payload and files use the same redaction and path-display rules as the top-level dry-run entry.
type TrackerDryRunEntry ¶
type TrackerDryRunEntry struct {
Tracker string
Status string
Message string
// Banned reports whether the normalized release group matched this tracker
// during dry-run or review evaluation. It is diagnostic state and does not
// mean the dry-run payload builder was skipped.
Banned bool
// BannedReason explains the matched banned group when Banned is true.
BannedReason string
// BannedCheckError carries a redacted banned-group refresh or cache error
// for dry-run diagnostics when the banned state could not be determined.
BannedCheckError string
ReleaseName string
OriginalReleaseName string
UploadReleaseName string
ReleaseNameChanged bool
ReleaseNameChangeReason string
DescriptionGroup string
Description string
Endpoint string
Payload map[string]string
Files []TrackerDryRunFile
// DebugSections carries optional staged diagnostics for trackers whose dry-run
// preview needs to show more than one request or derived payload.
DebugSections []TrackerDryRunDebugSection
Questionnaire *TrackerQuestionnaire
ImageHost ImageHostFeedback
}
type TrackerDryRunFile ¶
type TrackerDryRunPreview ¶
type TrackerDryRunPreview struct {
SourcePath string
Trackers []TrackerDryRunEntry
}
type TrackerMatch ¶
type TrackerMetadata ¶
type TrackerMetadata struct {
SourcePath string
Tracker string
TrackerID string
InfoHash string
TMDBID int
IMDBID int
TVDBID int
MALID int
// Category is the site-reported movie/TV content category from the tracker
// API. Supported values take precedence over MediaInfoCategory and
// Release.Category when resolving ExternalIDs.Category for upload
// classification; unsupported categories are ignored.
Category Category
Description string
ImageURLs []string
Filename string
Matched bool
UpdatedAt time.Time `ts_type:"string"`
}
type TrackerPreview ¶
type TrackerQuestionnaire ¶
type TrackerQuestionnaire struct {
Tracker string
Fields []TrackerQuestionnaireField
}
type TrackerReview ¶
type TrackerReview struct {
Tracker string
Banned bool
BannedReason string
RuleFailures []RuleFailure
DupeCheck DupeCheckResult
DryRun TrackerDryRunEntry
Questionnaire *TrackerQuestionnaire
}
type TrackerRuleFailure ¶
type TrackerService ¶
type TrackerService interface {
Upload(ctx context.Context, meta PreparedMetadata) (UploadSummary, error)
BuildPreparation(ctx context.Context, meta PreparedMetadata, trackers []string) (PreparationPreview, error)
BuildUploadDryRun(ctx context.Context, meta PreparedMetadata, trackers []string) ([]TrackerDryRunEntry, error)
}
type TrackerSiteOverrides ¶
type TrackerSiteOverrides struct {
TIK TIKOverrides
}
TrackerSiteOverrides groups tracker-specific site override payloads.
type TrackerTimestamp ¶
type UploadImageHostFailure ¶
type UploadImageHostFailure struct {
Host string
UsageScope string
Trackers []string
Message string
}
UploadImageHostFailure describes a single host-level image upload failure returned in UploadImagesResult when one or more target hosts fail. Host is the failed image host name. UsageScope is the upload scope targeted for that host. Trackers lists trackers blocked by this host failure. Message contains the host failure reason.
type UploadImagesResult ¶
type UploadImagesResult struct {
Links []UploadedImageLink
Failures []UploadImageHostFailure
}
UploadImagesResult aggregates image upload outcomes across target hosts. Links contains successfully uploaded image links and is populated when one or more host uploads succeed. Failures contains host-level upload failures and is populated when one or more target hosts fail.
type UploadOptions ¶
type UploadOptions struct {
Debug bool
DryRun bool
RunLogLevel string
Screens int
NoSeed bool
SkipAutoTorrent bool
OnlyID bool
KeepFolder bool
KeepImages bool
// CaptureDVDMenus requests automatic menu capture for DVD inputs before review or upload.
CaptureDVDMenus bool
InteractionMode InteractionMode
}
UploadOptions contains per-run upload and preview behavior flags.
type UploadProgressReporter ¶
type UploadProgressReporter func(update UploadProgressUpdate)
type UploadProgressUpdate ¶
type UploadProgressUpdate struct {
SourcePath string `json:"sourcePath"`
Tracker string `json:"tracker"`
Task string `json:"task"`
Status string `json:"status"`
Message string `json:"message"`
CompletedPieces int `json:"completedPieces"`
TotalPieces int `json:"totalPieces"`
Percent int `json:"percent"`
HashRateMiB float64 `json:"hashRateMiB"`
Timestamp string `json:"timestamp"`
}
type UploadRecord ¶
type UploadReview ¶
type UploadReview struct {
SourcePath string
Trackers []TrackerReview
}
type UploadSummary ¶
type UploadSummary struct {
Uploaded int
UploadedTorrents []UploadedTorrent
}
type UploadedImageLink ¶
Source Files
¶
- application_info.go
- browse_directory.go
- core.go
- description_groups.go
- dupe_progress.go
- dupes.go
- dvd_menu_progress.go
- dvd_menus.go
- history.go
- logger.go
- metadata_errors.go
- metadata_progress.go
- naming.go
- playlists.go
- preview.go
- repository.go
- screenshot_slots.go
- screenshots.go
- services.go
- tracker_auth.go
- upload_progress.go
- uploaded_images.go