Kodi Community Forum

Full Version: Media importing and library integration (UPnP, Emby, Plex, ...)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
(2020-10-08, 02:11)Supersilver Wrote: [ -> ]Hey @Montellese I have the latest test build you posted for Windows and Android but can't seem to import my movie library. Think I posted a log if it helps

https://paste.kodi.tv/izuyugagaw.kodi

Can you try to disable importing collections in the settings of the movie media import and see if it works then?
I can't seem to find the setting for turning off collections, can you explain where I can go to do it
(2020-10-08, 11:06)Supersilver Wrote: [ -> ]I can't seem to find the setting for turning off collections, can you explain where I can go to do it

Sorry you're right. This setting only exists in the Emby media importer...
(2020-10-08, 02:11)Supersilver Wrote: [ -> ]Hey @Montellese I have the latest test build you posted for Windows and Android but can't seem to import my movie library. Think I posted a log if it helps

https://paste.kodi.tv/izuyugagaw.kodi

I just tried this with my local PMS which has some movies and some collections / sets and everything imported perfectly fine. Do you have collections in your movie library?
I will try with another non-local PMS which also has collections and see if it works there as well.
Thanks for looking into this, I have some movie sections with collections and some that don't have collections and the ones that don't have collections seem to import fine so it does seem like a collection thing. But not sure why your ones import fine then.
Is it possible to also add the option to disable importing collections on the Plex media importer add-on or is that only possible on Emby?
(2020-10-09, 12:06)Supersilver Wrote: [ -> ]Thanks for looking into this, I have some movie sections with collections and some that don't have collections and the ones that don't have collections seem to import fine so it does seem like a collection thing. But not sure why your ones import fine then.
TBH I don't know either. I have imported movies from my local PMS and from two remote PMS with collections without any problems.
(2020-10-09, 12:17)Supersilver Wrote: [ -> ]Is it possible to also add the option to disable importing collections on the Plex media importer add-on or is that only possible on Emby?
Yes I will create a feature request ticket for this.

EDIT: See https://github.com/Montellese/mediaimpor.../issues/26.
(2020-10-09, 14:20)Montellese Wrote: [ -> ]
(2020-10-09, 12:17)Supersilver Wrote: [ -> ]Is it possible to also add the option to disable importing collections on the Plex media importer add-on or is that only possible on Emby?
Yes I will create a feature request ticket for this.

EDIT: See https://github.com/Montellese/mediaimpor.../issues/26.
Much appreciated @Montellese I look forward to testing it out and letting you know the results
(2020-10-09, 14:20)Montellese Wrote: [ -> ]
(2020-10-09, 12:06)Supersilver Wrote: [ -> ]Thanks for looking into this, I have some movie sections with collections and some that don't have collections and the ones that don't have collections seem to import fine so it does seem like a collection thing. But not sure why your ones import fine then.
TBH I don't know either. I have imported movies from my local PMS and from two remote PMS with collections without any problems.
It looks like I was able to reproduce your issue. Is it possible that you have at least one collection in your library which doesn't have any movies in it?
(2020-10-10, 21:49)Montellese Wrote: [ -> ]
(2020-10-09, 14:20)Montellese Wrote: [ -> ]
(2020-10-09, 12:06)Supersilver Wrote: [ -> ]Thanks for looking into this, I have some movie sections with collections and some that don't have collections and the ones that don't have collections seem to import fine so it does seem like a collection thing. But not sure why your ones import fine then.
TBH I don't know either. I have imported movies from my local PMS and from two remote PMS with collections without any problems.
It looks like I was able to reproduce your issue. Is it possible that you have at least one collection in your library which doesn't have any movies in it?
If this is the case in your library you can get the latest master version from https://github.com/Montellese/mediaimporter.plex and give it a try. I have added some special handling to ignore empty movie collections.
Sorry only seeing these now, yeah you're right turns out I do have a couple or maybe more empty collections good find, I'll try the new version now thanks
I'm playing on my laptop to see if I can make Kodi v19 work with my Emby setup, but when trying mediaimporter.emby and adding my Emby server I get the following errors:
Quote:2020-10-14 11:08:13.495 T:2300     INFO <general>: CActiveAESink::OpenSink - initialize sink
2020-10-14 11:08:14.886 T:12744    INFO <general>: initializing python engine.
2020-10-14 11:08:15.187 T:12744    INFO <general>: [mediaimporter.emby] Emby Media Import importer started
2020-10-14 11:08:29.864 T:12744    INFO <general>: [mediaimporter.emby] trying to discover an Emby server at http://192.168.1.150:8096...
2020-10-14 11:08:29.916 T:12744    INFO <general>: [mediaimporter.emby] Local Emby server "NAS" (emby://somecode/) successfully discovered at http://192.168.1.150:8096
2020-10-14 11:08:29.916 T:12744    INFO <general>: CPythonInvoker(12, C:\Users\xxx\AppData\Roaming\Kodi\addons\mediaimporter.emby\importer.py): script successfully run
2020-10-14 11:08:29.972 T:12744    INFO <general>: Python interpreter stopped
2020-10-14 11:08:29.996 T:10912    INFO <CMediaImportManager>: source registration task for "NAS" (emby://somecode/) started
2020-10-14 11:08:29.996 T:14644    INFO <general>: initializing python engine.
2020-10-14 11:08:30.279 T:14644    INFO <general>: [mediaimporter.emby] Emby Media Import importer started
2020-10-14 11:08:30.280 T:14644    INFO <general>: CPythonInvoker(13, C:\Users\xxx\AppData\Roaming\Kodi\addons\mediaimporter.emby\importer.py): script successfully run
2020-10-14 11:08:30.325 T:14644    INFO <general>: Python interpreter stopped
2020-10-14 11:08:30.332 T:8580     INFO <general>: initializing python engine.
2020-10-14 11:08:30.608 T:8580     INFO <general>: [mediaimporter.emby] Emby Media Import importer started
2020-10-14 11:08:30.609 T:8580     INFO <general>: CPythonInvoker(14, C:\Users\verme\AppData\Roaming\Kodi\addons\mediaimporter.emby\importer.py): script successfully run
2020-10-14 11:08:30.655 T:8580     INFO <general>: Python interpreter stopped
2020-10-14 11:08:30.670 T:4800    ERROR <general>: SQL: [MyVideos119.db] SQLite error SQLITE_ERROR (no such table: source)
                                                   Query: SELECT source_id FROM source WHERE identifier='emby://somecode/'
2020-10-14 11:08:30.670 T:4800    ERROR <general>: CVideoDatabase::AddSource unable to AddSource (SELECT source_id FROM source WHERE identifier='emby://somecode/')
2020-10-14 11:08:30.670 T:4800  WARNING <CMediaImportManager>: source "NAS" (emby://somecode/) couldn't be added to any import repository
Any thoughts on this?

When I try Emby connect this also doesn't work, I get these errors:
Quote:2020-10-14 11:11:35.476 T:14516    INFO <general>: initializing python engine.
2020-10-14 11:11:35.777 T:14516    INFO <general>: [mediaimporter.emby] Emby Media Import importer started
2020-10-14 11:11:37.291 T:14516   ERROR <general>: C:\xxx\verme\AppData\Roaming\Kodi\addons\script.module.urllib3\lib\urllib3\connectionpool.py:1004: InsecureRequestWarning: Unverified HTTPS request is being made to host 'connect.emby.media'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/latest...l-warnings
                                                     InsecureRequestWarning,
                                                   
2020-10-14 11:11:37.417 T:14516   ERROR <general>: EXCEPTION Thrown (PythonToCppException) : -->Python callback/script returned the following error<--
                                                    - NOTE: IGNORING THIS CAN LEAD TO MEMORY LEAKS!
                                                   Error Type: <class 'TypeError'>
                                                   Error Contents: function takes at most 2 arguments (3 given)
                                                   Traceback (most recent call last):
                                                     File "C:\Users\xxx\AppData\Roaming\Kodi\addons\mediaimporter.emby\importer.py", line 17, in <module>
                                                       importer.run(sys.argv)
                                                     File "C:\Users\xxx\AppData\Roaming\Kodi\addons\mediaimporter.emby\lib\importer.py", line 999, in run
                                                       actionMethod(handle, options)
                                                     File "C:\Users\xxx\AppData\Roaming\Kodi\addons\mediaimporter.emby\lib\importer.py", line 475, in discoverProvider
                                                       provider = discoverProviderWithEmbyConnect(handle, options)
                                                     File "C:\Users\xxx\AppData\Roaming\Kodi\addons\mediaimporter.emby\lib\importer.py", line 236, in discoverProviderWithEmbyConnect
                                                       embyConnect = linkToEmbyConnect(deviceId)
                                                     File "C:\Users\xxx\AppData\Roaming\Kodi\addons\mediaimporter.emby\lib\importer.py", line 148, in linkToEmbyConnect
                                                       dialog.ok(localise(32038), localise(32055), '[COLOR FF52B54B]{}[/COLOR]'.format(pinLogin.pin))
                                                   TypeError: function takes at most 2 arguments (3 given)
                                                   -->End of Python script error report<--
                                                   
2020-10-14 11:11:37.473 T:14516    INFO <general>: Python interpreter stopped
2020-10-14 11:11:37.490 T:10912 WARNING <CGUIWindowMediaSourceBrowser>: failed to discover source with importer "mediaimporter.emby"
So that's a no-go either.
@BigDoom,
Looks like you are using windows. Is that correct? Just tested the latest windows build and was able to import a library of tv shows.

I can see that you have posted the parts of the log which you think be most useful. However, it is a good practice to put the entire debug log on an appropriate site and paste the link here. The developer may want to look at info that you may not have considered to be relevant when you look at it.

Cheers
@BigDoom Thanks for the feedback. It looks like your database is broken because it can't find the "source" table. Did you upgrade from a previous test build? Or did you upgrade from an official Kodi build / release?