Versions in this module Expand all Collapse all v0 v0.3.1 Jan 31, 2025 Changes in this version + func FindExe() (string, error) — darwin/amd64, linux/amd64, windows/amd64 + type Config struct + ExePath string + MinLengthSeconds int64 + ProfilePath string + ReadCacheSizeMB int64 + func (cfg *Config) Validate() error v0.3.0 Jan 28, 2025 v0.2.0 Jan 27, 2025 Changes in this version type Info + func (info Info) GetAttrDefault(id defs.Attr, defaultValue string) string v0.1.2 Jan 25, 2025 v0.1.1 Jan 25, 2025 v0.1.0 Jan 25, 2025 Changes in this version + var ErrNotFound = fmt.Errorf("not found") + var ErrUnhandledLine = fmt.Errorf("unhandled line") + func Maximums[S []E, E any, V constraints.Ordered](s S, f func(E) (V, error)) S + func ParseDuration(s string) (time.Duration, error) + func ParseLines(r io.Reader) iter.Seq2[Line, error] + type CurrentProgressLine struct + func ParseCurrentProgressLine(s string) (*CurrentProgressLine, error) + func (l *CurrentProgressLine) Kind() LineKind + type Disc struct + Titles []*Title + func (d *Disc) TitleCount() int + func (d *Disc) TitlesWithAngle(targetAngle int) []*Title + func (d *Disc) TitlesWithLongestDuration() []*Title + func (d *Disc) TitlesWithMostChapters() []*Title + func (d *Disc) TitlesWithMostStreams() []*Title + type DiscInfoLine struct + func ParseDiscInfoLine(s string) (*DiscInfoLine, error) + func (l *DiscInfoLine) Kind() LineKind + type DriveScanLine struct + DiscTitle string + DriveName string + Field1 int + Field2 int + Field3 int + Index int + VolumeName string + func ParseDriveScanLine(s string) (*DriveScanLine, error) + func (l *DriveScanLine) Kind() LineKind + type Info []*InfoLine + func (info Info) GetAttr(id defs.Attr) (string, error) + func (info Info) GetAttrDuration(id defs.Attr) (time.Duration, error) + func (info Info) GetAttrInt(id defs.Attr) (int, error) + type InfoLine struct + Code int + ID defs.Attr + Value string + func (l *InfoLine) String() string + type Line interface + Kind func() LineKind + func ParseLine(s string) (Line, error) + type LineIterator struct + Seq iter.Seq2[Line, error] + func (li *LineIterator[T]) GetResult() (T, error) + type LineKind int + const LineKindCurrentProgress + const LineKindDiscInfo + const LineKindDriveScan + const LineKindMessage + const LineKindProgressBar + const LineKindStreamInfo + const LineKindTitleCount + const LineKindTitleInfo + const LineKindTotalProgress + const LineKindUnknown + type MakeMKVCon struct + func New(cfg *MakeMKVConConfig) (*MakeMKVCon, error) + func (c *MakeMKVCon) BackupTitle(ctx context.Context, driveIndex, titleIndex int, dstDir string) (iter.Seq2[Line, error], error) + func (c *MakeMKVCon) ListDrives(ctx context.Context) (*LineIterator[[]*DriveScanLine], error) + func (c *MakeMKVCon) ScanDrive(ctx context.Context, driveIndex int) (*LineIterator[*Disc], error) + type MakeMKVConConfig struct + ExePath string + MinLengthSeconds int64 + ProfilePath string + ReadCacheSizeMB int64 + func (cfg *MakeMKVConConfig) Validate() error + type MessageLine struct + Code int + Flags int + Format string + Message string + NumParams int + Params []string + func ParseMessageLine(s string) (*MessageLine, error) + func (l *MessageLine) Kind() LineKind + type ProgressBarLine struct + Current int + Max int + Total int + func ParseProgressBarLine(s string) (*ProgressBarLine, error) + func (l *ProgressBarLine) CurrentProgress() float64 + func (l *ProgressBarLine) Kind() LineKind + func (l *ProgressBarLine) TotalProgress() float64 + type Stream struct + Index int + type StreamInfoLine struct + StreamIndex int + TitleIndex int + func ParseStreamInfoLine(s string) (*StreamInfoLine, error) + func (l *StreamInfoLine) Kind() LineKind + type Title struct + Index int + Streams []*Stream + type TitleCountLine struct + Count int + func ParseTitleCountLine(s string) (*TitleCountLine, error) + func (l *TitleCountLine) Kind() LineKind + type TitleInfoLine struct + TitleIndex int + func ParseTitleInfoLine(s string) (*TitleInfoLine, error) + func (l *TitleInfoLine) Kind() LineKind + type TotalProgressLine struct + func ParseTotalProgressLine(s string) (*TotalProgressLine, error) + func (l *TotalProgressLine) Kind() LineKind