AppleScript add videos in Photos library to specific album, from their name on disk
I'm trying to use AppleScript to move videos to a specific folder. I have a program that determines if the videos should be moved to that folder, using directly the video files on disk within the Photos Library container. Therefore, I have the path and name of the files on disk, within the library.
Now I would like basically to tell photos to add these videos to a specific album, but I do not know how to identify these videos within the script.
I know from the Photos script definitions that each media item should have a filename property, but I don't know how to select an element based on its filename...
My idea (which doesn't work as is) :
tell application "Photos"
set ImgSel to (get media item with filename "033F9BD2-9DB3-4DCD-B281-0714BDC50C48")
add ImgSel to album "AppleScript album"
end tell