summaryrefslogtreecommitdiffabout
path: root/content/flickr.js
Unidiff
Diffstat (limited to 'content/flickr.js') (more/less context) (ignore whitespace changes)
-rw-r--r--content/flickr.js11
1 files changed, 8 insertions, 3 deletions
diff --git a/content/flickr.js b/content/flickr.js
index b5bfa43..75d1a72 100644
--- a/content/flickr.js
+++ b/content/flickr.js
@@ -252,15 +252,20 @@ Flickr.prototype = {
252 o.secret, 252 o.secret,
253 sfx, 253 sfx,
254 (sfx=='o')?o.originalformat:null 254 (sfx=='o')?o.originalformat:null
255 ); 255 );
256 }, 256 },
257 get_photo_page_url: function(p) { 257 get_photo_page_url: function(p) {
258 if(p instanceof Photo) // TODO: half wrong, what if no owner? 258 if(p instanceof Photo) {
259 return this.photos_url + (p.owner.nsid?p.owner.nsid:this.user.nsid) + '/' + p.id; 259 // TODO: track photoset and user owner id from there?
260 else // TODO: take owner into account? 260 // The approach below is sheerly wrong.
261 var o = this.user.nsid;
262 if(p.owner && p.owner.nsid) o = p.owner.nsid;
263 var rv = this.photos_url + o +'/' + p.id;
264 return rv;
265 }else // TODO: take owner into account?
261 return this.photos_url + this.user.nsid + '/' + p; 266 return this.photos_url + this.user.nsid + '/' + p;
262 }, 267 },
263 make_photo_url: function(p,sfx) { 268 make_photo_url: function(p,sfx) {
264 if(sfx=='p') 269 if(sfx=='p')
265 return this.get_photo_page_url(p); 270 return this.get_photo_page_url(p);
266 else 271 else