From eeaf00371106b873264b82ceda2711d89c6f1e82 Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Sat, 2 Nov 2019 10:46:56 +0000 Subject: [PATCH] Better handling of duration string --- daemon.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/daemon.py b/daemon.py index 17f6bd1db..dabad321d 100644 --- a/daemon.py +++ b/daemon.py @@ -2691,6 +2691,10 @@ class PubServer(BaseHTTPRequestHandler): if attachmentMediaType: if attachmentMediaType!='image': return -1 + durationStr=fields['duration'] + if durationStr: + if ' ' not in durationStr: + durationStr=durationStr+' days' addShare(self.server.baseDir, \ self.server.httpPrefix, \ nickname, \ @@ -2701,7 +2705,7 @@ class PubServer(BaseHTTPRequestHandler): fields['itemType'], \ fields['category'], \ fields['location'], \ - fields['duration']+' days', + durationStr, self.server.debug) if filename: if os.path.isfile(filename):