mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
89bcc951ce
commit
6815707587
@ -784,9 +784,8 @@ def read_alt_text(pil_im_or_path, target_lang='') -> str:
|
||||
im = pil_im_or_path
|
||||
xmp = read_xmp_from_pil_image(im)
|
||||
if xmp:
|
||||
alt = read_alt_text_from_xmp(xmp, target_lang)
|
||||
if alt:
|
||||
return alt.strip()
|
||||
if alt := read_alt_text_from_xmp(xmp, target_lang).strip():
|
||||
return alt
|
||||
exif = im.getexif()
|
||||
if exif:
|
||||
if desc := exif.get(270):
|
||||
|
Loading…
x
Reference in New Issue
Block a user