# HG changeset patch # User wycc # Date 1291852034 -28800 # Node ID 3d438daea48c171d2a45811e951c1237e079c444 # Parent e030c9d4b79bd134657a034a1afc2221b32c87f1 Add the handler for the next page diff -r e030c9d4b79b -r 3d438daea48c nodejs/examples/mce/epg.js --- a/nodejs/examples/mce/epg.js Thu Dec 09 07:46:00 2010 +0800 +++ b/nodejs/examples/mce/epg.js Thu Dec 09 07:47:14 2010 +0800 @@ -28,7 +28,12 @@ js = js + data; }); res.on('end', function () { - res = JSON.parse(js); + try { + res = JSON.parse(js); + } catch(e) { + sys.puts(e); + sys.puts(js); + } sys.puts("parsed"); self.onLoad(res); @@ -119,7 +124,7 @@ fs.close(f); var fields = cachepath.split('.'); var ext = fields.pop(); - if (ext != "png") { + if (ext != "png" && ext != 'jpg') { fields.push("png"); newf = fields.join("."); sys.puts("cachepath="+cachepath+" newf="+newf);