Skip to content

Conversation

@pobocks
Copy link

@pobocks pobocks commented May 28, 2025

Fixes #390

** Current behavior
Currently, namespaces in the file's embedded metadata other than EXIF are not processed and thus not available for generating albums when customizing album creation.

** Changes introduced by PR
Adds the XMP namespace to the EXIF data if (and only if) embedExif is true.

As an example use case, my filter.js which I'm using to produce albums based on the more structured hierarchical keywords used by Darktable and Digikam.

module.exports = (file) => {
  let albums = ['All Pics'];
  if (file.meta.keywords.includes('Dog')) {
    for (let kw of file.meta.exif.XMP.HierarchicalSubject) {
      if(kw.startsWith('Animal|Dog|')) {
        albums.push(kw.slice(11));
      }
    }
    return albums;
  }
}

** Does it introduce a breaking change for existing users?
No, this should be completely transparent to existing users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include option for embedding XMP metadata alongside EXIF

1 participant