remove unnecessary fs wrapper
This commit is contained in:
parent
7e942b0c63
commit
5c32d1c991
@ -273,9 +273,8 @@ func (i *FileInfo) detectSubtitles() {
|
|||||||
|
|
||||||
// detect multiple languages. Base*.vtt
|
// detect multiple languages. Base*.vtt
|
||||||
// TODO: give subtitles descriptive names (lang) and track attributes
|
// TODO: give subtitles descriptive names (lang) and track attributes
|
||||||
afs := &afero.Afero{Fs: i.Fs}
|
|
||||||
parentDir := strings.TrimRight(i.Path, i.Name)
|
parentDir := strings.TrimRight(i.Path, i.Name)
|
||||||
dir, err := afs.ReadDir(parentDir)
|
dir, err := afero.ReadDir(i.Fs, parentDir)
|
||||||
if err == nil {
|
if err == nil {
|
||||||
base := strings.TrimSuffix(i.Name, ext)
|
base := strings.TrimSuffix(i.Name, ext)
|
||||||
for _, f := range dir {
|
for _, f := range dir {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user