[AppleTV2] MySQL database / library support? - Printable Version
+- XBMC Community Forum (http://forum.xbmc.org)
+-- Forum: Help and Support (/forumdisplay.php?fid=33)
+--- Forum: XBMC General Help and Support (/forumdisplay.php?fid=111)
+---- Forum: iOS support (/forumdisplay.php?fid=137)
+---- Thread: [AppleTV2] MySQL database / library support? (/showthread.php?tid=91485)
- Jimmy89 - 2011-02-01 09:38
I just run a cron job from my linux box and do rsync via ssh to get to the ATV.
- AaronD - 2011-02-01 10:03
Hmmm... hadn't thought of that. So you don't need to do anything on the AppleTV? Do I understand right that rsync daemon is essentially running as part of the SSH server in the Apple TV? And you can then reverse the source and destination so you pushing updates rather than pulling updates?
- AaronD - 2011-02-01 10:10
One other general question about how this works, particularly with rsync. So if one day I updated the library on the AppleTV instead of my Revo, rather than the other way around, would it then push updates the other way?
In other words, is rsync bidirectional, or does it only update in one direction from a source to a destination?
- aicjofs - 2011-02-01 10:44
I was messing around with the path substitution amet talked about and see how it would apply to a remote thumbnail folder rather then a database.
Basically asking to substitute the thumbnails folder to a network share. Oddly it works. Complains about files already existing during thumbnail folder setup but otherwise works fine. The /var/mobile/Library/Preferences/XBMC/userdata/Thumbnails/ is completely empty and I get all my thumbs displayed. The caveat is if you don't have any thumbnails yet generated, it seems to die there. Probably since this wasn't what pathsubstitution was desined for.
Here is displaying a folder where you have already generated thumbnails on remote share.
and here is where I made a folder that hasn't had any thumbnails generated(well actually it seeked and extracted a thumbnail the previous log that I forgot to save but still had the error)
at around 00:31:07 you see ERROR: Texture manager unable to load file: /var/mobile/Library/Preferences/XBMC/userdata/Thumbnails/Video/c/auto-c645aa6d.tbn
If you go to another XBMC that has properly working remote thumbnails and let it generate the thumbs then come back to the ATV2 reopen folder then everything is fine.
So is the Texture manager hardcoded to look in /var/mobile/Library/Preferences/XBMC/userdata/Thumbnails? smb share not writable? Or the most likely I'm am just wasting my time thinking this will even work?
Like I said it actually works if you have already generated all your thumbs on a different XBMC.
- amet - 2011-02-01 11:09
aicjofs Wrote:I was messing around with the path substitution amet talked about and see how it would apply to a remote thumbnail folder rather then a database.
there is an issue writing to smb share
- aicjofs - 2011-02-01 18:26
Thanks for the reply amet. Is it issue that can be fixed down the road or is it a fundemental limitation?
- fattoony - 2011-02-01 18:46
very interested to hear how you get on with rsync / cron?
Need to rsync atv to dropbox on a local Linux server
AaronD did you find out if rsync would be bidirectional or will a cron job need setting up on atv, is this possible?
- amet - 2011-02-01 20:48
aicjofs Wrote:Thanks for the reply amet. Is it issue that can be fixed down the road or is it a fundemental limitation?
we are looking into it
- Jimmy89 - 2011-02-02 01:03
With regards to rsync, if you use rsync over ssh then rsync does not need to be set up as a daemon on the ATV.
A single command of rsync will only do a unidirectional backup.
It is however possible to sort of do a 2-way sync.
I am currently running two xbmc clients (win7 and ATV).
I also have a Linux based fileserver which is also doing the mysql db and now rsync cron job.
Basically I am currently doing something like this, in a cron job I am running the following commands:
rsync -rtu ATV --> file server
rsync -rtu Win7 ---> file server
rsync -rtu fileserver ---> ATV
rsync -rtu fileserver ---> Win7
That is not the full command obviously, you need to add the -e ssh , and setup passwordless ssh.
Basically if something gets scraped on one client or if you change fanart/thumb then the fileserver gets the update and hence the other client.
One issue with this is if something is deleted in the Thumbnails folder, then it will appear again on the next rsync, however I don't believe xbmc ever deletes anything from that folder.
Another option possibly worth looking at is unison, which does bi-directional sync however I didn't look into it too much.
- fattoony - 2011-02-02 01:16
Thanks for that Jimmy,
How often is the cron running. Do you have the cron setup on both atv and file server or just the file server.
Would you mind posting a full sample of one of your rsync command.