From 4bd5ed6ccc008604fa34cc6bcb790b247754637a Mon Sep 17 00:00:00 2001 From: Roy Olav Purser Date: Thu, 18 Nov 2021 21:26:37 +0100 Subject: [PATCH] force seafile content-type --- backend/stream_providers.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/backend/stream_providers.py b/backend/stream_providers.py index 7a74cf8..fb7e689 100755 --- a/backend/stream_providers.py +++ b/backend/stream_providers.py @@ -235,7 +235,9 @@ class SeafileRunner(StreamProvider): self.logger.info("%s <%s>", e, self.upstream) else: stream_data["title"] = json_data.get("filePath") - stream_data["upstream"] = json_data.get("rawPath") + stream_data["upstream"] = json_data.get("rawPath") + if json_data.get("filePath").lower().endswith(".mp4"): + stream_data["ctype"] = "video/mp4" return StreamData(**stream_data) class MetaProvider(StreamProvider):