Documentation
¶
Index ¶
- Constants
- Variables
- func Exec(mkv *MakeMKV, hb *HandBrakeCLI, discIds []int) error
- func GetHandBrakeCLIExecutable() (string, error)
- func GetMakeMKVExecutable() (string, error)
- func NewDiscError(discId int, msg string) error
- func PrintLogo()
- func ReadConfig() (*handyMKVConfig, error)
- func Setup(hb *HandBrakeCLI) error
- type DiscError
- type DiscInfo
- type EncodingParams
- type ExternalProcessError
- type HandBrakeCLI
- type HandBrakePreset
- type HandBrakePresetFile
- type MakeMKV
- type TitleInfo
Constants ¶
View Source
const ( System configFileLocation = iota User WorkingDirectory )
View Source
const ( Pending statusValue = iota InProgress Complete )
Variables ¶
View Source
var ErrConfigNotFound = errors.New("config file not found")
View Source
var ErrInvalidInput = errors.New("invalid input")
View Source
var ErrTitlesDiscRead = errors.New("cannot read titles from disc")
Functions ¶
func Exec ¶
func Exec(mkv *MakeMKV, hb *HandBrakeCLI, discIds []int) error
Executes the main functionality of the program. Reads the configuration file, reads titles from the disc, prompts the user for which titles they want to rip, and processes the selected titles.
func GetMakeMKVExecutable ¶
func NewDiscError ¶
func ReadConfig ¶
func ReadConfig() (*handyMKVConfig, error)
Reads the config file and returns a config struct.
Types ¶
type EncodingParams ¶
type EncodingParams struct {
TitleIndex int `json:"-"`
DiscId int `json:"-"`
MKVOutputPath string `json:"-"`
HandBrakeOutputPath string `json:"-"`
Encoder string `json:"encoder,omitempty"`
EncoderPreset string `json:"encoder_preset,omitempty"`
Quality int `json:"quality,omitempty"`
SubtitleLanguages []string `json:"subtitle_languages,omitempty"`
IncludeAllRelevantSubtitles bool `json:"include_all_relevant_subtitles,omitempty"`
AudioLanguages []string `json:"audio_languages,omitempty"`
IncludeAllRelevantAudio bool `json:"include_all_relevant_audio,omitempty"`
OutputFileFormat string `json:"output_file_format,omitempty"`
Preset string `json:"handbrake_preset,omitempty"`
PresetFile string `json:"preset_file,omitempty"`
}
type ExternalProcessError ¶
func NewExternalProcessError ¶
func NewExternalProcessError(err error, output string) *ExternalProcessError
func (*ExternalProcessError) Error ¶
func (e *ExternalProcessError) Error() string
type HandBrakeCLI ¶
type HandBrakeCLI struct {
// contains filtered or unexported fields
}
func NewHandBrakeCLI ¶
func NewHandBrakeCLI(executable string) *HandBrakeCLI
type HandBrakePreset ¶
type HandBrakePresetFile ¶
type HandBrakePresetFile struct {
PresetList []HandBrakePreset `json:"PresetList"`
}
type TitleInfo ¶
type TitleInfo struct {
// Index on disc
Index int
DiscTitle string
DiscId int
Chapters int
Length string
FileSize string
FileName string
// contains filtered or unexported fields
}
2 - Disc Title 8 - Number of chapters in file 9 - Length of file in seconds 10 - File size (GB) 11 - File size (Bytes) 27 - File name 28 - Audio Short Code 29 - Audio Long Code
func (*TitleInfo) GetEncodingFileName ¶
func (*TitleInfo) SetPrependDiscToSubdirectory ¶
func (*TitleInfo) Subdirectory ¶
Click to show internal directories.
Click to hide internal directories.