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, ...) - raptorjr - 2020-02-09

(2020-02-09, 14:35)LongMan Wrote:
(2020-02-09, 14:25)raptorjr Wrote: Hello

I have  a small question that might be a bug. If I exit playback after just a few seconds the episode is still marked as watched.

There was a small fix after the release of the last version. Please install the zip of the master branch here, https://github.com/Montellese/mediaimporter.emby, to see if that fixes your problem.   
Yes, it works. Thank you.

I should also remember to mention in the future what server I connect to, Emby. Thank you Montellese.

EDIT: Sorry, I was too fast, don't think it worked. Maybe just takes a little longer time before the check mark appears.


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

It seems, while trying to find the pattern about watched status, that I experience a lot of crashes. I will read how to upload the necessary files. But I noticed that the stacktrace only contain two lines. So maybe something more is wrong?


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

So the pattern, with Emby ant watched status is like this.

Starting playback and exit after a few seconds.

Marked as watched, but after a few seconds it chnge to unwatched.

If I start playback again, before it have changed back to unwatched, status is unwatched when I exit playback.

If I start playback again and exit after a few seconds, status is watched, and will never go back to unwatched again, even when waiting for a long time. Only goes to unwatched if I use the Context menu.

(The crash disappeared, so can't say more about that for now)


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

@Montellese,

I have been a bit distracted but I was able to give the last build a spin but haven't found time to get proper logs.

Just some observations,
 
  • External subtitles are showing up. However if there is only external, it is disabled and there seems to be no way to enable it.
    • However if there is internal and external then both are available. Thinking of it now, i should check to see if it is the type or the count that is key.
  • strm files for Netflix and Amazon Prime both play fine. However, those plugins are causing Kodi to crash. I will try to grab some logs.
  • Changes made to metadata in the Emby Web app are reflected in Kodi immediately.
  • I noticed that if I add one library and allow it to sync, and then add a second library of the same media type, the sync does not start automatically the way it does for a different media type. I have to choose synchronize.

I will try to get logs for you if needed.

I know that you want to make it more efficient, but other than that it is so close now I can taste it.

Cheers,
LongMan


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

(2020-02-13, 04:06)LongMan Wrote:  
  • External subtitles are showing up. However if there is only external, it is disabled and there seems to be no way to enable it.
    • However if there is internal and external then both are available. Thinking of it now, i should check to see if it is the type or the count that is key.
 
TBH I never tried it with videos that only have external subtitles. I'll have to give that a try as well. This might be an issue in Kodi core.
 
(2020-02-13, 04:06)LongMan Wrote:  
  • strm files for Netflix and Amazon Prime both play fine. However, those plugins are causing Kodi to crash. I will try to grab some logs.
 
Could this be related to the fact that my test builds require python 3 compatible add-ons? But then again it should only crash the add-ons and not Kodi.
(2020-02-13, 04:06)LongMan Wrote:  
  • I noticed that if I add one library and allow it to sync, and then add a second library of the same media type, the sync does not start automatically the way it does for a different media type. I have to choose synchronize.
 
I never throught about this use case. The logic would probably be something like this: if a media import exists which imports all libraries of the respective media type and a new library is added it should also be synchronized. And something similar if a synchronized library is removed?


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

This is from the Generic LibreELEC Build https://drive.google.com/file/d/1ONByejU0PxHAVPjuF0TfsD7w3hiCbNYn/view?usp=sharing.

This time it crash without the addons


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

(2020-02-13, 11:55)LongMan Wrote: This is from the Generic LibreELEC Build https://drive.google.com/file/d/1ONByejU0PxHAVPjuF0TfsD7w3hiCbNYn/view?usp=sharing.

This time it crash without the addons
Ah this is a known issue introduced by PR17202. It should be fixed by PR17352 but I haven't tried it yet and will have to rebase my media import work onto it.


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

Quote:Ah this is a known issue introduced by PR17202. It should be fixed by PR17352 but I haven't tried it yet and will have to rebase my media import work onto it.
Ok. Looking forward to that fix.
 
Quote:I never thought about this use case. The logic would probably be something like this: if a media import exists which imports all libraries of the respective media type and a new library is added it should also be synchronized. And something similar if a synchronized library is removed?
Being able to add one library initially is quite useful for testing and also for first setup. It means that one is able to use the device fairly quickly and then add all other libraries when viewing is finished. Especially for large libraries.
I just realized that if i choose All , then I can only remove All (ie after selecting All, sync and then selecting Choose.., no library is highlighted. That is fine for me. Can't speak for others). No auto sync here either.
As a workaround, after selecting Choose.., I can select the libraries that I want to keep and re synchronize..

I will test the same thing from the server point of view and see how the client reacts. I had done it when addon was in C++ and it worked as expected. I will retest when I find some time.

Cheers,
LongMan


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

(2020-02-13, 20:35)LongMan Wrote:
Quote:I never thought about this use case. The logic would probably be something like this: if a media import exists which imports all libraries of the respective media type and a new library is added it should also be synchronized. And something similar if a synchronized library is removed?
Being able to add one library initially is quite useful for testing and also for first setup. It means that one is able to use the device fairly quickly and then add all other libraries when viewing is finished. Especially for large libraries.
I just realized that if i choose All , then I can only remove All (ie after selecting All, sync and then selecting Choose.., no library is highlighted. That is fine for me. Can't speak for others). No auto sync here either.
As a workaround, after selecting Choose.., I can select the libraries that I want to keep and re synchronize.
Well as most of the user interface stuff this is still up for improvement. As I mentioned before I need to find a way to detect if some setting(s) affecting synchronization has changed to be able to force a resynchronization.


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

Makes perfect sense.


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

@Montellese 
Is there any chance for a optional "native path" sync? With Emby for Kodi we have a option to scan the native paths to the library. This is useful for local setups and addons which require direct access to the folders.


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

Hello
Can anyone please tell me how we can add a remote Plex server to media sources/media providers ?
I go to add provider, then Plex and put in my correct server address (that I can correctly reach from a browser for example) but I always get error and never connect.


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

Are you using MyPlex?.

BTW Don't forget the protocol htttp or https and the port.


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

(2020-02-16, 17:05)LongMan Wrote: Are you using MyPlex?.

BTW Don't forget the protocol htttp or https and the port.

I am using the exact same address and port I use on the browser.
On the browser it connects ok and after connecting ask for user and password.
On media import just throw error cannot connect.


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

(2020-02-16, 21:26)ntilagoa Wrote:
(2020-02-16, 17:05)LongMan Wrote: Are you using MyPlex?.

BTW Don't forget the protocol htttp or https and the port.

I am using the exact same address and port I use on the browser.
On the browser it connects ok and after connecting ask for user and password.
On media import just throw error cannot connect.
On mediaimporter.plex the local only option is misleading as it tries to use the local server without authentication. For it to work you need to add the IP address of your Kodi machine to the list of the allowed ipaddresses allowed to use your PMS without authentication (somewhere on PMS network configuration). You need to do it (for local only) or use myplex instead.

Please report back any issues you find.


This forum uses Lukasz Tkacz MyBB addons.