2016-11-08, 00:24
Montellese Wrote:First off, once again thanks for your detailed testing and feedback.
It is the least that I can do. I know that after some time of working alone on a big project, everything feels like it is running into each other. A fresh pair of eyes and a little feedback is a good way to break the monotony. So no problem.
Montellese Wrote:The problem is that Kodi does not really support this at all right now. You have to use hacks like smartplaylists etc. to get this kind of separation. This makes it almost impossible for media importing to support it in a useful way. From what I understood Emby solves this by using tags? Those can be (and probably are being) imported so you could still create smartplaylists in Kodi.
Yes, Emby for Kodi (E4K) does use tags. But not the tags that are stored on the server. The tags on the server are being imported in the current build. The tags used for library separation are added while the item is being imported. The logic goes something like this
- E4K asks the server for all the media libraries of a certain media type, say movies.
- These are returned, (Movies, Kids Movies and Documentaries in my case)
- It takes each in turn and ask for the media item within that library (SELECT * Kids Movies).
- These are returned, it loops through them, as it loops through the items it tags each one with the name of the library, Kids Movies, and add it to Kodi.
- it then move to the next library of the same media type and repeat the process. Then on to another media type etc.
It is true that Kodi does not support it. I was hoping that you could put a strut in place so that when Kodi actually supports it, the addons will not have to be modified. By this I mean put an external interface for it, maybe just a property/method in the code, and then use whatever 'hacks" inside the function in the importer. You could follow Emby for now and use tags. In doing this the addons would be passing in the information through one uniform interface. When Kodi properly supports it, the internal code could be changed, in one place, and the 'addons' would be none the wiser. I suspect if you do not define such an interface there are going to be many hacks. Thinking about it, the hacks may offer alternate approaches to a solution. However, it might be safer to limit the chaos.
Montellese Wrote:Right now it only syncs when it detects the media provider and after that through manual syncing. But that's just because I haven't implemented the websocket stuff which would inform Kodi's importer as soon as something has changed in Emby. Syncing watched state from Kodi back to Emby should be instantaneous.
I was wondering how I could test that since I had only one client, forgot that I can use the Emby Web Client. I will check that.
Montellese Wrote:Collections seem to be handled differently in Emby than I expected. You don't get the collections a movie belongs to as part of the movie's metadata (is there a reason for this or did I just miss some property?). You have to ask for all collections separately and I haven't implemented that yet.
That's right. Collections are handled separately in Emby. It is in a section by itself. The approach to closer to what you had envisaged for tags, but the addon imports it as Movie Sets. I like that actually. I have only made one personal collection, the others are from the scrapers, but I appreciate the flexibility. There is a separate import for collections in the Emby for Kodi addon. It runs right after all the movie libraries have been imported. Just a heads up, it does not have a web socket event for changes yet. There are many request for it to be added.
Montellese Wrote:I've thought about this too and it's probably the better thing to do but I'll have to see how I integrate it in the generic (i.e. media type agnostic) implementation of the media importer.
Cool
LongMan