From 320c736adaa6374fb0ac9988a64cbb1bd143425b Mon Sep 17 00:00:00 2001 From: tdro Date: Tue, 11 Oct 2022 22:55:52 -0400 Subject: themes/default/layouts/partials/video-container: Don't leak into source URL --- themes/default/layouts/partials/video-container.html | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/default/layouts/partials/video-container.html b/themes/default/layouts/partials/video-container.html index cf5c20e..488d4ec 100644 --- a/themes/default/layouts/partials/video-container.html +++ b/themes/default/layouts/partials/video-container.html @@ -1,12 +1,16 @@ {{- $cache := "" -}} +{{- $timestamp := "" -}} {{- $caption := .Caption -}} {{- $public := print "public/" .Source -}} -{{- $timestamp := print "#t=" .Start "," .End -}} {{- $immutable := print (.RelURL | humanize | urlize) "-" (.Source | sha256 | truncate 8 "") -}} {{- $extension := path.Ext .Source -}} {{- $fileCache := print $.Author "/media/" $immutable $extension -}} {{- $notCached := not (fileExists (path.Join "public/" $fileCache)) -}} +{{- if and .Start .End -}} + {{- $timestamp = print "#t=" .Start "," .End -}} +{{- end -}} + {{- if $notCached -}} {{- with $remote := resources.GetRemote .Source -}} {{- with .Err -}} -- cgit v1.2.3