Add command line M3U exporter. Closes #1914

This commit is contained in:
Deluan 2022-12-21 14:37:08 -05:00
parent 5d8318f7b3
commit 28389fb05e
12 changed files with 188 additions and 63 deletions

View file

@ -5,6 +5,7 @@ import (
"errors"
"fmt"
"net/http"
"os"
"runtime"
"sort"
"strings"
@ -40,7 +41,7 @@ var redacted = &Hook{
}
const (
LevelCritical = Level(logrus.FatalLevel)
LevelCritical = Level(logrus.FatalLevel) // TODO Rename to LevelFatal
LevelError = Level(logrus.ErrorLevel)
LevelWarn = Level(logrus.WarnLevel)
LevelInfo = Level(logrus.InfoLevel)
@ -145,6 +146,11 @@ func CurrentLevel() Level {
return currentLevel
}
func Fatal(args ...interface{}) {
log(LevelCritical, args...)
os.Exit(1)
}
func Error(args ...interface{}) {
log(LevelError, args...)
}