From 58d6d23967b54a77543fa5a0eee72292b854031d Mon Sep 17 00:00:00 2001 From: Krassimir Valev Date: Sun, 14 Feb 2021 19:25:52 +0100 Subject: [PATCH] Support .mts and .mpo files (#1029) --- pkg/fs/filetype.go | 4 ++++ pkg/fs/mediatype.go | 2 ++ 2 files changed, 6 insertions(+) diff --git a/pkg/fs/filetype.go b/pkg/fs/filetype.go index 9411f7bbb..9aff06324 100644 --- a/pkg/fs/filetype.go +++ b/pkg/fs/filetype.go @@ -22,6 +22,7 @@ const ( FormatHEVC FileFormat = "hevc" FormatMov FileFormat = "mov" // Video files. FormatMp4 FileFormat = "mp4" + FormatMpo FileFormat = "mpo" FormatAvc FileFormat = "avc" FormatAvi FileFormat = "avi" Format3gp FileFormat = "3gp" @@ -29,6 +30,7 @@ const ( FormatFlv FileFormat = "flv" FormatMkv FileFormat = "mkv" FormatMpg FileFormat = "mpg" + FormatMts FileFormat = "mts" FormatOgv FileFormat = "ogv" FormatWebm FileFormat = "webm" FormatWMV FileFormat = "wmv" @@ -77,6 +79,8 @@ var FileExt = FileExtensions{ ".mkv": FormatMkv, ".mpg": FormatMpg, ".mpeg": FormatMpg, + ".mpo": FormatMpo, + ".mts": FormatMts, ".ogv": FormatOgv, ".webm": FormatWebm, ".wmv": FormatWMV, diff --git a/pkg/fs/mediatype.go b/pkg/fs/mediatype.go index 355ab3101..99b73411a 100644 --- a/pkg/fs/mediatype.go +++ b/pkg/fs/mediatype.go @@ -18,6 +18,7 @@ var MediaTypes = map[FileFormat]MediaType{ FormatTiff: MediaImage, FormatBitmap: MediaImage, FormatHEIF: MediaImage, + FormatMpo: MediaImage, FormatAvi: MediaVideo, FormatHEVC: MediaVideo, FormatAvc: MediaVideo, @@ -28,6 +29,7 @@ var MediaTypes = map[FileFormat]MediaType{ FormatFlv: MediaVideo, FormatMkv: MediaVideo, FormatMpg: MediaVideo, + FormatMts: MediaVideo, FormatOgv: MediaVideo, FormatWebm: MediaVideo, FormatWMV: MediaVideo,