Documentation
¶
Overview ¶
Package migrate performs read-only PMS discovery and reviewed, idempotent local imports.
Index ¶
- type Item
- type List
- type Options
- type Plan
- type PreviewProgress
- type PreviewStatus
- type Request
- type Service
- func (s *Service) CancelPreview(id string) (PreviewStatus, bool)
- func (s *Service) ExportCSV(ctx context.Context, viewer int64, format, kind string, w io.Writer) error
- func (s *Service) Handler() http.Handler
- func (s *Service) Import(ctx context.Context, id string) (Plan, error)
- func (s *Service) Preview(ctx context.Context, q Request) (Plan, error)
- func (s *Service) PreviewCSV(ctx context.Context, viewer int64, format, kind string, r io.Reader) (Plan, error)
- func (s *Service) PreviewStatus(id string) (PreviewStatus, bool)
- func (s *Service) StartPreview(q Request) (PreviewStatus, error)
- type Viewer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Item ¶
type Item struct {
External string `json:"external"`
Key core.RatingKey `json:"key"`
Title string `json:"title"`
Viewer int64 `json:"viewer"`
Views int `json:"views"`
Offset int64 `json:"offsetMs"`
Duration int64 `json:"durationMs"`
Rating float64 `json:"rating"`
ViewedAt int64 `json:"viewedAt"`
Watchlist bool `json:"watchlist,omitempty"`
}
type PreviewProgress ¶ added in v0.2.49
type PreviewProgress struct {
Phase string `json:"phase"`
Pages int `json:"pages"`
Scanned int `json:"scanned"`
Matched int `json:"matched"`
Unmatched int `json:"unmatched"`
}
PreviewProgress is the counts a running preview exposes while it scans.
type PreviewStatus ¶ added in v0.2.49
type PreviewStatus struct {
ID string `json:"id"`
Status string `json:"status"`
Progress PreviewProgress `json:"progress"`
Error string `json:"error,omitempty"`
Plan *Plan `json:"plan,omitempty"`
}
PreviewStatus is the owner-facing preview job. Plan is set only when Status is done.
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func (*Service) CancelPreview ¶ added in v0.2.49
func (s *Service) CancelPreview(id string) (PreviewStatus, bool)
func (*Service) Handler ¶
Handler is intentionally unauthenticated: mount inside the owner's authenticated router.
func (*Service) PreviewCSV ¶
func (s *Service) PreviewCSV(ctx context.Context, viewer int64, format, kind string, r io.Reader) (Plan, error)
PreviewCSV accepts Letterboxd diary/ratings/watchlist and Trakt CSV columns. Letterboxd's export lacks external IDs, so exact title AND year are required.
func (*Service) PreviewStatus ¶ added in v0.2.49
func (s *Service) PreviewStatus(id string) (PreviewStatus, bool)
func (*Service) StartPreview ¶ added in v0.2.49
func (s *Service) StartPreview(q Request) (PreviewStatus, error)
StartPreview validates the request, then scans PMS on a background context. The POST that starts it returns as soon as the job exists.
Click to show internal directories.
Click to hide internal directories.