XBMC Community Forum
HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker - Printable Version

+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Announcements, Info, and General Discussion (/forumdisplay.php?fid=85)
+--- Forum: Tips, tricks, and step by step guides (/forumdisplay.php?fid=110)
+--- Thread: HOW-TO synchronize your XBMC Media Center between every room in the house: Lifehacker (/showthread.php?tid=80829)

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38


mySQL and Thumbnails across platforms - EdgarWallace - 2011-12-20 17:11

Finchy,

I have the following XBMC installations:
  • 2x on a Mac: (XBMC 11.0-PRE GIT:20111213
  • 1x on Windows 7: (XBMC 11.0 PRE-11.0 Git:20111210)
  • 1x on yaVDR 0.4, Ubuntu 11.04: (XBMC 2:11.0-pvr+pipelka-eden~git20111022)
The database resides on an unRAID Server V5b14 (mySQL 5.0.67-i486) as well as all video files (I don't use any music with XBMC).
Only one of the Mac's is doing the scraping. The one thing I was struggling first was the movie path in row c22 but since I'm using smb for all XBMC machines every instance understands where the files are (e.g. smb://TOWER/Kino/Mad Money (2008).mkv).

Here is the description how I centralized my library as well as the thumbnails: LINK
It works very well with both of the Mac's (nfs, symlink etc). On the Windows machine I' using pathsubstitution in the respective advancedsettings file:
Code:
<pathsubstitution>
  <substitute>    
   <from>special://masterprofile/Thumbnails/</from>
   <to>smb://TOWER/Kino/Thumbnails</to>  
  </substitute>
</pathsubstitution>

All machine are using the library according to the above guide (...which is based on other guides you can find on several web pages) - except the yaVDR XBMC. I'm using the same advancesettings but yaVDR doesn't seem to use the database (however there is no local database either).

Right now I do have 3 databases on my server: xbmc_video, xbmc_video58, MyVideos56. Here are the settings - at least the thumbnails sharing is working (the part between the videodatabase is the same on every machine):

Code:
<advancedsettings>
   <videodatabase>
        <type>mysql</type>
        <host>192.168.178.28</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video</name>
    </videodatabase>
    <lcd>
        <scrolldelay>5</scrolldelay>
        <spectrumanalyzer>false</spectrumanalyzer>
        <progressbar1>none</progressbar1>
        <progressbar2>progress</progressbar2>
        <progressbar3>none</progressbar3>
        <progressbar4>menu</progressbar4>
    </lcd>
    <pathsubstitution>
      <substitute>
        <from>special://masterprofile/Thumbnails/</from>
        <to>smb://TOWER/Kino/Thumbnails</to>
      </substitute>
    </pathsubstitution>                  
</advancedsettings>

If yaVDR would also use the database I would be a happy camper. I might just be the older build? Can anyone confirm?

Maybe the rest of the information is helpful in your case?


- Klyde - 2012-01-04 04:18

Thought I would give this another go, uninstalled sql, removed all registry entrys. Reinstalled using Latest MySQL Community Server 5.5.19, and the XBMC 11.0 Eden: Beta, Computer Running Windows 7 Ultimate.

Once its all setup, when I try to scan items into the library it will only allow me to scan 1 episode of the first tv show then stops.

Here is My Debug Log
*You may notice it connects with the root login, was just testing that to make sure it wasn't a permission issue with the xbmc user

I've also tried setting this up (installing mysql pointing the advancedsettings.xml to laptop etc.) temporarily on my laptop instead of on the mediaserver and experience the same issue.
Tried Following this Guide

I notice when I log into mysql and "show databases;" there is an xbmc_video58 which I've also tried changing the name to, but no luck.

*edit: Latest Debug log with hopefully a more helpful error

Any suggestions would be greatly appreciated.


- silencery - 2012-01-04 06:49

Klyde Wrote:Thought I would give this another go, uninstalled sql, removed all registry entrys. Reinstalled using Latest MySQL Community Server 5.5.19, and the XBMC 11.0 Eden: Beta, Computer Running Windows 7 Ultimate.

Once its all setup, when I try to scan items into the library it will only allow me to scan 1 episode of the first tv show then stops.

Here is My Debug Log
*You may notice it connects with the root login, was just testing that to make sure it wasn't a permission issue with the xbmc user

I've also tried setting this up (installing mysql pointing the advancedsettings.xml to laptop etc.) temporarily on my laptop instead of on the mediaserver and experience the same issue.
Tried Following this Guide

I notice when I log into mysql and "show databases;" there is an xbmc_video58 which I've also tried changing the name to, but no luck.

*edit: Latest Debug log with hopefully a more helpful error

Any suggestions would be greatly appreciated.

Looks like something's not right with your original library setup.

Your setup is having trouble inserting records into the table. MySQL error 1062 usually indicates duplicate values on a column designed to be unique. In this case, my guess would be the 'strpath' column since your log is showing the following repeats and the strpath column is set as unique:

insert into path (idPath, strPath, strContent, strScraper) values (NULL,'Y:\\24\\','','');
insert into path (idPath, strPath, strContent, strScraper) values (NULL,'Y:\\24\\','','');

The first step would be to see if you can insert anything into the table at all. To do so, just fire up the mysql console (login with the same credentials used in advancedsettings.xml) and run the following:
    Code:
    use database xbmc_video58;
    insert into path (idPath, strPath, strContent, strScraper) values (NULL,'Y:\\24\\','','');

    If it doesn't work, that means you may be running into some permission errors on your database (your last debug log says you logged in with xbmc)[ah, nevermind, saw your entry with the root login attempt].

    If that works with no errors, that means your database setup is ok and something isn't right with your library. In that case, I would suggest checking your source settings in the library setup, or checking if the export included duplicates for some reason.

    If it does work, you'll probably also want to run the following to remove the row of fake data you put in for testing:
    Code:
    DELETE FROM path ORDER BY idPath DESC LIMIT 1;



    - jwdv22 - 2012-01-04 16:35

    silencery, it looks like the problem is actually before that. It says the tables do not exist. Anyway since Eden the first thing I check is whether the as.xml has the db name listed. if so, delete it. then post your log.
    <advancedsettings>
    <videodatabase>
    <type>mysql</type>
    <host>172.16.1.202</host>
    <port>3306</port>
    <user>root</user>
    <pass>password</pass>
    <name>xbmc_video</name>
    </videodatabase>
    </advancedsettings>


    - jwdv22 - 2012-01-04 17:23

    I have mySQL db on Win7 but shared between Win7, atv2, and openelec(generic) xbmc installs. I recommed using the UNC path instead of mapped drives if possible. So instead of your sources being your Y:\ drive just change them to be smb shares like \\mediaserver\tvshows\ and \\mediaserver\movies
    I have had friends who have had the sharing act really funny until they switched to this smb method.


    - EMETIB - 2012-01-10 00:10

    This sounds AWESOME!!!

    Always wanted a feature like this, didn't even notice it's been worked on for so long.

    But before I try it out, I mainly use XBMC across my original XBOX and also iPad/iPhone, with new downloads on my Windoes 7 desktop and archived files stored on my LG NAS. Will it work across these devices too?

    Thanks!


    - {{INX}} - 2012-01-10 15:50

    I have all this setup with no problems, including the shared thumbnails but one problem is with the profile pics. Every machine when synchronised won't show up the login profile pictures unless I setup them up manually on each machine.
    Is there a work around for this?

    I also have the same issue with custom menu's on Aeon MQ3 skin. When I set them up with custom backgrounds and then synchronise the folder to another machine it won't show the backdrops.


    - {{INX}} - 2012-01-10 20:49

    OK now things are going a little strange.
    My server is just a Windows 7 64bit build with a copy of XBMC installed for me to try any changes etc. before playing with the main HTPC.
    I have 3 profiles which all work fine on the server but as soon as I copy the userdata folder to the main HTPC, the main profile works with no problems, my daughters profile works fine, but my sons profile just hangs on the login screen.

    Please see below for log.


    18:33:17 T:2076 NOTICE: -----------------------------------------------------------------------
    18:33:17 T:2076 NOTICE: Starting XBMC, Platform: Windows 7, 64-bit (WoW) Service Pack 1 build 7601. Built on Dec 23 2011 (Git:20111222-22ad8e4, compiler 1600)
    18:33:17 T:2076 NOTICE: AMD A6-3650 APU with Radeon™ HD Graphics
    18:33:17 T:2076 NOTICE: Desktop Resolution: 1920x1080 32Bit at 60Hz
    18:33:17 T:2076 NOTICE: Running with administrator rights
    18:33:17 T:2076 NOTICE: Aero is enabled
    18:33:17 T:2076 NOTICE: special://xbmc/ is mapped to: C:\Program Files (x86)\XBMC
    18:33:17 T:2076 NOTICE: special://xbmcbin/ is mapped to: C:\Program Files (x86)\XBMC
    18:33:17 T:2076 NOTICE: special://masterprofile/ is mapped to: C:\Users\Main\AppData\Roaming\XBMC\userdata
    18:33:17 T:2076 NOTICE: special://home/ is mapped to: C:\Users\Main\AppData\Roaming\XBMC\
    18:33:17 T:2076 NOTICE: special://temp/ is mapped to: C:\Users\Main\AppData\Roaming\XBMC\cache
    18:33:17 T:2076 NOTICE: The executable running is: C:\Program Files (x86)\XBMC\XBMC.exe
    18:33:17 T:2076 NOTICE: Log File is located: C:\Users\Main\AppData\Roaming\XBMC\xbmc.log
    18:33:17 T:2076 NOTICE: ------------------------------------------------

    18:34:02 T:2076 NOTICE: special://profile/ is mapped to: special://masterprofile/profiles/Jake/
    18:34:02 T:2076 NOTICE: loading special://profile/guisettings.xml
    18:34:02 T:2076 NOTICE: Getting hardware information now...
    18:34:02 T:2076 NOTICE: Checking resolution 12
    18:34:02 T:2076 NOTICE: Loading player core factory settings from special://xbmc/system/playercorefactory.xml.
    18:34:02 T:2076 NOTICE: Loaded playercorefactory configuration
    18:34:02 T:2076 NOTICE: Loading player core factory settings from special://profile/playercorefactory.xml.
    18:34:02 T:2076 NOTICE: Loaded playercorefactory configuration
    18:34:02 T:2076 NOTICE: No settings file to load to load (special://xbmc/system/advancedsettings.xml)
    18:34:02 T:2076 NOTICE: Loaded settings file from special://profile/advancedsettings.xml
    18:34:02 T:2076 NOTICE: Contents of special://profile/advancedsettings.xml are...
    <advancedsettings>
    <videodatabase>
    <type>mysql</type>
    <host>192.168.0.104</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
    <name>xbmc_video_eden_jake</name>
    </videodatabase>
    <musicdatabase>
    <type>mysql</type>
    <host>192.168.0.104</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
    <name>xbmc_music_eden_jake</name>
    </musicdatabase>
    <pathsubstitution>
    <substitute>
    <from>special://masterprofile/Thumbnails/</from>
    <to>smb://Home-Server/Software/Applications/HTPC/XBMC/_Shared/thumbnails</to>
    </substitute>
    </pathsubstitution>
    </advancedsettings>
    18:34:02 T:2076 WARNING: VIDEO database configuration is experimental.
    18:34:02 T:2076 NOTICE: Getting hardware information now...
    18:34:02 T:2076 NOTICE: Checking resolution 12
    18:34:02 T:2076 NOTICE: Default DVD Player: dvdplayer
    18:34:02 T:2076 NOTICE: Default Video Player: dvdplayer
    18:34:02 T:2076 NOTICE: Default Audio Player: paplayer
    18:34:02 T:2076 NOTICE: Disabled debug logging due to GUI setting. Level 0.
    18:34:02 T:2076 NOTICE: Log level changed to 0
    18:34:02 T:2076 NOTICE: Loading media sources from special://masterprofile/profiles/Jake/sources.xml
    18:34:06 T:2076 ERROR: unmatched parentheses in substring(Container(510).ListItem.Property(RunningTime),min
    18:34:06 T:2076 WARNING: Skin has invalid include: selectedcolor
    18:34:06 T:2076 WARNING: Previous line repeats 3 times.
    18:34:06 T:2076 NOTICE: Webserver: Starting...
    18:34:06 T:2076 NOTICE: WebServer: Started the webserver
    18:34:06 T:2076 NOTICE: starting upnp renderer
    18:34:06 T:2076 NOTICE: ES: Starting event server
    18:34:06 T:3076 NOTICE: ES: Starting UDP Event server on 0.0.0.0:9777
    18:34:06 T:3076 NOTICE: UDP: Listening on port 9777
    18:34:06 T:1088 NOTICE: -->Python Interpreter Initialized<--
    18:34:06 T:1428 NOTICE: -->Python Interpreter Initialized<--
    18:34:06 T:2076 NOTICE: CApplication::UpdateLibraries - Starting video library startup scan
    18:34:06 T:1088 NOTICE: StorageServer Module loaded RUN
    18:34:06 T:1088 NOTICE: StorageClient-0.8 Starting server
    18:34:06 T:1088 ERROR: Error Type: <class 'socket.error'>
    18:34:06 T:1088 ERROR: Error Contents: (10048, 'Only one usage of each socket address (protocol/network address/port) is normally permitted')
    18:34:06 T:1088 ERROR: Traceback (most recent call last):
    File "C:\Users\Main\AppData\Roaming\XBMC\addons\script.common.plugin.cache\default.py", line 40, in <module>
    run()
    File "C:\Users\Main\AppData\Roaming\XBMC\addons\script.common.plugin.cache\default.py", line 33, in run
    s.run()
    File "C:\Users\Main\AppData\Roaming\XBMC\addons\script.common.plugin.cache\lib\Storage​Server.py", line 106, in run
    sock.bind(self.socket)
    File "<string>", line 1, in bind
    error: (10048, 'Only one usage of each socket address (protocol/network address/port) is normally permitted')
    18:34:06 T:2076 NOTICE: CApplication::UpdateLibraries - Starting music library startup scan
    18:34:06 T:3084 NOTICE: VideoInfoScanner: Starting scan ..
    18:34:50 T:3084 NOTICE: VideoInfoScanner: Finished scan. Scanning for video info took 00:43

    Does anyone have any ideas why this is happening?


    - Klyde - 2012-01-11 00:44

    thanks for the suggestions:

    silencery Wrote:Looks like something's not right with your original library setup.

    Your setup is having trouble inserting records into the table. MySQL error 1062 usually indicates duplicate values on a column designed to be unique. In this case, my guess would be the 'strpath' column since your log is showing the following repeats and the strpath column is set as unique:

    insert into path (idPath, strPath, strContent, strScraper) values (NULL,'Y:\\24\\','','');
    insert into path (idPath, strPath, strContent, strScraper) values (NULL,'Y:\\24\\','','');

    The first step would be to see if you can insert anything into the table at all. To do so, just fire up the mysql console (login with the same credentials used in advancedsettings.xml) and run the following:
      Code:
      use database xbmc_video58;
      insert into path (idPath, strPath, strContent, strScraper) values (NULL,'Y:\\24\\','','');

      If it doesn't work, that means you may be running into some permission errors on your database (your last debug log says you logged in with xbmc)[ah, nevermind, saw your entry with the root login attempt].

      Attempted that code in the command line and get an error back saying:
      ERROR 1054 (42S22): Unknown column `Y:\\24\\` in `field list`


      jwdv22 Wrote:silencery, it looks like the problem is actually before that. It says the tables do not exist. Anyway since Eden the first thing I check is whether the as.xml has the db name listed. if so, delete it. then post your log.
      <advancedsettings>
      <videodatabase>
      <type>mysql</type>
      <host>172.16.1.202</host>
      <port>3306</port>
      <user>root</user>
      <pass>password</pass>
      <name>xbmc_video</name>
      </videodatabase>
      </advancedsettings>
      okay I've removed that still no luck. here's my latest debug log:http://pastebin.com/eCuBTmZh


      - hjid - 2012-01-11 21:58

      I have two XBMC Dharma clients on Win 7 computers and a shared MySQL database. In the first client I define sources and import all information to the database (thumbnails/fanart is not shared).

      All movies in the database are automatically visible in the second client but no thumbnails/fanart is presented. Is it possible to make XBMC automatically get the missing thumbnails/fanart in the second client?

      Also, no sources are defined for the second client. Do I need to update the sources manually or should that information be transferred from the database?

      Thanks!


      - Ray_N - 2012-01-11 22:03

      hjid Wrote:All movies in the database are automatically visible in the second client but no thumbnails/fanart is presented. Is it possible to make XBMC automatically get the missing thumbnails/fanart in the second client?

      Check out: http://wiki.xbmc.org/index.php?title=HOW-TO:Synchronize_multiple_XBMC_libraries

      Look towards the bottom of the page (Syncing thumbnails and fanart )


      - hjid - 2012-01-11 22:51

      Ray_N Wrote:Check out: http://wiki.xbmc.org/index.php?title=HOW-TO:Synchronize_multiple_XBMC_libraries

      Look towards the bottom of the page (Syncing thumbnails and fanart )

      Sorry, but I was a bit unclear in my first post. Since I am using Dharma (and want to wait for a stable Eden) it is not be possible to share thumbnails and fanart. Therefore, I would like a solution where the second client automatically (and locally) downloads the missing thumbnails/fanart based on the movies in the common database. The only solution I could find was to download the thumbnails/fanart movie by movie on the second client and that takes lots of time....


      - jdoggvt - 2012-01-11 22:59

      Quote:Since I am using Dharma (and want to wait for a stable Eden) it is not be possible to share thumbnails and fanart.

      You can accomplish this in Dharma with symbolic links, which is what I did and it works like a champ:

      http://www.mymeanmonkey.com/2011/08/09/6/

      Step 8 is what you'd be interested in.


      - bill55 - 2012-01-12 18:13

      svenh Wrote:I got this working today with the instructions from the original post at lifehacker, however at first it would not work. I had installed the 32 bit MSI version of MySQL (mysql-5.5.9). Created the tables etc.

      Upon launching, the UI would lag really bad and nothing would get scanned in if I tried to add content Looking at the xbmc.log I got errors such as this:

      "Can't get hostname for your address"

      I found you have to go into your mysql directory and add "skip-name-resolve
      " to your my.ini file. Afterward I restarted the MySQL service and it worked.

      I am pretty sure I saw this somewhere else because the fix sounded really familiar, but if anyone else tries this and runs into the problem maybe this post will help them!

      I am having issues exactly like you describe. Main Menu of the interface is SUPER SLOW. Once I am off the main menu everything moves quickly. Library not really functioning either. Going to try this fix tonight.

      Does "skip-name-resolve" need to be in any special place in the my.ini file?

      Thanks!
      Bill


      - bill55 - 2012-01-13 04:20

      bill55 Wrote:I am having issues exactly like you describe. Main Menu of the interface is SUPER SLOW. Once I am off the main menu everything moves quickly. Library not really functioning either. Going to try this fix tonight.

      Does "skip-name-resolve" need to be in any special place in the my.ini file?

      Thanks!
      Bill

      Well I tried this tonight and I am not seeing a change at all. The interface is VERY SLOW. The main menu at least. If I get off the main menu it navigates normally. I copied and pasted all the sql commands. Seemed like everything worked. Firewall ports are open. Before I did that XBMC wouldn't even get to the main menu. Would just hang at the splash screen.

      Any suggestions?

      My media server/mysql machine is running Windows 7. My XBMC machine is a Mac Mini running OSX Snow Leopard. XBMC is Eden Beta.

      Thanks!
      Bill