Kodi Community Forum
WIP Media importing and library integration (UPnP, Emby, Plex, ...) - Printable Version

Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Kodi Application (https://forum.kodi.tv/forumdisplay.php?fid=93)
--- Thread: WIP Media importing and library integration (UPnP, Emby, Plex, ...) (/showthread.php?tid=224794)



RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Montellese - 2020-03-02

I've created a new release of mediaimporter.emby with the following changelog:
  • fix playback stopped / ended callback handling
  • fix reporting of playback resume point when playback stopped
  • process UNC / DVD / Blu-Ray paths before passing them to Kodi
  • improve mapping of studios, overviews, MPAA and video / audio streams
  • redact HTTP request bodies that might contain a password
  • download the server's icon to avoid unsupported HTTP HEAD requests
  • support displaying server messages as notifications

In the meantime I'm working on the following things for mediaimporter.emby:
  • fast (re-)synchronization: this is basically finished but I'm waiting on feedback from a tester. If anyone else is willing to test this let me know.
  • reduce the number of authentications: this is also basically finished but not well tested yet. It stores the access token provided by Emby in the media provider's settings. If any request to the Emby server fails due to authentication it will force a new authentication to get a new access token.
  • Emby Connect: I want to add basic support for Emby Connect (e.g. when manually adding a new Emby media provider). I just started to read the available documentation on it.



RE: Media importing and library integration (UPnP, Emby, Plex, ...) - bg_x - 2020-03-09

(2020-03-02, 10:55)Montellese Wrote:
  • fast (re-)synchronization: this is basically finished but I'm waiting on feedback from a tester. If anyone else is willing to test this let me know.

I would like to test.

Keep up the good work and I'm waiting paitently for integration of music library...


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Montellese - 2020-03-09

(2020-03-09, 10:17)bg_x Wrote:
(2020-03-02, 10:55)Montellese Wrote:  
  • fast (re-)synchronization: this is basically finished but I'm waiting on feedback from a tester. If anyone else is willing to test this let me know.
 

I would like to test.
Thanks for your help. @sualfred has already tested it but more feedback is always welcome. You can download the proper version from https://www.dropbox.com/s/qr58iadjfeer1va/mediaimporter.emby.zip?dl=1.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - LongMan - 2020-03-14

@Montellese,

 Got the latest build to give a spin. It imports movies and music videos but doesn't import tvshows. 
I see that you are engaged to the logging PR, but when have a minute could you take a look.

https://drive.google.com/file/d/1JtIRE0f6fRxt6XeORFV8ohF7a3O8U5VQ/view?usp=sharing
Too large for pastebin


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Montellese - 2020-03-14

(2020-03-14, 01:18)LongMan Wrote: @Montellese,

 Got the latest build to give a spin. It imports movies and music videos but doesn't import tvshows. 
I see that you are engaged to the logging PR, but when have a minute could you take a look.

https://drive.google.com/file/d/1JtIRE0f6fRxt6XeORFV8ohF7a3O8U5VQ/view?usp=sharing
Too large for pastebin
Thanks for the report and the logs. I took a look and didn't see anything that would indicate that it tried to import tvshows at all. The add-on only sees import requests for movies/sets ans musicvideos.

I only found this log message:
Code:
WARNING: CMediaImportManager: unable to import from emby://2eeaab0437d14705b82f145170b0f589/ (tvshow, season, episode)

Is it possible that you configured your tvshows import to not automatically synchronize? That's the only time this log message should appear. And yes that's misleading and I'll improve it.
Did you try to manually synchronize your tvshows import as well through its context menu?


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - LongMan - 2020-03-14

You're right, it was set to manual. I guess I did that when it was crashing. I will let it sync and report back.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - teriyaki - 2020-03-15

(2020-02-01, 15:21)Wanilton Wrote:
Code:
2020-02-01 09:26:51.361 T:47268   ERROR: SQL: [MyVideos118.db] SQLite error SQLITE_ERROR (no such column: movie_view.c0)
                                            Query: select * from movie_view  WHERE ((movie_view.c0 LIKE '%aladdin%'))
2020-02-01 09:26:51.361 T:47268   ERROR: CVideoDatabase::GetMoviesByWhere failed
2020-02-01 09:26:51.378 T:47268   ERROR: SQL: [MyVideos118.db] SQLite error SQLITE_ERROR (no such column: tvshow_view.c0)
                                            Query: SELECT * FROM tvshow_view  WHERE ((tvshow_view.c0 LIKE '%aladdin%'))
2020-02-01 09:26:51.378 T:47268   ERROR: CVideoDatabase::GetTvShowsByWhere failed
2020-02-01 09:26:51.383 T:47268   ERROR: SQL: [MyVideos118.db] SQLite error SQLITE_ERROR (no such column: episode_view.c0)
                                            Query: select * from episode_view  WHERE ((episode_view.c0 LIKE '%aladdin%'))
2020-02-01 09:26:51.383 T:47268   ERROR: CVideoDatabase::GetEpisodesByWhere failed
2020-02-01 09:26:51.397 T:47268   ERROR: SQL: [MyVideos118.db] SQLite error SQLITE_ERROR (no such column: musicvideo_view.c0)
                                            Query: select * from musicvideo_view  WHERE ((musicvideo_view.c0 LIKE '%aladdin%'))
2020-02-01 09:26:51.397 T:47268   ERROR: CVideoDatabase::GetMusicVideosByWhere failed

Did you ever find a Kodi fix for this? I just noticed an .xsp to list specific tv shows with unwatched episodes I made is not working anymore with the same error as above. It's causing the WAF to decrease and that's never a good thing! Rolling back my libfmt-dev from 6.1.2 to 5.3.0 worked but was hoping for a Kodi solution/patch.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Wanilton - 2020-03-15

I continue using the previous, wait for a proper solution by Kodi team.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Montellese - 2020-03-15

(2020-03-15, 20:04)Wanilton Wrote: I continue using the previous, wait for a proper solution by Kodi team.
https://github.com/xbmc/xbmc/pull/17351 solves the issue and has been merged on March 1st but my last rebase of media import is from February 25th. So Kodi master is fine again but I will have to rebase media import to at least March 1st to get the necessary fix.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - raptorjr - 2020-03-17

I tried installing the version with fast resynchronisation, because it took a couple of hours for it to finish after I started Kodi before. But I see no change in speed. Don't know if there is anything else I can do to speed this up? But it still says version 0.07, or should this version number be increased? I just replaced the folder in AddOns folder.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - sualfred - 2020-03-17

@raptorjr 

The initial full sync is still required. And you also have to install the Emby server plugin "Kodi Companion" if not happened yet.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Montellese - 2020-03-17

@raptorjr and you need to enable fast sync / using the Kodi companion add-on in the settings of your media provider.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - raptorjr - 2020-03-18

Thank you for the suggestions. I have Kodi Companion versiojn 2.1.4 installed. I see that there was a new version available, but failed to install. Is 2.1.4 enough?
But I have no setting to enable fast resync, not in Emby or the Media Importer. Can't even choose Configure in Kodi for the Addon.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - LongMan - 2020-03-18

@raptorj,
It is working for me. Here is what I have.

Emby Server 4.3.1.0
Kodi Companion 2.1.6.0

KodiMediaImportBuild-20200228 from here
mediaimporter.emby from post 723 in the thread.
Settings>Media Sources>MyEmbyServer (You need to choose Information from the Context Menu to get the settings)>Synchronization>Use Kodi Companion Server Server Plugin (Enabled)

Hope that helps.
Cheers,
LongMan


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - raptorjr - 2020-03-18

(2020-03-18, 19:25)LongMan Wrote: @raptorj,
It is working for me. Here is what I have.

Emby Server 4.3.1.0
Kodi Companion 2.1.6.0

KodiMediaImportBuild-20200228 from heremediaimporter.emby from post 723 in the thread.
Settings>Media Sources>MyEmbyServer (You need to choose Information from the Context Menu to get the settings)>Synchronization>Use Kodi Companion Server Server Plugin (Enabled)

Hope that helps.
Cheers,
LongMan

Thank you. Everything look good there. 

But there is something wrong somewhere, but I really don't know what.

My log fills up with this:

2020-03-18 18:47:04.293 T:1392   ERROR: XFILE::CWin32SMBDirectory::ConnectAndAuthenticate: Username/password combination was not accepted by "\\tvdator\multimedia" when trying to connect without username and without password
2020-03-18 18:47:04.949 T:8544 WARNING: [mediaimporter.emby] [observer] unknown exception when receiving data from "tvdator" (emby://fc2dcbc85b2142f58b406de80a95d310/): socket is already closed.


But what username/password is that? Because I tested the authentication to my Emby server and that test is ok. Is there another place where I need to fill out username/password?


This forum uses Lukasz Tkacz MyBB addons.