Coder Social home page Coder Social logo

Comments (28)

grasdk avatar grasdk commented on June 12, 2024 1

I agree: The photo with the dog has these 3 tags: xmp:CreateDate, ModifyDate and MetadataDate. It should use xmp:CreateDate and it actually reads it, but then misinterprets it. The bug is in Utils.ts where the function I wrote assumed that timestamps do not contain offsets, but these are read independently in other tags. It's an easy fix, but I want to be sure that I don't introduce other problems ;-)

  xmp: {
    CreateDate: "2022-05-03T19:09:32-05:00",
    ModifyDate: "2024-03-22T18:02:39-05:00",
    MetadataDate: "2024-03-23T01:18:52-05:00",
    CreatorTool: "Adobe Photoshop Lightroom 13.2 Classic (Windows)",
  }

The metadata of the other photo from the other thread, does indeed have two other tags: photoshop.DateCreated and exif.DateTimeOriginal. exif.DateTimeOriginal has first priority in the metadataloader and photoshop.DateCreated is also pretty high up, and currently above xmp.CreateDate.

  • The code doesn't make this very clear currently, so I think I will refactor it a bit, while fixing the bug anyway, to make priority clear and easy to change, if new information on proper date tag priority surfaces.
xmp: {
  ModifyDate: "2024-03-22T19:09:41-05:00",
  CreatorTool: "Adobe Photoshop Lightroom 13.2 Classic (Windows)",
  CreateDate: "2007-07-29T18:19:58",
  MetadataDate: "2024-03-23T01:17:49-05:00",
},
photoshop: {
  DateCreated: "1900-06-02T18:19:58"
},
exif: {
  DateTimeOriginal: "1900-06-02T18:19:58"
}

NB: There is much more metadata in the two photos than copied here, but these are all the dates.

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

@grasdk do you think this might be related to my other issue? It seems when that field is missing it never moves to the next date/time field

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

Hey.

Yes it can be related in the manner that your unaltered pictures store their date in a field not read by pigallery. There are an insane amount of date fields.

Can you provide a sample, or if not, then maybe show the output of running exiftool on one of the pictures?

For example this command could provide useful info

exiftool -G0:1 -*date* -*time* -*offset* mypicture.png

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

@grasdk for instance, the previous image I submitted had it's date changed to some date in 1900 in lightroom, however this image never had it's capture date changed and instead should only include the date it was scanned into the computer
family-1117

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

thanks. It's a bug. The timestamp is actually stored in a field that is read already, but there is a bug in the code where the formatted timestamp is converted into a MS value.

It can easily be fixed, so I'll make sure to make a PR for that very soon.

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

@grasdk Thanks, just to be clear, "Date Created" will still take precedence over "Create Date," correct?

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

I think so, but I will try and make it clear with the PR. The tags have different names than the ones you mention, which are shown by your OS or image viewer.

In your photo, the tag xmp:CreateDate will be used. There are others that have higher priority, but they are not set in your photo.

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

In the photo I posted on the other thread, there is a tag in exiftool called "Date Created" as well as one called "Date/Time Original" (both have the same values) that are targeted when you use lightroom to updated the image dates. These should take precedence over "xmp:CreateDate," which is the tag currently not being read

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

Perfect, exactly what I need it to do. Currently I had to let users knows that yes, Im aware these people didnt exist in the 70's, please dont email me about them XD

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

I have a new PR here: #874. I added a test to show the problem and that it is solved. I actually discovered an extra bug this way. :)

It will probably conflict with my other PR because they both change both Utils.ts and MetadataLoaderSpec.ts, so there is probably a bit of extra work in either PR.

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

@grainsoflight this should be fixed in next edge build

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

@grasdk awesome, thanks! I noticed an update today but that must not be it because I didnt see any changes

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

Let me know if it still doesn't work after next update :-)

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

@grasdk I saw there was an update today, though there was no change

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

Hey.

It was merged 5 days ago, and I just ran your photo through the code from current master branch:
image

Could it be the image? only edge-alpine has been updated: https://hub.docker.com/r/bpatrik/pigallery2/tags/

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

Hmm, thats the branch I am pulling from, I dont see any changes as far as dates or captions

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

I did confirm from within the program that is April 9th's build

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

I just made sure to update as well. I added your? dog Koko to a test folder. It shows me 23rd of march 01:18:52 - 05:00

image

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

Weird, I wonder if I need to scrap the container and start over
Screenshot_20240410_004426_Chrome

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

indeed... hmm... And this is what is says under settings on mine:
image

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

This
Screenshot_20240410_004853_Chrome
is what I got

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

Same for me (but it shows the timestamp in my timezone both commit id etc is the same.

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

also checked on mobile. All ok with the date there aswell ¯_(ツ)_/¯

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

Could it be some browser caching? Try another browser or device, just to be sure.

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

Ok. Then I'm out of ideas except as you said, try from scratch. Luckily pigallery does not rely on the database as such. So you'll only loose your settings and your time for indexing. Perhaps try out with a second container first with a small album, before you scrap the one you use now?

Edit: Got one more idea: Try reindexing under settings?

from pigallery2.

grainsoflight avatar grainsoflight commented on June 12, 2024

Reindexing didnt work either, complete rebuild of the container did though. Thanks for all your help, looks like everything is working

from pigallery2.

grasdk avatar grasdk commented on June 12, 2024

Thanks, I'm glad to hear! :)

from pigallery2.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.