core

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: GPL-2.0 Imports: 36 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Core

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

func New

func New(deps api.CoreDependencies) (*Core, error)

func NewWithContext

func NewWithContext(ctx context.Context, deps api.CoreDependencies) (*Core, error)

func (*Core) BuildUploadReview

func (c *Core) BuildUploadReview(ctx context.Context, req api.Request) (api.UploadReview, error)

BuildUploadReview returns dupe, rule, dry-run, and banned-group review data for one prepared source path, committing GUI cache updates only after review work succeeds. Partial GUI reviews preserve unreviewed tracker cache state and can commit from a request-refreshed cache entry only when that entry matches the current request.

func (*Core) CheckDupes

func (c *Core) CheckDupes(ctx context.Context, req api.Request) (api.DupeCheckSummary, error)

func (*Core) Close

func (c *Core) Close() error

func (*Core) DeleteAllHistoryReleases

func (c *Core) DeleteAllHistoryReleases(ctx context.Context) (int, error)

func (*Core) DeleteHistoryRelease

func (c *Core) DeleteHistoryRelease(ctx context.Context, sourcePath string) error

func (*Core) DeleteScreenshot

func (c *Core) DeleteScreenshot(ctx context.Context, req api.Request, imagePath string) error

func (*Core) DeleteTrackerImageURL

func (c *Core) DeleteTrackerImageURL(ctx context.Context, req api.Request, url string) error

func (*Core) DeleteUploadedImage

func (c *Core) DeleteUploadedImage(ctx context.Context, req api.Request, imagePath string, host string) error

func (*Core) DiscoverPlaylists

func (c *Core) DiscoverPlaylists(ctx context.Context, sourcePath string) ([]api.PlaylistInfo, error)

func (*Core) ExportGUICachedPreparedMeta

func (c *Core) ExportGUICachedPreparedMeta(ctx context.Context, req api.Request) (api.PreparedMetadata, bool, error)

ExportGUICachedPreparedMeta exposes the resolved GUI prepared metadata cache entry so callers can hand off metadata to isolated per-run cores.

func (*Core) FetchDescriptionBuilderGroupPreview

func (c *Core) FetchDescriptionBuilderGroupPreview(ctx context.Context, req api.Request) (api.DescriptionBuilderGroup, error)

FetchDescriptionBuilderGroupPreview rebuilds one description group from cached or freshly prepared metadata. Request trackers limit the rebuild to the selected set while tracker removals still suppress removed selections.

func (*Core) FetchDescriptionBuilderPreview

func (c *Core) FetchDescriptionBuilderPreview(ctx context.Context, req api.Request) (api.DescriptionBuilderPreview, error)

FetchDescriptionBuilderPreview builds editable description groups from cached or freshly prepared metadata. When request trackers are provided, only that selected set contributes groups; selections that resolve empty return an empty preview instead of falling back to configured defaults.

func (*Core) FetchMetadataPreview

func (c *Core) FetchMetadataPreview(ctx context.Context, req api.Request) (api.MetadataPreview, error)

FetchMetadataPreview prepares and enriches metadata for one validated source path, emits metadata progress, and stores the refreshed prepared metadata cache entry. An empty tracker request is not an explicit "no trackers" request; downstream tracker resolution can still use configured defaults.

func (*Core) FetchPreparationPreview

func (c *Core) FetchPreparationPreview(ctx context.Context, req api.Request) (api.PreparationPreview, error)

FetchPreparationPreview builds the tracker preparation preview for one validated source path. Explicit tracker selections limit preparation to those trackers; selections that resolve empty return an empty preview.

func (*Core) FetchScreenshotPlan

func (c *Core) FetchScreenshotPlan(ctx context.Context, req api.Request) (api.ScreenshotPlan, error)

func (*Core) FetchTrackerDryRunPreview

func (c *Core) FetchTrackerDryRunPreview(ctx context.Context, req api.Request) (api.TrackerDryRunPreview, error)

FetchTrackerDryRunPreview builds per-tracker dry-run upload entries from cached prepared metadata, creating torrents and cache state only after selected trackers resolve.

func (*Core) GenerateScreenshots

func (c *Core) GenerateScreenshots(ctx context.Context, req api.Request, selections []api.ScreenshotSelection, purpose api.ScreenshotPurpose) (api.ScreenshotResult, error)

func (*Core) GetHistoryOverview

func (c *Core) GetHistoryOverview(ctx context.Context, sourcePath string) (api.HistoryOverview, error)

func (*Core) ImportMenuImages

func (c *Core) ImportMenuImages(ctx context.Context, req api.Request, importPaths []string) error

func (*Core) ImportPreparedMetadataForGUI

func (c *Core) ImportPreparedMetadataForGUI(ctx context.Context, req api.Request, meta api.PreparedMetadata) error

ImportPreparedMetadataForGUI stores prepared metadata on a per-run core so GUI dry-run and upload-only flows can reuse metadata prepared on the long-lived GUI core.

func (*Core) ListHistory

func (c *Core) ListHistory(ctx context.Context) ([]api.HistoryEntry, error)

func (*Core) ListUploadCandidates

func (c *Core) ListUploadCandidates(ctx context.Context, req api.Request) ([]api.ScreenshotImage, error)

func (*Core) ListUploadedImages

func (c *Core) ListUploadedImages(ctx context.Context, req api.Request) ([]api.UploadedImageLink, error)

func (*Core) LoadPlaylistSelection

func (c *Core) LoadPlaylistSelection(ctx context.Context, sourcePath string) (api.PlaylistSelection, error)

func (*Core) PreviewScreenshotFrame

func (c *Core) PreviewScreenshotFrame(ctx context.Context, req api.Request, timestampSeconds float64) (api.ScreenshotPreview, error)

func (*Core) RenderDescription

func (c *Core) RenderDescription(ctx context.Context, raw string) (string, error)

func (*Core) RunUpload

func (c *Core) RunUpload(ctx context.Context, req api.Request) (api.Result, error)

func (*Core) RunUploadPrepared

func (c *Core) RunUploadPrepared(ctx context.Context, req api.Request) (api.Result, error)

RunUploadPrepared uploads from cached prepared metadata for each requested path. Explicit tracker selections that resolve empty return without tracker upload side effects, while omitted tracker selections retain configured default behavior. If a later path fails or the context is canceled after earlier uploads complete, the returned result preserves the uploaded count accumulated before the error.

func (*Core) SaveDescriptionOverride

func (c *Core) SaveDescriptionOverride(ctx context.Context, req api.Request, raw string) (api.DescriptionBuilderGroup, error)

func (*Core) SaveFinalScreenshotSelections

func (c *Core) SaveFinalScreenshotSelections(ctx context.Context, req api.Request, images []api.ScreenshotImage) error

func (*Core) SavePlaylistSelection

func (c *Core) SavePlaylistSelection(ctx context.Context, sourcePath string, playlists []string, useAll bool) error

func (*Core) SelectBlurayCandidate

func (c *Core) SelectBlurayCandidate(ctx context.Context, sourcePath string, releaseID string) (api.MetadataPreview, error)

func (*Core) UploadImages

func (c *Core) UploadImages(ctx context.Context, req api.Request, host string, images []api.ScreenshotImage) (api.UploadImagesResult, error)

Jump to

Keyboard shortcuts

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