LycheeOrg / Lychee

A great looking and easy-to-use photo-management-system you can run on your server, to manage and share photos.
https://lycheeorg.github.io/
MIT License
3.35k stars 299 forks source link

Description not being populated from EXIF #1117

Closed FinalDoom closed 2 years ago

FinalDoom commented 3 years ago

Description is blank for every image I upload, whether through the UI or through sync, no matter the description. The image from #386 also has no description when uploaded.

Using docker lycheeorg/lychee:latest from July 11th 2021. @sha256:7e7f9c6d9cae99b80dcb3186f455c63884fcc2035e3fe4c749f20cc3272d2854 Problem in both firefox and chrome.

For example, with the image from #386: image image

Exiftool ran on the image from within the container shows the description before import:

exiftool -j 68530571-a9685f00-0309-11ea-86f4-4cf1572ee667.jpg |grep Description "ImageDescription": "Capitol in the morning at 200mm", "ProfileDescription": "sRGB IEC61966-2.1", "Description": "Capitol in the morning at 200mm",

and after import:

exiftool -j 6a2aa6f8f669fa13bda5cca539dbf1f6.jpg |grep Description "ImageDescription": "Capitol in the morning at 200mm", "ProfileDescription": "sRGB IEC61966-2.1", "Description": "Capitol in the morning at 200mm",

Diagnostics:

Diagnostics
-------
Warning: Dropbox import not working. dropbox_key is empty.
Info: Latest version of PHP is 8

System Information
--------------
Lychee Version (git):            No git data found.
DB Version:                      4.3.4

composer install:                --no-dev
APP_ENV:                         production
APP_DEBUG:                       false

System:                          Linux
PHP Version:                     7.4
Max uploaded file size:          100M
Max post size:                   100M
MySQL Version:                   10.6.4-MariaDB-1:10.6.4+maria~focal

Imagick:                         1
Imagick Active:                  1
Imagick Version:                 1691
GD Version:                      2.3.0

Config Information
--------------
version:                         040304
check_for_updates:               0
sorting_Photos_col:              taken_at
sorting_Photos_order:            ASC
sorting_Albums_col:              max_taken_at
sorting_Albums_order:            ASC
imagick:                         1
skip_duplicates:                 0
small_max_width:                 0
small_max_height:                360
medium_max_width:                1920
medium_max_height:               1080
lang:                            en
layout:                          1
image_overlay_type:              exif
default_license:                 CC-BY-NC-SA-4.0
compression_quality:             90
full_photo:                      1
delete_imported:                 0
Mod_Frame:                       1
Mod_Frame_refresh:               30
thumb_2x:                        1
small_2x:                        1
medium_2x:                       1
landing_page_enable:             0
landing_owner:                   FinalDoom
landing_title:                   FinalDoom.net
landing_subtitle:                Self-hosted Flickr Photography Place
landing_facebook:                
landing_flickr:                  https://www.flickr.com/FinalDoom
landing_twitter:                 https://www.twitter.com/FinalDoom
landing_instagram:               
landing_youtube:                 
landing_background:              dist/cat.jpg
site_title:                      Lychee v4
site_copyright_enable:           0
site_copyright_begin:            2021
site_copyright_end:              2021
additional_footer_text:          
display_social_in_gallery:       0
public_search:                   0
SL_enable:                       0
SL_for_admin:                    0
public_recent:                   0
recent_age:                      1
public_starred:                  0
downloadable:                    0
photos_wraparound:               1
map_display:                     1
zip64:                           1
map_display_public:              1
map_provider:                    Wikimedia
force_32bit_ids:                 0
map_include_subalbums:           0
update_check_every_days:         3
has_exiftool:                    1
share_button_visible:            0
import_via_symlink:              0
has_ffmpeg:                      1
location_decoding:               1
location_decoding_timeout:       30
location_show:                   1
location_show_public:            1
rss_enable:                      0
rss_recent_days:                 7
rss_max_items:                   100
prefer_available_xmp_metadata:   0
editor_enabled:                  1
lossless_optimization:           0
swipe_tolerance_x:               150
swipe_tolerance_y:               250
local_takestamp_video_formats:   .avi|.mov
log_max_num_line:                1000
unlock_password_photos_with_url_param: 0
nsfw_visible:                    1
nsfw_blur:                       1
nsfw_warning:                    1
nsfw_warning_admin:              0
map_display_direction:           1
album_subtitle_type:             oldstyle
upload_processing_limit:         4
public_photos_hidden:            1
kamil4 commented 3 years ago

OK, I've got a fix for you. If you want to try it out, replace the file Lychee/vendor/lychee-org/php-exif/lib/PHPExif/Mapper/Exiftool.php in your Lychee install with the contents of https://raw.githubusercontent.com/LycheeOrg/php-exif/b3957c653595d5ad09c911f22859a01128ce3b3b/lib/PHPExif/Mapper/Exiftool.php

FinalDoom commented 3 years ago

Wow that was fast. It works! Thanks!

kamil4 commented 3 years ago

Actually, I had the fix ready to go already after somebody reported it to us on Gitter a month ago; I just needed to test it.

FinalDoom commented 3 years ago

Ah, perfect. I saw the Gitter after poking around trying to figure it out myself, but wasn't sure I'd be able to monitor it as effectively. Thanks for the help 😄

nagmat84 commented 3 years ago

OK, I've got a fix for you. If you want to try it out, replace the file Lychee/vendor/lychee-org/php-exif/lib/PHPExif/Mapper/Exiftool.php in your Lychee install with the contents of https://raw.githubusercontent.com/LycheeOrg/php-exif/b3957c653595d5ad09c911f22859a01128ce3b3b/lib/PHPExif/Mapper/Exiftool.php

@kamil4 I haven't looked into the fix and what you have changed, but is this fix of general interest? If so, we should integrate it into the master branch, shouldn't we?

kamil4 commented 3 years ago

Sure; however, the bug is not in Lychee but in a dependency (one that we control, but still, it's a different repo). See https://github.com/LycheeOrg/php-exif/pull/36.

ildyria commented 2 years ago

Is this fixed yet?

kamil4 commented 2 years ago

The PR against php-exif (https://github.com/LycheeOrg/php-exif/pull/36) is not merged. If you can review it an merge it that would be appreciated and then this issue can be closed.