summaryrefslogtreecommitdiffabout
path: root/content
authorMichael Krelin <hacker@klever.net>2011-08-28 16:57:16 (UTC)
committer Michael Krelin <hacker@klever.net>2011-08-28 16:57:16 (UTC)
commit0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac (patch) (side-by-side diff)
tree8e496ae35eae9e4e09a8daef17d1bee9589dda61 /content
parent63b7d8b9cd7b4c4fd010a46bb2737a47d5afa65e (diff)
downloadfireflix-0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac.zip
fireflix-0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac.tar.gz
fireflix-0d7604dd5ba76c31d7192ff37e0f6ae6f95945ac.tar.bz2
more jsonifications
Signed-off-by: Michael Krelin <hacker@klever.net>
Diffstat (limited to 'content') (more/less context) (ignore whitespace changes)
-rw-r--r--content/fireflix.js32
1 files changed, 14 insertions, 18 deletions
diff --git a/content/fireflix.js b/content/fireflix.js
index 34cfd3e..f30daee 100644
--- a/content/fireflix.js
+++ b/content/fireflix.js
@@ -632,4 +632,4 @@ var fireflix = {
if(pset.dirty) {
- var _this = this;
- this.flickr.api_call(
+ var that = this;
+ this.flickr.api_call_json(
{
@@ -640,5 +640,5 @@ var fireflix = {
description: pset.description
- }, function(xr) {
+ }, function(x,j) {
pset.dirty = false;
- _this.flickr.api_call(
+ that.flickr.api_call_json(
{
@@ -647,17 +647,13 @@ var fireflix = {
photoset_id: pset.id
- }, function(xr) {
- var x = xr.responseXML;
- var xp = x.evaluate(
- '/rsp/photoset/photo', x, null,
- XPathResult.ORDERED_NODE_ITERATOR_TYPE, null );
+ }, function(x,j) {
+ var pp = j.photoset.photo;
var phids = new Array();
var priph = null;
- var n; while(n=xp.iterateNext()) {
- var pid = n.getAttribute('id');
- phids.push( pid );
- if(pid==pset.primary && n.getAttribute('isprimary')!='1')
- priph = pid;
+ for(var i in pp) {
+ var pid = pp[i].id;
+ phids.push(pid);
+ if(pid==pset.primary && pp[i].isprimary) priph = pid;
}
if(priph) {
- _this.flickr.api_call(
+ that.flickr.api_call_json(
{
@@ -669,3 +665,3 @@ var fireflix = {
}, function() { }, function(x,s,c,m) { /* flickr.photosets.editPhotos */
- _this.flickr_failure(x,s,c,m);
+ that.flickr_failure(x,s,c,m);
}
@@ -674,3 +670,3 @@ var fireflix = {
}, function(x,s,c,m) { /* flickr.photosets.getPhotos */
- _this.flickr_failure(x,s,c,m);
+ that.flickr_failure(x,s,c,m);
}
@@ -678,3 +674,3 @@ var fireflix = {
}, function(x,s,c,m) { /* flickr.photosets.editMeta */
- _this.flickr_failure(x,s,c,m);
+ that.flickr_failure(x,s,c,m);
}