Repair OCR languages

This commit is contained in:
Alexandre
2021-11-01 22:43:36 +01:00
parent 29bd4e7a6c
commit 856b25d596
3 changed files with 8 additions and 14 deletions

View File

@@ -7,8 +7,9 @@ if bashio::config.has_value 'OCR'; then
apk add --no-cache tesseract-ocr || apk add --no-cache tesseract-ocr@community
# Install additional language if requested
if bashio::config.has_value 'OCRLANG'; then
bashio::log.info 'Installing OCR language'
apk add --no-cache tesseract-ocr-data-$(bashio::config 'OCRLANG') || apk add --no-cache tesseract-ocr-data-$(bashio::config 'OCRLANG')@community
LANG=$(bashio::config 'OCRLANG')
bashio::log.info "Installing OCR language : $LANG"
apk add --no-cache tesseract-ocr-data-$LANG || apk add --no-cache tesseract-ocr-data-$LANG@community
fi
elif $(bashio::config 'OCR') = false; then
bashio::log.info 'Removing OCR'