Better handling of duration string

main2
Bob Mottram 2019-11-02 10:46:56 +00:00
parent a5a792762f
commit eeaf003711
1 changed files with 5 additions and 1 deletions

View File

@ -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):