Skip to content

Commit

Permalink
Allow generating previews for .mp3 files
Browse files Browse the repository at this point in the history
  • Loading branch information
KillerX committed Jul 26, 2024
1 parent d3bace6 commit 498ab6e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions workflows/misc/transcode_preview-vx.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package miscworkflows

import (
"fmt"
"github.com/samber/lo"
"path/filepath"
"strings"
"time"
Expand Down Expand Up @@ -53,9 +54,8 @@ func TranscodePreviewVX(
return err
}

switch strings.ToLower(filepath.Ext(shapes.FilePath.Path)) {
case ".mxf", ".mov", ".mp4", ".wav", ".mpg", ".aif":
default:
allowedExtensions := []string{".mxf", ".mov", ".mp4", ".wav", ".mpg", ".aif", ".mp3"}
if lo.Contains(allowedExtensions, strings.ToLower(filepath.Ext(shapes.FilePath.Path))) {
return fmt.Errorf("unsupported file extension: %s", filepath.Ext(shapes.FilePath.Path))
}

Expand Down

0 comments on commit 498ab6e

Please sign in to comment.