From 326d128bd1cafc0a7888dcd27b374ee9d0fa7f26 Mon Sep 17 00:00:00 2001 From: milarin Date: Sat, 14 Jan 2023 11:07:15 +0100 Subject: [PATCH] remove unused file --- file_properties.go | 65 ---------------------------------------------- 1 file changed, 65 deletions(-) delete mode 100644 file_properties.go diff --git a/file_properties.go b/file_properties.go deleted file mode 100644 index 5fcac23..0000000 --- a/file_properties.go +++ /dev/null @@ -1,65 +0,0 @@ -package main - -// type FileProperties struct { -// Filepath string -// Languages []string -// Subtitles []string -// Resolution model.Resolution -// } - -// var _ model.PropertyHolder = &FileProperties{} - -// // TODO cache -// func AnalyzeFile(path string) (*FileProperties, error) { -// props := &FileProperties{Filepath: path} - -// file, err := os.Open(path) -// if err != nil { -// return nil, err -// } -// defer file.Close() - -// data, err := ffprobe.ProbeReader(context.Background(), file) -// if err != nil { -// return nil, err -// } - -// defaultVideoLang := "" -// for _, s := range data.StreamType(ffprobe.StreamVideo) { -// if s.Disposition.Default > 0 { -// props.Resolution = model.Resolution(s.Height) -// defaultVideoLang = parsers.ParseLanguage(s.Tags.Language) -// break -// } -// } - -// for _, s := range data.StreamType(ffprobe.StreamAudio) { -// if s.Tags.Language != "" { -// props.Languages = append(props.Languages, parsers.ParseLanguage(s.Tags.Language)) -// } else if s.Disposition.Default > 0 { -// props.Languages = append(props.Languages, defaultVideoLang) -// } -// } - -// for _, s := range data.StreamType(ffprobe.StreamSubtitle) { -// if s.Tags.Language != "" { -// props.Subtitles = append(props.Subtitles, parsers.ParseLanguage(s.Tags.Language)) -// } else if s.Disposition.Default > 0 { -// props.Subtitles = append(props.Subtitles, defaultVideoLang) -// } -// } - -// return props, nil -// } - -// func (fp *FileProperties) GetLanguages() []string { -// return fp.Languages -// } - -// func (fp *FileProperties) GetSubtitles() []string { -// return fp.Subtitles -// } - -// func (fp *FileProperties) GetResolution() model.Resolution { -// return fp.Resolution -// }