Skip to content

Commit

Permalink
fix: In Sipi use size fallback only when api failed to return a setti…
Browse files Browse the repository at this point in the history
…ng (DEV-3409) (#3112)
  • Loading branch information
seakayone authored Mar 12, 2024
1 parent c7d69aa commit 172041a
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit 172041a

Please sign in to comment.