For all people that miss a plugin that allows to view the OS X Photo App library (mac) from within XBMC there is good news. The Plugin PhotoApp will be released in a few days.
The Plugin supports the categories Moments, Albums, Slideshows (Faces and Places will need some more time).
The latest release is available in the official XBMC add-on repository. If you would like to help with the add-on or provide translations, the source code will be available here.
Source link is missing
Is there any beta we can test until you release the final version?
Thank you for this offer.
I will send you a link to the zip file with the beta this evening.
For me it’s not working. My Kodi runs on Windows and I try to connect via SMB to my Mac. I get an error because not finding the Library.apdb. Running Kodi on the Mac works but it’s not what I want. I tried to copy the Photo.Library onto the Windows PC to get local access but I cannot do that. Probably a problem with the structure of that file?
I did not try test the windows-smb-mac configuration yet. I am going to do that...
Did you set the correct path to the photo library in settings?
Can you send me your settings file?
Can you send me the error message from the log file?
Apple OS X photo app uses a sqlite database to store information about your photos, albums and slideshows (iPhoto used XML files for that). This database is stored in the photo library and needs to be read by the add-on and this seems to be a problem.
According to some internet posts it is not recommended to access a sqlite database over an smb share (there are problems with database locks, possible data damage and performance issues).
Therefore the chances that this will ever work are not too good. However I will do some more investigations...
One thing you could probably do is have the addon copy over the database to the local machine first and store it in the addon data folder. Store the modification date of the database file and then compare it against your local copy and you'll only have to copy it when it has changed.
I added a new version that can make a local copy of the remote PhotoApp database. This can be activated in the addon settings.
@hidalgo67: can you try if this works?
@ jingai: thank you for the hint!
Sorry, it did not work. I get the following error:
Code:
02:04:31 T:5568 NOTICE: -->Python Interpreter Initialized<--
02:04:32 T:5568 NOTICE: photoapp.db: Opening database: smb://BIGBOX/Pictures/Fotos-Mediathek.photoslibrary//database/Library.apdb
02:04:32 T:5568 NOTICE: photoapp.db: __init__: unable to open database file
02:04:32 T:5568 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <class 'sqlite3.OperationalError'>
Error Contents: unable to open database file
Traceback (most recent call last):
File "C:\Users\pvr\AppData\Roaming\Kodi\addons\plugin.image.photoapp-master\addon.py", line 291, in <module>
photoApp.open_db()
File "C:\Users\pvr\AppData\Roaming\Kodi\addons\plugin.image.photoapp-master\addon.py", line 98, in open_db
self.db = PhotoAppDB(self.photo_app_db_file)
File "C:\Users\pvr\AppData\Roaming\Kodi\addons\plugin.image.photoapp-master\resources\lib\photo_app_db.py", line 55, in __init__
raise e
OperationalError: unable to open database file
-->End of Python script error report<--
02:04:32 T:4040 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.image.photoapp/
02:04:32 T:4040 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.photoapp/) failed
When I look at your logfile I would guess you did not activate the local copy flag in the addon settings (the databas path is still an smb path, but it should be a local path now).
Did you activate the flag?
I think, I’m a step ahead. First I had to delete the trailing / in the photo_library_path section
Then I get the following
Code:
11:59:52 T:3612 NOTICE: -->Python Interpreter Initialized<--
11:59:52 T:3612 NOTICE: photoapp.gui: Copy Photo Library Database...
11:59:52 T:3612 NOTICE: photoapp.gui: from smb://BIGBOX/Pictures/Fotos-Mediathek.photoslibrary/database/Library.apdb to C:\Users\pvr\AppData\Roaming\Kodi\userdata\addon_data\plugin.image.photoapp\Library.apdb
11:59:52 T:3612 ERROR: XFILE::CDirectory::Create - Error creating C:\
11:59:52 T:3612 NOTICE: photoapp.db: Opening database: C:\Users\pvr\AppData\Roaming\Kodi\userdata\addon_data\plugin.image.photoapp\Library.apdb
11:59:52 T:848 NOTICE: Thread BackgroundLoader start, auto delete: false
11:59:54 T:5212 NOTICE: Thread LanguageInvoker start, auto delete: false
11:59:54 T:5212 NOTICE: -->Python Interpreter Initialized<--
11:59:54 T:5212 NOTICE: {'action': 'moments'}
11:59:54 T:5212 ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
- NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
Error Type: <type 'exceptions.WindowsError'>
Error Contents: (123, 'Die Syntax f\xfcr den Dateinamen, Verzeichnisnamen oder die Datentr\xe4gerbezeichnung ist falsch', 'smb://BIGBOX/Pictures/Fotos-Mediathek.photoslibrary/database/Library.apdb')
Traceback (most recent call last):
File "C:\Users\pvr\AppData\Roaming\Kodi\addons\plugin.image.photoapp-master\addon.py", line 290, in <module>
photoApp = PhotoAppGUI()
File "C:\Users\pvr\AppData\Roaming\Kodi\addons\plugin.image.photoapp-master\addon.py", line 82, in __init__
(os.stat(self.photo_app_db_file).st_mtime > os.stat(database_copy).st_mtime)):
WindowsError: (123, 'Die Syntax f\xfcr den Dateinamen, Verzeichnisnamen oder die Datentr\xe4gerbezeichnung ist falsch', 'smb://BIGBOX/Pictures/Fotos-Mediathek.photoslibrary/database/Library.apdb')
-->End of Python script error report<--
11:59:54 T:5192 ERROR: XFILE::CDirectory::GetDirectory - Error getting plugin://plugin.image.photoapp/?action=moments
11:59:54 T:5192 ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.photoapp/?action=moments) failed
11:59:54 T:5108 NOTICE: Thread LanguageInvoker start, auto delete: false
What is this XFILE that cannot be created?
Then it says an error in the syntax of the Library.apdb
I tried it with my working Library and with a new one too.
Ok, we are getting closer... ;-)
Now it seams, there ist a problem with making the database copy or creating the folder that holds the database copy (it works on my mac). Can you please check if the folder "C:\Users\pvr\AppData\Roaming\Kodi\userdata\addon_data\plugin.image.photoapp\" already exists? If it is not there can you try to create it manually?
Yes, the folder exists. It also creates the copy of the database file