MySQL Database: Multiple XBMC HTPC's with 1 Shared Library

  Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
RamboUnchained Offline
Senior Member
Posts: 113
Joined: Apr 2014
Reputation: 3
Post: #391
(2015-02-20 23:46)Tight_wad Wrote:  How to search, it's easy Click the link, you will have your video

Both old videos with pretty horrible guidance. I'll figure it out on my own. Smartass.
(This post was last modified: 2015-02-21 03:35 by RamboUnchained.)
find quote
RamboUnchained Offline
Senior Member
Posts: 113
Joined: Apr 2014
Reputation: 3
Post: #392
(2015-02-20 20:07)nickr Wrote:  
(2015-02-20 15:47)RamboUnchained Wrote:  5 years and not a single person has done a tutorial actually worth watching...I dont get it. There are Kodi/XBMC tuts out there that explain how to do things a monkey could learn to do, but there's no solid tut for this. I'm used to working with hardware and software that TELLS me if I've done something right or wrong. Following text tutorials has lead me nowhere.

And when you ask for help, people assume you're on Linux...Please...Someone take 15min of your time and make a true step by step guide to this for Windows as well. Linux tuts are of no use to me since the commands seem to be completely different. A 15min video stickied on the forums would save a lot of people a lot of time.
Is the process not fully described, for windows, here? http://kodi.wiki/view/MySQL/Setting_up_M...ab=Windows

It's vague for someone that's never done anything mysql related. All command lines since ever offer feedback when you type a command and it is accepted or not. With Mysql, you can type anything and as long as you don't put any weird symbols, there's no surefire way of knowing of what you entered was correct or not.
(This post was last modified: 2015-02-21 07:16 by RamboUnchained.)
find quote
nickr Online
Donor
Posts: 12,175
Joined: May 2009
Reputation: 218
Location: Christchurch NZ
Post: #393
Copy & paste is good for eliminating error. How is a video going to help your typing skills?

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
RamboUnchained Offline
Senior Member
Posts: 113
Joined: Apr 2014
Reputation: 3
Post: #394
(2015-02-21 21:26)nickr Wrote:  Copy & paste is good for eliminating error. How is a video going to help your typing skills?

It wouldn't, but I ended up figuring out most of it on my on in the end anyway. The difference b/w a ' and a ` are miniscule and as I previously stated, I tried every possible combination before I just copied and pasted. My typing skills had nothing to do with the fact that what I typed and what I copied and pasted "looked" exactly the same in notepad, but only the copied text was accepted by the command line. It's not like I was mistaking a & for a % or something weird like that.
find quote
Ned Scott Offline
Team-Kodi Wiki Guy
Posts: 25,827
Joined: Jan 2011
Reputation: 359
Location: Arizona, USA
Post: #395
(2015-02-20 15:47)RamboUnchained Wrote:  I'm used to working with hardware and software that TELLS me if I've done something right or wrong. Following text tutorials has lead me nowhere.

I'll tell you what you did wrong: you ignored all the warnings that this was experimental and above your head, and you then expected someone else to solve your problems for nothing.

It takes a hell of a lot longer than 15 minutes to make an easy to understand video to set this stuff up. It's a lot easier to just complain about other people not doing it for you.

You can make easy links to the Kodi Wiki Manual using double brackets around common Kodi words: [[debug log]] = debug log (wiki), [[Video library]] = Video library (wiki), [[SMB]] = SMB (wiki) , [[userdata]] = userdata (wiki), etc
find quote
DJ_Izumi Offline
Posting Freak
Posts: 778
Joined: Jul 2007
Reputation: 8
Post: #396
I gotta be honest, I know nothing about MySQL, databases or anything of the like and I successfully set it up on a Windows based server/HTPC setup. The worst issue I ran into was needing to convert my file entries from locations like d:\media\television series\ to smb://server/blah/blah but that was a fairly straight forward word replace of the XML file on the exported database.
find quote
nickr Online
Donor
Posts: 12,175
Joined: May 2009
Reputation: 218
Location: Christchurch NZ
Post: #397
notepad?

Now we know you're mad LOL!

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
find quote
aitrus00 Offline
Junior Member
Posts: 3
Joined: Mar 2013
Reputation: 0
Post: #398
This may be an issue that has already been discussed, but I am at my wits end so I am coming to all you smarter people in hopes that I can get some guidance. So here's the issue....

I have a Synology Diskstation with my entire video/music library. Its running MySQL and houses the main DB for all the Kodi clients. When I setup my first client, it was a mini PC running Windows 7 that populated the first database scraping all the movies/music. I had a share on that computer labeled z:\ that had all the content. Its been tracking all the WATCHED items.

I just got a new Raspberry Pi 2 and have it setup with all the correct data, created the advancedsettings.xml as it should be and the first time I booted into Kodi on the Pi it showed my entire library as it was on the first computer, but obviously using all the paths from the windows machine which the Pi didn't like and it couldn't get to any of the files. So I found the <pathsubstitution> section and figured that would do it, and I thought I had it right, but it didn't do anything. Here's what my file looks like on the Pi:

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.100</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name>
</videodatabase>
<videolibrary>
<importwatchedstate>true</importwatchedstate>
<importresumepoint>true</importresumepoint>
</videolibrary>
<musicdatabase>
<type>mysql</type>
<host>192.168.1.100</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>
<pathsubstitution>
<substitute>
<from>Z:\Music\</from>
<to>SMB://192.168.1.100/Music/</to>
<from>Z:\Movies\</from>
<to>SMB://192.168.1.100/Movies/</to>
<from>Z:\TV Shows\</from>
<to>SMB://192.168.1.100/TV Shows/</to>
</substitute>
</pathsubstitution>
</advancedsettings>

The only way it works is to remove all the sources and readd them browsing through the SMB source I have setup, then all the files show up, but won't show me any of the WATCHED data. If I had known this would be an issue mixing Windows/Linux machines with the Kodi DB I would have done things differently. Any idea what direction I should go with this? I am stumped.
find quote
rlg6767 Offline
Member
Posts: 61
Joined: May 2013
Reputation: 0
Post: #399
I run pretty much the same setup as you. Win 7 and Xbmc Linux connecting to MySQL on synology.

This does sound weird. Are you running the same version of kodi on all devices?
I also had to include username and password in the substituted path within the advanced settings.xml on the Linux based devices so that they could access smb shares properly.

I.e. Smb://user:pass@nasIP

Also, it may be that the pi re-scanned the files to the db? Using the smb:// path. So it may have created separate entries for these which wouldn't have a watched status in the db.

I only allow my master htpc to scan. All others just read the db.

Kodi 14.2 on main HTPC Win 7 64-bit, 8 GB RAM, Quad Core 2.4 Ghz
Remote HTPC's running Linux Kodi 14.1 on Android TV boxes
Raspberry Pi 2 running Kodi 14.2 via OSMC
Shared MySQL on Raspberry Pi 2
(This post was last modified: 2015-02-25 15:39 by rlg6767.)
find quote
Tight_wad Offline
Fan
Posts: 426
Joined: Oct 2010
Reputation: 4
Post: #400
If you are wanting to do pathsubstitution with the source then the wiki shows that it should be like this.

Code:
<substitute>
    <from>special://profile/sources.xml</from>
    <to>PROTOCOL://YOUR_NETWORK_SHARE/kodi/userdata/sources.xml</to>
  </substitute>
find quote
aitrus00 Offline
Junior Member
Posts: 3
Joined: Mar 2013
Reputation: 0
Post: #401
(2015-02-25 15:36)rlg6767 Wrote:  I run pretty much the same setup as you. Win 7 and Xbmc Linux connecting to MySQL on synology.

This does sound weird. Are you running the same version of kodi on all devices?
I also had to include username and password in the substituted path within the advanced settings.xml on the Linux based devices so that they could access smb shares properly.

I.e. Smb://user:pass@nasIP

Also, it may be that the pi re-scanned the files to the db? Using the smb:// path. So it may have created separate entries for these which wouldn't have a watched status in the db.

I only allow my master htpc to scan. All others just read the db.

Yes that's where I think some of the issue stems. My Win7 PC created the first DB with the Z:\ pathing, and then the pi connected up to the MySQL DB (without scanning the first time) and saw everything but all had the Z:\path which made Kodi think that everything was unreachable. When I removed the sources and rescanned from an smb://192.x source it created brand new database tables obviously without the watched data. So I'm not sure if there is any way to just import the watched data to the DB that the Pi is using (I plan on putting Pi's for all the rest of my devices, no more windows boxes).
find quote
rlg6767 Offline
Member
Posts: 61
Joined: May 2013
Reputation: 0
Post: #402
(2015-02-26 03:04)aitrus00 Wrote:  So I'm not sure if there is any way to just import the watched data to the DB that the Pi is using (I plan on putting Pi's for all the rest of my devices, no more windows boxes).

It might just be easier to start from scratch with unc paths and manually whizz through all your movies/tv shows and mark them as watched (unless you have a large library). There will probably be a technical way but it's beyond me.

Kodi 14.2 on main HTPC Win 7 64-bit, 8 GB RAM, Quad Core 2.4 Ghz
Remote HTPC's running Linux Kodi 14.1 on Android TV boxes
Raspberry Pi 2 running Kodi 14.2 via OSMC
Shared MySQL on Raspberry Pi 2
find quote
nickr Online
Donor
Posts: 12,175
Joined: May 2009
Reputation: 218
Location: Christchurch NZ
Post: #403
Export your existing library as an xml file.

Use a text editor or sed to change the paths from Z:\whatever to SMB://whateverelse

Import the amended xml file.

If I have helped you or increased your knowledge, click the 'thank user' button to give thanks :) (People with less than 20 posts won't see the "Thank you" button.)
(This post was last modified: 2015-02-26 23:41 by nickr.)
find quote
Post Reply