•  Previous
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 18
  • Next 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
[AppleTV2] MySQL database / library support?
#31
I just run a cron job from my linux box and do rsync via ssh to get to the ATV.
Reply
#32
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?
Reply
#33
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?
Reply
#34
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.

Code:
<advancedsettings>
<videodatabase>
        <type>mysql</type>
        <host>192.168.1.105</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video</name>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.1.105</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_music</name>
    </musicdatabase>
<pathsubstitution>
    <substitute>
        <from>/var/mobile/Library/Preferences/XBMC/userdata/Thumbnails/</from>
        <to>smb://192.168.1.105/d/XBMCTHUMBS/</to>
    </substitute>
</pathsubstitution>

</advancedsettings>

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.

http://pastebin.com/NKmrsCmb

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)

http://pastebin.com/PwW721xd

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.
Reply
#35
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.

Code:
<advancedsettings>
<videodatabase>
        <type>mysql</type>
        <host>192.168.1.105</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_video</name>
    </videodatabase>

    <musicdatabase>
        <type>mysql</type>
        <host>192.168.1.105</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
        <name>xbmc_music</name>
    </musicdatabase>
<pathsubstitution>
    <substitute>
        <from>/var/mobile/Library/Preferences/XBMC/userdata/Thumbnails/</from>
        <to>smb://192.168.1.105/d/XBMCTHUMBS/</to>
    </substitute>
</pathsubstitution>

</advancedsettings>

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.

http://pastebin.com/NKmrsCmb

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)

http://pastebin.com/PwW721xd

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.


there is an issue writing to smb share
Reply
#36
Thanks for the reply amet. Is it issue that can be fixed down the road or is it a fundemental limitation?
Reply
#37
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?
Reply
#38
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
Reply
#39
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.
Reply
#40
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.

Regards,
Reply
#41
cool, all is working good on the atv2.
The desktop is working on sql OK
Getting this in the log though on the atv2.

DNS is set correctly on the atv2


Code:
17:07:23 T:157904896 M:139616256   ERROR: Unable to open database: xbmc_video [1042](Can't get hostname for your address)
17:07:23 T:157904896 M:139616256   ERROR: Unable to open database at host: 192.168.221.6 db: xbmc_video (old version?)

Thanks again

EDIT: mysql error, added skip-name-resolve to my.ini
Reply
#42
I'm having problems getting thumbnails to work, i liked the idea of using path substitute but it isnt working for me,

<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>server2008</host>
<port>3306</port>
<user>root</user>
<pass>xbmc</pass>
<name>xbmc_movies</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>server2008</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbmc</pass>
<name>xbmc_music</name>
</musicdatabase>

<pathsubstitution>
<substitute> <from>/var/mobile/Library/Preferences/XBMC/userdata/Thumbnails/</from>
<to>smb://192.168.0.1/c/Thumbnail Cache/Thumbnails/</to>
</substitute>
</pathsubstitution>
</advancedsettings>
Reply
#43
What are you seeing in your xbmc.log?

I'd be worried about the space being translated correctly in between Thumbnail Cache in this

"smb://192.168.0.1/c/Thumbnail Cache/Thumbnails/"
Reply
#44
ok that's a fair comment will try without the space and report back
Reply
#45
Tried renaming but still getting same issue.

<pathsubstitution>
<substitute>
<from>/var/mobile/Library/Preferences/XBMC/userdata/Thumbnails/</from>
<to>smb://192.168.0.1/c/Thumbnails/Thumbnails/</to>
</substitute>
</pathsubstitution>



11:49:32 T:162021376 M:333041664 ERROR: Create - Error creating /var/mobile/Library/Preferences/XBMC/userdata/Thumbnails/Video/Fanart/
11:49:32 T:162021376 M:333041664 ERROR: Create - Error creating special://masterprofile/Thumbnails/Video/Fanart/
11:49:32 T:162021376 M:333041664 WARNING: FileSmb::OpenForWrite() called with overwriting enabled! - smb://192%2e168%2e0%2e1/c/Thumbnails/Thumbnails/Video/Fanart/87087b47%2etbn
11:49:32 T:162021376 M:333041664 ERROR: FileSmb->Open: Unable to open file : 'smb://192%2e168%2e0%2e1/c/Thumbnails/Thumbnails/Video/Fanart/87087b47%2etbn'
unix_err:'2' error : 'No such file or directory'
Reply
  •  Previous
  • 1
  • 2
  • 3(current)
  • 4
  • 5
  • 18
  • Next 
 
Thread Rating:
  • 1 Vote(s) - 5 Average



Logout Mark Read Team Forum Stats Members Help
[AppleTV2] MySQL database / library support?51