feat: unified navigation
fix: install script copying build binary chore: updated readme
This commit is contained in:
@@ -11,7 +11,13 @@ import (
|
||||
|
||||
// Load loads an SRT file from the given path
|
||||
func Load(path string) (*Transcript, error) {
|
||||
subs, err := astisub.OpenFile(path)
|
||||
f, err := os.Open(path)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to open file: %w", err)
|
||||
}
|
||||
defer f.Close()
|
||||
|
||||
subs, err := astisub.ReadFromSRT(f)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to parse SRT file: %w", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user