Kodi Community Forum

Full Version: HOW-TO:Share libraries using MySQL: Wiki Edition
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
(2014-03-03, 16:01)johnmerrick Wrote: [ -> ]thanks. I'll probably leave it on then as it was set to turn off after 20 mins idle.

I have watchdog enabled on all clients. i'm not sure if that's needed now?

I'd even say it's not wanted. If one of your clients updates the central database, all clients have access to the new data. If two clients update the same data at the same time, weird stuff could happen. Check the number of movies on your server and compare it to the ones in xbmc. If there's a difference, try the MissingMovies add-on to see if any movies are not scanned. Don't use MySQL for music, can't help you there. Different share for a-d? Check if you have access to it from all clients.
No the music is all on the same share folder. A-D have vanished.

is there a way to start again? i have my original db's backed up.
Ok my music is reappearing now after using 'scan item to library'. Struggling to get music thumbnails working correctly in a client. They are not appearing at all.
With the thumbnails folder on my main xbmc pc being linked to media on network paths due to msql being used, can i just copy that thumbnail folder to my client pc userdata folders?

i'm having issues with music thumbnails on the clients and some movie posters but none on the main pc.
Yes, as long as the client is using the exact same sources. You'll also want to copy the Textures13.db file too.

If you want to find out why some thumbnails are not showing on specific clients (and also force them to be cached), the script in my sig might help you.

i have been using your script today and although it has downloaded many files etc it isn't downloading any music thumbs at all. i'm getting errors (in the cmd window) but i can't see what they are (is there a log file?)

what is the best command for finding errors in the music thumbs?

just realised that the sources are not identical as the one of the clients has separate photo libraries etc.
(2014-03-04, 18:43)johnmerrick Wrote: [ -> ]i have been using your script today and although it has downloaded many files etc it isn't downloading any music thumbs at all. i'm getting errors (in the cmd window) but i can't see what they are (is there a log file?)

There can be a log file, which you enable with the @logfile=filename property, however all the script is doing is requesting XBMC to download the files, so if there is an error downloading it's likely to be recorded in the xbmc.log.

If you're having problems downloading/caching artwork, check your network connection. If the problem artwork is remote (http urls), check your internet connection, and then check if the artwork is still available/accessible - the problem with using internet-based artwork is that it quite often disappears once it has been scraped into a library, so that when you come to view it on another client the original artwork is no longer available to be cached, and you get download errors (or in the XBMC GUI, no image).

(2014-03-04, 18:43)johnmerrick Wrote: [ -> ]what is the best command for finding errors in the music thumbs?

"c audio" would cache albums+artists+songs that aren't already cached.

If you want to "force" artwork for a specific artist to be re-cached, try "C artist artistname".

You can of course also try "C audio" which will forcibly re-cache (remove from the cache, then re-download) ALL your albums/artists/songs artwork, but that's a bit of a sledgehammer approach. If you just want to delete a specific cached artwork item, try searching for it using "s partial-url-pattern" then delete it using "d #" where # is the rowid - this will remove the database row from Textures13.db and the file from the Thumbnails folder.

(2014-03-04, 18:43)johnmerrick Wrote: [ -> ]just realised that the sources are not identical as the one of the clients has separate photo libraries etc.
You can probably still copy Thumbnails and Textures13.db in that case.
Many thanks for these replies.

if i try C music i get the following log file (v short scan)

Sorry, it's "C audio" not music (it used to be music at one point). Original post updated with correction.
I now have my clients thumbnails folders all syncing with the main thumbnails folder using syncbackpro.

i can't sync the textures.db though because it's locked (in use with xbmc)

no trying again with the script. now trying lc audio. the texture db updates i can see the change in the timestamp but can't see any change in xbmc yet. the network connections are all fine.

can you give me any extra hints about what should be in the cfg file apart from the usual fields?
You shouldn't need anything in the config file to perform a basic re-caching operation on the local client, though it would take a long time to explain every setting - you'll need to review the thread (or changelog on github, which tries to mention each option as they're introduced and should give an idea of their purpose).

If you are missing artwork in the GUI, I would search Textures13.db for the url (ie. the path) of the missing artwork to see if the artwork has been successfully cached and is present in the Thumbnails folder. If the file is there, I really can't explain why it wouldn't be appearing in the GUI, if it's not there in the database or folder then you'll need to try and (force) cache it and check xbmc.log for errors which may explain why it's not being successfully cached.

Note that "lc" is to cache artwork for movies or tvshows added since the modification timestamp of the file specified as the "lastrunfile" property - it will have no effect on audio, you'll just process everything.
I have posted a very small texturecache log file which shows errors only when trying to scan in new albums only. The top half is the errors and at the bottom is the regular scans of existing albums etc. The artist to keep an eye on is 'the war on drugs' (they are a band, don't be alarmed!)


sorry i meant this scan is lc audio which has scanned the whole audio library but the errors are only in new albums. the existing albums have all of their artwork because i synced the thumb directories and copied the textures db over. if i scanned the whole library then no images would be cached.

edit: also a very small debug log for when it tries to load an image from an album that's just been added:

So your XBMC client has a problem accessing the path "G:\Music\The War On Drugs\Future Weather (2010)\cover.jpg"

Have you checked the xbmc.log to see what the actual error is? Is your XBMC able to access this G:\ drive? Does this file exist?

Like I said, it's your XBMC that is performing the actual download - the script is only telling XBMC to perform the download, the script isn't performing the download itself, and unfortunately it isn't able to show why the download isn't possible - for that you need to check your xbmc.log.

Since this thread is about synchronising multiple clients, my guess is that the G:\ drive is not accessible to your XBMC client, as you should be using network paths (smb://, nfs://) when sharing media (and artwork) between multiple clients.

To see the details of the above album (Future Weather, by War on Drugs), run:
texturecache.py jd albums "future weather"
and you should see that all the artwork urls are pointing at your G:\ drive. This means that this album (and others like it) has been scraped incorrectly, and will need to be removed and re-scrapped so that it uses network shares.

If you also look at the songs on the album (jd songs <songname>, although in the next update of the script you will be able to view songs within each album by enabling @songmembers=yes when running "jd albums <albumname>"), you will see that the songs are also located on the inaccessible G:\ drive, so you probably can't play these songs either.
right i think you may have cracked it.

When i rebuilt my xbmc on my main pc for use with msql, i entered all the media sources as network shares but not the music source. I used the local path by mistake. Then i copied the sources file to each client pc.

i'm pretty certain this is the route of my problem here. once you mentioned g:/ then that was it. i knew the sources file was wrong.

apologies for this but hopefully we can view it as a 'solved' case!

will update soon.


yes I apologise that i made this error it's all working seemless now. just need to configure smb sharing on an openelec device.

thanks for your help and patience Millhouse!
I've googled and read and googled and read some more but I still can't get this to work:

Kitchen pc stores all music, tv, movies etc. and runs Ubuntu 13.10. All shares are via nfs.

I installed mysql-server on the kitchen pc and followed this link which is damned close to the wiki which I found after .... added xbmc user in mysql and created xbmc_video and xbmc_music databases and granted xbmc ALL.

CREATE database xbmc_video;
CREATE database xbmc_music;
GRANT ALL ON *.* TO 'xbmc';

And restarted mysql

Note that I have tried my.cnf set with bind_address as (kitchen pc) and and commented out and all gives the same result.

I updated advancedsettings.xml on each of my machines and when I go to TV or Movies link and try "Set content" I can run through the gui and yet it doesn't "take" ie if I select the link then I have the "set content" option again but it hasn't been set to TV or Movies .......


And restarted each machine.

I reset advancedsettings.xml back to what it was prior and I still can't set the content which seems rather bizarre as now I should be using local libraries and not via mysql to the kitchen pc.

Where the fur do I start looking?

I don't want to dump a ton of stuff here but am quite happy to take pointers on where to look.

Cheers, Duncan
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40