[RELEASE] iPhoto Plugin Addon for XBMC

  Thread Rating:
  • 1 Votes - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #11
jabba_29 Wrote:Thanks for the quick response. It is a ATV 1, and I am completely at a loss with the first suggestion - I will have a google and play around though. At least I know that something like this is possible.

If you're running a Linux-based ATV installation, I can help some. I don't know how (or if it's possible) to do it with Apple's OS. Maybe someone else can chime in here.

In a nutshell, you'd need to ssh into the ATV, change to the root user, and add something like the following to /etc/fstab:

Code:
//server/directory /mnt/media smbfs username=foo,password=bar,user,uid=xbmc,gid=xbmc,fmask=0664,dmask=0775 0 0

//server/directory is the share path to your Mac that contains the iPhoto Library.

/mnt/media is where you want to mount the share on the local filesystem. You will need to create the directory if it doesn't exist.

Then you should be able to see the share on the ATV after a reboot.

If all of that seems really foreign to you, it's probably better to go the other route I mentioned.

-j
find quote
jayhawk785 Offline
Aeon Group
Posts: 230
Joined: Oct 2008
Post: #12
I keep getting an addon.py error when trying to run this. I've mount ~/Pictures/iPhoto Library to /Pics and pointed the addon to that? What am I missing? How can I debug this?
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #13
jayhawk785 Wrote:I keep getting an addon.py error when trying to run this. I've mount ~/Pictures/iPhoto Library to /Pics and pointed the addon to that? What am I missing? How can I debug this?

I'd need to at least see the log output when the error occurs. Post it and I'll see if I can't figure out what's wrong.

-j
find quote
bennydesign Offline
Junior Member
Posts: 1
Joined: May 2011
Reputation: 0
Post: #14
jingai Wrote:I'd need to at least see the log output when the error occurs. Post it and I'll see if I can't figure out what's wrong.

-j

Hi,

I am having the same "issues". Here's my part of the logfile

Code:
4:14:24 T:200331264 M:103432192  NOTICE: -->Python Interpreter Initialized<--
14:14:26 T:200331264 M:102260736   ERROR: Error Type: <type 'exceptions.IOError'>
14:14:26 T:200331264 M:102260736   ERROR: Error Contents: (2, 'No such file or directory', 'smb://192.168.1.59/Public/Images/iPhoto Library/AlbumData.xml')
14:14:26 T:200331264 M:102260736   ERROR: Traceback (most recent call last):
                                              File "/var/mobile/Library/Preferences/XBMC/addons/plugin.image.iphoto/addon.py", line 490, in <module>
                                                shutil.copyfile(origxml, xmlfile)
                                              File "/private/var/stash/Applications/XBMC.frappliance/Frameworks/usr/lib/python2.6/shutil.py", line 52, in copyfile
                                                fsrc = open(src, 'rb')
                                            IOError: (2, 'No such file or directory', 'smb://192.168.1.59/Public/Images/iPhoto Library/AlbumData.xml')
14:14:26 T:168738816 M:102072320   ERROR: GetDirectory - Error getting plugin://plugin.image.iphoto/
14:14:26 T:168738816 M:102072320   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.iphoto/) failed
14:15:49 T:168738816 M:103157760  NOTICE: Samba is idle. Closing the remaining connections

Seems the smb mount doesn't work. Since ATV2 doesn't know "smbfs" everything is handled internally through XBMC. And that little thing is putting out the mentioned "smb://[...]" path.

Any suggestions?

Regards

b.
find quote
jayhawk785 Offline
Aeon Group
Posts: 230
Joined: Oct 2008
Post: #15
Found this error so I installed simplejson (sudo apt-get install python-simplejson) then I restarted xbmc still same error.

Code:
19:27:05 T:2904271728 M:1810595840   ERROR: Error Type: exceptions.ImportError
19:27:05 T:2904271728 M:1810595840   ERROR: Error Contents: No module named simplejson
19:27:05 T:2904271728 M:1810595840   ERROR: Traceback (most recent call last):
                                              File "/home/dave/.xbmc/addons/plugin.image.iphoto/addon.py", line 38, in ?
                                                from resources.lib.iphoto_parser import *
                                              File "/home/dave/.xbmc/addons/plugin.image.iphoto/resources/lib/iphoto_parser.py", line 24, in ?
                                                from geo import *
                                              File "/home/dave/.xbmc/addons/plugin.image.iphoto/resources/lib/geo.py", line 20, in ?
                                                import simplejson as json
                                            ImportError: No module named simplejson
19:27:05 T:2904271728 M:1810595840    INFO: -->End of Python script error report<--
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #16
bennydesign Wrote:Seems the smb mount doesn't work. Since ATV2 doesn't know "smbfs" everything is handled internally through XBMC. And that little thing is putting out the mentioned "smb://[...]" path.

Are you guys entering the smb path by hand, or are you browsing to a Video source you've added?

See this thread discussing the issue. Basically, you have to have the network share added in the Video section. Then point the plugin at that source.

If that doesn't help, let me know.

-j
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #17
jayhawk785 Wrote:Found this error so I installed simplejson (sudo apt-get install python-simplejson) then I restarted xbmc still same error.

Are you running a nightly or stable 10.x?

-j
find quote
jayhawk785 Offline
Aeon Group
Posts: 230
Joined: Oct 2008
Post: #18
jingai Wrote:Are you running a nightly or stable 10.x?

-j

Stable 10.1 - Going to try install addon simplejson next.
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #19
jayhawk785 Wrote:Stable 10.1 - Going to try install addon simplejson next.

It should have been installed automatically.. it's listed as a dependency for my plugin.

If you were running a nightly build of XBMC, it would make sense, because simplejson hasn't been updated for eden-pre yet.

Nonetheless, I think I have some modifications that will make the iPhoto plugin work for you ATV2 users. The problem was that I was originally comparing the modification date of the iPhoto XML with the one from the last import, but when using xbmcvfs it doesn't preserve the file stats, so instead I'm going to just compare the MD5 checksums.

I don't have an ATV which makes this kind of difficult for me. Is anyone with the know-how willing to replace the addon.py of their plugin on an ATV2 with a beta version so I can know for sure that the fix worked?

-j
find quote
jingai Offline
Skilled Skinner
Posts: 888
Joined: Mar 2010
Reputation: 8
Post: #20
v1.4.4 of the plugin (which should hit dharma soon) should fix these issues with the smb shares. I've tested it on three boxes here (two snow leopard macs and a debian linux unstable box) and it works fine. However, I don't have an ATV (1 or 2) so it's hard to be 100% positive, but I think I understand the situation well enough.

If anything is still awry, do let me know.

-j
find quote
Post Reply