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, ...) - Norin_Radd - 2019-12-30

(2019-12-30, 22:13)Montellese Wrote:
(2019-12-29, 04:47)Norin_Radd Wrote: Hello there,

i could not connect with plex, with jellyfin i could and imported library, i can stream movies but i cannot use any subtitles that i have on jellyfin, fortunately, i can use one subtitle addon with kodi, others i can´t because i can´t install the rar and archive addons, i can´t install one dependency which is needed.

here is my log https://paste.kodi.tv/udemohatoc.kodi

and thank you for compiling for android.

if there's anything you want me to try, tell me.
Thanks for the feedback and the log. I noticed the following things:
  • Concerning Plex I only see a few log messages indicating that authentication fails. Did you try MyPlex PIN login or local access?
  • Concerning Jellyfin
    • Is it possible that you first tried to play a video while the Jellyfin server was not reachable? There are a few timeouts while trying to open a stream.
    • I saw lots of warnings / errors concerning the responses for playback checkins. Maybe the Jellyfin API for /Sessions/Playing, /Sessions/Playing/Progress and /Sessions/Playing/Stopped differ from the ones Emby provides? Did playback checkins show up on the Jellyfin server?
    • I see the error that Jellyfin does not support the newly added endpoint to update userdata (playcount, lastplayed, ...) of a media item on the server. This is a known issue. I need to figure out if there's a way to identify that the server is Jellyfin and not Emby then I could try to react accordingly.
Thanks for taking the time to test this and report back! This is much appreciated. 

Yes, i have tried myplex with plex.tv/link.

And yes i have tried to play a video right before import (when not all art was showing)... after a time i could play video with no issues.

Every time i finish seeing a video it gives me an error message, but then on kodi it shows the in-progress or watched mark, but it's not working correctly, sometimes i stop playback without watching the whole video and checks as watched, but playback checks show up in jellyfin, all episodes i have watched are checked in jellyfin.

Smile


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

I've made the following changes to the Emby mediaimport add-on:
  • Fixed the log warning related to playback checkins
  • Retrieve the "product name" from the public server info to determine whether the server is an Emby or Jellyfin server.
  • Only use the new UserData endpoint for Emby 4.3+ servers but not for Jellyfin
  • Fixed updating resume points for Emby 4.2- and Jellyfin servers



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

(2019-12-30, 23:03)Norin_Radd Wrote: Yes, i have tried myplex with plex.tv/link.
Did you get an immediate error / failed message? How exactly did you proceed? I just noticed that only the following approach seems to always succeed for me:
  1. Choose "MyPlex" as authentication method.
  2. Click on "Link MyPlex account"
  3. Remember the PIN and keep the dialog in Kodi open
  4. On https://plex.tv/link enter the PIN and wait until it says "Account Linked"
  5. Now close the dialog in Kodi.
  6. Click on "Test connection" and a dialog saying "Successfully connected" should be displayed.
If you close the dialog containing the PIN before linking it to MyPlex an error will be displayed. I'll fix this ASAP. Furthermore the "MyPlex Username" is not properly displayed after linking to the MyPlex account has succeeded.

(2019-12-30, 23:03)Norin_Radd Wrote: Every time i finish seeing a video it gives me an error message
This issue should be solved with the latest version of the Emby mediaimporter add-on, see my previous post.


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

@Norin_Radd I've improved the Plex mediaimporter add-on to also support closing the MyPlex PIN dialog before having successfully linked a MyPlex account.


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

(2019-12-30, 23:45)Montellese Wrote: @Norin_Radd I've improved the Plex mediaimporter add-on to also support closing the MyPlex PIN dialog before having successfully linked a MyPlex account.

what happened to me was that on plex site said it was linked but nothing happened on kodi.

ill update the emby addon


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

I am still getting the error when I stop a file from Jellyfin. There is also a crash stacktrace with the logs. Kodi doesn't crash, at least not that I can see.

https://drive.google.com/file/d/1ChXVmFLXLFmi_C41zpyVY5kHa1GDtqD3/view?usp=sharing


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

(2019-12-31, 02:30)Norin_Radd Wrote:
(2019-12-30, 23:45)Montellese Wrote: @Norin_Radd I've improved the Plex mediaimporter add-on to also support closing the MyPlex PIN dialog before having successfully linked a MyPlex account.

what happened to me was that on plex site said it was linked but nothing happened on kodi.

ill update the emby addon 
I've improved the Plex mediaimporter add-on to show a dialog if "Link MyPlex account" succeeded. The dialog should show the username of the linked account. Furthermore "Test connection" should always tell you if authentication works or not. Remember to close the settings dialog using the "OK" button or the settings won't be saved.


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

(2019-12-31, 15:15)LongMan Wrote: I am still getting the error when I stop a file from Jellyfin. There is also a crash stacktrace with the logs. Kodi doesn't crash, at least not that I can see.

https://drive.google.com/file/d/1ChXVmFLXLFmi_C41zpyVY5kHa1GDtqD3/view?usp=sharing
Odd it looks like the call to get the public information of the server fails. Could you try opening the following URL in your browser and see if it works: http://<jellyfin-ip>:<jellyfin-port>/emby/System/Info/Public
On my installation the response looks like
Code:
{"LocalAddress":"http://192.168.1.30:8096","WanAddress":"http://XXX.XXX.XXX.XXX:8096","ServerName":"Jellyfin - Dev","Version":"10.3.7","ProductName":"Jellyfin Server","OperatingSystem":"Windows","Id":"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"}
The mediaimporter add-on uses the "Version" and "ProductName" properties to determine whether the server is an Emby or Jellyfin server and whether the Emby server's version is at least 4.3.

But in your case the add-on says that it did not receive a valid response.


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

Seems to work. I got

LocalAddress"http://172.24.145.242:8096"
ServerName"Jellyfin Server"
Version"10.4.3"
ProductName"Jellyfin Server"
OperatingSystem"Windows"
Id"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"


Edit: Emby responds differntly

"http://172.24.145.7:xxxx"
WanAddress"http://xx.xx.xx.xx:xxxx"
ServerName"xxxx Server"
Version"4.3.1.0"
Id"XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"


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

Emby does not give a product name. How about for now, using version >10 for Jellyfin identification. They choose a high number for just that reason


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

(2019-12-31, 17:58)LongMan Wrote: Emby does not give a product name. How about for now, using version >10 for Jellyfin identification. They choose a high number for just that reason
Yes I saw that. Right now the logic is to assume that if there's a product name and it's "Jellyfin Server" it's a Jellyfin server and otherwise it's an Emby server. But all of that logic doesn't work if we don't get the proper response from the API call.


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

(2019-12-31, 15:15)LongMan Wrote: I am still getting the error when I stop a file from Jellyfin. There is also a crash stacktrace with the logs. Kodi doesn't crash, at least not that I can see.

https://drive.google.com/file/d/1ChXVmFLXLFmi_C41zpyVY5kHa1GDtqD3/view?usp=sharing
Could you please enable debug logging because right now I don't see any of the log messages from mediaimporter.emby so I can't check if the URL for the API call is correct or not.


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

Sorry about that. Here you go

https://drive.google.com/file/d/19TzYLQFQicJ3SfLIt2WgxEEiszKQjGOM/view?usp=sharing


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

(2020-01-01, 02:54)LongMan Wrote: Sorry about that. Here you go

https://drive.google.com/file/d/19TzYLQFQicJ3SfLIt2WgxEEiszKQjGOM/view?usp=sharing

Thanks that helped a lot. I found the issue and will fix it ASAP.

I've also started rebasing onto latest master (with Python 3 support) but I guess I'll have to adjust quite a few things in the add-ons...


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

Sweet.


This forum uses Lukasz Tkacz MyBB addons.