@@ -777,11 +777,15 @@ function PiwigoAPI.createCollection(propertyTable, node, parentNode, isLeafNode,
777777 collectionSettings = newColl :getCollectionInfoSummary ().collectionSettings or {}
778778 if propertyTable .syncAlbumDescriptions then
779779 collectionSettings .albumDescription = collDescription
780- collectionSettings .albumPrivate = collStatus == " private"
781780 else
782781 collectionSettings .albumDescription = " "
783- collectionSettings .albumPrivate = " public"
784782 end
783+ if collStatus == " private" then
784+ collectionSettings .albumPrivate = true
785+ else
786+ collectionSettings .albumPrivate = false
787+ end
788+
785789 catalog :withWriteAccessDo (" Add Piwigo details to collections" , function ()
786790 newColl :setRemoteId (remoteId )
787791 newColl :setRemoteUrl (propertyTable .host .. " /index.php?/category/" .. remoteId )
@@ -807,10 +811,13 @@ function PiwigoAPI.createCollection(propertyTable, node, parentNode, isLeafNode,
807811 collectionSettings = newColl :getCollectionSetInfoSummary ().collectionSettings or {}
808812 if propertyTable .syncAlbumDescriptions then
809813 collectionSettings .albumDescription = collDescription
810- collectionSettings .albumPrivate = collStatus == " private"
811814 else
812815 collectionSettings .albumDescription = " "
813- collectionSettings .albumPrivate = " public"
816+ end
817+ if collStatus == " private" then
818+ collectionSettings .albumPrivate = true
819+ else
820+ collectionSettings .albumPrivate = false
814821 end
815822
816823 catalog :withWriteAccessDo (" Add Piwigo details to collections" , function ()
@@ -833,10 +840,13 @@ function PiwigoAPI.createCollection(propertyTable, node, parentNode, isLeafNode,
833840 collectionSettings = existingColl :getCollectionInfoSummary ().collectionSettings or {}
834841 if propertyTable .syncAlbumDescriptions then
835842 collectionSettings .albumDescription = collDescription
836- collectionSettings .albumPrivate = collStatus == " private"
837843 else
838844 collectionSettings .albumDescription = " "
839- collectionSettings .albumPrivate = " public"
845+ end
846+ if collStatus == " private" then
847+ collectionSettings .albumPrivate = true
848+ else
849+ collectionSettings .albumPrivate = false
840850 end
841851
842852 catalog :withWriteAccessDo (" Update Piwigo details to collections" , function ()
@@ -848,10 +858,13 @@ function PiwigoAPI.createCollection(propertyTable, node, parentNode, isLeafNode,
848858 collectionSettings = existingColl :getCollectionSetInfoSummary ().collectionSettings or {}
849859 if propertyTable .syncAlbumDescriptions then
850860 collectionSettings .albumDescription = collDescription
851- collectionSettings .albumPrivate = collStatus == " private"
852861 else
853862 collectionSettings .albumDescription = " "
854- collectionSettings .albumPrivate = " public"
863+ end
864+ if collStatus == " private" then
865+ collectionSettings .albumPrivate = true
866+ else
867+ collectionSettings .albumPrivate = false
855868 end
856869 catalog :withWriteAccessDo (" Update Piwigo details to collections" , function ()
857870 existingColl :setCollectionSetSettings (collectionSettings )
@@ -1062,7 +1075,6 @@ function PiwigoAPI.ConnectionChange(propertyTable)
10621075 if (propertyTable .savedHost ~= propertyTable .host ) or (propertyTable .savedUsername ~= propertyTable .userName ) then
10631076 propertyTable .unsavedConnectionChanges = true
10641077 end
1065-
10661078end
10671079
10681080-- *************************************************
0 commit comments