Kodi Community Forum

Full Version: SQL Database with Fanart across Mac and Ubuntu
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hey all,
I've had the SQL database stuff working before, but now have a fresh install with the official Dharma version etc..

My problem before was that I could get everything working on my main HTPC working as usual and on our Mac Laptops be able to see the library with "watched" states and watch movies/tv shows as normal over SMB, but NO fanart.

I tried setting up symbolic links but couldn't get it to work.
Ideally there would be a setting where I could point it to a thumbnails folder so all machines could access/write them over SMB.

Has anyone got this working accross multiple systems?
Thanks
Niietzshe
I believe xbmc caches thumbnails with the local system instead of with the media :/

Lifehacker had a good post awhile back about storing your thumbs with the media in this structure:

\Movies\
—-\MovieTitle\
—— MovieTitle.mkv
—— folder.jpg
—— fanart.jpg
—— movie-trailer.flv
—— title.nfo
\TV Shows\
—- \Show\
—— folder.jpg
—— fanart.jpg
——- \Season\
——— folder.jpg
Hmmm, yes but then it scrapes them and stores them in a the xbmc user_data folder, so I would believe that when you're on the laptop it will be looking for local images in its XBMC user_data rather than the original movie folder.

Thanks though
Niietzshe
That's correct. I don't think you could make a symlink to a network location either.

When I did it I exported the db on one and imported in on the other, thereby grabbing all the image data. But this store 2 copies instead of a single unified one. You could probably create a symlink and sync with dropbox though Smile
I solved it by copying the /userdata/thumbnails-folder to a samba-share and mounting this folder on every system... works like a charm

greetings

MJFox
MJFox, could you explain more exactly what you did as I've tried this approach before.

I moved the thumbnails folder of my main HTPC to the Samba share and symlinked it back to the HTPCs user_data folder, which worked. Getting the same thing working on a Mac though proved hard work.

Cheers
Niietzshe
I don't think he was talking about symlinks, but mounting the thumbnails folder from the share to .xbmc/userdata/Thumbnails (for Linux at least).

What you want is to mount -t smbfs //IP/SHARE /home/username/.xbmc/userdata/Thumbnails

More or less.
use this command to mount the thumbnail-folder from a smb-share to your local macos-filesystem:

Code:
mount -t smbfs //USER_NAS:PASSWORD@IP_OF_YOUR_NAS/path/to/Thumbnails /Users/USER_MACOS/Library/Application\ Support/XBMC/userdata/Thumbnails

replace USER_NAS and PASSWORD with your samba-share-login and fill in your IP of your NAS

also replace USER_MACOS with the username of your mac-user

put this code into an automator-program and drop it into your startup objects to mount the folder on every startup

let me know if you need more help

greetings

MJFox
Thanks!
I'll get the SQL stuff set back up tomorrow and try it out. Maybe make a "launch XBMC" automator script so it only mounts the folder when needed.

I'll let you know how it goes.
Niietzshe
@MJFox

Thanks for the info man, this all works and finally I can sleep at night Smile
It does load the thumbnails in slowly though. I'm sure the missus won't even notice, but for my own sanity I'm wondering whether some sort of sync on startup would be faster without really hitting any problems of missing thumbnails (unless something gets added after startup, but then next session it'll be there).

I'll report back with my findings, but the above works at least.
Niietzshe
Ok so I've done some tests and I think syncing is the way to go, for me at least.
I've got a symbolic link set up from my ubuntu htpc from the xbmc thumbnails folder to the external HD that the samba server broadcasts. So from my Mac I can see the thumbnails folder across samba.

Then on the macs I have an automator application to launch XBMC (see attatched image) that connects to the samba share, launches XBMC THEN does a sync between the thumbnails folder. If you do the sync first, it takes a while (5 mins first time, only about 20 seconds after that), so I've launched XBMC first, then the sync after.

So far so good. It makes browsing much much faster so it doesn't feel like it's having to load across the server, yet it will still update when the server does.

Hope this helps some other people.
Niietzshe

P.s. This is the Automator Action I added to make it possible:
http://www.apple.com/downloads/macosx/au...ction.html

Image
@niietzshe:

thanks for reporting back, happy to hear that it works for you now!

are you using WLAN? I notice almost no difference between a local database/thumbnail-folder and the mysql-database/mounted-folder on my setup (I'm storing my data on a Synology DS710+ NAS and my boxes are connected through a 100MBit-wire to it)

greetings

MJFox
Yeah Sorry I should have mentioned that the laptops are over WLAN...
If I wouldn't have seen any lag in loading the art I would have been fine with the sym linking.

Added a few new episodes/movies into the database today and the thumbnails sync up pretty quickly. I haven't seen a blank poster/fanart yet even though they start syncing after XBMC launches.

Niietzshe
MJFox Wrote:use this command to mount the thumbnail-folder from a smb-share to your local macos-filesystem:

Code:
mount -t smbfs //USER_NAS:PASSWORD@IP_OF_YOUR_NAS/path/to/Thumbnails /Users/USER_MACOS/Library/Application\ Support/XBMC/userdata/Thumbnails

replace USER_NAS and PASSWORD with your samba-share-login and fill in your IP of your NAS

also replace USER_MACOS with the username of your mac-user

put this code into an automator-program and drop it into your startup objects to mount the folder on every startup

let me know if you need more help

greetings

MJFox

MJFox, sorry for the potentially noob question, but will this work on Windows?
tboooe Wrote:MJFox, sorry for the potentially noob question, but will this work on Windows?

yes, but use mklink instead:

Code:
mklink /D c:\Users\%username%\AppData\Roaming\XBMC\userdata\Thumbnails //SHARE/path/to/Thumbnails

works only on Vista and above as far as I know

greetings

MJFox