commit 7110d901688a30fa03fbacdf9a87a1feaff60fc2
parent b890c1ac452b1c84249bfe47bd6d2b1f0462a2d8
Author: rbckman <rob@tarina.org>
Date: Mon, 7 Apr 2025 19:10:58 +0300
non cacheable
Diffstat:
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/srv/gonzopiserver.py b/srv/gonzopiserver.py
@@ -372,7 +372,8 @@ class films:
class player:
def GET(self, film):
i=web.input(scene=None,shot=None,take=None)
- return render.player(filmfolder,film,i.scene,i.shot,i.take,str)
+ randhash = hashlib.md5(str(random.getrandbits(256)).encode('utf-8')).hexdigest()
+ return render.player(filmfolder,film,i.scene,i.shot,i.take,str,randhash)
class api:
def GET(self):
diff --git a/srv/templates/player.html b/srv/templates/player.html
@@ -1,4 +1,4 @@
-$def with (filmfolder,film,scene,shot,take,str)
+$def with (filmfolder,film,scene,shot,take,str,randhash)
$ video=''
$ audio=''
$if shot != None and take != None:
@@ -16,11 +16,11 @@ $elif film != None:
<h3>$title</h3>
<div class="player-container">
<video id="videoPlayer" controls>
- <source src="$video" type="video/mp4">
+ <source src="$video?randhash" type="video/mp4">
Your browser does not support the video element.
</video>
<audio id="audioPlayer">
- <source src="$audio" type="audio/wav">
+ <source src="$audio?randhash" type="audio/wav">
Your browser does not support the audio element.
</audio>
<div class="controls">