aboutsummaryrefslogtreecommitdiff
path: root/pkg/components/media
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/components/media')
-rw-r--r--pkg/components/media/model.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/components/media/model.go b/pkg/components/media/model.go
index 0e17e92..1962a23 100644
--- a/pkg/components/media/model.go
+++ b/pkg/components/media/model.go
@@ -2,6 +2,7 @@ package media
import (
"context"
+ "strings"
"time"
)
@@ -57,3 +58,7 @@ type (
CreateEXIF(context.Context, uint, *MediaEXIF) error
}
)
+
+func (m *Media) IsVideo() bool {
+ return strings.HasPrefix(m.MIMEType, "video")
+}