Skip to content

Commit

Permalink
Change method for extracting photo id from Flickr URL. Closes #556
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeGermuska committed Jan 9, 2014
1 parent 3641935 commit 0003b01
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions source/js/Core/Media/VMM.MediaType.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,13 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaType == 'undefined') {
media.user = d.split("google.com/")[1].split("/posts/")[0];
}
success = true;
} else if (d.match("flickr.com/photos")) {
} else if (d.match("flickr.com/photos/")) {
media.type = "flickr";
media.id = d.split("photos\/")[1].split("/")[1];
var pos = d.indexOf("flickr.com/photos/") + "flickr.com/photos/".length;
var photo_info = d.substr(pos)
media.id = photo_info.split("/")[1];
media.link = d;
success = true;
success = Boolean(media.id);
} else if (d.match("instagr.am/p/")) {
media.type = "instagram";
media.link = d;
Expand Down

0 comments on commit 0003b01

Please sign in to comment.