Work in Progress - Media importing and library integration (UPnP, Emby, ...)

  Thread Rating:
  • 5 Vote(s) - 4 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Mettbrot Offline
Senior Member
Posts: 279
Joined: Jan 2011
Reputation: 4
Location: Aachen
Post: #301
I don't know if Montellese is happy with the UPnP implementation as it is right now. I recall, he was considering moving the whole thing from platinum SDK to OhNet since platinum isnt really developed anymore.
This seems to be a huge amount of work though.. https://github.com/Montellese/xbmc/commits/ohnet
Maybe something for GSoC?
(This post was last modified: 2017-04-30 11:26 by Mettbrot.)
find quote
Montellese Offline
Team Kodi Developer
Posts: 4,811
Joined: Jan 2009
Reputation: 66
Location: Switzerland
Post: #302
(2017-04-28 15:40)natethomas Wrote:  It seems like this project is pretty far along, montellese. Would it make sense to PR it in and let the team work on any remaining bugs?

There are basically three problems with this right now (apart from any known/unknown bugs):
  1. I most likely won't have time to take care of any bugs and issues this would cause which would result in a huge additional burden on other developers.
  2. The implementation only covers videos and music hasn't been done yet.
  3. Right now the only way to write media imports is in C++. I would prefer it if we had a python add-on interface which would make it a lot easier for other people to write imports for Emby, Plex et al.

(2017-04-30 11:20)Mettbrot Wrote:  I don't know if Montellese is happy with the UPnP implementation as it is right now. I recall, he was considering moving the whole thing from platinum SDK to OhNet since platinum isnt really developed anymore.
This seems to be a huge amount of work though.. https://github.com/Montellese/xbmc/commits/ohnet
Maybe something for GSoC?
Well that's not really a necessity for this work. It would allow a bit more flexibility and additional integration like downloading imported items for offline viewing but the basics needed work fine with the existing platinum SDK.

Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
find quote
jjd-uk Offline
Team-Kodi Member
Posts: 6,116
Joined: Oct 2011
Reputation: 146
Post: #303
For the Media Importers could the python scraper interface be extended to cover this?
find quote
Montellese Offline
Team Kodi Developer
Posts: 4,811
Joined: Jan 2009
Reputation: 66
Location: Switzerland
Post: #304
(2017-04-30 12:20)jjd-uk Wrote:  For the Media Importers could the python scraper interface be extended to cover this?

I don't really know what that interface currently looks like. Right now the interface to be implemented by a media importer is defined by https://github.com/Montellese/xbmc/blob/...mporter.h. The imporant parts are:
  • GetIdentification(): this should be easy as the add-on already has an ID and a name.
  • ProvidesChangeset(): whether the add-on provides a full list of imported items or only a changeset since the last synchronisation.
  • CanImport(): whether the add-on is capable of importing items from a given path.
  • LoadSourceSettings() / LoadImportSettings(): the add-on can provide media provider / import specific settings. This is the reason why I started working on getting add-ons to use the same settings system as kodi again.
  • Import(): the add-on gets a list of already imported items and then more or less returns a full list or a changeset of imported items

Furthermore the add-on would probably need some kind of service component which tells kodi about available media sources which the user can import items from.

Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
find quote
angelblue05 Offline
Senior Member
Posts: 153
Joined: Nov 2014
Reputation: 9
Post: #305
@Montellese

I'd like to help with the python portion if possible. Just let me know what needs to be done and where I should start.

Quick question about paths for items: Let's say the user uses Kodi locally or outside their network. In Emby for Kodi, we use plugin paths to accommodate the scenario where the path of the content may change depending on the user's location. What flexibility do we have in this regard? Does this only support direct paths to content or?
(This post was last modified: 2017-05-22 21:18 by angelblue05.)
find quote
Montellese Offline
Team Kodi Developer
Posts: 4,811
Joined: Jan 2009
Reputation: 66
Location: Switzerland
Post: #306
Right now the UPnP importer simply uses UPnP paths which can already be resolved by Kodi. But this is a problem I'm aware of. We might need some kind of URL resolver plugin infrastructure which would allow a media importer plugin to also provide an URL resolver implementation and then use its own URLs for imported items.

As soon as I've finished my add-on settings work I'll come back to media importing (which should benefit from the add-on settings work) and then I'll look into how this could be done for python add-ons. Most of the things mentioned above should be straight forward but the Import() part requires that Kodi provides the plugin with a list of already imported items and AFAIK this hasn't been done anywhere in the existing plugin API yet. I'll let you know as soon as I've got something to work with / against.

Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
find quote
angelblue05 Offline
Senior Member
Posts: 153
Joined: Nov 2014
Reputation: 9
Post: #307
That's good to hear. I'll be here Smile
find quote
Post Reply