X-Git-Url: http://git.scottworley.com/picsort/blobdiff_plain/a5ef285705b4a65abe7d6527b2e727eebd111aba..cd368e974b63917e537306af77de71ded9f8e1ef:/picsorter.js?ds=inline diff --git a/picsorter.js b/picsorter.js index db81f05..b1c1bdf 100644 --- a/picsorter.js +++ b/picsorter.js @@ -28,13 +28,19 @@ function stripFromEnd(str, suffix) { } function setpic() { - if ("exposure" in picinfo[files[input_index]]) { - exposure = picinfo[files[input_index]].exposure; + var display_filename; + if (endsWith(files[input_index], ".NEF")) { + if ("exposure" in picinfo[files[input_index]]) { + exposure = picinfo[files[input_index]].exposure; + } else { + picinfo[files[input_index]].exposure = exposure; + save_picinfo(); + } + display_filename = zoom + exposure + "/" + stripFromEnd(files[input_index], ".NEF") + ".jpeg"; } else { - picinfo[files[input_index]].exposure = exposure; - save_picinfo(); + display_filename = zoom + files[input_index]; } - $("#pic").attr("src", zoom + exposure + "/" + files[input_index]); + $("#pic").attr("src", display_filename); } function say(message) {