[RELEASE] iPhoto Plugin Addon for XBMC

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jingai Offline
Skilled Skinner
Posts: 1,111
Joined: Mar 2010
Reputation: 12
Post: #31
NewFolk Wrote:Hello, will your script work with win7 if I copy iPhoto library?

It should, but it should also work if you just share out the iPhoto Library from your Mac.

Disclaimer: I don't actually have any real Windows machines to test with, so if this is not working, please post your debug log here so I can have a look.

-j
find quote
NewFolk Offline
Junior Member
Posts: 34
Joined: Jan 2011
Reputation: 0
Post: #32
Debug it is log file of xbmc ? If yes it is the same to Pavla log.

How I share it ? I see only my local disk when I'm looking for iPhoto library path. While I see Mac in explorer.
(This post was last modified: 2011-05-15 17:14 by NewFolk.)
find quote
jingai Offline
Skilled Skinner
Posts: 1,111
Joined: Mar 2010
Reputation: 12
Post: #33
NewFolk Wrote:Debug it is log file of xbmc ? If yes it is the same to Pavla log.

If you're using Dharma and version 1.4.5 of the iPhoto plugin, it shouldn't be the same as Pavla's log -- there is no instance of that line in 1.4.5.

Are you sure you updated the iPhoto plugin to 1.4.5? And are you sure the error you're receiving is still the same? If you post your debug log, I can look.

Quote:How I share it ? I see only my local disk when I'm looking for iPhoto library path. While I see Mac in explorer.

Map the share from the Mac in Windows. You should then be able to get to it from the plugin settings in XBMC.

-j
find quote
NewFolk Offline
Junior Member
Posts: 34
Joined: Jan 2011
Reputation: 0
Post: #34
Code:
13:23:09 T:1588 M:2802503680  NOTICE: -->Python Interpreter Initialized<--
13:23:09 T:1588 M:2802503680   ERROR: Error Type: exceptions.SyntaxError
13:23:09 T:1588 M:2802503680   ERROR: Error Contents: ('invalid syntax', ('C:\\Users\\Media\\AppData\\Roaming\\XBMC\\addons\\jingai-plugin.image.iphoto-0f739ed\\addon.py', 77, 13, "    with open(filename, 'rb') as f:\n"))
13:23:09 T:1588 M:2802483200   ERROR:   File "C:\Users\Media\AppData\Roaming\XBMC\addons\jingai-plugin.image.iphoto-0f739ed\addon.py", line 77
                                                with open(filename, 'rb') as f:
                                                        ^
                                            SyntaxError: invalid syntax
13:23:09 T:208 M:2802454528   ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.image.iphoto/
13:23:09 T:208 M:2802454528   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/) failed
13:23:17 T:4680 M:2799026176  NOTICE: -->Python Interpreter Initialized<--

my log.
find quote
jingai Offline
Skilled Skinner
Posts: 1,111
Joined: Mar 2010
Reputation: 12
Post: #35
NewFolk Wrote:
Code:
13:23:09 T:1588 M:2802503680   ERROR: Error Contents: ('invalid syntax', ('C:\\Users\\Media\\AppData\\Roaming\\XBMC\\addons\\jingai-plugin.image.iphoto-0f739ed\\addon.py', 77, 13, "    with open(filename, 'rb') as f:\n"))

That line does not exist in version 1.4.5. However, the plugin appears to be installed in "plugin.image.iphoto-0739ed". 0739ed is the last commit in the master branch of my plugin, which is for eden-pre.

Are you checking out the code from my repository by hand or something? If so, and you're really using dharma, you're checking out the wrong branch. It's probably best to just delete the plugin and let XBMC handle the updates, unless you're making local changes or something.

-j
find quote
azeroth Offline
Junior Member
Posts: 6
Joined: Apr 2011
Reputation: 0
Post: #36
So it seems that the iphoto almost works in windows. When I point it to the iphoto library folder (it only sees it if its in movies btw) it does scan and pull back all my albums. When i try to select any of the albums it does nothing. Any ideas? Thanks!
find quote
jingai Offline
Skilled Skinner
Posts: 1,111
Joined: Mar 2010
Reputation: 12
Post: #37
azeroth Wrote:So it seems that the iphoto almost works in windows. When I point it to the iphoto library folder (it only sees it if its in movies btw)

If you use smb:// style path to your iPhoto Library, then yes, it does need to be in Movies. I know it's odd, but it's a limitation in XBMC.

If you mount the share in Windows, you don't need to do that, though.

Quote:it does scan and pull back all my albums. When i try to select any of the albums it does nothing. Any ideas? Thanks!

I'd need to see your debug log. I do know that it does actually work under Windows -- I just tested v1.4.5 of the plugin on a Windows 7 box running XBMC 10.1 and it worked fine.

Also, are you using stable XBMC or a nightly?

-j
find quote
azeroth Offline
Junior Member
Posts: 6
Joined: Apr 2011
Reputation: 0
Post: #38
Thanks for the quick reply!

I'm using the official 10.1 release. My system is running Win 7 ultimate x64.

There are a lot of warnings/errors when i press the addin, i'll try to list unique ones without the repeats.

13:28:46 T:4576 M:2580582400 NOTICE: as 'smb://SERVER/raid/Pictures/iPhoto Library/'
13:28:50 T:3320 M:2576015360 NOTICE: -->Python Interpreter Initialized<--
13:28:51 T:3320 M:2576842752 NOTICE: {'action': 'albums'}
13:28:51 T:3320 M:2576838656 NOTICE: 'albumid'
13:28:51 T:5496 M:2576556032 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(plugin) in plugin://plugin.image.iphoto/?action=albums&albumid=2518
13:28:51 T:5496 M:2576556032 WARNING: Previous line repeats 1 times.
13:28:51 T:5496 M:2576556032 WARNING: WARNING: File is larger than 32bit stat can


3:28:51 T:4616 M:2576556032 ERROR: CPicture::CacheImage Unable to create new image special://masterprofile/Thumbnails/7/7e1291cc from image plugin://plugin.image.iphoto/?action=albums&albumid=2524
13:28:51 T:5496 M:2576556032 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(plugin) in plugin://plugin.image.iphoto/?action=albums&albumid=4149
13:28:51 T:5496 M:2576556032 WARNING: Previous line repeats 1 times.
13:28:51 T:5496 M:2576556032 WARNING: WARNING: File is larger than 32bit stat can handle, file size will be reported as 0 bytes
13:28:51 T:5496 M:2576556032 WARNING: XFILE::CFileFactory::CreateLoader - Unsupported protocol(plugin) in plugin://plugin.image.iphoto/?action=albums&albumid=4149
13:28:51 T:5496 M:2576556032 ERROR: CPicture::CacheImage Unable to create new image special://masterprofile/Thumbnails/a/a9afd965 from image plugin://plugin.image.iphoto/?action=albums&albumid=4149


Did I possibly install incorrectly? All I did was install from within xbmc, all settings at default with the source pointing at the smb share.


Do I need a certain version of iPhoto for the xml and files to formated to work with your plugin?
(This post was last modified: 2011-06-09 20:39 by azeroth.)
find quote
jingai Offline
Skilled Skinner
Posts: 1,111
Joined: Mar 2010
Reputation: 12
Post: #39
I've verified that the plugin works with at least the iPhoto from iLife '09 and '11. Not sure about earlier versions.

When you select an album/event/etc, do you at least see placeholders for the images that are supposed to be there? Or does XBMC say the addon failed?

What I'd really need to see is the debug log (complete) after clicking Update Library from within the plugin, and then after selecting an album.

-j
find quote
azeroth Offline
Junior Member
Posts: 6
Joined: Apr 2011
Reputation: 0
Post: #40
I don't see any place holders or even an error. When I click on an album nothing happens...

Here are the 2 debug logs

Album (a single click on an album):
http://pastebin.com/SAupJ7T5

Update Library:
http://pastebin.com/w3GnLYA6

I'll try to figure out what iPhoto I'm running and possibly upgrade. I have a newer mac around here that maybe I can test with.

Thanks!
find quote
azeroth Offline
Junior Member
Posts: 6
Joined: Apr 2011
Reputation: 0
Post: #41
It was my iPhoto library. I updated it with the newer computer and all is well. Sorry for the post! Thanks for the plugin!!!

Now I just have to find a newer iLife for my computer that I normally use with iPhoto lol

Thanks again!
find quote
jingai Offline
Skilled Skinner
Posts: 1,111
Joined: Mar 2010
Reputation: 12
Post: #42
azeroth Wrote:It was my iPhoto library. I updated it with the newer computer and all is well. Sorry for the post! Thanks for the plugin!!!

Now I just have to find a newer iLife for my computer that I normally use with iPhoto lol

Thanks again!

Oh, good. I was just going to reply to you that your log looked like it wasn't actually importing Tongue

Out of curiosity, what version of iPhoto/iLife were you using when it failed?

-j
find quote
GGet Offline
Junior Member
Posts: 10
Joined: Jun 2011
Reputation: 0
Post: #43
I'm running into the error "Script failed: addon.py"

Below is the (what I think is) relevant lines from the log file
Code:
22:34:30 T:2942024560 M:538214400   DEBUG: StartScript - calling plugin iPhoto('plugin://plugin.image.iphoto/','0','')
22:34:30 T:2942024560 M:538214400    INFO: initializing python engine.
22:34:30 T:2942024560 M:538214400   DEBUG: Loading: /usr/lib/xbmc/system/python/python24-i486-linux.so
22:34:30 T:2942024560 M:538157056   DEBUG: Python wrapper library linked with internal Python library
22:34:31 T:2942024560 M:538042368   DEBUG: new python thread created. id=2
22:34:31 T:2942024560 M:538042368   DEBUG: WaitOnScriptResult - waiting on the iPhoto plugin...
22:34:31 T:2933631856 M:538042368   DEBUG: thread start, auto delete: 0
22:34:31 T:2933631856 M:538042368   DEBUG: Python thread: start processing
22:34:31 T:2933631856 M:537915392  NOTICE: -->Python Interpreter Initialized<--
22:34:31 T:2933631856 M:537915392   DEBUG: Process - The source file to load is /home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py
22:34:31 T:2933631856 M:537915392   DEBUG: Process - Setting the Python path to /home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed:/home/guy/.xbmc/addons/script.module.simplejson/lib:/home/guy/.xbmc/addons/script.module.beautifulsoup/lib:/usr/lib/xbmc/addons/script.module.pil/lib:/usr/lib/xbmc/addons/script.module.pysqlite/lib:/usr/lib/xbmc/system/python/python24.zip:/usr/share/xbmc/system/python/lib/python24.zip:/usr/share/xbmc/system/python/lib/python2.4/:/usr/share/xbmc/system/python/lib/python2.4/plat-linux2:/usr/share/xbmc/system/python/lib/python2.4/lib-tk:/usr/share/xbmc/system/python/lib/python2.4/lib-dynload
22:34:31 T:2933631856 M:537915392   DEBUG: Process - Entering source directory /home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed
22:34:31 T:2933631856 M:537915392    INFO: -->Python script returned the following error<--
22:34:31 T:2933631856 M:537915392   ERROR: Error Type: exceptions.SyntaxError
22:34:31 T:2933631856 M:537915392   ERROR: Error Contents: ('invalid syntax', ('/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py', 77, 13, "    with open(filename, 'rb') as f:\n"))
22:34:31 T:2933631856 M:537915392   ERROR:   File "/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py", line 77
                                                with open(filename, 'rb') as f:
                                                        ^
                                            SyntaxError: invalid syntax
22:34:31 T:2933631856 M:537915392    INFO: -->End of Python script error report<--
22:34:31 T:2933631856 M:537661440   DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/time.so. flags: 2
22:34:31 T:2933631856 M:537661440   DEBUG: Loading: /home/guy/.xbmc/temp/time.so
22:34:31 T:2933631856 M:537661440   DEBUG: RegisterExtensionLib, adding time.so (0x984a3e0)
22:34:31 T:2933631856 M:537661440   DEBUG: xbp_dlsym - load symbol inittime
22:34:31 T:2933631856 M:537534464   DEBUG: xbp_dlopen loading python lib /usr/lib/xbmc/system/python/python24.zip/collections.so. flags: 2
22:34:31 T:2933631856 M:537661440   DEBUG: Loading: /home/guy/.xbmc/temp/collections.so
22:34:31 T:2933631856 M:537661440   DEBUG: RegisterExtensionLib, adding collections.so (0x98cacb0)
22:34:31 T:2933631856 M:537661440   DEBUG: xbp_dlsym - load symbol initcollections
22:34:31 T:2933631856 M:537661440    INFO: Python script stopped
22:34:31 T:2933631856 M:537661440   DEBUG: Thread 2933631856 terminating
22:34:31 T:2942024560 M:537661440   DEBUG:  WaitOnScriptResult - plugin exited prematurely - terminating
22:34:31 T:3079419776 M:537661440   ERROR: GetDirectory - Error getting plugin://plugin.image.iphoto/
22:34:31 T:3079419776 M:537661440   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/) failed
22:34:31 T:3079419776 M:537661440   DEBUG: CGUIMediaWindow::GetDirectory (addons://sources/image/)
22:34:31 T:3079419776 M:537661440   DEBUG:   ParentPath = []

I'm running XBMC on Ubuntu 11.04 with the iPhoto library networked from a Mac OS X 10.4 smb share. The share is mounted through Ubuntu, not XBMC.

Which I've done by
Code:
sudo mount -t cifs //netbios/directory/ /media/iPhoto/ -o username=username,password=password,file_mode=0777,dir_mode=0777

I've set up the share on the Mac using SharePoint.

I may not have privileges set right for the share when it's mounted but I can browse. I say this because when navigating the share using Nautilus the child-directories are read-only(only the first level down from parent the rest are rw below that)

I have v1.5.1 of the addon installed on the latest build of XBMC. I didn't enabe the SVN Repo when setting up.

Just to make sure; when setting the path for the AlbumData.xml file I only need to set the directory don't I? not select the actual file? (I can only see directories when navigating the 'set path' dialogue in the addon config.

Thanks in advance for any help anyone can give me with this.
find quote
jingai Offline
Skilled Skinner
Posts: 1,111
Joined: Mar 2010
Reputation: 12
Post: #44
GGet Wrote:I'm running into the error "Script failed: addon.py"

Below is the (what I think is) relevant lines from the log file
Code:
22:34:31 T:2933631856 M:537915392    INFO: -->Python script returned the following error<--
22:34:31 T:2933631856 M:537915392   ERROR: Error Type: exceptions.SyntaxError
22:34:31 T:2933631856 M:537915392   ERROR: Error Contents: ('invalid syntax', ('/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py', 77, 13, "    with open(filename, 'rb') as f:\n"))
22:34:31 T:2933631856 M:537915392   ERROR:   File "/home/guy/.xbmc/addons/jingai-plugin.image.iphoto-0f739ed/addon.py", line 77
                                                with open(filename, 'rb') as f:
                                                        ^
                                            SyntaxError: invalid syntax
22:34:31 T:2933631856 M:537915392    INFO: -->End of Python script error report<--

The eden-pre version of my plugin assumes you have Python 2.6, but it looks like you don't. Either that or whoever built your nightly built it with internal Python 2.4.

Installing Python 2.6 should solve the problem for you.

Quote:I may not have privileges set right for the share when it's mounted but I can browse. I say this because when navigating the share using Nautilus the child-directories are read-only(only the first level down from parent the rest are rw below that)

You won't need write access anyway, so you're fine.

Quote:Just to make sure; when setting the path for the AlbumData.xml file I only need to set the directory don't I? not select the actual file? (I can only see directories when navigating the 'set path' dialogue in the addon config.

That's correct.

-j
find quote
GGet Offline
Junior Member
Posts: 10
Joined: Jun 2011
Reputation: 0
Post: #45
Thanks for the quick reply. Python 2.6 is installed. Are there any other related packages I should check to see are installed?

I'd installed xbmc just by adding the maverick respository (couldn't find an 11.04 xbmc repo) and then installing by doing
Code:
apt-get install xbmc

Should I have installed using another method?

Thanks again for your help.
find quote
Post Reply