Shared Library (MySQL) and Fanart/Thumbnails
#1
Hi there,

I have several XBMC Machines in my House and i try to archive a shared movie library via mysql and shared fanart/thumbnails. I had no problem setting up MySQL and have my video database exported and re-imported into mysql, also all XBMC machines see the database, movie-seen flag and so on but i'm struggeling on getting fanart/thumbnails on every device. I read a lot and it was stated that since Frodo release i don't need to substitue folder's and stuff, sync of media is beeing managed by XBMC itself?!

Is that correct?

If so, i don't really get that to work. I would want to have my database global and have every machine download and cache it's own media, which seems to be the preferred method, but i don't know how. If i export my database into a single file, i can re-import this into my XBMC and this data is now stored into my MySQL database, but then i have no thumbnails/fanart on any other machine than the one i exported everything (since there's a local "Thumbnails" folder and a "Texture13.db").

One way would be to export everything into seperate files first, which creates .nfo files in every media folder and then export it into a single file to have something to import into MySQL afterwards, but this leaves the question, if i now add a new movie or tvshow, is the corresponding .nfo file created automatically or would i need to create this one by myself and/or export the database into seperate files again?

Maybe someone could shed a light on the preferred method if i want ONE global MySQL Database and have every machine load it's own cached media data.

regards,

Markus
Reply
#2
Entries in the video DB include a URL to download artwork in case it is missing or is being accessed by an additional XBMC/Kodi "client". Even when there is no local image file, XBMC can just use the URL from the database and download a fresh copy over the internet.
Reply
#3
Oh well, mark that one as solved. The only missing part, which is not clearly stated in the wiki, is to re-scan the whole library AFTER the import to mysql. After that the corresponding mysql table is filled with URL's and not local media path's. The strange part is, when importing the library to mysql the FIRST TIME all path's direct to the folder where the library was exported before,
Reply
#4
Did you use "single-file" export? It should only point to the exported folder when using single-file export, which is a weird quirk since v12 or v13.
Reply
#5
Yes i did use single-file export, but also tried separate. Separate just creates many .nfo files in my network shares, but no file to re-import into MySQL, single creates a "dump" which i can import to XBMC again while having the MySQL stuff set in advancedsettings.xml, which is what i need. It's all a bit confusing, step's to have multiple-xbmc's with ONE Video Database in MySQL while having each xbmc instance downloading the media in it's own cache is not clearly explained. Basically you can export your existing database, set up mysql, set up xbmc to use this mysql instance, re-initiate your complete library again so that url's instead of file path's are used to point to the media needed (thumbs, fanart etc). But this leads to one conclusion, just setup mysql, configure xbmc to use it, then re-initiate your library on ONE XBMC INSTANCE, no need to export the library in first place, since you do the same work twice then. After that just set up each xbmc to use mysql, delete local thumbnails folder and texture13.db, that's it.
Reply
#6
(2014-10-23, 19:48)neutron666 Wrote: Yes i did use single-file export, but also tried separate. Separate just creates many .nfo files in my network shares, but no file to re-import into MySQL, single creates a "dump" which i can import to XBMC again while having the MySQL stuff set in advancedsettings.xml, which is what i need. It's all a bit confusing, step's to have multiple-xbmc's with ONE Video Database in MySQL while having each xbmc instance downloading the media in it's own cache is not clearly explained. Basically you can export your existing database, set up mysql, set up xbmc to use this mysql instance, re-initiate your complete library again so that url's instead of file path's are used to point to the media needed (thumbs, fanart etc). But this leads to one conclusion, just setup mysql, configure xbmc to use it, then re-initiate your library on ONE XBMC INSTANCE, no need to export the library in first place, since you do the same work twice then. After that just set up each xbmc to use mysql, delete local thumbnails folder and texture13.db, that's it.

The import/export is in place I believe to prevent duplication when changing an existing local setup to a mysql setup and to allow for a quicker migration instead of having to re-scrape everything. Once your library is scraped on one system every other system will have the same library the moment you apply the correct changes to each system's advancedsettings.xml, no other steps are needed.
Reply
#7
(2014-10-23, 19:48)neutron666 Wrote: Yes i did use single-file export, but also tried separate. Separate just creates many .nfo files in my network shares, but no file to re-import into MySQL, single creates a "dump" which i can import to XBMC again while having the MySQL stuff set in advancedsettings.xml, which is what i need. It's all a bit confusing, step's to have multiple-xbmc's with ONE Video Database in MySQL while having each xbmc instance downloading the media in it's own cache is not clearly explained. Basically you can export your existing database, set up mysql, set up xbmc to use this mysql instance, re-initiate your complete library again so that url's instead of file path's are used to point to the media needed (thumbs, fanart etc). But this leads to one conclusion, just setup mysql, configure xbmc to use it, then re-initiate your library on ONE XBMC INSTANCE, no need to export the library in first place, since you do the same work twice then. After that just set up each xbmc to use mysql, delete local thumbnails folder and texture13.db, that's it.

Yep, that would be why we have the big yellow note under that step that points out exporting/importing isn't always necessary :)

http://kodi.wiki/view/MySQL/Setting_up_XBMC#Exporting
Reply
#8
(2014-10-23, 19:57)azrael17 Wrote:
(2014-10-23, 19:48)neutron666 Wrote: Yes i did use single-file export, but also tried separate. Separate just creates many .nfo files in my network shares, but no file to re-import into MySQL, single creates a "dump" which i can import to XBMC again while having the MySQL stuff set in advancedsettings.xml, which is what i need. It's all a bit confusing, step's to have multiple-xbmc's with ONE Video Database in MySQL while having each xbmc instance downloading the media in it's own cache is not clearly explained. Basically you can export your existing database, set up mysql, set up xbmc to use this mysql instance, re-initiate your complete library again so that url's instead of file path's are used to point to the media needed (thumbs, fanart etc). But this leads to one conclusion, just setup mysql, configure xbmc to use it, then re-initiate your library on ONE XBMC INSTANCE, no need to export the library in first place, since you do the same work twice then. After that just set up each xbmc to use mysql, delete local thumbnails folder and texture13.db, that's it.

The import/export is in place I believe to prevent duplication when changing an existing local setup to a mysql setup and to allow for a quicker migration instead of having to re-scrape everything. Once your library is scraped on one system every other system will have the same library the moment you apply the correct changes to each system's advancedsettings.xml, no other steps are needed.

(2014-10-24, 00:07)Ned Scott Wrote:
(2014-10-23, 19:48)neutron666 Wrote: Yes i did use single-file export, but also tried separate. Separate just creates many .nfo files in my network shares, but no file to re-import into MySQL, single creates a "dump" which i can import to XBMC again while having the MySQL stuff set in advancedsettings.xml, which is what i need. It's all a bit confusing, step's to have multiple-xbmc's with ONE Video Database in MySQL while having each xbmc instance downloading the media in it's own cache is not clearly explained. Basically you can export your existing database, set up mysql, set up xbmc to use this mysql instance, re-initiate your complete library again so that url's instead of file path's are used to point to the media needed (thumbs, fanart etc). But this leads to one conclusion, just setup mysql, configure xbmc to use it, then re-initiate your library on ONE XBMC INSTANCE, no need to export the library in first place, since you do the same work twice then. After that just set up each xbmc to use mysql, delete local thumbnails folder and texture13.db, that's it.

Yep, that would be why we have the big yellow note under that step that points out exporting/importing isn't always necessary Smile

http://kodi.wiki/view/MySQL/Setting_up_XBMC#Exporting

I would still need to maintain one Thumbnails folder and a texture13.db on the master client correct? I can not delete all of the instances?
Reply
#9
No. Every XBMC/Kodi install has its own thumbnails folder and DB file.
Reply
#10
(2015-02-17, 02:30)Ned Scott Wrote: No. Every XBMC/Kodi install has its own thumbnails folder and DB file.

If each client needs a thumbnails folder and DB file. Then what files where you referring to in your post to delete?
Reply
#11
I've been trying to do the same thing now for a while now.
Doing it on Windows is easy. ALL media info comes from the DB and ALL artwork comes form the shared network folder.
If I look at the thumbnail directories on my windows clients. The artwork folders are empty. (exactly what I want)

I cannot however got this to work on my KodiBuntu boxes (which is what I want)
I can get the Kodi to connect and use the MySQL db but I cannot get it to use the Network path for the artwork.

I would love a set of step by step directions for this.(which I simply cannot find)
I don't want all my client storing all the artwork. Especially since I want to start experimenting with Raspberry Pi 2.

Based on what I see on forums... This is getting more and more popular.
I'd love to see development spend the time and do this right.

I'm not a Linux guy... and its getting painful.
But I would not use Windows on any of my dedicated HTPC boxes.
Laptops... thats a different story.

Chris
Reply
#12
(2015-02-17, 14:54)apw63 Wrote: If each client needs a thumbnails folder and DB file. Then what files where you referring to in your post to delete?

Each client should have their own Thumbnails folder and a texture13.db inside its respective userdata directory. You should have neither on your MySQL server.
Reply
#13
(2015-02-17, 14:54)apw63 Wrote:
(2015-02-17, 02:30)Ned Scott Wrote: No. Every XBMC/Kodi install has its own thumbnails folder and DB file.

If each client needs a thumbnails folder and DB file. Then what files where you referring to in your post to delete?

That is referring to importing/reading from a "single-file" Kodi backup (technically it's several files). It only applies to people who are trying to import their old library using that method, which is not recommended. If you follow the wiki's instructions then you don't need to worry about it at all.
Reply
#14
I have a question along the same lines. How can I force each client to go through the library and download artwork to it's local cache? Right now it downloads automatically when I select a show/movie, but I'd like a way that everything is already cached.
Reply
#15
Take a look at this:
http://forum.kodi.tv/showthread.php?tid=...xturecache
Bye,
Fry
Kodi v17.6 with shared MariaDB v10.3 | HTS Tvheadend 4.2.6 on RPi2 | running on:
Windows 10x64 | Nvidia Shield | FireTV4k | FireTVStick4 | Android 5 | RPi3 with OSMC
Reply

Logout Mark Read Team Forum Stats Members Help
Shared Library (MySQL) and Fanart/Thumbnails0