Jump to content

Kodi MySQL Emulation


cracksloth

Recommended Posts

cracksloth

I am aware of the MediaBrowser for Kodi add-on, however, wouldn't a more seamless experience be achieved by emulating the MySQL server expected by Kodi clients.  As clients would see this as "native", they would be far more optimized, they could be run out of the box, would support traditional software remotes, and would not require special skins.  I am very impressed with the developers of MediaBrowser for Kodi but simply see this as having more utility in the long run especially as low powered devices such as Raspberry Pi are becoming more involved in the living room.

Link to comment
Share on other sites

Vidman

This was discussed at the beginning of the addon development and the devs decided that the current addon was the best way forward. ..obviously. Feel free to develop your own solution tho. .. I'm sure allot of rasp pi owners will thank you:)

Edited by Vidman
Link to comment
Share on other sites

cracksloth

Sorry if the idea is seen unfavorable.  I and many others have used Kodi with MySQL successfully and consider it largely supported within the community.  I would argue that even if this method is seen as "experimental" it still seems that (according to my research) this is the way forward the Kodi team will take things. Forward compatibility seems assured unless I am missing something. This seems important and the advantages I mentioned earlier do too. That being said, I'm just one guy and wanted to share my point of view. I'm not a coder. I prefer to contribute by donation as a user not as a developer.  I fear becoming a valuable developer would require a rewrite of my life given my natural aptitude.

Edited by cracksloth
Link to comment
Share on other sites

Beardyname

Sorry if the idea is seen unfavorable.  I and many others have used Kodi with MySQL successfully and consider it largely supported within the community.  I would argue that even if this method is seen as "experimental" it still seems that (according to my research) this is the way forward the Kodi team will take things. Forward compatibility seems assured unless I am missing something. This seems important and the advantages I mentioned earlier do too. That being said, I'm just one guy and wanted to share my point of view. I'm not a coder. I prefer to contribute by donation as a user not as a developer.  I fear becoming a valuable developer would require a rewrite of my life given my natural aptitude.

 

Not really, I did that as well and would love for someone to hook this up with mb support :)

 

Going forward kodi will mostly do library sharing via upnp and methods such like this, sql support has been experimental for a very long time and not much development goes into that. (At least it didn't when i tried to get some information about it in their irc channel)

Link to comment
Share on other sites

steve1977

Beardyname is right. The Kodi developers don't really favor the mysql solution and it has not seen a lot of love. However, it is a working model and many users do enjoy using it.

 

What exactly is being proposed here? Would this even still require a mysql server setup or is the idea to find away that MBS actually "looks" to Kodi like an mysql server? If that would be possible, this would be a dream... But I doubt that this would be feasible at ease.

Link to comment
Share on other sites

cracksloth

Too bad.  Thanks for the background info.  I figured this would make my life easier.  I guess someone should just fork Kodi and make a Kodi based MB frontend :)

Link to comment
Share on other sites

Beardyname

Too bad.  Thanks for the background info.  I figured this would make my life easier.  I guess someone should just fork Kodi and make a Kodi based MB frontend :)

 

That would be the cake :)

 

the more clients the merrier

Link to comment
Share on other sites

cracksloth

Well, the reason I even started this thread was because I am using (or at least trying to use) underpowered Raspberry Pis as my clients.  Although Kodi is usable running from the MySQL server, it is virtually unusable with the current MB add-on.  I have a large library and the add-on simply cannot deliver a performance that is acceptable for daily use (even with recent optimizations).  Also, there is no ability to remote control Kodi via any of the many Kodi remote control apps out there.  Such apps don't work because the add-on is not actually adding items into the native Kodi library.  I'm not sure whether it's simply impossible for Kodi add-ons to add items to the native library or it was simply a conscious choice of the developers (I suspect the latter). Technically, the add-on developers could also add support to remote control Kodi from the remote control functions built into MB Server (I've been waiting on that feature for awhile). Finally, it would simply be easier for users to download/install a prepackaged client designed from the ground up to work with MB (similar in ease to installing MB Theater, however, borrowed Kodi code is available on a variety of platforms). Anyway, I realize this likely never happen for a lot of reasons - I was just throwing it out there for fun.

Link to comment
Share on other sites

If they had done what you actually suggested and emulated MySQL I imagine the performance would be pretty much the same as it is now.

 

I think the only way you could reach the performance of the native Kodi MySQL implementation would be to create a separate process that actually replicates your MB installation to a MySQL Kodi db on some sort of schedule.

 

In my opinion, the way they went is a better option for most people because something like that replication scheme would be quite complex and have lots of issues to deal with as far as keeping everything up to date between the two systems.  I imagine, it could be done though.

Link to comment
Share on other sites

cracksloth

Sorry emulated was the wrong word choice (I forgot emulation has deeper tech meaning than its common use).  What I was really thinking was a server plugin that would update a Kodi compliant MySQL database whenever MB makes changes to its own library and monitor the MySQL database for changes in play count and resume percentages.

Edited by cracksloth
Link to comment
Share on other sites

Vidman

Well, the reason I even started this thread was because I am using (or at least trying to use) underpowered Raspberry Pis as my clients. Although Kodi is usable running from the MySQL server, it is virtually unusable with the current MB add-on. I have a large library and the add-on simply cannot deliver a performance that is acceptable for daily use (even with recent optimizations). Also, there is no ability to remote control Kodi via any of the many Kodi remote control apps out there. Such apps don't work because the add-on is not actually adding items into the native Kodi library. I'm not sure whether it's simply impossible for Kodi add-ons to add items to the native library or it was simply a conscious choice of the developers (I suspect the latter). Technically, the add-on developers could also add support to remote control Kodi from the remote control functions built into MB Server (I've been waiting on that feature for awhile). Finally, it would simply be easier for users to download/install a prepackaged client designed from the ground up to work with MB (similar in ease to installing MB Theater, however, borrowed Kodi code is available on a variety of platforms). Anyway, I realize this likely never happen for a lot of reasons - I was just throwing it out there for fun.

I don't see much of what you mention actually being improved by a kodi based front end plus the enormous amount of extra work for devs to maintain I see why the current solution is favoured. For example all of the current kodi remotes do actually work apart from direct libraray access, a forked kodi would require rewritten remote apps as well .... Also the add-on in the beta repo does function with the mbs remote control interface Edited by Vidman
Link to comment
Share on other sites

cracksloth

Regarding the Kodi based frontend, I was really just throwing out a half-thought idea. I mostly agree. The most significant benefit would only be if the current MB Theater devs were interested because it *might* allow for easier cross platform development but I *might* also be full of horse crap. Although I wasn't aware (even with the beta repos) that the addon supported full remote... I'll definitely look into it.

Edited by cracksloth
Link to comment
Share on other sites

steve1977

Fully agree with @@ebr. There is no point to have an emulation. The current addon is brilliant and the MBS-specific skins are basically Kodi forks without formally going this way. Only issue is those of us who still use RPis, where a python based addon (or a mysql emulation) just do not work well enough.

 

While I like the idea of MBS working with an mysql database natively, I don't think that this is what the future will bring for Kodi. The Kodi developers are planning to integrate UPNP/DLNA into the native Kodi library (and eventually even abandom mysql). Once this will happen, all our issues (even on the RPi) will be solved as UPNP/DLNA is very fast and will bring the final full integration of Kodi with MBS.

 

For those interested, a few more information:

 

Presentation from Kodi developer conference about new library, which would allow natively to include MBS

https://dl.dropboxusercontent.com/u/4929486/20141004_devcon14_media_importing.pdf

 

Very initial development branch for this effort

https://github.com/Montellese/xbmc/tree/media_import_redesign

 

Some discussion on this topic, which indicates that this may still be quite far in the future given lack of development capacity

http://forum.kodi.tv/showthread.php?tid=212196

http://forum.kodi.tv/showthread.php?tid=210921

http://forum.kodi.tv/showthread.php?tid=197039

 

 

 

In any case, my best guess would be that we will be able to natively integrate the two (Kodi and MBS) in 12-18 months and by then no longer need addons. Until then, let's not complain as the addon is fantastic for the interim!!!

Link to comment
Share on other sites

xnappo

@ has done some research into how this might be done by background syncing the local and MBS database - but it would need a separate team to look into it. 

 

Personally, in 12-18 months, the Pi 3 will be out or there will be an optimized Pi Python port and it will still not be a problem :)

 

On a side note, I really rarely read the server section, so if you post about Kodi elsewhere it would be nice if you could mention the discussion in the Kodi section.

 

xnappo

Link to comment
Share on other sites

cracksloth

Sorry everyone - I'd like to think this feature/plugin request wasn't seen as complaining about the MB for Kodi addon.  There are simply limitations I'm trying to work around.  The current options don't work for my implementation and the idea that came to mind to resolve my issues would require a separate plugin or become baked into the server itself. I do think supporting underpowered devices such as the Raspberry Pi, Android sticks, and similar boards would be considered a valuable addition to MB. Kodi runs relatively well on them natively so I figured there might be hope for MB one day.  A ton of those boards have been sold and many of them just function as HTPCs running XBMC/Kodi.  That's a lot of untapped potential MB users.  I'll continue using the native Kodi library for now but I'm still hopeful a more seamless integration will be possible for these boards in the future.

Link to comment
Share on other sites

xnappo

@@cracksloth - I don't disagree at all.  Have you tried the latest server version and DLNA in Kodi?  It is quite a good option for low-end devices.

 

I did not take offense to this - doing a MB3<->Kodi data sync project is a good idea, I just don't have the time to do it.

 

xnappo

Edited by xnappo
Link to comment
Share on other sites

Koleckai Silvestri

Kodi's MySQL implementation needs a lot of work. As I would suspect their default SQLite Database would. Many fields aren't even named in the database and just called Column1, Column2, etc... I don't think it is proper to emulate at this time.

 

However I do like that MediaBrowser has settled on using Kodi's NFO format as a standard. Thought I hate the choice of extension but that is another issue. By adopting Kodi's metadata file format, we take more steps towards standards and interoperability more than matching their database. The XML format is easier to adapt to different systems, programming languages, and is human readable. This gives a lot more options both present and future than using a proprietary format like MySQL. With the XML format, you can build clients that utilize MySQL, Oracle, SQL Server or anything else. This will only help build a stronger Media Center market and hopefully others will follow suit.

Link to comment
Share on other sites

cracksloth

@@xnappo Yes, I've used the DLNA option recently but probably not with the latest server version (I run the beta build).  It was ok but did not seem to work well with remote functions of MB (I could only use the stop button and change volume).  Also it didn't tolerate pausing media for extended periods. Obviously, the remote control ability is a big thing in my usage scenario.  Vidman mentioned MB for Kodi has implemented support for MBS remote which I was unaware.  Last time I tried it, I think only a couple buttons worked. I'll give it another shot.  Maybe I'll just use the web client for browsing the collection and play to the Pis.  This should work ok (as long as the remote buttons are supported).

 

For anybody reading this thread, another potential option would be a Kodi add-on that scraped the MB server and inserted the metadata into the native Kodi library (the local library, not the MySQL library).  It could monitor the server for changes periodically and update play counts and playback progress on MB server as needed.  I suggest this subtle change because it seems some resistance to the idea stems from the uncertain future of MySQL as a library backend with Kodi. This would provide the performance benefits of a native Kodi library and would allow for traditional methods of Kodi remote control. Is this idea more appealing?

Link to comment
Share on other sites

xnappo

Using DNLA for on-Pi browsing, and the AddOn for remote is probably a good scheme.

 

As far as your second suggestion, yes the is what I meant.  It would need to be bi-directional though to update playback position and watched status.  This is not a quick/small project though.

 

Someone was working on a Kodi-specific DNLA scheme, but I don't see it in the list...

Link to comment
Share on other sites

Vidman

@@xnappo Yes, I've used the DLNA option recently but probably not with the latest server version (I run the beta build). It was ok but did not seem to work well with remote functions of MB (I could only use the stop button and change volume). Also it didn't tolerate pausing media for extended periods. Obviously, the remote control ability is a big thing in my usage scenario. Vidman mentioned MB for Kodi has implemented support for MBS remote which I was unaware. Last time I tried it, I think only a couple buttons worked. I'll give it another shot. Maybe I'll just use the web client for browsing the collection and play to the Pis. This should work ok (as long as the remote buttons are supported).

 

For anybody reading this thread, another potential option would be a Kodi add-on that scraped the MB server and inserted the metadata into the native Kodi library (the local library, not the MySQL library). It could monitor the server for changes periodically and update play counts and playback progress on MB server as needed. I suggest this subtle change because it seems some resistance to the idea stems from the uncertain future of MySQL as a library backend with Kodi. This would provide the performance benefits of a native Kodi library and would allow for traditional methods of Kodi remote control. Is this idea more appealing?

You could add your mbs library folders as native kodi source folders and use trakt to sync playstates
Link to comment
Share on other sites

cracksloth

You could add your mbs library folders as native kodi source folders and use trakt to sync playstates

This is my current implementation. The biggest reason this is frustrating is that I need to scrape with MB, usually customizing artwork, then update the library in Kodi.  It works but because I'm lazy at times with artwork the Kodi clients lag behind so I would prefer something more streamlined and automatic.

 

 

I think this is going to be the long term answer for low end devices:

http://mediabrowser....view=getnewpost

 

Nice hustle @@xnappo!  You may be right.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...