bpatrik / pigallery2

A fast directory-first photo gallery website, with rich UI, optimized for running on low resource servers (especially on raspberry pi)
http://bpatrik.github.io/pigallery2/
MIT License
1.8k stars 207 forks source link

Is there a maximum limit on field metadataKeywords? #914

Closed miguelius1966 closed 4 months ago

miguelius1966 commented 4 months ago

I have an image with a long text in the subject field and a long text in the keywords field. For example:

$ exiftool -subject -keywords image.jpg
Subject                         : Madrid,Comunidad de Madrid,España
Keywords                        : Carreras,Media de Fuencarral

When indexing is carried out, the union of the two text strings is not obtained. It seems that the keywords field is ignored. It can be seen in the database:

sqlite> select id, directoryid, metadataKeywords from media_entity where directoryid=2286;

166390|2286|,Madrid,Comunidad de Madrid,España
200429|2286|,Madrid,Comunidad de Madrid,España
200430|2286|,Madrid,Comunidad de Madrid,España

Maybe, is there a maximum limit on field metadataKeywords and therefore, the union of the two fields of the image cannot be performed?

Thanks in advance.

bpatrik commented 4 months ago

The issue most likely lies here: https://github.com/bpatrik/pigallery2/blob/1fd07a640c9f7593c23389cf1ae6a23eeb71d72a/src/backend/model/fileaccess/MetadataLoader.ts#L328-L356

The app does not load keywords from exif data. FYI: @grasdk

bpatrik commented 4 months ago

@miguelius1966 Can you provide a broken image to test on?

miguelius1966 commented 4 months ago

Yes, of course.

media-fuencarral-2023-01

grasdk commented 4 months ago

@miguelius1966 I think you're running an older version of pigallery. I cannot reproduce the problem. I included your photo in my test-image folder and it was indexed correctly, here is a screenshot from SQLite browser:

image

You can try to update to the latest edge-version and see if that doesn't fix the problem :)

miguelius1966 commented 4 months ago

I execute:

$ sudo docker compose stop
$ sudo docker pull bpatrik/pigallery2:edge-debian-bookworm
$ sudo docker compose up -d

And this version resolves the problem.