feat: add cmd flags
This commit is contained in:
@@ -3,6 +3,7 @@ package utility
|
||||
import (
|
||||
"log/slog"
|
||||
"os"
|
||||
"slices"
|
||||
"strings"
|
||||
)
|
||||
|
||||
@@ -15,20 +16,18 @@ func RemoveFile(p string) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
func CategorizeMediaType(ext string) (MediaType, bool) {
|
||||
func CategorizeMediaType(ext string) MediaType {
|
||||
// Lets categorize
|
||||
|
||||
/*
|
||||
switch ext {
|
||||
case slices.Contains(videoFormats, ext):
|
||||
return Video, true
|
||||
case slices.Contains(presentationFormats, ext):
|
||||
return Presentation, true
|
||||
default:
|
||||
slog.Debug("marking file as invalid due to its undefined extension")
|
||||
return "", false
|
||||
}
|
||||
*/
|
||||
if slices.Contains(videoFormats, ext) {
|
||||
return Video
|
||||
}
|
||||
|
||||
if slices.Contains(presentationFormats, ext) {
|
||||
return Presentation
|
||||
}
|
||||
|
||||
return Unspecified
|
||||
}
|
||||
|
||||
func ParseSlogLevel(s string) slog.Level {
|
||||
|
||||
Reference in New Issue
Block a user