Skip to content

Commit

Permalink
determining name of the tag for the embedded jpeg preview
Browse files Browse the repository at this point in the history
  • Loading branch information
catdad committed Apr 21, 2019
1 parent c9fd927 commit e736fd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/exiftool.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,12 @@ async function readExif(filepath) {
};
}

return result.out[0];
const data = result.out[0];

data['Z-JpgTagName'] = data['JpgFromRaw'] ? 'JpgFromRaw' :
data['PreviewImage'] ? 'PreviewImage' : null;

return data;
}

async function readJpegMeta(filepath) {
Expand Down
1 change: 1 addition & 0 deletions renderer/sidebar/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ module.exports = function ({ events }) {
{ key: 'Artist', gui: 'Artist' },
{ key: 'DateTimeOriginal', gui: 'Timestamp' },
{ key: 'Z-FileSize', gui: 'Size' },
{ key: 'Z-JpgTagName', gui: 'Preview Tag' }
].filter(({ key }) => !!allMeta[key]).map(({ key, gui }) => {
const p = document.createElement('p');
p.appendChild(document.createTextNode(`${gui}: ${allMeta[key]}`));
Expand Down

0 comments on commit e736fd4

Please sign in to comment.