[RELEASE] iPhoto Plugin Addon for XBMC

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
GOODRIDDANCE Offline
Junior Member
Posts: 15
Joined: Jul 2009
Reputation: 0
Location: Germany
Post: #46
I´m running XMC Live 10.1 Dharma.
The iPhoto Database is on a Mac running 10.6.8.0 / iPhoto 2011 and is shared via SMB.

I´ve installe the plugin today / Version 1.4.5.
In the configuration of the plugin i switched to the SMB share wich I added before in Videos.
So far so good.

But now when I click in Pictures and open the Plugin 1.4.5 i see Folders like "Albums" "Faces" ect. and I see in the right up "Script failed: addon.py"

This is a XBMC Live 10.1 Dharma without any changes downloaded Image today from xmbc.org.
Are you sure that your script is running out of the box via XBMC Live?
It seems that it isn´t so.

Does anyone have a solution for me?
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #47
GGet Wrote:Thanks for the quick reply. Python 2.6 is installed. Are there any other related packages I should check to see are installed

The "with...open" syntax is new as of Python 2.5, so I can only assume that you're using a version less than that.

What does /usr/bin/python point to? It should be a symlink to python2.6. You probably have multiple versions of Python installed.

If you do have Python 2.4 and don't need it for anything in particular, you can just try removing it. If you do need it, use update-alternatives to change the default version to Python 2.6.

Also, you are sure you are running a nightly build of XBMC, yes? If you're running 10.x you've got the wrong version of my plugin (it should be 1.4.5).

-j
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #48
GOODRIDDANCE Wrote:Are you sure that your script is running out of the box via XBMC Live?
It seems that it isn´t so.

Well, I definitely cannot say it works for every user right out of the box, as there can be bugs that I have not yet found. But I can say it works for me Smile

I will need to see your debug log to tell you anything further, though.

-j
find quote
GOODRIDDANCE Offline
Junior Member
Posts: 15
Joined: Jul 2009
Reputation: 0
Location: Germany
Post: #49
Here are the last lines from the xbmc.log


21:35:46 T:2194590576 M:1900367872 NOTICE: -->Python Interpreter Initialized<--
21:35:48 T:2194590576 M:1899855872 NOTICE: {'action': 'albums'}
21:35:48 T:2194590576 M:1899855872 NOTICE: 'albumid'
21:35:48 T:3077498752 M:1899855872 ERROR: GetDirectory - Error getting plugin://plugin.image.iphoto/?action=albums
21:35:48 T:3077498752 M:1899855872 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/?action=albums) failed
21:35:50 T:3077498752 M:1899765760 ERROR: Texture manager unable to load file: /home/dba/.xbmc/addons/plugin.image.iphoto/resources/icons/faces.png
21:35:52 T:2205080432 M:1899765760 NOTICE: -->Python Interpreter Initialized<--
21:35:55 T:2205080432 M:1899765760 NOTICE: {'action': 'albums'}
21:35:55 T:2205080432 M:1899765760 NOTICE: 'albumid'
21:35:55 T:3077498752 M:1899761664 ERROR: GetDirectory - Error getting plugin://plugin.image.iphoto/?action=albums
21:35:55 T:3077498752 M:1899761664 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/?action=albums) failed
21:35:59 T:2845911920 M:1899937792 NOTICE: -->Python Interpreter Initialized<--
21:36:01 T:2845911920 M:1899929600 ERROR: Error Type: exceptions.IOError
21:36:01 T:2845911920 M:1899929600 ERROR: Error Contents: (2, 'No such file or directory', 'smb://dba:mypassword@iMac/Pictures/AlbumData.xml')
21:36:01 T:2845911920 M:1899929600 ERROR: Traceback (most recent call last):
File "/home/dba/.xbmc/addons/plugin.image.iphoto/addon.py", line 574, in ?
copyfile(origxml, tmpfile)
File "/usr/lib/xbmc/system/python/python24.zip/shutil.py", line 47, in copyfile
fsrc = open(src, 'rb')
IOError: (2, 'No such file or directory', 'smb://dba:mypassword@iMac/Pictures/AlbumData.xml')
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #50
GOODRIDDANCE Wrote:Here are the last lines from the xbmc.log

IOError: (2, 'No such file or directory', 'smb://dba:mypassword@iMac/Pictures/AlbumData.xml')

You chose the wrong directory in the plugin configuration. You need to choose the directory called "iPhoto Library".

-j
find quote
GOODRIDDANCE Offline
Junior Member
Posts: 15
Joined: Jul 2009
Reputation: 0
Location: Germany
Post: #51
Yes i did - in the Configuration it sais: "choose the path to the database" but this is wrong i have to choose the database itself:
not "smb://dba:mypassword@iMac/Pictures"

so it works: "smb://dba:mypassword@iMac/Pictures/iphoto database"
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #52
GOODRIDDANCE Wrote:Yes i did - in the Configuration it sais: "choose the path to the database" but this is wrong i have to choose the database itself

It's not wrong -- the "iPhoto Library" folder is not the database; the file inside called "AlbumData.xml" is.

But I'm glad it's working for you now.

-j
find quote
GGet Offline
Junior Member
Posts: 10
Joined: Jun 2011
Reputation: 0
Post: #53
jingai Wrote:The "with...open" syntax is new as of Python 2.5, so I can only assume that you're using a version less than that.

What does /usr/bin/python point to? It should be a symlink to python2.6. You probably have multiple versions of Python installed.

If you do have Python 2.4 and don't need it for anything in particular, you can just try removing it. If you do need it, use update-alternatives to change the default version to Python 2.6.

Also, you are sure you are running a nightly build of XBMC, yes? If you're running 10.x you've got the wrong version of my plugin (it should be 1.4.5).

-j


Hadn't had a chance to try your solution until last night but it's now sorted, thank you very much.

I've now run into the issue that azeroth encountered of nothing happening after clicking on an album but I'm assuming this is related to my old version of iPhoto, I think it's either 5 or 6 that I'm running. Time to upgrade I think (everyone seems to be dropping support for 10.4 anyway)

Haven't had an opportunity to get to the log yet but will post when I can.

Thanks for your help and the great addon.
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #54
GGet Wrote:I've now run into the issue that azeroth encountered of nothing happening after clicking on an album but I'm assuming this is related to my old version of iPhoto, I think it's either 5 or 6 that I'm running. Time to upgrade I think (everyone seems to be dropping support for 10.4 anyway)

Aye, I have only tested with iPhoto 8 and 9 (from iLife '09 and '11). Reports from other users seem to indicate it doesn't work with prior versions.

If you wouldn't mind, please post what worked for you regarding the Python version issue, so other users that run into the same problem can see it.

-j
find quote
GGet Offline
Junior Member
Posts: 10
Joined: Jun 2011
Reputation: 0
Post: #55
jingai Wrote:Aye, I have only tested with iPhoto 8 and 9 (from iLife '09 and '11). Reports from other users seem to indicate it doesn't work with prior versions.

If you wouldn't mind, please post what worked for you regarding the Python version issue, so other users that run into the same problem can see it.

-j

I did two things, first was installing (after removing) xbmc from the xbmc unstable repo instead of the maverick one.

The second was downloading the correct addon .zip file. I'd originally downloaded the 'master' version instead of the Dharma one.

Below is my latest log file from http://pastebin.com/xnZpJuss

One odd thing that you might be able to see is when launching XBMC I went to Pictures>addons and the version of the iPhoto addon was 1.5.2 but was 1.4.6 when I last logged out. I uninstalled the addon which then left 1.4.6 installed. Go figure.


Thanks again,
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #56
GGet Wrote:I did two things, first was installing (after removing) xbmc from the xbmc unstable repo instead of the maverick one.

Ah, so you were using my unstable plugin with stable (Dharma) XBMC before. Yes, that won't work.

Quote:The second was downloading the correct addon .zip file. I'd originally downloaded the 'master' version instead of the Dharma one.

This is incorrect. The master branch is for eden-pre (nightlies), not dharma. The dharma branch is, as its name implies, for dharma (XBMC 10.0 and 10.1).

Is there some reason you don't just use the addon manager built into XBMC? It should fetch the appropriate version for you. I ask because you're not the first person to end up in this situation and I'm wondering why people are choosing to install the addon by hand.

Quote:One odd thing that you might be able to see is when launching XBMC I went to Pictures>addons and the version of the iPhoto addon was 1.5.2 but was 1.4.6 when I last logged out. I uninstalled the addon which then left 1.4.6 installed. Go figure.

It probably tried to update the plugin for you to the eden-pre version, and you overwrote it with 1.4.6. Version 1.5.x is for eden-pre. Version 1.4.x is for dharma.

Or, to be more specific: odd-numbered minor versions are unstable, even-numbered minor versions are stable. The minor version is the digit after the first decimal place.

-j
find quote
GGet Offline
Junior Member
Posts: 10
Joined: Jun 2011
Reputation: 0
Post: #57
jingai Wrote:This is incorrect. The master branch is for eden-pre (nightlies), not dharma. The dharma branch is, as its name implies, for dharma (XBMC 10.0 and 10.1).

ah, what I meant was I was using the master eden-pre version on dharma.

jingai Wrote:Is there some reason you don't just use the addon manager built into XBMC? It should fetch the appropriate version for you. I ask because you're not the first person to end up in this situation and I'm wondering why people are choosing to install the addon by hand.

-j

haha, because I'm a jackass. I'm new to XBMC and didn't realise there was an addon manager. I did find it last night but there only appeared to be two Picture addons, yours and another I can't remember the name of. I assumed I could see yours only because it was installed and the other was from the XBMC.org repo.

Do I need to add other repos to search addons or should I be able to find it without making any changes to a fresh install of XBMC?

Do you know if any of the older iPhoto addons/plugins that work with earlier versions of iPhoto still work in Dharma?
(This post was last modified: 2011-07-08 02:36 by GGet.)
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #58
GGet Wrote:haha, because I'm a jackass. I'm new to XBMC and didn't realise there was an addon manager. I did find it last night but there only appeared to be two Picture addons, yours and another I can't remember the name of. I assumed I could see yours only because it was installed and the other was from the XBMC.org repo.

There probably aren't too many pictures addons for eden-pre yet. Just let XBMC install the correct version for you to avoid this kind of issue.

Quote:Do I need to add other repos to search addons or should I be able to find it without making any changes to a fresh install of XBMC?

My plugin is available for both dharma and eden-pre in the official repository. It should show up for either without any intervention.

Quote:Do you know if any of the older iPhoto addons/plugins that work with earlier versions of iPhoto still work in Dharma?

It's been a while to be honest, but I don't think so. I took over the iPhoto plugin before Dharma was made stable and it didn't work at that point.

I know that the term "expensive" is relative, but honestly, iLife is about as cheap as it gets for paid software. I suggest you just upgrade. It should (I think) convert your database to a compatible format.

-j
find quote
dynaflash Offline
Senior Member
Posts: 167
Joined: Nov 2010
Reputation: 0
Post: #59
Just a quick shout out of thanks ! Am running your plugin on current git head of xbmc as of last night on linux on an atv 1. I can tell you that accessing via AFP to my networked mac running lion it works great!

You're right, it is kinda wonky having to first access the directory under "Add Video Source" in order to set the path via the iPhoto plugin but once you get your head wrapped around that ... works great! Would be the creme' de la creme' if one could navigate right from the plugin add source dialog but its not too big of a deal.

Well done!
find quote
jingai Offline
Skilled Skinner
Posts: 1,073
Joined: Mar 2010
Reputation: 12
Post: #60
Thanks for the kind words. Always nice to hear that it's working well for others too.

-j
find quote
Post Reply