From 9027d68ab7726023e11edd435c53a0ad57667635 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Wed, 23 Oct 2019 13:17:40 +0100 Subject: [PATCH] url format --- daemon.py | 10 +++++++--- webinterface.py | 2 +- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/daemon.py b/daemon.py index 2bf9b95b..83fc1ca6 100644 --- a/daemon.py +++ b/daemon.py @@ -974,11 +974,15 @@ class PubServer(BaseHTTPRequestHandler): # full screen images shown from the media timeline if self.path.startswith('/fullscreen?'): - fullscreenImageStr=self.path.split('?') + fullscreenImageStr=self.path.split('?img=') imageFilename=fullscreenImageStr[1] + if '?' in imageFilename: + imageFilename=imageFilename.split('?')[0] imageDescription=None - if len(fullscreenImageStr)>2: - imageDescription=fullscreenImageStr[2] + if '?desc=' in self.path: + imageDescription=self.path.split('?desc=') + if '?' in imageDescription: + imageDescription=imageDescription.split('?')[0] msg=htmlFullScreenImage(imageFilename,imageDescription) self._login_headers('text/html',len(msg)) self._write(msg) diff --git a/webinterface.py b/webinterface.py index b7321704..64953b6b 100644 --- a/webinterface.py +++ b/webinterface.py @@ -1922,7 +1922,7 @@ def individualPostAsHtml(iconsDir: str,translate: {}, \ if boxName=='tlmedia': galleryStr+= \ '\n' attachmentStr+= \