PhotoAppPlugin / plugin.image.photoapp

Shows the OS X Photo App library in Kodi.
Other
10 stars 3 forks source link

Not working with Photos 2, Kodi 17 #4

Open MarkCallow opened 7 years ago

MarkCallow commented 7 years ago

Here's the Kodi log content after clicking "Moments"

11:56:18.449 T:123145521070080 WARNING: CreateLoader - unsupported protocol(plugin) in plugin://plugin.image.photoapp/
11:56:18.770 T:140736988021696   ERROR: Control 55 in window 10002 has been asked to focus, but it can't
11:56:18.884 T:123145524903936 WARNING: CreateLoader - unsupported protocol(plugin) in plugin://plugin.image.photoapp/?action=moments
11:56:28.543 T:123145526513664   ERROR: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                             - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                            Error Type: <type 'exceptions.AttributeError'>
                                            Error Contents: 'NoneType' object has no attribute 'GetMomentList'
                                            Traceback (most recent call last):
                                              File "/Users/mark/Library/Application Support/Kodi/addons/plugin.image.photoapp/addon.py", line 297, in <module>
                                                items = photoApp.list_moments(year, month)
                                              File "/Users/mark/Library/Application Support/Kodi/addons/plugin.image.photoapp/addon.py", line 107, in list_moments
                                                moments = self.db.GetMomentList(year, month)
                                            AttributeError: 'NoneType' object has no attribute 'GetMomentList'
                                            -->End of Python script error report<--
11:56:28.589 T:140736988021696   ERROR: GetDirectory - Error getting plugin://plugin.image.photoapp/?action=moments
11:56:28.589 T:140736988021696   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.photoapp/?action=moments) failed
11:56:28.646 T:123145518387200  NOTICE: virtual bool CAESinkDARWINOSX::Initialize(AEAudioFormat &, std::string &): Opening default device Built-in Output

I do have the location set correctly to my Photos' library.

Do you plan to continue work on this plug-in? The most recent change is almost a year ago.

Karimchakroun commented 3 years ago

I changed a few lines in addon.py for it to work somehow (I manage to see my "moments" now) I changed line 67 to self.photo_app_db_file = self.photo_app_path + 'Database/Photos.db' and line 76 to database_copy = xbmc.translatePath(os.path.join(addon.getAddonInfo("Profile"), "Photos.db"))

I also added manually my library path in resources/settings.xml

I also checked the option to copy the database in the home folder when configuring

markst commented 2 years ago

Seems Addon not working for latest Photos 7.0 either.

I've tried the changes you suggested @Karimchakroun but the error logs simply displays:

2021-12-23 13:47:44.990 T:140597941339904   ERROR: GetDirectory - Error getting plugin://plugin.image.photoapp/?action=moments
2021-12-23 13:47:45.000 T:140599737402240   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.photoapp/?action=moments) failed
2021-12-23 13:47:47.535 T:140597951715072   ERROR: GetDirectory - Error getting plugin://plugin.image.photoapp/?action=albums&folderUuid=TopLevelAlbums
2021-12-23 13:47:47.537 T:140599737402240   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.photoapp/?action=albums&folderUuid=TopLevelAlbums) failed
2021-12-23 13:47:49.246 T:140597941339904   ERROR: GetDirectory - Error getting plugin://plugin.image.photoapp/?action=slideshows&folderUuid=TopLevelSlideshows
2021-12-23 13:47:49.253 T:140599737402240   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.photoapp/?action=slideshows&folderUuid=TopLevelSlideshows) failed
2021-12-23 13:47:50.601 T:140597951715072   ERROR: GetDirectory - Error getting plugin://plugin.image.photoapp/?action=albums&folderUuid=TopLevelAlbums
2021-12-23 13:47:50.618 T:140599737402240   ERROR: CGUIMediaWindow::GetDirectory(plugin://plugin.image.photoapp/?action=albums&folderUuid=TopLevelAlbums) failed