In a Ruby script I access the iPhoto database, I get a root_folder uuid from the RKFolder in the Library.apdb :
@root_folder_uuid = @db.execute("SELECT uuid FROM RKFolder table
WHERE name = '#{@config["root_folder"]}'
AND parentFolderUuid = 'TopLevelAlbums' ").flatten.first
then using this root uuid , I get get all albums uuid within the root folder, from the RKAlbum in the Library.apdb :
albums = @db.execute("SELECT uuid, name FROM RKAlbum table
WHERE folderUuid = '#{@root_folder_uuid}'
AND albumSubclass = 3 ")
Now , I need to get all photos within each album... when i look at the RKMaster table (where all photos records are stored) .. I don't see what is the relationship attribute between a photo record and an album....
any hints ? thanks for help
Aucun commentaire:
Enregistrer un commentaire