diff options
Diffstat (limited to 'modules/base/tool.go')
-rw-r--r-- | modules/base/tool.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/base/tool.go b/modules/base/tool.go index 5b79a844ab..b069e5faee 100644 --- a/modules/base/tool.go +++ b/modules/base/tool.go @@ -576,6 +576,11 @@ func IsVideoFile(data []byte) bool { return strings.Index(http.DetectContentType(data), "video/") != -1 } +// IsAudioFile detects if data is an video format +func IsAudioFile(data []byte) bool { + return strings.Index(http.DetectContentType(data), "audio/") != -1 +} + // EntryIcon returns the octicon class for displaying files/directories func EntryIcon(entry *git.TreeEntry) string { switch { |