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 - 2019-12-12

Since both media importer add-ons are now basically working I've moved them to their own repositories: This should allow you to easily download the latest version as a ZIP and install it. I'm not sure if jenkins will be able to handle the add-ons as git submodules in the kodi git repository but shouldn't be a big deal if it can't.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - LongMan - 2019-12-12

(2019-12-12, 00:58)Montellese Wrote: This should allow you to easily download the latest version as a ZIP and install it.
Thanks. That will make life a lot easier.

 
Quote:Maybe we should do the following:
Add a "Sources" (or whatever it will be named) node under Videos. This is also where Media > Library > Videos would forward to.

Add sub-nodes "Files" and "Imports" where "Files" shows the same as Videos > Files does now and "Imports" shows a list of media providers (with the matching imports as sub-nodes)

But I'll probably postpone this until the day (if it ever comes) where this gets actually considered to be included in Kodi.
That's a great idea. And it is also good to leave it where it is while testing.

The presence of the protocol, http://, is good.
The Device name of the client is nice. It gives the installation Name as well as the Kodi Version which is good.
Including the addon version would be a nice touch. eg LivingRoom-0.01

All in all great stuff.


Media importing and library integration (UPnP, Emby, Plex, ...) - angelblue05 - 2019-12-12

For external subtitles,

I grab them from Emby, download them locally, name them accordingly with the correct language tag, append them to the stream using the Kodi listitem api. It would be easier if Kodi had a way of labelling the external subtitles in the api because Emby provides no language tag in the direct url for the subtitles, they get detected as unknown by Kodi if added directly. hence the need for the workaround.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - LongMan - 2019-12-12

Quote:I gave this a try on my setup and when I stop playing an episode it
stops playback

updates playcount / watched / lastplayed / resume point on the Emby server

receives an update from the Emby server and processes it

I didn't see any errors though.
This does not occur if playback is started from a episode widget. However, when I choose Show>Season>episode; the error occurs.

Hope that helps.

Cheers,
LongMan


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Montellese - 2019-12-13

(2019-12-12, 05:36)LongMan Wrote:
Quote:I gave this a try on my setup and when I stop playing an episode it
stops playback

updates playcount / watched / lastplayed / resume point on the Emby server

receives an update from the Emby server and processes it

I didn't see any errors though.
This does not occur if playback is started from a episode widget. However, when I choose Show>Season>episode; the error occurs.

Hope that helps.

Cheers,
LongMan 
Odd I tried both without any issues.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - LongMan - 2019-12-13

The logs

https://drive.google.com/file/d/1KNuD9YvkbvXks9DN1i-04BA-q_Sv4s2r/view?usp=sharing

First I play from the library list Show>Season>Episode then from the widget then from the library again.


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

(2019-12-13, 05:17)LongMan Wrote: The logs

https://drive.google.com/file/d/1KNuD9YvkbvXks9DN1i-04BA-q_Sv4s2r/view?usp=sharing

First I play from the library list Show>Season>Episode then from the widget then from the library again.
Thanks. Actually from the logs it looks like the error happens on every playback. I finally managed to reproduce it and the Emby server logs clearly state that the datetime format for the "LastPlayedDate" is wrong. I've fixed that in the mediaimporter.emby add-on repository. Feel free to download the latest version and give it a try.

Furthermore in a feature branch I've implemented Playback Check-ins so now in the Emby server dashboard I can see the status of playback of an Emby library item from Kodi. I didn't have to make any changes to the media importer API for that but I had to make a small change to the general python API so this will not work with the last test-build. I'll provide new ones ASAP.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - LongMan - 2019-12-15

Quote:Feel free to download the latest version and give it a try.
Yes. That fixed it. I am no longer getting that error. Thanks

I wanted to give Plex a shot but it seems that now one has to register to use the server. It wasn't like that when I last used Plex. Admittedly that was about five years ago.

I tried the Emby addon with Jellyfin. It saw the server but it would not authenticate. The devs said not to hash the password. So, I copied the Emby addon and passed self._password instead of passwordsha1, but still no joy.
In case you weren't aware, Jellyfin is a fork of Emby, about one year old. I still use Emby so I not fully up to speed with Jellyfin but I think not hashing the password is probably , one of a few, if not the only API change.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - sualfred - 2019-12-15

@Montellese 

Finally found a minute to look at your progress, but I cannot authenticate:

https://paste.kodi.tv/wipicupose.kodi

Used the latest testbuild and github addon version


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

(2019-12-15, 04:14)LongMan Wrote:
Quote:Feel free to download the latest version and give it a try.
Yes. That fixed it. I am no longer getting that error. Thanks
Great, thanks for the feedback.

(2019-12-15, 04:14)LongMan Wrote: I wanted to give Plex a shot but it seems that now one has to register to use the server. It wasn't like that when I last used Plex. Admittedly that was about five years ago.
AFAIK you can configure your Plex installation to work without internet but you still need a MyPlex account to initially set it up. But I'm no expert.

(2019-12-15, 04:14)LongMan Wrote: I tried the Emby addon with Jellyfin. It saw the server but it would not authenticate. The devs said not to hash the password. So, I copied the Emby addon and passed self._password instead of passwordsha1, but still no joy.
In case you weren't aware, Jellyfin is a fork of Emby, about one year old. I still use Emby so I not fully up to speed with Jellyfin but I think not hashing the password is probably , one of a few, if not the only API change. 
I've never heard of Jellyfin. Maybe I'll take a look once everything works reliably for Emby ;-)


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

(2019-12-15, 08:33)sualfred Wrote: @Montellese 

Finally found a minute to look at your progress, but I cannot authenticate:

https://paste.kodi.tv/wipicupose.kodi

Used the latest testbuild and github addon version
Thanks for the logs. It looks like there's a bug / problem in the observer script which causes it to crash as long as the media provider has not been properly configured. But that shouldn't affect general authentication. Can you check the logs of your emby server from the time where you tried to authenticate? The logged requests look sane but I can't see more from the current logs.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - sualfred - 2019-12-15

@Montellese 

Sure

https://paste.kodi.tv/sujipemeqo.kodi

Doesn't work for any user. Used passwords were always correct.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - sualfred - 2019-12-15

Created a test user with no pw. That works.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - Montellese - 2019-12-16

(2019-12-15, 11:39)sualfred Wrote: Created a test user with no pw. That works.

Thanks for the feedback and testing different cases. It turns out SHA1 password authentication is not supported anymore and I have to pass the password as plain text. Now it's working again on my setup. Please give the latest version of the add-on a try.


RE: Media importing and library integration (UPnP, Emby, Plex, ...) - sualfred - 2019-12-16

Will test it again this week, thanks.

Haven't read the complete thread yet (out of time atm), but in my quick testings the watched stated and progress reporting wasn't working from widgets. From a media window it was working fine. I guess you are already aware of it? If not I'll provide the logs after my next tests.


This forum uses Lukasz Tkacz MyBB addons.