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, ...) - LongMan - 2019-12-11

Is that windows home or windows pro?

Edit: It couldn't be windows, just checked with windows home and it works.

Try
http://mirrors.kodi.tv/test-builds/windows/win64/KodiSetup-20191210-b937206b-media_import_rebase_20191003-x64.exe


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

(2019-12-11, 05:11)LongMan Wrote: Is that windows home or windows pro?

It is windows 10 Home


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

And the addon from here
https://www.dropbox.com/s/qr58iadjfeer1va/mediaimporter.emby.zip?dl=1


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

nothing

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


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

It is saying that the dependencies are not installed. Try installing the addon from zip. use the zip from post 498


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

(2019-12-11, 03:48)LongMan Wrote: With regards to useful features, I only use Emby with Kodi so I am not really familiar with all the features of Emby. As far as parity with Emby for Kodi,  these are the ones I can think of right now.

Useful features
  • External subtitles
    •  I am not sure how @angelblue05 achieves it, but external subtitle work in Emby for Kodi.
    • For MediaImport, only the internal subs work right now. I suspect she copies the subtitle files.
  • Refreshing an item
    •   I remember your modifying video info dialog to allow hiding the refresh button for imports. Actually Emby allows refresh of individual items.
    • It is in the context menu for Emby for Kodi and it works very well. I often use it to refresh a series after I have added a new episode and I don't want to run a library scan.
  • Playing .strm files
    • strm files, Netflix and Amazon strm files in my case, works with Emby for Kodi. I think she test for .strm extention and do some resolve url or something like that, and use Kodi to direct play the file.
    • In addition, since Liuke added the new API to update the server, playback and resume position are also reported to the server, which propagate to other clients.
Edit:
  • Individual Client Name
    • The ability to identify each client. Right each client registers as Kodi 19.0 ALPHA 1


And Thanks again for taking the time to do this. I know it is a sacrifice and i really appreciate it.   
  • External subtitles: I can look into this but personally I hate subtitles so I never use them and also have no idea how they work in Kodi.
  • Refreshing an item: I'd have to add support for that to both Kodi and the mediaimporter.emby add-on. How long does synchronisation take for you once everything has been synced once? Furthermore as long as Kodi and Emby are running Kodi will receive notifications for whenever an item has changed on Emby and it will only sync the changed items.
  • Plying .strm files: Are the STRM files in the Emby library as normal items? Do you need an additional add-on in Kodi to be able to play from Netflix or Amazon Prime? I neither have Netflix nor an Amazon Prime account so I have no idea how these things work...
  • Individual Client Name: This one should be easy. There are basically two ways (or a combination of the two): We take the name of the Kodi installation from the settings or we add a setting to the media provider settings to allow the user to specify / overwrite it. Is the latter necessary or is the former good enough? The former is probably implemented in 10 minutes. The latter takes a bit longer ;-)
    EDIT: I've already implemented the former :-) If useful we can still support the latter.



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

(2019-12-11, 03:48)LongMan Wrote: When I play an episode and stop, it shows an error. It doesn't have the error for movies or music video.

https://drive.google.com/file/d/1hIsocO3hV7Pf34BUsHC34ux0hBPpVk-l/view?usp=sharing
From your logs it looks like it tried to update the resume position of your episode on the Emby server but the response from the server was invalid. I'll try it myself.
 
(2019-12-11, 03:48)LongMan Wrote: Also it doesn't seems adding the provider manually works. Every time I try it it fails. I will try to provide a separate debug log with just that.
Odd I just tried this by entering "http://localhost:8096" as the Emby base URL and it detected the proper Emby server and allowed me to choose the user etc. After that I was also able to add media imports and synchronize them.


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

External subtitles:
  • When my daughters were younger, i used subtitles so that they would associate sounds with letters and words while watching television.
  • After a couple of years I just got used to it. It worked out well, actually. They learned to read quite early.

Refreshing an item:
  • Refreshing of an item is useful sometimes for example if a piece of artwork is changed, or just a single episode is added for a favorite show to be watched immediately.
  • Running a library scan just for one item is not always the best move.
Playing .strm files:
  • Yes, we would be using a Kodi addon to play the stream file.
  • In my case I use The Amazon Prime and Netflix addons.
  • You also correct about them being added as normal library items.
  • The value of adding the files to Emby is that watch state get propagated to other clients around the house.
  • I can leave the living room and continue in the bedroom.
  • Also I don't have to go digging in the addon to continue a movie or series, it is the first item in Continue watching.
Individual Client Name:
  • For me taking the Kodi installation name from settings is preffered. But others may want the ability to overide.
  • I assume you are taking about Settings>Services>General>Device Name



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

You are correct. Manually adding provider works. I was forgetting the protocol.
Maybe pre-populating http:// would may it clear that the protocol is needed.
If https is being used, the user would probably realize correct it.


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

if it is possible, adding Add Import... to the context menu for the provider is a nice touch


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

(2019-12-11, 18:59)LongMan Wrote: You are correct. Manually adding provider works. I was forgetting the protocol.
Maybe pre-populating http:// would may it clear that the protocol is needed.
If https is being used, the user would probably realize correct it.
That's a good idea. For developers it's always so obvious as to what to do ;-)
TBH I never tested HTTPS so no idea if that would be working at all.

EDIT: I've added it :-)


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

(2019-12-11, 19:12)LongMan Wrote: if it is possible, adding Add Import... to the context menu for the provider is a nice touch
I was actually just thinking about completely re-organizing the whole media source directory tree. I'm not sure if splitting media providers and imports makes any sense. Maybe it should just be:
  • Media providers (as part of Settings)
    • All media providers
      • Emby XYZ (possibility to open the info / settings dialog via context menu)
        • Movie import (possibility to open the info / settings dialog via Enter or context menu)
        • TV show import (possibility to open the info / settings dialog via Enter or context menu)
        • Add import... (only if there is still a media type without an existing media import)
      • Plex ABC
      • Add provider...
    • Active media providers
      • ...
    • Inactive media providers
      • ...
This would basically be the same as we have now under "Media imports" > "By media providers" with the addition of all / active / inactive from the "Media providers" tree. Maybe that's less confusing and I'm not sure if "Media imports" > "By media types" has any gain.


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

I like that. It has a natural feel to it.

I assume you are avoiding Media Servers because provider could be a Kodi plugin.
Also,  are keeping it away when the Media>Library> Videos> Sources? I know UPnP sources are in that node.


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

(2019-12-11, 20:23)LongMan Wrote: I like that. It has a natural feel to it.
I'll give it a try.
(2019-12-11, 20:23)LongMan Wrote: I assume you are avoiding Media Servers because provider could be a Kodi plugin.
TBH I suck when it comes to naming things. Initially (and still in the Kodi code) it was named "media source" but when I first introduced the concept to the team some found it confusing because we already use "source" for the existing file based sources. I don't want to use the term "server" because importing can theoretically happen from anywhere. We already support importing from another Kodi installation using UPnP.
(2019-12-11, 20:23)LongMan Wrote: Also,  are keeping it away when the Media>Library> Videos> Sources? I know UPnP sources are in that node.
Well there are multiple reasons:
  • Media imports are not video-specific but could also support music. I just never implemented it because I don't really use the music library myself and don't know how it works.
  • Media > Library > Videos (there is no "Sources") forwards to "Videos > Files" which certainly doesn't fit media importing.
  • The existing sources and media providers / imports work completely different so I wanted to avoid any confusion.

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.


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

(2019-12-11, 18:30)Montellese Wrote:
(2019-12-11, 03:48)LongMan Wrote: When I play an episode and stop, it shows an error. It doesn't have the error for movies or music video.

https://drive.google.com/file/d/1hIsocO3hV7Pf34BUsHC34ux0hBPpVk-l/view?usp=sharing
From your logs it looks like it tried to update the resume position of your episode on the Emby server but the response from the server was invalid. I'll try it myself. 

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.