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 ParseLogLevel(value string) (string, error)
- func SetApplicationBuild(version string, buildIdentifier string)
- 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 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 DescriptionBuilderGroup
- type DescriptionBuilderPreview
- type DescriptionImageHostStatus
- type DescriptionOverride
- 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 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 TVDBMetadata
- type TVmazeMetadata
- type TagOverride
- type TorrentMatch
- type TorrentOverrides
- type TorrentResult
- type TorrentService
- type TrackerBlockReason
- type TrackerConfigOverrides
- 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 ParseLogLevel ¶
func SetApplicationBuild ¶
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 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"`
}
func CurrentApplicationInfo ¶
func CurrentApplicationInfo() ApplicationInfo
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
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 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 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 ¶
type ExternalIDOverrides ¶
type ExternalIDSelection ¶
ExternalIDSelection records the external metadata IDs chosen for one source path.
type ExternalIDs ¶
type ExternalMetadata ¶
type ExternalMetadata struct {
SourcePath string
TMDB *TMDBMetadata
IMDB *IMDBMetadata
TVDB *TVDBMetadata
TVmaze *TVmazeMetadata
Bluray *BlurayMetadata
UpdatedAt time.Time `ts_type:"string"`
}
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
}
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
}
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)
}
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
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
}
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
}
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
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 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
const ( ScreenshotPurposePreview ScreenshotPurpose = "preview" ScreenshotPurposeFinal ScreenshotPurpose = "final" ScreenshotPurposeMenu ScreenshotPurpose = "menu" )
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
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 TVDBMetadata ¶
type TVDBMetadata struct {
TVDBID int
Name string
NameEnglish string
Overview string
OverviewEnglish string
FirstAired string
Year int
YearFromAlias bool
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
}
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 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 TrackerDryRunEntry ¶
type TrackerDryRunEntry struct {
Tracker string
Status string
Message string
ReleaseName string
OriginalReleaseName string
UploadReleaseName string
ReleaseNameChanged bool
ReleaseNameChangeReason string
DescriptionGroup string
Description string
Endpoint string
Payload map[string]string
Files []TrackerDryRunFile
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
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
}