Skip to content

Commit

Permalink
allow any non-zero number of EXIF hits
Browse files Browse the repository at this point in the history
  • Loading branch information
jonkeane committed Mar 9, 2024
1 parent c3fa1e3 commit e9491c0
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/jquery.nanogallery2.data_flickr.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,25 +181,25 @@
if( data.photo.camera !== undefined ) { newItem.exif.model = data.photo.camera; }
// Exif - flash
var flash = data.photo.exif.filter(function(exif) {return exif.tag == "Flash"})
if( flash.length == 1 ) { newItem.exif.flash = flash[0].raw._content; }
if( flash.length >= 1 ) { newItem.exif.flash = flash[0].raw._content; }
// Exif - focallength
var fl = data.photo.exif.filter(function(exif) {return exif.tag == "FocalLength"});
if( fl.length == 1 ) { newItem.exif.focallength = fl[0].raw._content; }
if( fl.length >= 1 ) { newItem.exif.focallength = fl[0].raw._content; }
// Exif - fstop
var fstop = data.photo.exif.filter(function(exif) {return exif.tag == "FNumber"});
if( fstop.length == 1 ) { newItem.exif.fstop = fstop[0].raw._content; }
if( fstop.length >= 1 ) { newItem.exif.fstop = fstop[0].raw._content; }
// Exif - exposure
var exposure = data.photo.exif.filter(function(exif) {return exif.tag == "ExposureTime"});
if( exposure.length == 1 ) { newItem.exif.exposure = exposure[0].raw._content; }
if( exposure.length >= 1 ) { newItem.exif.exposure = exposure[0].raw._content; }
// Exif - iso
var iso = data.photo.exif.filter(function(exif) {return exif.tag == "ISO"});
if( iso.length == 1 ) { newItem.exif.iso = iso[0].raw._content; }
if( iso.length >= 1 ) { newItem.exif.iso = iso[0].raw._content; }
// Exif - time
var time = data.photo.exif.filter(function(exif) {return exif.tag == "DateTimeOriginal"});
if( time.length == 1 ) { newItem.exif.time = time[0].raw._content; }
if( time.length >= 1 ) { newItem.exif.time = time[0].raw._content; }
// Exif - location
var location = data.photo.exif.filter(function(exif) {return exif.tag == "LOLcation"});
if( location.length == 1 ) { newItem.exif.location = location[0].raw._content; }
if( location.length >= 1 ) { newItem.exif.location = location[0].raw._content; }

// author
var author = data.photo.exif.filter(function(exif) {return exif.tag == "OwnerName"});
Expand Down

0 comments on commit e9491c0

Please sign in to comment.