Browse Source

Fixing thumbnails list

master
tr4ck3ur des JM2L 5 years ago
parent
commit
b8067feb34
1 changed files with 4 additions and 1 deletions
  1. +4
    -1
      jm2l/upload.py

+ 4
- 1
jm2l/upload.py View File

@@ -63,7 +63,10 @@ class MediaPath():
ress_url = '/image/%s/%d/%s' % (media_table, linked_id, f.replace(" ", "%20")) ress_url = '/image/%s/%d/%s' % (media_table, linked_id, f.replace(" ", "%20"))
thumb_url = '/image/%s/%d/thumbnails/%s' % (media_table, linked_id, f.replace(" ","%20")) thumb_url = '/image/%s/%d/thumbnails/%s' % (media_table, linked_id, f.replace(" ","%20"))
if MediaType is None: if MediaType is None:
filelist.append((ress_url, thumb_url))
if os.path.exists(os.path.join(thumbpath, f +".jpg")):
filelist.append((ress_url, thumb_url +".jpg"))
else:
filelist.append((ress_url, thumb_url))
elif MediaType=='Image' and len( os.path.splitext(filename)[1] )==0: elif MediaType=='Image' and len( os.path.splitext(filename)[1] )==0:
filelist.append((ress_url, thumb_url)) filelist.append((ress_url, thumb_url))
elif MediaType=='Other' and len( os.path.splitext(filename)[1] ): elif MediaType=='Other' and len( os.path.splitext(filename)[1] ):


Loading…
Cancel
Save