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

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Support (https://forum.kodi.tv/forumdisplay.php?fid=33)
+--- Forum: Tips, tricks, and step by step guides (https://forum.kodi.tv/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


- scooper750 - 2011-09-27

Regarding MySQL performance.
Try enabling QueryCache. I've allocated 10mb of memory for queryCache and am getting over 80% hit rate on the queries. Made a slight difference for me. Every little bit helps.


- scooper750 - 2011-09-27

Slightly off topic, but for those running the Eden nightlies, configure your advancedsettings.xml to enable dirtyregion processing. You can add the following to your advancesettings.xml:

<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
<visualizedirtyregions>false</visualizedirtyregions>
<nofliptimeout>1000</nofliptimeout>
</gui>


You'd be amazed how much difference this setting makes. Makes the UI really snappy on an ATOM.


- SophT - 2011-10-04

Here you go, something like this aught to work:

Set the number of backups you want (defaut 3)
Set the databases you want (default XBMC_Video and XBMC_Music)
Set the backup path (default is execution directory +backup/)
Modify the backup timestamp if you want it, default is YYMMDD

When it dumps you should end up with something like this: XBMC_Video.111004.00.sql (00 is the newest, 02 the oldest)

Script automatically deletes the oldest backup.

Also, make sure you've setup your my.cnf, that's how the dumper works, or add in the -U -P switches to the mysqldump command.

Code:
#!/bin/bash

# Set Variables
dbcount=3
dbnames=( "XBMC_Video" "XBMC_Music" )
backup_path="backup/"
long_date=`date`
short_date=`date +"%y%m%d"`
date_regex="[0-9]{6}"


# Start backup process
  #echo ""
echo "Starting backup - "$long_date

# Dumping Databases
#  echo ""
#  echo "Dumping databases"
#  echo ""

  cd /$backup_path

for (( i = 0 ; i <= `expr ${#dbnames[@]} \- 1`; i++ ))
do
#    echo "  -Moving old backups"
  for (( c = `expr $dbcount \- 1` ; c >=0; c-- ))
  do
    n=`expr $c \+ 1`
    while test "${#n}" -lt 2
    do
      n="0$n"
    done
    d=$c
    while test "${#d}" -lt 2
    do
      d="0$d"
    done
    file=`ls | grep -E ".($d).(sql)$"`
#      echo "File name is: $file"
    if [[ $file =~ $date_regex ]]
    then
      if [ -f "$file" ]
      then
#          echo "Moving $file to ${dbnames[$i]}.${BASH_REMATCH[0]}.$n.sql"
        mv $file ${dbnames[$i]}.${BASH_REMATCH[0]}.$n.sql
      fi
    fi
  done
#    echo "  -Dumping ${dbnames[$i]} to ${dbnames[$i]}.$short_date.00.sql"
#  mysqldump -B ${dbnames[$i]} > ${dbnames[$i]}.$short_date.00.sql
  old_file=`ls | grep -E ".($dbcount).(sql)$"`
  if [[ $old_file =~ $date_regex ]]
  then
    if [ -f "$old_file" ]
    then
#        echo "  -Removing oldest backup: $old_file"
      rm $old_file
    fi
  fi
done

# Complete
#  echo ""
echo "Backup Complete - "$long_date

Can't guarantee this will work, I've ripped it out of a larger backup script I've written to dump and backup over rsync several dozen postgres databases, but the foundation is there anyways.


- constrictor - 2011-10-05

scooper750 Wrote:Slightly off topic, but for those running the Eden nightlies, configure your advancedsettings.xml to enable dirtyregion processing. You can add the following to your advancesettings.xml:

<gui>
<algorithmdirtyregions>1</algorithmdirtyregions>
<visualizedirtyregions>false</visualizedirtyregions>
<nofliptimeout>1000</nofliptimeout>
</gui>


You'd be amazed how much difference this setting makes. Makes the UI really snappy on an ATOM.

OMG thank you! I remember reading about dirty regions on the xbmc news page a while ago, but I had forgotten about it. I enabled it last night and noticed an improvement in video stuttering. I used to get a video stutter about once every 30-60 seconds when watching a movie.


Is Dharma for OSX compatible with Dharma for Windows ? - Erwin - 2011-10-13

My setup is as follows:
  • movie files and mysql xbmc video library on Synology NAS (unix).
  • windows7 pc with latest xbmc stable release
  • windows7 laptop with latest xbmc stable release

Can I add a mac with latest stable xbmc for osx release to update and play from the same video library ?


- Kolkjaer - 2011-10-15

Hey

I'm having problems getting this to work.

I had to create the xbmc_video database my self becouse xbmc was unabled to do it.
And that still gave some problems.

But now xbmc dos't post data ind the database, when scanning my movie/serie folders.

Code:
13:38:32 T:5744 M:2287890432   ERROR: Window Translator: Can't find window pluginsettings
13:38:32 T:5744 M:2287890432   ERROR: Control has invalid animation type (no condition or no type)
13:38:39 T:5744 M:2288013312   ERROR: SQL: Undefined MySQL error: Code (1048)
                                            Query: insert into path (idPath, strPath, strContent, strScraper) values (NULL,'smb://***:****@***.***.***.***/usbshare1/Film/Harry.Potter.And.The.Half.Blood.Prince.2009.DvDRip-FxM/','','')
13:38:39 T:5744 M:2288013312   ERROR: CVideoDatabase::AddPath unable to addpath (insert into path (idPath, strPath, strContent, strScraper) values (NULL,'smb://***:****@***.***.***.***/usbshare1/Film/Harry.Potter.And.The.Half.Blood.Prince.2009.DvDRip-FxM/','',''))

And when it's scanning my music folder I get this errors ind the log

Code:
13:16:09 T:4052 M:2454286336   ERROR: Tag loader mp3: Unable to create album art for smb://***:****@***.***.***.***/music/I/In Flames/The Jester Race/In Flames - The Jester Race - 05 - Lord Hypnos.mp3 (extension=JPG, size=7463)
13:16:09 T:4052 M:2454351872   ERROR: CPicture::CreateThumbnailFromMemory: exception with fileType: JPG
13:16:09 T:4052 M:2454351872   ERROR: Tag loader mp3: Unable to create album art for smb://***:****@***.***.***.***/music/I/In Flames/The Jester Race/In Flames - The Jester Race - 06 - Dead Eternity.mp3 (extension=JPG, size=7463)
13:16:09 T:4052 M:2454417408   ERROR: CPicture::CreateThumbnailFromMemory: exception with fileType: JPG

I'm running XBMC 10.1 on a windows 7
And mysq 5.5 on a windows 2008r2 server.
My music is shared on the same server and my movies/series are shared from synology NAS box

Hop someone can help


- Tobas - 2011-10-16

Hi there,


System : Ubuntu 10.04 x86_64
Xbmc : Nightly (git 15-10-2011)
Skin : MQ3

I have synchronised my library with a MySQL database, and shared the tumbs.
I first had a dns_resolve issue but thats solved.
Everything works ok, but i have troubles when i leave TV Shows
i can go in and out of the movies and music, but when i leave the TV shows xbmc hangs.
i only see the backdrop and nothing else


xbmc.log : http://pastebin.com/8MmWjXFH


Problem when Creating a new Database - daninino - 2011-10-25

Hi

Using the Nightly from 24/10

It won't create the tables when I start XBMC see log file. Not sure what I could have donw differently followed the guide.

It's going crazy with:

ERROR: Unable to open database: xbmc_video45 [1049](Unknown database 'xbmc_video45')


Br
Daninino

Pastebin log: http://pastebin.com/eNbRa22g


- daninino - 2011-10-26

Apperently using the official version, and not a nightly, it worked without a problem. So something is up with the nightly I used Eek


- Ray_N - 2011-10-27

Seeing as though the synchronization feature is a common desire among us here, and the solution on the famous article on Lifehacker seems to not be complete and elude even some of us knowledgeable in SQL, operating systems, XML and networking, I've taken the information on the famous article and created an XBMC wiki page to help us through.
http://wiki.xbmc.org/index.php?title=Synchronize_Multiple_XBMCs
The original article was written more than a year ago (back in September 2010) and people still try to use it as is. Some things have changed since then and now as an XBMC wiki article we can all contribute and fix any errors that may exist. Let's help fix it.

Enjoy,
r


- nchall - 2011-10-28

Main problem seems to be that the database name has changed in the latest nightlies in October. Once this is fixed, should work according to the wiki.


- DrGosha - 2011-11-01

works fine on the atv2 but does not work on the mac - please help!

my setup:
- mysql db running on a windows xp
- media stored on a an external hd drive connected to my router and shared via smb
- xbmc on my atv2
- xbmc on my mac

btw.: where is the difference between the lifehacker-article and the recently created wiki-article, posted some posts above this?

the mysql db is running well and I have copied the advancedsetings.xml from my atv2 to my mac (both in the respective userdata folders) but if I start XBMC on my mac it does only show "Files" and "Add-Ons" under "Videos", no "Movies", no "TV Shows" (as it does on the atv2!).

I am able to connect to the mysql db from my mac using "Sequel Pro" and the same IP and user and pass I entered in the advancedsettings.xml. If I change something in the library on my atv2 I see the changes correctly in the mysql db via sequel pro on my mac immediately. Means atv2 and mac are both able to connect to the db and all my library is stored in the mysql db - but XBMC on my mac does not recognize that.

If I shut down the server-pc and try to start XBMC on my mac it crashes down or hangs up - which is good as it means that XBMC on my mac does not ignore the advancedsettings.xml file and tries to connect to the server-pc. If I start up the server-pc again, XBMC on my mac starts up fine but still does not show any movies or tv-shows under "Videos" (and seems to run much slower).

I am new to XBMC so maybe there is a little update-library trick or something that you would expect me to know but please act on the assumption that I don't know anything about XBMC.


- jacintech.fire - 2011-11-01

I got this working on the first try :-)
I installed mysql on one of the Ubuntu Servers I have to store the *.iso DVDs.

Yes, I am running several Ubuntu Servers because I need an Easy way to process the DVD into *.iso images, get other info off the web, and share the drives with the PC running the XBMC client. I would be nice to build a custom distro with the bare minimum, but right now this setup works fine...

Everything works as advertised, except that I cannot see my TV shows!!!
TV shows are on DVD as well; but I scrapped them as TV instead of movies and everything is well organized by episode, with thumb images, etc. It works fine on the local database, but on the centralized one is a no go.

I can see everything on the mysql database including the tv shows; but for some reason, the xbmc client is not loading this information.

WHAT GIVESHuh!!!!


- Ray_N - 2011-11-01

DrGosha Wrote:btw.: where is the difference between the lifehacker-article and the recently created wiki-article, posted some posts above this?

To: DrGosha
The main difference is that the author of the Lifehacker article assumed a Windows only installation and there are certain specifics for other operating systems that don't quite work if you just go by the article.

Also, there are many additional questions related to the process (for example, thumbnails sharing) and all, that now that we have the wiki we can answer, add to the information and make better. With a static article, there is no way to do that and so the knowledge sharing is limited and restricted.

All in all, use the wiki, use the wiki, use the wiki. If something is missing, add it to the wiki. If something is not clear, expand the wiki. If something is not right, fix the wiki. In the end, we all benefit...

thanks,
r


- DrGosha - 2011-11-01

Of course I know the advantages of a wiki compared to a static article and will try to contribute my knowledge since I like XBMC more and more. But are there already any changes in the content compared to the article? I'm asking because I followed the article and have the problems I've written about. But I can't find anything different in the wiki that could have been the reason for my problems. F.e. what do you mean by this:
Ray_N Wrote:...there are certain specifics for other operating systems that don't quite work if you just go by the article...

And still the major question: why isn't XBMC on my mac showing the Movies and TV-Shows in the mysql db while XBMC on my atv2 shows all of them? (both XBMC installations use the same advancedsettings.xml)