hanklords/flickraw

Incorrect photo URL's

Closed this issue · 1 comments

I believe there's a bug in the url_x (where x is: n, s, or something else) methods. Whenever I call the following:

FlickRaw.url_n(photoset)

I get a URL which looks like the following: http://farm9.staticflickr.com/8499/72157632367381040_eda82f692f_n.jpg. This results in the "This image or video is currently unavailable." Flickr image. As far as I can see, this is because of the fact that it contains the ID of the photoset instead of the value of the primary field.

In that URL 72157632367381040 is the ID of my photoset. When I replace that with the primary value. I get the following URL: http://farm9.staticflickr.com/8499/8318972536_eda82f692f_n.jpg, which results in the correct image.

I'll try to look into this when I get the time, if it hasn't been fixed by then.

Ok, I just realised I added the incorrect input. I wasn't supposed to supply the photoset itself as an argument, but an info object from that photoset instead:

info = flickr.photos.getInfo(photo_id: photoset.primary)
FlickRaw.url_n(info)

This results in the following URL: http://farm9.staticflickr.com/8499/8318972536_eda82f692f_n.jpg, which is correct. So, I'm closing this issue.