This commit is contained in:
Ignacio Serantes
2026-04-19 17:39:01 +02:00
parent b5b70326b1
commit a824a01579
10 changed files with 118 additions and 43 deletions

View File

@@ -17,13 +17,17 @@ Dependencies:
"""
import os
import re
import logging
from utils import preserve_mtime
from metadatamanager import notify_baloo, mark_app_modified
from constants import UITexts
try:
import exiv2
except ImportError:
exiv2 = None
logger = logging.getLogger(__name__)
class XmpManager:
"""
@@ -167,5 +171,10 @@ class XmpManager:
mark_app_modified(path)
return True
except Exception as e:
print(f"Error saving faces to XMP: {e}")
return False
error_msg = str(e)
if "kerTooLargeJpegSegment" in error_msg or "38" in error_msg:
msg = UITexts.ERROR_JPEG_METADATA_LIMIT.format(os.path.basename(path))
logger.error(msg)
raise IOError(msg) from e
logger.error(f"Error saving faces to XMP: {e}")
raise