Skip to content

Commit fb8a4de

Browse files
committed
Fix #41 Problem with 'Clone Existing Publish Service - public/private setting
1 parent 59243e0 commit fb8a4de

4 files changed

Lines changed: 10 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Changelog
22

3-
## [20260205.30] - 2026-02-05
3+
## [20260206.30] - 2026-02-06
44
### Fixed
55
Fix #41 Problem with 'Clone Existing Publish Service - public/private setting
66

piwigoPublish.lrplugin/Info.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,5 +66,5 @@ return {
6666

6767
LrPluginInfoProvider = 'PluginInfo.lua',
6868

69-
VERSION = { major=20260205, minor=30, revision=0 },
69+
VERSION = { major=20260206, minor=30, revision=0 },
7070
}

piwigoPublish.lrplugin/Init.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ _G.iconPath = _PLUGIN:resourceId("icons/icon_med.png")
7979
-- _PLUGIN.VERSION is nil here for some reason, so hardcoding for now
8080
-- just need to ensure both places are updated together
8181

82-
_G.versionInfo = { major=20260205, minor=30, revision=0 }
82+
_G.versionInfo = { major=20260206, minor=30, revision=0 }
8383

8484
_G.pluginVersion = string.format("%d.%d", versionInfo.major, versionInfo.minor)
8585
-- Auto-update checker

piwigoPublish.lrplugin/PWImportService.lua

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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

Comments
 (0)