mirror of
https://github.com/sjlongland/tornado-gallery.git
synced 2025-09-19 11:23:31 +10:00
generator template: Pass through size, retry failures.
This commit is contained in:
parent
6a9ce03c38
commit
9f4f40f1d0
@ -86,6 +86,8 @@ body {
|
|||||||
*/
|
*/
|
||||||
return {
|
return {
|
||||||
src: curr_img.src,
|
src: curr_img.src,
|
||||||
|
width: curr_img.width,
|
||||||
|
height: curr_img.height,
|
||||||
href: '{{site_uri}}'
|
href: '{{site_uri}}'
|
||||||
+ gallery.name
|
+ gallery.name
|
||||||
+ '/' + photo
|
+ '/' + photo
|
||||||
@ -105,6 +107,8 @@ body {
|
|||||||
|
|
||||||
render_img(gallery.content[i]).then(function (res) {
|
render_img(gallery.content[i]).then(function (res) {
|
||||||
last_img.src = res.src;
|
last_img.src = res.src;
|
||||||
|
last_img.width = res.width;
|
||||||
|
last_img.height = res.height;
|
||||||
last_lnk.href = res.href;
|
last_lnk.href = res.href;
|
||||||
var progress = Math.round(
|
var progress = Math.round(
|
||||||
100*( i + 1 )
|
100*( i + 1 )
|
||||||
@ -115,6 +119,7 @@ body {
|
|||||||
next();
|
next();
|
||||||
}).catch(function (err) {
|
}).catch(function (err) {
|
||||||
console.log('Failed request: ' + err);
|
console.log('Failed request: ' + err);
|
||||||
|
setTimeout(next, 2000);
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user