• 1
  • 29
  • 30
  • 31(current)
  • 32
  • 33
  • 40
HOW-TO:Share libraries using MySQL: Wiki Edition
(2017-05-24, 22:30)runningnaked Wrote: Assuming you're using Windows for the HTPC's. Also assuming you currently have the 2 HDDs in each HTPC assigned the same drive letters on each HTPC (for example, HDD1 is L: and HDD2 is M: on both).

That will work, with caveats.

Also pay attention to these points.

I am running windows on both. The drives are mapped the same in both pcs. They are WD green drives, but i will check compatibility, thankyou.

What im planning is a litle different to what you suggest though. I will end up with a laptop in bedroom with no local drives, which will have 3 hdds in the nas as sources. In the lounge room i will have a htpc with 2 local drives, with only 1 on the nas as a source.

Will running a centralised mysql on the nas still work, being both players will be marking things in the library as watched, that are in different source locations? (local on one, nas on the other).

I guess i could watch everything from the nas for both rooms, and keep the locals as the backups of whats in the nas. Would rather not though.
Reply
I'm trying to ease my way into this, never having used any of the library functions before :-( Here's the deal: my husband uses his tablet heavily to watch local content, but he moves from room to room in the middle of a video.... So we have a PC attached to the TV in the living room and have ordered a TV box for the downstairs "man cave" once I discovered the Upnp functionality.

Of course this creates another problem since resume points don't work properly with Upnp (Jarvis 16.1--gotta be for his tablet).

In short, we need a way to play local videos from his tablet either on the tablet itself or to another Kodi via Upnp AND maintain proper resume points on his tablet.

Is MySQL the way? I've installed it on my Win 10 PC as a test and set up a basic database form following http://lifehacker.com/5634515/how-to-syn...-the-house.

So far I've had no luck. I did manage to finally get some of my local videos to generate a library, I guess, because all kinds of new stuff appeared on my tablet screen (where I was doing the library formation) and then it also appeared on the Kodi on my PC all by itself! So I guess that's good. But when I start a library video on my tablet with "Play using..." directed to my PC, I do get a resume option but it is ignored and the video starts on the PC from the beginning.

If I try to start the video from the library on the PC (my preference), it starts from the beginning, not from where I left off on the tablet. So clearly something is not right. This whole library thing is pretty complicated. Generally we use Kodi as a video player (yes, we have a few addons, etc. also) for local content which is deleted after watching, so that's why we've never used library functions before.

So...the Wiki makes it sound like it should all work. But it doesn't?
Reply
If you created data bases in mysql, as per the instructions link above, you didn't need to. Once you have the correct user info added to advancedsettings.xml the dbases will be created on their own.

Best thing you could do right now is send a log file and let someone here, not me, look it over and direct you from there.

It all works fine for me so it DOES work.

A few things..

You HAVE to use the same version of Kodi on all devices as kodi creates the dbase in mysql and each kodi version uses a different dbase name.
You need to make sure you have advancedsettings.xml configured properly on EACH device accessing MySql.
I'm pretty sure you need to have UPNP setting OFF in Kod's settings as mysql is taking over.

There is a KODI wiki with instructions for setting this up and that is what you should use. WIKI
Reply
OK, so I went back and deleted the previous database and followed (as much as possible) the Wiki instructions. Since the tablet is the file source, there has to be some way for other Kodi instances to access the files and I chose UPNP (yeah, it works).

I think the Library is pretty squirrely. It took me a long time to get it to pick up content from the source directory, and when it did it ignored most of the videos. One that did make it in played perfectly from device to device, including resume points, but only if accessed from the Library itself or "TV Shows" (guess I need another one for Movies....). Any other access point just started the file from the beginning.

So now I'm stuck with the files that the Library can't/won't "see". I read the Wiki on Naming conventions and that does not seem to be the issue. Really annoying.

But here's the worst: for this to work for my husband, he has to be able to not only wander around the house with his tablet but also *leave* the house (like going to the gym). Kodi will hang on startup if the MySQL server is not available, so that's not good. I guess I could make a simple app to turn off/on the advancedsettings.xml file (just rename it on a toggle). But if he was resuming a video I assume the information for the start time would not exist locally?
Reply
Well I think you're trying to do something (...by going away from your local network) that neither Kodi or MySql is intended to do, in the manner you're trying to do it, and you might have better results using Emby media server and integrating it with the Emby addon into Kodi. MySql REPLACES UPNP. Most people using it (MySql) have their media files stored either on a NAS device or a PC that acts as a server. Like in my situation, I have a NAS serving the media. I have MYSQL setup on an old laptop that is ON 24/7 and I have 5 devices accessing MySQl and using it to keep the Kodi library. I can add movies to the NAS and add them to the library from any one of the PCs or Android devices I have via Kodi Library Update. I don't think it was really meant to be used off site. Seems like you're trying to do it all backwards. Putting the media on that PC you have connected to the TV and sharing them from there to the rest of the devices is the way it usually gets done.

As far as keeping the watched status and resume points, do you have these lines of code in your advancedsettings.xml file:

Code:
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
Reply
(2017-05-30, 21:26)flhthemi Wrote: Well I think you're trying to do something (...by going away from your local network) that neither Kodi or MySql is intended to do, in the manner you're trying to do it, and you might have better results using Emby media server and integrating it with the Emby addon into Kodi. MySql REPLACES UPNP. Most people using it (MySql) have their media files stored either on a NAS device or a PC that acts as a server. Like in my situation, I have a NAS serving the media. I have MYSQL setup on an old laptop that is ON 24/7 and I have 5 devices accessing MySQl and using it to keep the Kodi library. I can add movies to the NAS and add them to the library from any one of the PCs or Android devices I have via Kodi Library Update. I don't think it was really meant to be used off site. Seems like you're trying to do it all backwards. Putting the media on that PC you have connected to the TV and sharing them from there to the rest of the devices is the way it usually gets done.

As far as keeping the watched status and resume points, do you have these lines of code in your advancedsettings.xml file:

Code:
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>

Yes, I realize this is sort of bass-ackwards, but that's the way he watches things...I could never do it :-)

Because of these issues I decided to try a different approach and looked at the Trakt addon. Initially I passed that up (although I have a trakt.tv account I never use), but considering what I wanted to do... Anyway, I set it up on my tablet and my PC for a test run. Once again the whole Library thing just seemed so impenetrable, but I did get a local Library finally on the tablet with a few videos. Then I set the UPNP on both machines to share Libraries, discover, etc.

After a few restarts and some fiddling with authorization on the Trakt addon, I finally saw a Library on my tablet, but not on the PC. However, under Videos->Files I deleted a former UPNP link to my tablet and made a new one. To my surprise, opening that revealed a Library directory, not just a file list. Sure enough, I was able to resume videos in-progress from the correct point on both devices.

I think this is about as close as I can get. There's nothing to stop the tablet from starting up Kodi away from other instances and--presumably--the Trakt addon will update the on-line database the next time wi-fi is available if viewing is done off-line.

I only wish there were some way to hide all that Library "stuff" from under the VIDEO heading on the home screen of the tablet. "Files" and "Addons" are quite enough for the small screen. I suppose that's in the code somewhere. Maybe that's my next project :-)

Thanks for your time and the explanations which eventually led me away from a path that would not have been a good fit.
Reply
Funny that was going to be my next suggestion, trakt. I just wanted to make sure you had a working dbase before hand.

Well you got something....so I guess it's a least close to what you want. But do take a look at Emby, it's free and can be installed on that PC right along with MySql and Kodi. If you can't use or don't like it you can always remove it. But it will share media over the internet so the hubby could watch what's at home while at work...and I think you can still use a web browser or Emby's app from the store.
Reply
Finally gave this a shot and have a few issues that maybe someone can help a newcomer with. I have mysql setup, it created the mymusic and myvideo databases properly. When I copy the advancedsettings.xml over to another device, the library shows up along with any progress on the videos, but videos will not play. Just says, file is no longer found, do I want to remove it from the library.

Is this a common mistake I am making along the way?

All devices are running 17.3.
Shares are all on my HTPC which is running mysql. The initial setup to mysql was done from a Fire TV. Laptop running 17.3 is what is giving the issue.

Any thoughts?
Reply
Did you copy sources.xml (and possibly passwords.xml if you created that file) in addition to advancedsettings.xml to the other device?
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Nope...I'll give that a shot and see how it works.

Thanks!
Reply
Looks like that did the trick, thanks a bunch!

Something else I just thought of, when it comes time to upgrade kodi (currently running 17.3) do I just update all device to the same version and keep trucking or will I have to rebuild the library again in mysql?
Reply
The first device you upgrade to 17.3 will upgrade/migrate your MySQL databases to the new database version which won't be visible to your devices running older versions of Kodi, so you'll then need to upgrade those Kodi devices to the same Kodi 17.3 version in order for all your devices to be using the same database version. You should not need to rebuild your library provided the database migration is successful (it usually is).
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
I got one question about this migration...once it is complete for all devices and all is well, should the old databases be dropped in mysql to keep it trim?
Reply
(2017-06-01, 18:18)flhthemi Wrote: I got one question about this migration...once it is complete for all devices and all is well, should the old databases be dropped in mysql to keep it trim?
Dropping the old databases shouldn't be a problem once you are happy with the migration.
Texture Cache Maintenance Utility: Preload your texture cache for optimal UI performance. Remotely manage media libraries. Purge unused artwork to free up space. Find missing media. Configurable QA check to highlight metadata issues. Aid in diagnosis of library and cache related problems.
Reply
Everything worked great, just wanted to thank you guys again. One last question though. Is there a file that I can move over from box to box that would keep the home screen settings such as TV, Weather, Favorites, etc. hidden or visible?

Thanks again!
Reply
  • 1
  • 29
  • 30
  • 31(current)
  • 32
  • 33
  • 40

Logout Mark Read Team Forum Stats Members Help
HOW-TO:Share libraries using MySQL: Wiki Edition2