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)



- scooper750 - 2011-09-27 17:17

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 17:21

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 06:59

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 19:49

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 16:10

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 17:58

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 09:31

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 17:11

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 10:14

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 23:34

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