Kodi Community Forum

Full Version: [RELEASE] iPhoto Plugin Addon for XBMC
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29
(2012-10-17, 20:28)tenzion Wrote: [ -> ]Regarding the library question - I haven't been using iPhoto much - but all the Albums are named (as they are imported from Lightroom), whereas none of the Events are named (not by me anyway).

What I mean is, are any of the Event or Album titles blank/empty?

I just tried removing a title from one my events and iPhoto replaced it with a date (I'm assuming the oldest date it found in the EXIF of the contained images). It's possible I guess that if none of the images had EXIF timestamps that it would use a UUID instead, however.

(2012-10-17, 20:28)tenzion Wrote: [ -> ]I don't know if this complicates things that the Albums are imported (or rather exported) from Lightroom??

How was this accomplished? Does Lightroom have a "export to iPhoto" feature, or did you merely export the images to disk and then drag them to iPhoto?

(2012-10-17, 20:28)tenzion Wrote: [ -> ]Does iPhoto do anything to the Albums/Events in this respect?

Clearly it did something different than what I've come across. But I use Aperture3 for photo editing and just export to JPEGs for importing to iPhoto.
@tenzion,

iPhoto 1.9.2 will be released shortly to address this issue for you. You're Events section will still have the oddly-named events because that's how they're actually stored in the XML, but the Albums section will no longer show the duplicates.
I'm getting the following error using 1.9.2 with iPhoto 9.4.1:

Code:
NOTICE: -->Python Interpreter Initialized<--
NOTICE: {'action': 'rescan'}
NOTICE: iphoto.db: Detected iPhoto Version 9.4
NOTICE: iPhoto.db: Rewriting iPhoto archive path '/Users/username/Pictures/iPhoto Library'
NOTICE: iPhoto.db: as 'nfs://nas/Pictures/'
NOTICE: iphoto.db: commitAll: 'key image face index'
NOTICE: iphoto.db: Parse: 'key image face index'
ERROR: Traceback (most recent call last):
ERROR:   File "/Users/username/Library/Application Support/XBMC/addons/plugin.image.iphoto/addon.py", line 591, in import_library
ERROR:     iparser.Parse()
ERROR:   File "/Users/username/Library/Application Support/XBMC/addons/plugin.image.iphoto/resources/lib/iphoto_parser.py", line 990, in Parse
ERROR:     raise e
ERROR: KeyError: 'key image face index'
NOTICE: None
NOTICE: iPhoto: Library parse failed.
(2012-10-18, 20:01)guyz Wrote: [ -> ]I'm getting the following error using 1.9.2 with iPhoto 9.4.1:

Easiest way for me to help you is if you could send me your AlbumData.xml, if possible.

edit: If you don't want to send the whole thing, I'd to see at least one (or all) of the Face sections after "List of Faces" in the XML. In mine, the "key image face index" is there and contains a valid value. Not sure why yours does not.

By the way, did you get 1.9.2 from github? I didn't think it had been pulled into the official repo yet..
(2012-10-18, 21:37)jingai Wrote: [ -> ]By the way, did you get 1.9.2 from github? I didn't think it had been pulled into the official repo yet..

Yes.

Purely by coincidence I installed a new XBMC system today and could not get this working. After an existing install also failed a search let me to github and then here.

I also want to say thanks for creating this plugin, it is excellent!
FYI for anyone else having the same issue as guyz: it was caused by an invalid entry in the AlbumData.xml. It's unclear how it happened, but I think it probably will be an isolated case.

However, if anyone else has the same problem, do let me know here. I have a workaround already in place in the addon, but I'm not going to bother to release a new version just yet (just released 1.9.2 and the XBMC team frowns upon quick back-to-back releases).

guyz managed to fix his/her issue by deleting the offending bits from the XML. If you need assistance with this before the next version of my addon is released, please PM me.
Also, Keywords are currently broken in the addon when used with iPhoto 9.4. I'm working on fixing this as quickly as I can, but if this is a critical feature for you, you should refrain from updating iPhoto until I've gotten to it.
I get the exact same error as Guyz. Allready tried to rebuild the iphoto database (hold command + Option then start iPhoto) but to no avail.

How can I fix this?

Thanks!
(2012-10-21, 19:02)MrMario64 Wrote: [ -> ]I get the exact same error as Guyz. Allready tried to rebuild the iphoto database (hold command + Option then start iPhoto) but to no avail.

How can I fix this?

The easiest way would be for you to send me your AlbumData.xml and I can fix it for you and send it back. Or I can just go ahead and release 1.9.3 which works around this error. I had planned on waiting until I had Keywords working again to release it, but it seems this particular issue isn't as isolated as I thought it might have been.

To do it yourself, back up your AlbumData.xml first. Then, open it up in a text editor and search for "List of Faces". Inside there is an entry for each face. You're looking for one (or more) that does not contain a "key image face index" key. Delete the whole block for any that lack this key.

For instance, here is an invalid Face:

Code:
<key>2332</key>
                        <dict>
                        <key>key</key>
                        <string>2332</string>
                        <key>name</key>
                        <string>John Doe</string>
                        <key>key image</key>
                        <string>(null)</string>
                        <key>PhotoCount</key>
                        <string>598</string>
                        <key>Order</key>
                        <integer>0</integer>
                        </dict>

Note the lack of a "<key>key image face index</key>". You would delete this entire block, from the first "<key>2332</key>" down to the "</dict>".

After you delete the offending face(s), make sure you load up iPhoto again and ensure that it can still read your library. If not, copy your backup back in and try again.

Here's what a valid one looks like, for reference:

Code:
<key>2332</key>
                        <dict>
                        <key>key</key>
                        <string>2332</string>
                        <key>name</key>
                        <string>John Doe</string>
                        <key>key image</key>
                        <string>Jz8BKhKNQdsk%0RRPUtxbg</string>
                        <key>key image face index</key>
                        <integer>1</integer>
                        <key>PhotoCount</key>
                        <string>598</string>
                        <key>Order</key>
                        <integer>0</integer>
                        </dict>
Worked like a charm!

I noticed that the 2 person that had the missing keys where the 2 last persons I added in the faces feature.
Thanks for this, now I can enjoy my pictures! Hurray!!!
(2012-10-21, 19:41)MrMario64 Wrote: [ -> ]I noticed that the 2 person that had the missing keys where the 2 last persons I added in the faces feature.

Hmm. Do you know if you added these last 2 faces before or after you upgraded iPhoto to 9.4? I'm hoping this isn't a bug/difference in the way iPhoto 9.4 adds faces...

(2012-10-21, 19:41)MrMario64 Wrote: [ -> ]Thanks for this, now I can enjoy my pictures! Hurray!!!

No problem. Glad it's working for you!
I added them absolutely before upgrading to 9.4
FYI, 1.9.3 has been pushed up. This works around the bogus Face entries some are seeing since the iPhoto 9.4 update. It does not yet support Keywords, however. Apple pulled the keywords out of the XML and I haven't yet figured out where in the databases it's storing these. The list of keywords seems to be in Database/Keywords.plist, but that doesn't contain the links to the images.
Hello!
I am a complete nooby with XBMC so forgive me if I ask a stupid question.
I have Mountain Lion, latest update, Iphoto 9.4.1 and Aperture ( latest version). I have just installed XBMC and the Iphoto plugin.
I pointed the plugin to the folder where my photo library resides but it cannot scan it, it says that the database is corrupt. I delete it as requested but then I get the same problem.
I looked into my Aperture library (now aperture/iphoto libs are shared), and there is no AlbumData.xml anywhere. Only ApertureData.xml...
Here is my XBMC log: http://pastebin.com/FnrC4TWr
Any clue how to fix this?
Thanks!
Al
xexets, I don't personally use the shared aperture/iphoto library functionality, as to me, iPhoto is more of a cataloguing program and aperture is the editing program. In my use, I keep the two separate, since I generally archive some photos/versions that I'd like to hang on to but not display to anyone.

My addon does not directly parse Aperture libraries, but according to this post and this post if you just call the iPhoto Library the 'main' library and then point it at the "iPhoto Library" path it should work. Have you tried this?
Thank for the very prompt reply!

I tried renaming Aperture Library to iPhoto Library, changing the extension, changing, inside the package the ApertureData.xml file to AlbumData.xml file, went through various routines to repair the library and regenerate the album data.xml but the problem seems to be that the liubrary was born as aperture and not iphoto. Nothing really works. I'll try with a brand new Iphoto library and post back.
Thanks in any case!
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29