Skip to content

Commit

Permalink
Fixed issue that occurs when removing a photo if the UUID of Photos i…
Browse files Browse the repository at this point in the history
…s not present in Photos.
  • Loading branch information
sto3014 committed Feb 24, 2024
1 parent 62509ea commit ee31cc5
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 9 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,16 @@ rendition is marked as skipped.

### Fixed

* Fixed issue when publish process must start Photos app and thereby, import or photo fails.
* Fixed issue that occurs when publish process must start Photos app and thereby, import or photo fails.

### Changed

* Remove version from install script

## [2.1.0.2] - 2024-02-24

### Fixed

* Fixed issue that occurs when removing a photo if the UUID of Photos is not present in Photos.


2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ LRPhotos is a Lightroom Classic publishing service for Apple's Photos app.

---

1. Download the zip archive from [GitHub](https://github.com/sto3014/LRPhotos/blob/main/target/LRPhotos2.1.0.1_mac.zip).
1. Download the zip archive from [GitHub](https://github.com/sto3014/LRPhotos/blob/main/target/LRPhotos2.1.0.2_mac.zip).
2. Extract the archive in the download folder
3. Copy plug-in, applescript files and automator workflow into ~/Library
Open a terminal window, change to Downloads/LRPhotos and execute install.sh:
Expand Down
2 changes: 1 addition & 1 deletion package.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export SOURCE_DIR=$SCRIPT_DIR/src/main/$PACKAGE_NAME.lrdevplugin
export SOURCE_DIR_SERVICES=/Users/dieterstockhausen/Projekte/Automation/Services
export SOURCE_DIR_SCRIPT_LIBRARIES="/Users/dieterstockhausen/Projekte/Automation/Script Libraries/src"
export RESOURCE_DIR=$SCRIPT_DIR/res
export VERSION=2.1.0.1
export VERSION=2.1.0.2
#
# mac
#
Expand Down
2 changes: 1 addition & 1 deletion src/main/lrphotos.lrdevplugin/Info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ return {

LrPluginName = 'Photos',
LrToolkitIdentifier = 'at.homebrew.lrphotos',
VERSION = { major = 2, minor = 1, revision = 0, build = 1, },
VERSION = { major = 2, minor = 1, revision = 0, build = 2, },
LrInitPlugin = "InitPlugin.lua",
-- Add the Metadata Definition File
LrMetadataProvider = 'PhotosMetadataDefinition.lua',
Expand Down
10 changes: 5 additions & 5 deletions src/main/lrphotos.lrdevplugin/PhotosImport.applescript
Original file line number Diff line number Diff line change
Expand Up @@ -614,7 +614,7 @@ on remove(photoDescriptors, session)
set targetAlbum to album by path albumName of session without create if not exists
end tell
if targetAlbum is missing value then
log message "Album " & albumName of session & " as not found." as severe
log message "Album " & albumName of session & " was not found." as severe
return removedPhotos
end if

Expand All @@ -625,10 +625,10 @@ on remove(photoDescriptors, session)
log message "remove photo " & photosId of photoDescriptor & " from album " & name of targetAlbum
tell me to set targetPhoto to getPhotoById(photosId of photoDescriptor)
if targetPhoto is missing value then
log message "photos was not found" as fault
log message "photo was not found" as alarm
-- target photo was not found at all.
-- but as it was sent from LR we should clear photosId in LR
set newEntry to "n.a." & ":" & lrId of photoDescriptor & ":" & lrCat of photoDescriptor & ":" & photosId
set newEntry to "n.a." & ":" & lrId of photoDescriptor & ":" & lrCat of photoDescriptor & ":" & photosId of photoDescriptor
copy newEntry to the end of removedPhotos
else
-- the photo exists
Expand Down Expand Up @@ -712,7 +712,7 @@ on updateSessionFile(sessionFile, session)
end tell
write utf8Content to sessionFile
close access fileRef
log message "updateSessionFile() start"
log message "updateSessionFile() end"
end updateSessionFile
-------------------------------------------------------------------------------
--
Expand Down Expand Up @@ -901,7 +901,7 @@ on run argv
log message "PhotosImport.app start"

if (argv = me) then
set argv to {"/Users/dieterstockhausen/Library/Caches/at.homebrew.lrphotos/Dieses und Dases/Tests/Fotos"}
set argv to {"/Users/dieterstockhausen/Library/Caches/at.homebrew.lrphotos/Dieses und Dases/Test/Fotos"}
end if
-- Read the directory from the input and define the session file
set tempFolder to item 1 of argv
Expand Down
Binary file added target/LRPhotos2.1.0.2_mac.zip
Binary file not shown.

0 comments on commit ee31cc5

Please sign in to comment.