From e58247a43552504e34ae31a5262a8a9dd338243c Mon Sep 17 00:00:00 2001 From: Michael Krelin Date: Sun, 28 Aug 2011 16:22:04 +0000 Subject: more json calls Signed-off-by: Michael Krelin --- diff --git a/content/fireflix.js b/content/fireflix.js index 283e930..d70ab4d 100644 --- a/content/fireflix.js +++ b/content/fireflix.js @@ -445,31 +445,30 @@ var fireflix = { if(psn!=null) { var pids = this.batch_ids.join(','); var ppid = this.batch_ids[0]; - var _this = this; - this.fireflix.flickr.api_call( + var that = this; + this.fireflix.flickr.api_call_json( { method: 'flickr.photosets.create', auth_token: 'default', title: psn, primary_photo_id: ppid - }, function(x) { - var npid = - x.responseXML.getElementsByTagName('photoset').item(0).getAttribute('id'); - _this.fireflix.flickr.api_call( + }, function(x,j) { + var npid = j.photoset.id; + that.fireflix.flickr.api_call_json( { method: 'flickr.photosets.editPhotos', auth_token: 'default', photoset_id: npid, primary_photo_id: ppid, photo_ids: pids - }, function(x) { - _this.fireflix.refresh_sets(); + }, function(x,j) { + that.fireflix.refresh_sets(); }, function(x,s,c,m) { - _this.fireflix.flickr_failure(x,s,c,m); + that.fireflix.flickr_failure(x,s,c,m); } ); }, function(x,s,c,m) { - _this.fireflix.flickr_failure(x,s,c,m); + that.fireflix.flickr_failure(x,s,c,m); } ); } -- cgit v0.9.0.2