mirror of https://gitlab.com/bashrc2/epicyon
Better handling of duration string
parent
a5a792762f
commit
eeaf003711
|
@ -2691,6 +2691,10 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
if attachmentMediaType:
|
if attachmentMediaType:
|
||||||
if attachmentMediaType!='image':
|
if attachmentMediaType!='image':
|
||||||
return -1
|
return -1
|
||||||
|
durationStr=fields['duration']
|
||||||
|
if durationStr:
|
||||||
|
if ' ' not in durationStr:
|
||||||
|
durationStr=durationStr+' days'
|
||||||
addShare(self.server.baseDir, \
|
addShare(self.server.baseDir, \
|
||||||
self.server.httpPrefix, \
|
self.server.httpPrefix, \
|
||||||
nickname, \
|
nickname, \
|
||||||
|
@ -2701,7 +2705,7 @@ class PubServer(BaseHTTPRequestHandler):
|
||||||
fields['itemType'], \
|
fields['itemType'], \
|
||||||
fields['category'], \
|
fields['category'], \
|
||||||
fields['location'], \
|
fields['location'], \
|
||||||
fields['duration']+' days',
|
durationStr,
|
||||||
self.server.debug)
|
self.server.debug)
|
||||||
if filename:
|
if filename:
|
||||||
if os.path.isfile(filename):
|
if os.path.isfile(filename):
|
||||||
|
|
Loading…
Reference in New Issue