XBMC MySQL Library

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
hefla Offline
Junior Member
Posts: 10
Joined: May 2012
Reputation: 0
Post: #46
Upgraded with the patch (i´m using openelec). Tv-show banners still takes forever to load on my eee 1012p (aprox 1 second pr banner). Checked the log and looks like there is some problem with the mysql server? The mysql server is run from my netgear ultra 4 nas.

Log: pastebin.com/XGcs7a8M
(This post was last modified: 2012-05-18 22:21 by hefla.)
find quote
jmarshall Online
Team-XBMC Developer
Posts: 25,671
Joined: Oct 2003
Reputation: 169
Post: #47
Error 1062 is duplicate entry. Check exactly what is in your video database, in particular the art table. Check how it was created etc.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote
hefla Offline
Junior Member
Posts: 10
Joined: May 2012
Reputation: 0
Post: #48
Looks like I´ve solved the problem by deleting the v63 and v64 db, allowing a new v64 db to be created. It wasn´t enough just deleting the v64, so my guess is that the v63 made the problem Smile
find quote
LastSilmaril Offline
Junior Member
Posts: 19
Joined: May 2012
Reputation: 0
Post: #49
(2012-05-19 00:22)jmarshall Wrote:  Error 1062 is duplicate entry. Check exactly what is in your video database, in particular the art table. Check how it was created etc.
Hey jmarshall-
I was getting the 1062 error too. Looking at the schema it looks like auto_increment wasn't enabled for art_id, so for every attempt at entry after the first one, since no art_id was specified, the default (0) was probably entered, which of course won't work for unique keys. Modifying the db to auto_increment solved this issue, but there are others.
I'm testing OpenELEC on the rPi and filed this and a few other thumbnail and image related quirks/problems there (didn't happen before this build)

https://github.com/OpenELEC/OpenELEC.tv/issues/679
https://github.com/OpenELEC/OpenELEC.tv/issues/680
https://github.com/OpenELEC/OpenELEC.tv/issues/681

and was wondering if you thought saving thumbs locally (getting rid of pathsubstitution to somewhere else on my network) would help solve them. I tried hunting through the code on github to try to find changes but was lost without any understanding of what went where and why. There was a lot of talk about how pathsubstitution shouldn't be used anymore, but I really didn't understand the gist of it. If the paths to thumbnails are saved in the db, what difference does saving them locally (on the xbmc client) make?
I don't know how old the xbmc in the close-to-edge build of OpenELEC (11034) is, so maybe the schema issue was solved already, since just one other person is complaining about it in this thread. Can I upgrade xbmc and OpenELEC separately, or checkout xbmc and somehow integrate it into OpenELEC myself? I'm not even sure which exact build of xbmc my build of OpenELEC uses...
Apologies, I've never really scratched the surface of projects like this before and I'm a bit excited/not entirely sure where to ask these questions.
-e
(This post was last modified: 2012-05-19 07:32 by LastSilmaril.)
find quote
vicbitter Offline
Donor
Posts: 253
Joined: Jan 2011
Reputation: 3
Post: #50
Can you check the version of your DB? It appears there is an issue with v63. See post #48 above. Also, XBMC for RPi is a different git repo to the main XBMC and is not as up to date so you may need to look at the XBMC master commits and apply relevant commits to XBMC for RPi...

In OpenELEC, to use the latest XBMC code from master, you need to build OpenELEC with XBMC=frodo.

For building for x86 hardware, checkout this link which will help you build OpenELEC with frodo and support for the new AudioEngine.

For building for RPi, I would use this Compile with custom XBMC branch as a starter.

The following steps will allow you to pull the latest XBMC RPi master in OpenELEC (This is quick and dirty but will allow you to get your own builds up and running quickly)

Start with pulling a fresh git where you can play around without breaking anything:

git clone git://github.com/OpenELEC/OpenELEC.tv.git sometest

Now you need to pull the xbmc master branch you want to test into a tarball:
cd sometest/tools/mkpkg/

Run the script:
./mkpkg_xbmc-rpi

This will create two tarballs (where nnnnnnn is the current commit from the master branch):
xbmc-rpi-nnnnnnn.tar.xz
xbmc-rpi-theme-Confluence-nnnnnnn.tar.xz

Now you have to put these on a webserver, so you can wget them later. Then edit the meta files for both xbmc-frodo and xbmc-frodo-theme-Confluence:
cd ..
cd ..

nano packages/mediacenter/xbmc-rpi/meta
nano packages/mediacenter/xbmc-rpi-theme-Confluence/meta

The part you need to edit is package version, and package url. Something like this:
PKG_VERSION="nnnnnnn"
PKG_REV="1"
PKG_ARCH="any"
PKG_LICENSE="GPL"
PKG_SITE="www.xbmc.org"
PKG_URL="your.webserver/openelec/$PKG_NAME-$PKG_VERSION.tar.xz"

Now you need to rename the patches.

cd packages/mediacenter/xbmc-rpi/patches/

ls
./rename.sh <insertoldversionhere> nnnnnnn

Now you are ready to try to build. Go back to "sometest" and build with:
PROJECT=RPi ARCH=arm make
(This post was last modified: 2012-05-19 14:31 by vicbitter.)
find quote
zebraitis Offline
Donor
Posts: 358
Joined: Jan 2008
Reputation: 6
Location: NorthAm
Post: #51
May I ask a question about My SQL and profiles?

The wiki ( http://wiki.xbmc.org/index.php?title=HOW...d_profiles ) is not clear on how I wish to enable this.

The current general recommendation is to NOT create a DB manually, and to allow XBMC to do so.

However...

Q: Do I need to create or define a name for a MySQL DB when using profiles?

Q: Is there a preferred naming schema to be followed for mainprofile and created profiles?


--------------------

Specifics:

(environment: running 13-May build on win7)


I have the solution working well for the main profile. XBMC has created the required MySQL DB's


THEN I created a profile "Excercise" and enabled the login screen.

I copied my advancedsettings.xml to %username%\AppData\Roaming\XBMC\userdata\profiles\exercise

What I thought that would occur when restarting XBMC with advancedsettings.xml in the profile was that XBMC would create a necessary DB for that specific profile.

On checking MySQL, what I saw was different.

Here is what I saw was:

mysql> showdatabases;
+----------------------------
| Database
+----------------------------
| information_schema
| mainprofilemusic18
| mainprofilemusic60
| mymusic20
| mysql
| myvideos64
| performance_schema
| test
+----------------------------

When I checked records, I see the following:

mysql> SELECT COUNT(*) from myvideos64.movie;
+-------------------
| COUNT(*)
+------------------
| 2329
+-------------------

mysql> SELECT COUNT(*) from mainprofilevideos64.movie;
+-------------------
| COUNT(*)
+------------------
| 0
+-------------------

And, when I check XBMC / Movies, I see the same movies in each profile (which kind of defeats the purpose of having profiles).


So... should I be using the naming convention that I saw at http://www.howtogeek.com/75535/how-to-sy...with-xbmc/ , adding the following line to the profile advancedsettings.xml ?

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>profilenameherevideo</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>profilenameheremusic</name> </musicdatabase>
</advancedsettings>


I look forward to a reply. Thanks!

Vincent
find quote
Ned Scott Offline
Team-XBMC Wiki Guy
Posts: 18,221
Joined: Jan 2011
Reputation: 219
Location: Arizona, USA
Post: #52
The name used doesn't actually matter as long as you remember that the actual MySQL DB will add a number to the end, and that number should not be added in advancedsettings.xml (otherwise it would be something like Excercise6060, etc).

You can make easy links to the XBMC wiki using double brackets around words: [[debug log]] = debug log, [[Add-on:YouTube]] = Add-on:YouTube, [[Adding videos to the library]] = Adding videos to the library, [[userdata]] = userdata, etc
find quote
zebraitis Offline
Donor
Posts: 358
Joined: Jan 2008
Reputation: 6
Location: NorthAm
Post: #53
(2012-05-19 18:51)Ned Scott Wrote:  The name used doesn't actually matter as long as you remember that the actual MySQL DB will add a number to the end, and that number should not be added in advancedsettings.xml (otherwise it would be something like Excercise6060, etc).


So... I think you are saying that I could call it "flatsquashedcat" if I so wished.


However, you are not saying IF i should add the profile name into the advancedsettings.xml

So, should the added line(s) be:


<name>flatsquashedcatvideo</name>

and...

<name>flatsquasedcatmusic</name>


which would create the DB's (with a number extension) in MySQL..... and ALSO that by naming the DB for profile use, it will prevent the main profile DB from being referenced?

Thx,

v.
find quote
zebraitis Offline
Donor
Posts: 358
Joined: Jan 2008
Reputation: 6
Location: NorthAm
Post: #54
(2012-05-19 19:28)zebraitis Wrote:  So, should the added line(s) be:

<name>flatsquashedcatvideo</name>

and...

<name>flatsquasedcatmusic</name>


which would create the DB's (with a number extension) in MySQL..... and ALSO that by naming the DB for profile use, it will prevent the main profile DB from being referenced?


Nevermind... Just tested it, and the answer is YES.

So: Rule of thumb with MySQL... IF you only have one profile, and do not name it, THEN MySQL will create a Music and Videos DB for you.

However, if you want to use PROFILES, and keep things managed well and separate, THEN you must give the DB a name in advancedsettings.xml for MySQL to create the "right" database, and for XBMC to reference that database in that profile on starting.


ONE LAST TIP: if you should happen to CHANGE the name of the default main profile in the profiles setup, then you will need to include the default database names in the advancedsettings.xml


OK... Thanks all !

v.
(This post was last modified: 2012-05-20 00:11 by zebraitis.)
find quote
LastSilmaril Offline
Junior Member
Posts: 19
Joined: May 2012
Reputation: 0
Post: #55
(2012-05-19 14:09)vicbitter Wrote:  ...

Thanks a lot vic! And all of that can be automated, too Smile Had to change the fetch line from the default (not your fault) but it looks like it's working
And yes, this was using v63. I'm assuming that the latest xbmc-rpi has been updated to 64?
(This post was last modified: 2012-05-19 23:26 by LastSilmaril.)
find quote
hefla Offline
Junior Member
Posts: 10
Joined: May 2012
Reputation: 0
Post: #56
Just a quick update on my v63 v64 issues. My openelec machine created v63 over and over again, also after updating to newest build. Had to do a fresh install (with the same build), and now it created v64 with no problems. Thumbnails works as well, but still quite slow to load. Feels like I´m on a wireless path substitution setup Smile
find quote
LastSilmaril Offline
Junior Member
Posts: 19
Joined: May 2012
Reputation: 0
Post: #57
(2012-05-20 01:29)hefla Wrote:  Just a quick update on my v63 v64 issues. My openelec machine created v63 over and over again, also after updating to newest build. Had to do a fresh install (with the same build), and now it created v64 with no problems. Thumbnails works as well, but still quite slow to load. Feels like I´m on a wireless path substitution setup Smile

I used the newest version of openelec with the newest version of xbmc-rbp and have v63 created, even though I dropped v61. I wonder if just dumping the xbmc/xbmc/video folder from frodo in will fix matters. something tells me that's the wrong way to going about a good impulse
(This post was last modified: 2012-05-22 06:07 by LastSilmaril.)
find quote
hefla Offline
Junior Member
Posts: 10
Joined: May 2012
Reputation: 0
Post: #58
Do you have a v60 from eden? That was my save... It was auto upgraded to v64 when I reinstalled new with new build.
find quote
LastSilmaril Offline
Junior Member
Posts: 19
Joined: May 2012
Reputation: 0
Post: #59
No. I'm using xbmc-rbp and had a v61, but dropping the v61 and starting from scratch with 63 didn't help; has all sorts of issues with progressive images and such. Apparently the upgrade to v64 hasn't trickled down yet to the -rbp project
find quote
jmarshall Online
Team-XBMC Developer
Posts: 25,671
Joined: Oct 2003
Reputation: 169
Post: #60
And there were some known problems around v61/v62 with some mysql installs.

Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


[Image: badge.gif]
find quote