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

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
ethanol Offline
Junior Member
Posts: 9
Joined: Apr 2012
Reputation: 0
Post: #271
(2012-05-11 13:11)madcow Wrote:  I noticed the same. I also have 2 profiles.

I *may* have figured out the issue. When I created the 1st video db, I did not include the DB name in the profile info and it auto created the DB myvideo60 (or something like that). For the "kids" video db, I specified something like "kids60" but did not go back and enter the db "name" in the profile for profile 1. This might have fixed it (although haven't had a lot of chance to play / test.

(2012-05-11 13:11)madcow Wrote:  are you by any chance also running Openelec 2.0 beta3?

Not sure - whats that for?
find quote
madcow Offline
Junior Member
Posts: 18
Joined: Jan 2010
Reputation: 0
Thumbs Up  RE: MySQL Database: Multiple XBMC HTPC's with 1 Shared Library Post: #272
(2012-05-12 07:04)ethanol Wrote:  
(2012-05-11 13:11)madcow Wrote:  I noticed the same. I also have 2 profiles.

I *may* have figured out the issue. When I created the 1st video db, I did not include the DB name in the profile info and it auto created the DB myvideo60 (or something like that). For the "kids" video db, I specified something like "kids60" but did not go back and enter the db "name" in the profile for profile 1. This might have fixed it (although haven't had a lot of chance to play / test.

(2012-05-11 13:11)madcow Wrote:  are you by any chance also running Openelec 2.0 beta3?

Not sure - whats that for?
Works! All the How-To's and guides state that you don't need the <name> tag anymore, but for multiple libraries it is required.
http://forum.xbmc.org/showthread.php?tid...pid1102917


OpenElec is a XBMC in combination with a very lightweight linux distribution. This makes the system very fast. To me it is the best distribution that turns my system in a dedicated HTPC. It is similiar to XBMCbuntu. website
find quote
Weirdzo Offline
Junior Member
Posts: 2
Joined: May 2012
Reputation: 0
Post: #273
I'm not sure if this is the right place to ask this but I have spent a long time looking and noone else seems to have exactly the same setup as me so...

I have successfully set up mysql to run on my server and had it happily sharing my library between 2 different installs of xbmc, both running eden, I have now updated one of the machines to a v12.0 alpha 2 nightly build for some experimentation and initially I was happy that it had picked up my existing library and synced all my watched marks... However I have now noticed that it has actually created a new library on mysql for the v12 install labelled myvideos64, previous library is myvideos60 and consequentially the watched lists no longer sync between machines.

So my question is this, is there any way to get eden to read the new database format or force v12 to use the old one? or am I stuck with having separate libraries?
I have debug logs if needed but it just shows that it detected the old library and updated to the new version.
find quote
Memphiz Offline
Team-XBMC Developer
Posts: 7,684
Joined: Feb 2011
Reputation: 91
Location: germany
Post: #274
the only solution is to use the same xbmc version on all your clients if you want to be compatible to the same database version.

AppleTV2/iPhone/iPod: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for XBMC: Wiki NFS
HowTo configure avahi (zeroconf): Wiki Avahi
READ THE IOS FAQ!: iOS FAQ
find quote
Weirdzo Offline
Junior Member
Posts: 2
Joined: May 2012
Reputation: 0
Post: #275
Ok I was starting to think that was the case, thanks for the confirmation
find quote
PapBek Offline
Junior Member
Posts: 5
Joined: Jun 2012
Reputation: 0
Post: #276
Hi, I have set up a shared mysql database for my xbmc instances and, afaik, it is completely working. However, it is causing my xbmc to freeze for about 2-3 minutes right before it starts scanning for new content (each time, not just at startup). I will post the relevant part of my log file below:

Quote:06:09:57 T:2724 DEBUG: script.randomitems: script version 3.0.9 started
06:09:57 T:2724 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": {"properties": ["title", "playcount", "year", "plot", "runtime", "fanart", "thumbnail", "file", "trailer", "rating"] }, "id": 1}
06:09:57 T:2724 DEBUG: JSONRPC: Calling videolibrary.getmovies
06:09:58 T:2724 DEBUG: CVideoDatabase::RunQuery took 599 ms for 1038 items query: select * from movieview
06:10:03 T:4748 DEBUG: script.watchlist: script version 0.1.13 started
06:10:03 T:4748 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": {"properties": ["title", "resume", "genre", "studio", "tagline", "runtime", "fanart", "thumbnail", "file", "plot", "plotoutline", "year", "lastplayed", "rating"]}, "id": 1}
06:10:03 T:4748 DEBUG: JSONRPC: Calling videolibrary.getmovies
06:10:04 T:4748 DEBUG: CVideoDatabase::RunQuery took 767 ms for 1038 items query: select * from movieview
06:11:31 T:4196 NOTICE: Artwork Downloader: ## Service - Run at startup: False
06:11:31 T:4196 NOTICE: Artwork Downloader: ## Service - Delayed startup: -- minutes
06:11:31 T:4196 NOTICE: Artwork Downloader: ## Service - Run as service: False
06:11:31 T:4196 NOTICE: Artwork Downloader: ## Service - Time: 00:00
06:11:31 T:4196 INFO: Scriptresult: Success
06:11:31 T:4196 INFO: Python script stopped
06:11:31 T:4196 DEBUG: Thread XBPyThread 4196 terminating
06:11:31 T:2724 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", "season", "episode", "showtitle", "plot", "fanart", "thumbnail", "file", "rating"] }, "id": 1}
06:11:31 T:2724 DEBUG: JSONRPC: Calling videolibrary.getepisodes
06:11:38 T:2724 DEBUG: CVideoDatabase::RunQuery took 6513 ms for 13126 items query: select * from episodeview
06:12:40 T:4748 DEBUG: script.watchlist: movie list: 6 items
06:12:40 T:4748 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": {"properties": ["title", "playcount", "plot", "season", "episode", "showtitle", "thumbnail", "file", "lastplayed", "rating"], "sort": {"method": "episode"} }, "id": 1}
06:12:40 T:4748 DEBUG: JSONRPC: Calling videolibrary.getepisodes
06:12:46 T:4748 DEBUG: CVideoDatabase::RunQuery took 6197 ms for 13126 items query: select * from episodeview
06:13:31 T:592 NOTICE: CApplication::UpdateLibraries - Starting music library startup scan
06:13:31 T:592 DEBUG: ------ Window Init (DialogMusicScan.xml) ------
06:13:31 T:592 INFO: Loading skin file: DialogMusicScan.xml
06:13:31 T:3488 DEBUG: Thread VIDEO::CVideoInfoScanner start, auto delete: 0
06:13:31 T:592 INFO: Music scan has started... Enabling tag reading, and remote thumbs
06:13:31 T:3488 NOTICE: VideoInfoScanner: Starting scan ..
06:13:32 T:592 DEBUG: ADDON: Starting service addons.
06:13:32 T:2144 DEBUG: Thread MUSIC_INFO::CMusicInfoScanner start, auto delete: 0
06:13:32 T:592 INFO: initializing python engine.
06:13:32 T:592 DEBUG: new python thread created. id=5
06:13:32 T:592 NOTICE: initialize done
06:13:32 T:592 NOTICE: Running the application...

As you can see the delays happen after running CVideoDatabase::RunQuery at 06:10:04, 06:11:38, and 06:12:46. I was wondering if this has to do with the thumbnail issue that was mentioned a few pages back (although my thumbnails are still stored locally right now) or if there is a different problem to this. I hope someone can help me figure this out, because its driving me crazy! Smile

Thanks in advance!
find quote
PapBek Offline
Junior Member
Posts: 5
Joined: Jun 2012
Reputation: 0
Post: #277
I also installed the Alpha 2 build of Frodo on one of my machines, and I get the same problem with that build.

Also, I've found out that during the freeze up of xbmc it sends almost 80.000 queries to the mysql database for the Frodo build and 10.000 queries for the Eden build. Is this normal? And if so, what is it querying in Frodo which it doesn't query in Eden? Because that is probably what's causing my delay.

Here is the relevant part of the debug log of the frodo Alpha 2 build as well:

Quote:03:55:59 T:5852 DEBUG: XBPyThread::Process - Entering source directory C:\Users\J.Klessens\AppData\Roaming\XBMC\addons\script.watchlist
03:55:59 T:4988 DEBUG: Instantiating addon using automatically obtained id of "script.randomitems" dependent on version 2.0 of the xbmc.python api
03:55:59 T:6888 DEBUG: Instantiating addon using automatically obtained id of "script.tv.show.next.aired" dependent on version 2.0 of the xbmc.python api
03:55:59 T:5852 DEBUG: Instantiating addon using automatically obtained id of "script.watchlist" dependent on version 2.0 of the xbmc.python api
03:55:59 T:5436 DEBUG: Trying to connect to \\192.168.1.3\xbmc with username(XBMC) and password(XXXX)
03:55:59 T:5436 ERROR: CWINFileSMB: Unable to open file '\' Error '3
03:55:59 T:5436 DEBUG: LocalizeStrings: no strings.po file exist at C:\Users\J.Klessens\AppData\Roaming\XBMC\addons\script.artwork.downloader\resour​ces\language\english, fallback to strings.xml
03:55:59 T:4988 DEBUG: script.randomitems: script version 3.0.9 started
03:55:59 T:4988 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": {"properties": ["title", "playcount", "year", "plot", "runtime", "fanart", "thumbnail", "file", "trailer", "rating"] }, "id": 1}
03:55:59 T:4988 DEBUG: JSONRPC: Calling videolibrary.getmovies
03:56:00 T:4988 DEBUG: CVideoDatabase::RunQuery took 1025 ms for 1038 items query: select * from movieview
03:57:06 T:5436 NOTICE: Artwork Downloader: ## Service - Run at startup: False
03:57:06 T:5436 NOTICE: Artwork Downloader: ## Service - Delayed startup: -- minutes
03:57:06 T:5436 NOTICE: Artwork Downloader: ## Service - Run as service: False
03:57:06 T:5436 NOTICE: Artwork Downloader: ## Service - Time: 00:00
03:57:06 T:5436 INFO: Scriptresult: Success
03:57:06 T:5436 INFO: Python script stopped
03:57:06 T:5436 DEBUG: Thread XBPyThread 5436 terminating
03:57:06 T:5852 DEBUG: script.watchlist: script version 0.1.13 started
03:57:06 T:5852 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetMovies", "params": {"properties": ["title", "resume", "genre", "studio", "tagline", "runtime", "fanart", "thumbnail", "file", "plot", "plotoutline", "year", "lastplayed", "rating"]}, "id": 1}
03:57:06 T:5852 DEBUG: JSONRPC: Calling videolibrary.getmovies
03:57:06 T:5852 DEBUG: CVideoDatabase::RunQuery took 765 ms for 1038 items query: select * from movieview
03:59:10 T:6888 DEBUG: ### TV Show - Next Aired starting ...
03:59:10 T:6888 DEBUG: ### author: Ppic, Frost, ronie, `Black
03:59:10 T:6888 DEBUG: ### version: 4.1.20
03:59:10 T:6888 DEBUG: ### dateformat: %d-%m-%y
03:59:10 T:6888 DEBUG: ### params: {'silent': 'True'}
03:59:10 T:6888 INFO: -->Python script returned the following error<--
03:59:10 T:6888 ERROR: Error Type: <type 'exceptions.WindowsError'>
03:59:10 T:6888 ERROR: Error Contents: (3, 'The system cannot find the path specified', 'C:\\Users\\J.Klessens\\AppData\\Roaming\\XBMC\\userdata\\addon_data\\script.tv.​show.next.aired\\next_aired.db')
03:59:10 T:6888 ERROR: Traceback (most recent call last):
File "C:\Users\J.Klessens\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\defaul​t.py", line 441, in <module>
NextAired()
File "C:\Users\J.Klessens\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\defaul​t.py", line 96, in __init__
self.update_data()
File "C:\Users\J.Klessens\AppData\Roaming\XBMC\addons\script.tv.show.next.aired\defaul​t.py", line 129, in update_data
elif time() - os.path.getmtime(dbfile) > 86400:
File "C:\Program Files (x86)\XBMC\system\python\Lib\genericpath.py", line 54, in getmtime
return os.stat(filename).st_mtime
WindowsError: (3, 'The system cannot find the path specified', 'C:\\Users\\J.Klessens\\AppData\\Roaming\\XBMC\\userdata\\addon_data\\script.tv.​show.next.aired\\next_aired.db')
03:59:10 T:6888 INFO: -->End of Python script error report<--
03:59:10 T:6888 INFO: Python script stopped
03:59:10 T:6888 DEBUG: Thread XBPyThread 6888 terminating
03:59:11 T:4988 DEBUG: JSONRPC: Incoming request: {"jsonrpc": "2.0", "method": "VideoLibrary.GetEpisodes", "params": { "properties": ["title", "playcount", "season", "episode", "showtitle", "plot", "fanart", "thumbnail", "file", "rating"] }, "id": 1}
03:59:11 T:4988 DEBUG: JSONRPC: Calling videolibrary.getepisodes
03:59:16 T:4988 DEBUG: CVideoDatabase::RunQuery took 5019 ms for 13142 items query: select * from episodeview
04:00:58 T:7340 NOTICE: CApplication::UpdateLibraries - Starting music library startup scan
04:00:58 T:7340 DEBUG: ------ Window Init (DialogMusicScan.xml) ------
04:00:58 T:7340 INFO: Loading skin file: DialogMusicScan.xml
04:00:58 T:7884 NOTICE: Thread CVideoInfoScanner start, auto delete: false
04:00:58 T:7340 INFO: Music scan has started... Enabling tag reading, and remote thumbs
04:00:58 T:7884 NOTICE: VideoInfoScanner: Starting scan ..
04:00:58 T:7340 DEBUG: ADDON: Starting service addons.
04:00:58 T:3776 NOTICE: Thread CMusicInfoScanner start, auto delete: false
04:00:58 T:7340 INFO: initializing python engine.
04:00:58 T:7340 DEBUG: new python thread created. id=5
04:00:58 T:7340 NOTICE: initialize done
04:00:58 T:7340 NOTICE: Running the application...

pay attention to the delays after timestamps: 03:56:00 / 03:57:06 / 03:59:16

p.s. since today my thumbnails and such also aren't stored locally anymore, but that didn't have any real effect.
(This post was last modified: 2012-06-20 04:46 by PapBek.)
find quote
kedda Offline
Senior Member
Posts: 133
Joined: Feb 2011
Reputation: 0
Post: #278
Can you now scan sources that have local windows paths?

e,g, E:\Movies\ would fail to scan before.

However, in this thread, I have seen mentions to local windows paths.
find quote
jmarshall Offline
Team-XBMC Developer
Posts: 24,523
Joined: Oct 2003
Reputation: 138
Post: #279
@PapBek: It'll likely be the scripts that are calling for all your episodes, and art for every single item (13000 odd).

No doubt as JSON-RPC matures (there's a bunch of significant changes going in that drastically improve the way that info from the library can be fetched) there won't be need for scripts to fetch all 13000 episodes to perform whatever processing they're doing.

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
PapBek Offline
Junior Member
Posts: 5
Joined: Jun 2012
Reputation: 0
Post: #280
@jmarshall: Is that a script used in the main application? Or an addon, because I have not installed any add-ons yet, except the ones you get automatically with the aeon nox skin.

If it is in the main application, it should really be considered a bug, as it gets annoying really fast when you are watching something and everything, except the sound, freezes for 3 minutes because, for example, couchpotato tells your xbmc to scan for new content. Especially if this happens about 5 times during one movie. Confused

Basically my main question is: is there any way I can fix/circumvent this?!
(This post was last modified: 2012-06-22 13:17 by PapBek.)
find quote
Post Reply