importer

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2026 License: MIT Imports: 22 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package importer moves completed downloads into the library directory tree, creates movie_file records, and updates movie status.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

Service subscribes to TypeDownloadDone events and imports completed files into the library directory tree.

func NewService

func NewService(q dbgen.Querier, bus *events.Bus, logger *slog.Logger, mm *mediamanagement.Service, dh *downloadhandling.Service, mediaSvc *mediainfo.Service, sqlDB ...*sql.DB) *Service

NewService creates a new Service.

func (*Service) ImportFromHaulRecord

func (s *Service) ImportFromHaulRecord(ctx context.Context, movieID, contentPath string) error

ImportFromHaulRecord runs the import pipeline against a Haul history record without requiring a pre-existing Prism grab_history row. Used by the "import from Haul" flow on the movie detail page and the Activity-page "downloaded but not in library" rail — surfaces files Haul has but Prism's library doesn't know about (because the original grab record was lost, the torrent was added directly in Haul, or the file pre-dates the importer).

movieID is the target movie in Prism's DB; contentPath is the absolute path Haul reports as save_path/name. Quality + edition are zero-valued (importer derives what it can from filename when the grab is empty).

func (*Service) Subscribe

func (s *Service) Subscribe()

Subscribe registers the importer handler on the event bus. Call this once during application startup.

Jump to

Keyboard shortcuts

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