It is currently May 18th, 2013, 11:39 am Advanced search

MYSQL Library Issues

Everything related to running XBMC for Linux on XIOS DS

MYSQL Library Issues

Postby cashel » August 21st, 2012, 7:17 pm

I've run into a few issues while setting up the XIOS to access the MYSQL library.

I've got a Win7 box that runs both the MYSQL server and XBMC (plain stable Eden) and stores all the media. I setup everything per XBMC's WiKi:
http://wiki.xbmc.org/index.php?title=HOW-TO:Sync_multiple_libraries

On the Win7 box, I added the sources as SMB shares, using the IP address rather than server name. Scanning for content picked everything up. All fanart/thumbs are visible, and files play without issue.

On the XIOS box, movies/TV shows appear as they're added to the database. Whenever I go to play something, I get an error saying the item is no longer available. I hadn't yet added the sources.xml file the XIOS, so I did so using IP addresses. This allows me to browse the items as files and play them, but browsing 'Movies' or 'TV' libraries still results in broken links.

What's odd is if I update the library from the XIOS now, it'll add duplicate entries for all items. These new items are using the server name rather than the IP address. The episode thumb is displayed but no other art is. These new items will play. I haven't tested if they play on the Win7 box yet, I removed the duplicates when I realized what was going on.

What do I need to do to get the XIOS box to play the files in the library? I find it odd that it's able to pull items from the MYSQL database on the server, but it cannot play the files on the same server.

Also, I've read that I should create a symlink from the userdata/Thumbnails folder on the XIOS to the same folder on my Win7 server where the art is stored to have the XIOS access it. Everything I've tried seems to not work, what sort of path should I be using to point to the SMB share?
cashel
Curious
 
Posts: 29
Joined: July 25th, 2012, 8:06 am

Re: MYSQL Library Issues

Postby papampi » August 22nd, 2012, 12:06 am

your library and video sources on all machines should be in same format if you use mysql .
I have xbmc on ubuntu, atv1(crystalbuntu), atv2, iPad, xios and win7
I set all the video sources with smb address even in my ubuntu desktop which all my media files are in it and dont have any issue
papampi
Curious
 
Posts: 25
Joined: July 14th, 2012, 1:10 am

Re: MYSQL Library Issues

Postby demost » August 22nd, 2012, 5:48 am

I posted this in the Bug report forum too.

this version names the database myvideos60 so you need to make sure you're using a build that also uses the same database name. This drove me nuts before, This version of XBMC works well with stable download of eden available on the XBMC website. I had to recreate my database from scratch though.

The trick is to drop the current database from mysql, and the name tag in advancedsettings.xml.

so the line that says <name>xbmc_video</> (this is not needed)
so here are the steps.
1. make sure all systems are running the eden build for xbmc downloads page
2.clear any existing databases from Mysql
3. edit the advancedsettings.xml and remove the name tag
4. open xbmc on your main system and set the content for you sources (make sure sources are in IP format eg. SMB://192.168.1.9/Movies )
5. after it begins adding your content look at mysql to see what database was created, it should be called myvideos60.
6. copy the sources.xml and the advancedsettings.xml to the userdata folder of each of your XBMC installs.

Your advancedsettings.xml should look like this (I'm only doing videos)

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>***.***.***.***</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
</videodatabase>
</advancedsettings>

It should not look this

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>192.168.1.123</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_video</name> --->not required
</videodatabase>
</advancedsettings>

To drop the database you just need to type the following into mysql:
drop database (the name of your database);
demost
Curious
 
Posts: 38
Joined: July 18th, 2012, 10:08 am

Re: MYSQL Library Issues

Postby cashel » August 22nd, 2012, 7:19 pm

demost » August 22nd, 2012, 8:48 am wrote:I posted this in the Bug report forum too.

this version names the database myvideos60 so you need to make sure you're using a build that also uses the same database name. This drove me nuts before, This version of XBMC works well with stable download of eden available on the XBMC website. I had to recreate my database from scratch though.

The trick is to drop the current database from mysql, and the name tag in advancedsettings.xml.

so the line that says <name>xbmc_video</> (this is not needed)
so here are the steps.
1. make sure all systems are running the eden build for xbmc downloads page
2.clear any existing databases from Mysql
3. edit the advancedsettings.xml and remove the name tag
4. open xbmc on your main system and set the content for you sources (make sure sources are in IP format eg. SMB://192.168.1.9/Movies )
5. after it begins adding your content look at mysql to see what database was created, it should be called myvideos60.
6. copy the sources.xml and the advancedsettings.xml to the userdata folder of each of your XBMC installs.


I'm using Eden (11.0) on my Win7 box that is storing the MYSQL database. I dropped all of the tables and added the sources again (in IP format) on that XBMC install. Everything is fine on that box.

I'm now running a compiled build of XBMC from this morning on the XIOS. I copied the advancedsettings.xml and sources.xml files from the Win7 box to the XIOS. Here is what I have in them:

advancedsettings.xml:
Code: Select all
<advancedsettings>
    <videodatabase>
        <type>mysql</type>
        <host>192.168.6.100</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>

    <videolibrary>
        <hideemptyseries>true</hideemptyseries>
        <recentlyaddeditems>50</recentlyaddeditems>
    </videolibrary>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.6.100</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>

    <pathsubstitution>
      <substitute>
        <from>special://masterprofile/Thumbnails/Video/</from>
        <to>smb://USER:[email protected]/userdata/Thumbnails/Video/</to>
      </substitute>
      <substitute>
        <from>special://masterprofile/Thumbnails/Music/</from>
        <to>smb://USER:[email protected]/userdata/Thumbnails/Music/</to>
      </substitute>
    </pathsubstitution>
</advancedsettings>



sources.xml:
Code: Select all
<sources>
    <programs>
        <default pathversion="1"></default>
    </programs>
    <video>
        <default pathversion="1"></default>
        <source>
            <name>Movies</name>
            <path pathversion="1">smb://USER:[email protected]/Movies/</path>
        </source>
        <source>
            <name>TV</name>
            <path pathversion="1">smb://USER:[email protected]/TV/</path>
        </source>
    </video>
    <music>
        <default pathversion="1"></default>
    </music>
    <pictures>
        <default pathversion="1"></default>
    </pictures>
    <files>
        <default pathversion="1"></default>
    </files>
</sources>


I'm still running into the same issue of the XIOS not able to play any files in the Movies/TV libraries, even though it can pull the entries + info just fine. The files play fine when accessed via the Files menu in Videos.

edit: Got thumbs/fanart working via path substitution as I hear using symlinks to a smb share requires some workarounds and a custom build. Still not able to play anything in the library though.
cashel
Curious
 
Posts: 29
Joined: July 25th, 2012, 8:06 am

Re: MYSQL Library Issues

Postby demost » August 22nd, 2012, 8:37 pm

After you dropped the databases did you set the content type and refresh the metadata?
demost
Curious
 
Posts: 38
Joined: July 18th, 2012, 10:08 am

Re: MYSQL Library Issues

Postby cashel » August 22nd, 2012, 8:50 pm

demost » August 22nd, 2012, 11:37 pm wrote:After you dropped the databases did you set the content type and refresh the metadata?


On the Win7 box or the XIOS? Win7 yes, XIOS, no. I was under the impression I did not need to do anything on the XIOS, that it would pull everything from the MYSQL database.

Edit 1:
On the XIOS, setting the content type and refreshing the metadata adds duplicate entries for everything, and the original items still do not play. Cleaning the library removes the bad entries. I haven't checked the Win7 machine (it's being used to watch something as I'm typing this), but is this going to re-add everything to the library there as well (which would alter the recently added items lists), and am I going to have to do this every time a new item is added to the database?

Edit 2:
Alright so cleaning the library from the XIOS wiped the MYSQL library and it's re-adding everything on both the Win7 box and the XIOS. The newly added items play on both the Win7 box and XIOS which is good, other than losing recently added items.

I notice that space is being consumed on the XIOS whereas before there wasn't. I'm using path substitution for thumbs/art and the MYSQL library to access everything, so why is this happening? I'm not necessarily worried, I just don't want it creating a local database when it should be using the remote one (right?).

Also, my last question still stands, if items are added to the library on the Win7 box, are they not going to work on the XIOS, and am I going to have to re-add them from the XIOS? What if I were to have 3 or 4 of these XIOS (or other XBMC devices) in the house? Would this issue be multiplied several times over? What's the proper order for adding sources/refreshing content for all of the XBMC devices to avoid this issue?
cashel
Curious
 
Posts: 29
Joined: July 25th, 2012, 8:06 am

Re: MYSQL Library Issues

Postby Speedster » August 22nd, 2012, 11:14 pm

Thumbs/fanart are handled differently in Frodo - it doesn't use the Thumbnails directory for separate files anymore, there should be a file called Texture13.db which is how thumbs are stored now.

Naturally as you index more thumbnails/fanart this file will grow.

No you can't share it between installs without risking destroying the file (multiple-host access to a flat file DB is BAD!).
Speedster
Hardcore
 
Posts: 122
Joined: August 7th, 2012, 6:28 pm
Location: Australia


Return to XBMC on XIOS DS (Linux)

Who is online

Users browsing this forum: No registered users and 2 guests