Jump to content
Sign in to follow this  
N4TH4N

XBMC Thumbnails Spin Up

11 posts in this topic Last Reply

Recommended Posts

Hello,

 

I have 6 media centres all running Windows 7 + XBMC

 

I have setup a dedicated MySQL database and SAMBA share (for "Thumbnails") on CentOS 6.4 Minimal.

 

There are 5 databases: "a", "b", "c", "d" and "e".

Databases: "b", "c", "d" and "e" are exact clones of "a" except they each have there own individual watch status.

 

- Master (Always on. Partial updates when notified. Full update and clean daily)

  - "a"

 

- Lounge

  - "a"

  - "b"

  - "c"

  - "d"

  - "e"

 

- Garage

  - "a"

  - "b"

  - "c"

  - "d"

  - "e"

 

- Bedroom 1

  - "a"

 

- Bedroom 2

  - "b"

 

- Bedroom 3

  - "c"

 

- Bedroom 4

  - "d"

 

Note: "e" is just a guest account.

 

So now you see that i have 15 different "Thumbnail" and "Database" folders you will see why its necessary to share thumbs.

 

I have setup the Lounge and Garage computers to share "Database" folders between profiles by symbolic link, reducing the "Database" folders to 7. This seems to be working.

 

You cannot share the "Database" folders between computers as it can only be open by one XBMC at a time. Therefore each computer needs its own "Database" folder.

 

I have also setup all computers and profiles to symbolic link to "Thumbnails" on the SAMBA share in the hope that i wouldn't have to spin up disks just to get thumbs.

 

This does not seem to be working 100% and disks are being spun up to load thumbs on different computers, even though they have been previously loaded on another.

 

Is there anyone else in this situation with a better way of doing it, or a solution.

 

I plan to keep playing with it, ill post up once i find a solution.

 

Thank-you.

Share this post


Link to post

question: why different databases why not different XBMC profiles?

Share this post


Link to post

They are separate profiles linked to external mysql databases.

 

The Master XBMC machine scans in content to the MySQL database under "a" and through the magic of a custom MySQL structure, databases "b", "c", "d" and "e" are populated from "a" except for bookmarks and play counts.

 

I can pause/stop a movie in the lounge/garage and resume it in my bedroom as can my 3 house mates.

I can watch a TV series and know where i'm up to in my lounge, garage and bedroom.

 

As far as i'm aware these are the possible setups:

- The internal XBMC database manages multiple profiles locally on the single computer.

- An external MySQL database manages one profile for many computers. (Meaning if you have multiple profiles, each has to scan individually and is completely separate).

- The way i have mine setup, An external MySQL database manages multiple profiles for many computers. (Meaning you only need to scan once for all profiles/computers).

Share this post


Link to post

If it's spinning up the drive to display new icons on system B when said icon has been displayed on system A already, it's because each system keeps it's own hash tables of icons & images in the database. If the hash doesn't exist, it creates it by accessing the image.

 

One way I worked against this in the past was to have the images/nfo files stored on a SDD that was part of the array, in the highest number slot available.

Share this post


Link to post

They way I ended up settling for mine was to just have the central MySQL database but store icons on each computer. Ran against my "prevent duplicate files" mentality but it proved far less of a headache and far less complexity.

 

Movies, view counts, pause on one system resume on another - all available.

 

One database, multiple systems.

Share this post


Link to post

Thats the official semi supported way. The way the OP is doing it is interesting but way way way unsupported.

 

It seem way complicated just to save on scanning for new content multiple times.

 

Also you can still share one central art repo. The problem is not locking it replacing.

Share this post


Link to post

If it's spinning up the drive to display new icons on system B when said icon has been displayed on system A already, it's because each system keeps it's own hash tables of icons & images in the database. If the hash doesn't exist, it creates it by accessing the image.

 

Thanks for the reply.

 

I thought the "Thumbnails" folder was able to be shared between computers and used consistant file names for thumbs.

 

If this is not the case, is it possible to set unRAID to filter "*.jpg", "*.tbn" and "*.nfo" files onto a specific SSD/HDD.

 

They way I ended up settling for mine was to just have the central MySQL database but store icons on each computer. Ran against my "prevent duplicate files" mentality but it proved far less of a headache and far less complexity.

 

Movies, view counts, pause on one system resume on another - all available.

 

One database, multiple systems.

 

But the HDD's will spin up when loading the thumbs for each computer. Which normally wouldn't be a problem, but i have 7 XBMC clients including the master.

 

Also do you just have the single profile on multiple computers.

 

Thats the official semi supported way. The way the OP is doing it is interesting but way way way unsupported.

 

It seem way complicated just to save on scanning for new content multiple times.

 

Also you can still share one central art repo. The problem is not locking it replacing.

 

I have sb and cp notify the master XBMC which then partial scans (only what it needs, usually the disk thats already spinning) and updates "a", so no computers other then the master do any scanning ever.

 

The master XBMC is set to also do a full update/clean once per day at 03:00, so it cleans out any deleted files and adds anything that might of accidentally been missed.

 

 

Its actually not that complex, when you break it down, I'm happy to share my blank .SQL files. So all that you would need to do is import them to a MySQL server and you can have up to 5 profiles (scanning only once) shared to as many XBMC clients as you wish.

 

Then all you need is a advancedsettings.xml file for each profile.

 

<advancedsettings>



  <videodatabase>

    <type>mysql</type>
    <host>10.0.0.51</host>
    <port>3306</port>
    <user>xbmc</user>
    <pass>xbmc</pass>
    <name>a</name>

  </videodatabase>



  <videolibrary>

    <dateadded>0</dateadded>
    <recentlyaddeditems>27</recentlyaddeditems>

  </videolibrary>



</advancedsettings>

 

Note: The videolibrary section is not necessary, it just makes the Aeon Nox skin latest movies (wall view) fill the page (27 items) and the 0 makes recently added items display in order of whats been scanned in most recently, rather then via release date.

 

P.S. the MySQL database is setup so you can update from "a", "b", "c", "d" or "e" and it updates all of them. So its not just limited to scanning with "a".

 

Everything works fine as it is, i would just like it to be even better. Saving disks from spinning up and also removing the delay of  loading thumbs would be great.

 

P.P.S this is how i make changes from the "a" profile mirror to the other profiles on garage and lounge clients. So that changes to skin settings, system settings are consistent between profiles locally.

2ll2268.jpg

Share this post


Link to post

I dont know if this helps you but,

 

if XBMC A and XBMC B share the same art folder it is unlikely there will be any locking issues. The only problem is that if XBMC A updates and gets new art, when XBMC is turned on it will update the local sqlite art table on boot (Eden) with date from the central mysql art table and download the missing art. Notice at no point does it check to see if the art exists on the filesystem i.e. the shared folder.

 

This results in the art being downloaded again and overwriting the existing file with a new likely identical copy.

 

Most of us reduce this inefficiency by using a proxy server and have abandoned shared central art as the old way of doing things.

 

Things will change again in the future when mysql is dropped.

Share this post


Link to post

With XBMC setup to hit against MySQL, you just need to only have one XBMC client (your master) do the scanning. On the others, disable the automatic scan at startup. Since they query the database, they'll pick up any changes automatically.

 

Runs pretty smoothly on my system. I don't even have the sources configured on the "client" systems, just on the master.

 

As for filtering certain files onto a given drive, I used Beyond Compare to only display jpg/nfo on disk1 on the left, the last drive in the array on the right (both viewing the Movies share), selected all left orphan files and then moved them to the right side. Repeat for each drive. You could create an UNRAID script to do all the steps for you in one shebang.

 

You will want to exclude the drive holding the images from the share to prevent against new files from being dropped onto it.

Share this post


Link to post

I think i might setup a proxy and step away from local thumbs and nfo files.

 

It seems to be the easiest/best way to stop the spin ups and delays.

 

Thanks for all of your input and help.

Share this post


Link to post

Update: I setup a non-transparent proxy with my existing ClearOS gateway and directed XBMC clients to use it. I have allocated it 10GB.

 

I deleted all local *.tbn, *.jpg and *.nfo files, wiped the MySQL databases, deleted my existing textures db, unshared Thumbnails directories and rescanned my content.

 

This seems to be working great so far, no pointless spin-ups.

Share this post


Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this