Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: In Sipi use size fallback only when api failed to return a setting (DEV-3409) #3112

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions sipi/scripts/sipi.init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,15 @@ function pre_flight(prefix, identifier, cookie)

local settings_for_sipi = {}
settings_for_sipi['type'] = "restrict"
settings_for_sipi['size'] = config.thumb_size

if settings_from_api ~= nil then
log("pre_flight - restricted view settings - from api: " .. tableToString(settings_from_api), server.loglevel.LOG_DEBUG)
if settings_from_api.size ~= nil then
settings_for_sipi['size'] = settings_from_api.size
end
if settings_from_api.watermark then
elseif settings_from_api.watermark then
settings_for_sipi['watermark'] = "/sipi/scripts/watermark.tif"
else
settings_for_sipi['size'] = config.thumb_size
end
end

Expand Down