Show taglib and ffmpeg versions in the log

This commit is contained in:
Deluan
2024-02-17 12:06:01 -05:00
committed by Deluan Quintão
parent effd588406
commit b67d1c0830
9 changed files with 51 additions and 0 deletions
+7
View File
@@ -22,6 +22,7 @@ import (
type Extractor interface {
Parse(files ...string) (map[string]ParsedTags, error)
CustomMappings() ParsedTags
Version() string
}
var extractors = map[string]Extractor{}
@@ -30,6 +31,12 @@ func RegisterExtractor(id string, parser Extractor) {
extractors[id] = parser
}
func LogExtractors() {
for id, p := range extractors {
log.Debug("Registered metadata extractor", "id", id, "version", p.Version())
}
}
func Extract(files ...string) (map[string]Tags, error) {
p, ok := extractors[conf.Server.Scanner.Extractor]
if !ok {