diff options
Diffstat (limited to 'ui')
-rw-r--r-- | ui/commands.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ui/commands.go b/ui/commands.go index 3636c5b..59bfe6f 100644 --- a/ui/commands.go +++ b/ui/commands.go @@ -467,7 +467,9 @@ func fileGetContentType(filePath string) (string, error) { return "", err } - if len(buffer) >= 3 && (buffer[0] == 0xFF && (buffer[1] == 0xFB || buffer[1] == 0xF3 || buffer[1] == 0xF2)) || string(buffer[0:3]) == "ID3" { + if len(buffer) >= 3 && buffer[0] == 0xFF && (buffer[1] == 0xFB || buffer[1] == 0xF3 || buffer[1] == 0xF2) { + return "audio/mpeg", nil + } else if len(buffer) >= 3 && string(buffer[0:3]) == "ID3" { return "audio/mpeg", nil } |