1
0
mirror of https://github.com/sjlongland/tornado-gallery.git synced 2025-09-14 00:53:19 +10:00

generator template: Pass through size, retry failures.

This commit is contained in:
Stuart Longland 2018-04-18 21:51:49 +10:00
parent 6a9ce03c38
commit 9f4f40f1d0
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -86,6 +86,8 @@ body {
*/
return {
src: curr_img.src,
width: curr_img.width,
height: curr_img.height,
href: '{{site_uri}}'
+ gallery.name
+ '/' + photo
@ -105,6 +107,8 @@ body {
render_img(gallery.content[i]).then(function (res) {
last_img.src = res.src;
last_img.width = res.width;
last_img.height = res.height;
last_lnk.href = res.href;
var progress = Math.round(
100*( i + 1 )
@ -115,6 +119,7 @@ body {
next();
}).catch(function (err) {
console.log('Failed request: ' + err);
setTimeout(next, 2000);
});
};