-rw-r--r-- | content/flickr.js | 11 |
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 | |||
@@ -255,9 +255,14 @@ Flickr.prototype = { | |||
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) { |