Skip to content

Commit

Permalink
feature: wmv streaming default support
Browse files Browse the repository at this point in the history
  • Loading branch information
alxarno committed Dec 3, 2024
1 parent 2cba4e6 commit 36d0dd5
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ The latest version of the TinyTune can be found on the GitHub [releases page](ht
# check that you have ffmpeg installed
ffmpeg -v
wget https://github.com/alxarno/tinytune/releases/download/v1.2.2/tinytune_linux_amd64
wget https://github.com/alxarno/tinytune/releases/download/v1.2.3/tinytune_linux_amd64
mv tinytune_linux_amd64 /usr/local/bin/tinytune
Expand Down
2 changes: 1 addition & 1 deletion internal/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ func DefaultRawConfig() RawConfig {
MaxImages: -1,
MaxVideos: -1,
MaxFileSize: "-1B",
Streaming: "\\.(flv|f4v|avi)$",
Streaming: "\\.(flv|f4v|avi|wmv)$",
MediaTimeout: "2m",
}
}
Expand Down
3 changes: 2 additions & 1 deletion internal/excluded.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ package internal
import (
"errors"
"regexp"
"strings"

"github.com/alxarno/tinytune/pkg/index"
)
Expand Down Expand Up @@ -45,7 +46,7 @@ func filter(items []index.FileMeta, filterFunc func(index.FileMeta) bool) map[st
func filterHandler(patterns []*regexp.Regexp) func(index.FileMeta) bool {
return func(file index.FileMeta) bool {
for _, p := range patterns {
if p.MatchString(file.Path()) {
if p.MatchString(strings.ToLower(file.Path())) {
return true
}
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/index/meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func (m *Meta) setContentType() {

m.Type = ContentTypeOther
//nolint:lll
videoFormats := []string{"3gp", "avi", "f4v", "flv", "hevc", "m4v", "mlv", "mov", "mp4", "m4a", "3g2", "mj2", "mpeg", "ogv", "webm"}
videoFormats := []string{"3gp", "avi", "f4v", "flv", "hevc", "m4v", "mlv", "mov", "mp4", "m4a", "3g2", "mj2", "mpeg", "ogv", "webm", "wmv"}
imageFormats := []string{"jpeg", "png", "jpg", "webp", "bmp", "gif"}

ext := strings.ToLower(filepath.Ext(string(m.AbsolutePath)))[1:]
Expand Down

0 comments on commit 36d0dd5

Please sign in to comment.