mirror of
https://github.com/sjlongland/tornado-gallery.git
synced 2025-09-13 08:42:23 +10:00
generator template: Pass through size, retry failures.
This commit is contained in:
parent
6a9ce03c38
commit
9f4f40f1d0
@ -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);
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user