Skip to content

Commit 59243e0

Browse files
committed
Merge branch 'pr-44'
2 parents 27ac3b6 + 744f17b commit 59243e0

18 files changed

Lines changed: 62 additions & 926 deletions

.gitignore

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,13 @@ piwigoPublish.lrplugin/lrcUtils.lua
1414
piwigoPublish.lrplugin/PiwigoHelper.lua
1515

1616
# Other files
17+
*.bak
18+
.claude/
19+
__pycache__/
1720
cat layout.odt
1821
deploy.sh
1922
diagnostic.txt
2023
copilot-instructions.md
2124

22-
# i18n
23-
localize_plugin.py
24-
extract_localizable_strings.py
25-
localization_report.txt
25+
# Temporary folder for localisation tools
26+
piwigoPublish.lrplugin/__i18n_tmp__/

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,12 @@
11
# Changelog
2+
3+
## [20260205.30] - 2026-02-05
4+
### Fixed
5+
Fix #41 Problem with 'Clone Existing Publish Service - public/private setting
6+
7+
### Added
8+
- Preparation for locatalistion
9+
210
## [20260126.29] - 2026-01-26
311
### Fixed
412
Fix #41 Allow clone service to include unpublished photos from standard published collections

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=20260126, minor=29, revision=0 },
69+
VERSION = { major=20260205, minor=30, revision=0 },
7070
}

piwigoPublish.lrplugin/Init.lua

Lines changed: 1 addition & 2 deletions
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=20260126, minor=29, revision=0 }
82+
_G.versionInfo = { major=20260205, minor=30, revision=0 }
8383

8484
_G.pluginVersion = string.format("%d.%d", versionInfo.major, versionInfo.minor)
8585
-- Auto-update checker
@@ -97,4 +97,3 @@ LrTasks.startAsyncTask(function()
9797
end
9898
end)
9999

100-

piwigoPublish.lrplugin/Locales/en.lrproj/PluginStrings.txt

Lines changed: 0 additions & 410 deletions
This file was deleted.

piwigoPublish.lrplugin/Locales/en.lrproj/PluginStrings.txt.old

Lines changed: 0 additions & 13 deletions
This file was deleted.

piwigoPublish.lrplugin/Locales/fr.lrproj/PluginStrings.txt

Lines changed: 0 additions & 409 deletions
This file was deleted.

piwigoPublish.lrplugin/PWImportService.lua

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -101,15 +101,15 @@ local function processSmartCollectionQueue(smartColls, publishService, propertyT
101101
if not smartColls or index > #smartColls then
102102
releasePublishLock(serviceId)
103103
progressScope:done()
104-
LrDialogs.message("Clone completed", "Publish Service Clone omplete.", "info")
104+
LrDialogs.message("Clone completed", "Publish Service Clone Complete.", "info")
105105
return
106106
end
107107

108108
local entry = smartColls[index]
109109
if not entry then
110110
releasePublishLock(serviceId)
111111
progressScope:done()
112-
LrDialogs.message("Clone completed", "Publish Service Clone omplete.", "info")
112+
LrDialogs.message("Clone completed", "Publish Service Clone Complete.", "info")
113113
return -- done
114114
end
115115

@@ -362,7 +362,7 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
362362
if extra then
363363
if extra.collSettings then
364364
comment = extra.collSettings.comment or ""
365-
status = extra.collSettings.status or ""
365+
status = extra.collSettings.status or "public"
366366
end
367367
isSmartColl = extra.isSmartColl
368368
searchDesc = extra.searchDesc
@@ -388,22 +388,36 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
388388
local collectionSettings = newCollorSet:getCollectionSetInfoSummary().collectionSettings or {}
389389
if propertyTable.syncAlbumDescriptions then
390390
collectionSettings.albumDescription = comment
391-
collectionSettings.albumPrivate = status == "private"
392391
else
393392
collectionSettings.albumDescription = ""
393+
end
394+
if status == "private" then
395+
collectionSettings.albumPrivate = true
396+
else
394397
collectionSettings.albumPrivate = false
395398
end
399+
396400
if remoteAlbumId then
397401
local thisCat = PiwigoAPI.pwCategoriesGetThis(propertyTable, remoteAlbumId)
398402
if thisCat then
399-
if thisCat.name == name then
400-
albumUrl = propertyTable.host .. "/index.php?/category/" .. remoteAlbumId
401-
catalog:withWriteAccessDo("Add Piwigo details to collections", function()
402-
newCollorSet:setRemoteId(remoteAlbumId)
403-
newCollorSet:setRemoteUrl(albumUrl)
404-
newCollorSet:setCollectionSetSettings(collectionSettings)
405-
end)
403+
if propertyTable.syncAlbumDescriptions then
404+
if thisCat.description then
405+
collectionSettings.albumDescription = thisCat.description
406+
else
407+
collectionSettings.albumDescription = ""
408+
end
409+
end
410+
if thisCat.status == "public" then
411+
collectionSettings.albumPrivate = false
412+
else
413+
collectionSettings.albumPrivate = true
406414
end
415+
albumUrl = propertyTable.host .. "/index.php?/category/" .. remoteAlbumId
416+
catalog:withWriteAccessDo("Add Piwigo details to collections", function()
417+
newCollorSet:setRemoteId(remoteAlbumId)
418+
newCollorSet:setRemoteUrl(albumUrl)
419+
newCollorSet:setCollectionSetSettings(collectionSettings)
420+
end)
407421
end
408422
end
409423
end
@@ -464,6 +478,18 @@ local function createTree(nodes, parentSet, publishService, created, childrenInd
464478
-- check if remoote album exists and add to collection if so
465479
local thisCat = PiwigoAPI.pwCategoriesGetThis(propertyTable, remoteAlbumId)
466480
if thisCat then
481+
if propertyTable.syncAlbumDescriptions then
482+
if thisCat.description then
483+
collectionSettings.albumDescription = thisCat.description
484+
else
485+
collectionSettings.albumDescription = ""
486+
end
487+
end
488+
if thisCat.status == "public" then
489+
collectionSettings.albumPrivate = false
490+
else
491+
collectionSettings.albumPrivate = true
492+
end
467493
albumUrl = propertyTable.host .. "/index.php?/category/" .. remoteAlbumId
468494
catalog:withWriteAccessDo("Add Piwigo details to collections", function()
469495
newCollorSet:setRemoteId(remoteAlbumId)

piwigoPublish.lrplugin/PWSetAlbumCover.lua

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ local function SetAlbumCover()
115115
if not (publishSettings.Connected) then
116116
rv = PiwigoAPI.login(publishSettings)
117117
if not rv then
118-
LrDialogs.message('SetAlbumCover - cannot connect to piwigo')
118+
LrDialogs.message("SetAlbumCover - cannot connect to piwigo")
119119
return false
120120
end
121121
end

piwigoPublish.lrplugin/PiwigoAPI.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ function PiwigoAPI.pwConnect(propertyTable)
13651365
-- get list of all tagIDs
13661366
rv, propertyTable.tagTable = PiwigoAPI.getTagList(propertyTable)
13671367
if not rv then
1368-
LrDialogs.message('PiwigoAPI.pwConnect - cannot get taglist from Piwigo')
1368+
LrDialogs.message("PiwigoAPI.pwConnect - cannot get taglist from Piwigo")
13691369
return false
13701370
end
13711371

@@ -2795,7 +2795,7 @@ function PiwigoAPI.setAlbumCover(publishService)
27952795
if not (publishSettings.Connected) then
27962796
rv = PiwigoAPI.login(publishSettings)
27972797
if not rv then
2798-
LrDialogs.message('PiwigoAPI.setAlbumCover - cannot connect to piwigo')
2798+
LrDialogs.message("PiwigoAPI.setAlbumCover - cannot connect to piwigo")
27992799
return false
28002800
end
28012801
end

0 commit comments

Comments
 (0)