@@ -346,6 +346,7 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
346346 local extra = node .extra or nil
347347 local isSpecialColl = false
348348 -- Special collection renaming
349+
349350 if isSpecialCollection (node .name ) and parentSet then
350351 -- Use the parent collection/set name
351352 name = " [Photos in " .. parentSet :getName () .. " ]"
@@ -354,7 +355,6 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
354355 end
355356
356357 local remoteAlbumId = node .remoteId
357- local remoteAlbumUrl
358358 local comment = " "
359359 local status = " public" -- ensure default is public
360360 local isSmartColl = false
@@ -366,7 +366,6 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
366366 end
367367 isSmartColl = extra .isSmartColl
368368 searchDesc = extra .searchDesc
369- remoteAlbumUrl = extra .remoteUrl
370369 end
371370
372371 local newCollorSet
@@ -386,6 +385,7 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
386385 local albumUrl = " "
387386 if pwDetails .isPiwigo then
388387 local collectionSettings = newCollorSet :getCollectionSetInfoSummary ().collectionSettings or {}
388+ -- album settings set to correspond to service being cloned
389389 if propertyTable .syncAlbumDescriptions then
390390 collectionSettings .albumDescription = comment
391391 else
@@ -400,6 +400,7 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
400400 if remoteAlbumId then
401401 local thisCat = PiwigoAPI .pwCategoriesGetThis (propertyTable , remoteAlbumId )
402402 if thisCat then
403+ -- use settings directly from Piwigo, overriding local settings
403404 if propertyTable .syncAlbumDescriptions then
404405 if thisCat .description then
405406 collectionSettings .albumDescription = thisCat .description
@@ -469,9 +470,12 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
469470 local collectionSettings = newCollorSet :getCollectionInfoSummary ().collectionSettings or {}
470471 if propertyTable .syncAlbumDescriptions then
471472 collectionSettings .albumDescription = comment
472- collectionSettings .albumPrivate = status == " private"
473473 else
474474 collectionSettings .albumDescription = " "
475+ end
476+ if status == " private" then
477+ collectionSettings .albumPrivate = true
478+ else
475479 collectionSettings .albumPrivate = false
476480 end
477481 if remoteAlbumId then
0 commit comments