Add thumbnails in images results

- Modify engines to create/fetch an URL for the thumbnails
- Modify themes to show thumbnails instead of full images.

In Courgette, the result is not very beautiful. Should we change it ?
This commit is contained in:
Cqoicebordel 2015-01-17 19:21:09 +01:00
parent edd9d31180
commit cb4a3fe598
9 changed files with 44 additions and 8 deletions

View file

@ -43,15 +43,18 @@ def response(resp):
# parse results
for result in search_res['responseData']['results']:
print result
href = result['originalContextUrl']
title = result['title']
if not result['url']:
continue
thumbnail_src = result['tbUrl']
# append result
results.append({'url': href,
'title': title,
'content': '',
'thumbnail_src': thumbnail_src,
'img_src': unquote(result['url']),
'template': 'images.html'})