Forum
  • Search
  • Member List
  • Calendar
Hello There, Guest! Login Register — Login with Facebook

[Tutorial] Shared Library / Shared Sources
Thank you for your donation

Pages (2): 1 2 Next »
Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Threaded Mode | Linear Mode
[Tutorial] Shared Library / Shared Sources
3rd Jan, 2013, 04:03 AM
Post: #1
brantje Offline
Tester
Posts: 305
Joined: Dec 2012
Reputation: 32
[Tutorial] Shared Library / Shared Sources
I made this on the git wiki, but maybe is handy to have it on the forum wiki as well.

http://wiki.xbian.org/index.php?title=Shared_Sources

Any questions, feel free to ask.

XBian Skin Beta Testing
Clock Screensaver

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
4th Jan, 2013, 10:08 AM
Post: #2
CurlyMo Offline
Registered
Posts: 3,501
Joined: Dec 2012
Reputation: 202
RE: [Tutorial] Shared Library / Shared Sources
I miss the shared thumbnail storage Smile

pilight - modular domotica solution
Visit this user's website Find all posts by this user
Quote this message in a reply
21st May, 2013, 01:19 AM
Post: #3
Smiggel Offline
Registered
Posts: 22
Joined: Feb 2013
Reputation: 1
RE: [Tutorial] Shared Library / Shared Sources
Why does Xbian not use the default table names xbmc_video and xbmc_music? I followed this (http://ozymandyaz.blogspot.nl/2011/08/configure-synology-nas-as-mysql-server.html) tutorial, but somehow see that Xbian makes it's own table names.
Find all posts by this user
Quote this message in a reply
21st May, 2013, 03:59 AM
Post: #4
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: [Tutorial] Shared Library / Shared Sources
(21st May, 2013 01:19 AM)Smiggel Wrote:  Why does Xbian not use the default table names xbmc_video and xbmc_music? I followed this (http://ozymandyaz.blogspot.nl/2011/08/configure-synology-nas-as-mysql-server.html) tutorial, but somehow see that Xbian makes it's own table names.

"Sorry, the page you were looking for in this blog does not exist."

xbmc_video and xbmc_music is not standard. look point 5.

http://wiki.xbmc.org/index.php?title=HOW-TO:Share_libraries_using_MySQL/Advanced_notes

anytime you can override the names in advancedsettings.xml like this (xbmc will ALWAYS add version number (of the DB template, not XBMC version) as suffix):

<videodatabase>
<type>mysql</type>
<host>xbmcdb.private</host>
<port>3306</port>
<user>USERNAME</user>
<pass>PASSWORD</pass>
<name>xbmc_MyVideos</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xbmcdb.private</host>
<port>3306</port>
<user>USERNAME</user>
<pass>PASSWORD</pass>
<name>xbmc_MyMusic</name>
</musicdatabase>

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
27th May, 2013, 11:44 AM
Post: #5
MM3 Offline
Registered
Posts: 9
Joined: May 2013
Reputation: 0
RE: [Tutorial] Shared Library / Shared Sources
Sorry for the noob question, but could you provide a step by step on how to copy over a advancedsettings to the pi. I have the rest setup as I have several different Macs using a shared resource of my synology NAS, but would like to know what is the easiest way to copy over my sources.xml and advancedsettings.xml files from one of my macs to the pi. I assume this can be done in terminal via ssh? Any help would be appreciated.
Find all posts by this user
Quote this message in a reply
27th May, 2013, 05:16 PM
Post: #6
Smiggel Offline
Registered
Posts: 22
Joined: Feb 2013
Reputation: 1
RE: [Tutorial] Shared Library / Shared Sources
(21st May, 2013 03:59 AM)mk01 Wrote:  
(21st May, 2013 01:19 AM)Smiggel Wrote:  Why does Xbian not use the default table names xbmc_video and xbmc_music? I followed this (http://ozymandyaz.blogspot.nl/2011/08/configure-synology-nas-as-mysql-server.html) tutorial, but somehow see that Xbian makes it's own table names.

"Sorry, the page you were looking for in this blog does not exist."

xbmc_video and xbmc_music is not standard. look point 5.

http://wiki.xbmc.org/index.php?title=HOW-TO:Share_libraries_using_MySQL/Advanced_notes

anytime you can override the names in advancedsettings.xml like this (xbmc will ALWAYS add version number (of the DB template, not XBMC version) as suffix):

<videodatabase>
<type>mysql</type>
<host>xbmcdb.private</host>
<port>3306</port>
<user>USERNAME</user>
<pass>PASSWORD</pass>
<name>xbmc_MyVideos</name>
</videodatabase>

<musicdatabase>
<type>mysql</type>
<host>xbmcdb.private</host>
<port>3306</port>
<user>USERNAME</user>
<pass>PASSWORD</pass>
<name>xbmc_MyMusic</name>
</musicdatabase>

Ah ok. :-) Thanks.

(27th May, 2013 11:44 AM)MM3 Wrote:  Sorry for the noob question, but could you provide a step by step on how to copy over a advancedsettings to the pi. I have the rest setup as I have several different Macs using a shared resource of my synology NAS, but would like to know what is the easiest way to copy over my sources.xml and advancedsettings.xml files from one of my macs to the pi. I assume this can be done in terminal via ssh? Any help would be appreciated.

You can use the terminal to make a new file. SSH into the PI and browse to the folder where the file is stored. Use nano advancedsettings.xml to open the file in nano and you can edit it from there.
Find all posts by this user
Quote this message in a reply
27th May, 2013, 10:46 PM
Post: #7
MM3 Offline
Registered
Posts: 9
Joined: May 2013
Reputation: 0
RE: [Tutorial] Shared Library / Shared Sources
(27th May, 2013 05:16 PM)Smiggel Wrote:  You can use the terminal to make a new file. SSH into the PI and browse to the folder where the file is stored. Use nano advancedsettings.xml to open the file in nano and you can edit it from there.

Thanks that did the trick. Never used nano before, but it was pretty simple in the end.

edit: For others following if you enable smb add-on on the xbian pi via terminal this then allows you to use finder or pathfinder (hidden file view must be enabled) on Mac to easily browse and edit the required files, without having to use terminal...
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 05:14 AM
Post: #8
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: [Tutorial] Shared Library / Shared Sources
(27th May, 2013 10:46 PM)MM3 Wrote:  
(27th May, 2013 05:16 PM)Smiggel Wrote:  You can use the terminal to make a new file. SSH into the PI and browse to the folder where the file is stored. Use nano advancedsettings.xml to open the file in nano and you can edit it from there.

Thanks that did the trick. Never used nano before, but it was pretty simple in the end.

special bonus:
- put mediasources.xml and sources.xml on the NAS
- edit advanced.....xml on each Mac and RPi

put
Code:
<pathsubstitution>
<substitute>
    <from>special://masterprofile/sources.xml</from>
    <to>/Network/Servers/media.private/xbmc/userdata/sources.xml</to>
</substitute>
<substitute>
    <from>special://masterprofile/mediasources.xml</from>
    <to>/Network/Servers/media.private/xbmc/userdata/mediasources.xml</to>
</substitute>
</pathsubstitution>

and you have shared sources instantly available everywhere. you can do the same with favorites.xml

the <to>...</to> can be regular folder (I have nfs mounted central xbmc setting folder on each machine), but it can be "nfs://" , "smb://" anything what xbmc understands.

mk

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 04:28 PM
Post: #9
MM3 Offline
Registered
Posts: 9
Joined: May 2013
Reputation: 0
RE: [Tutorial] Shared Library / Shared Sources
(2nd Jun, 2013 05:14 AM)mk01 Wrote:  [quote]

special bonus:
- put mediasources.xml and sources.xml on the NAS
- edit advanced.....xml on each Mac and RPi

put
Code:
<pathsubstitution>
<substitute>
    <from>special://masterprofile/sources.xml</from>
    <to>/Network/Servers/media.private/xbmc/userdata/sources.xml</to>
</substitute>
<substitute>
    <from>special://masterprofile/mediasources.xml</from>
    <to>/Network/Servers/media.private/xbmc/userdata/mediasources.xml</to>
</substitute>
</pathsubstitution>

and you have shared sources instantly available everywhere. you can do the same with favorites.xml

the <to>...</to> can be regular folder (I have nfs mounted central xbmc setting folder on each machine), but it can be "nfs://" , "smb://" anything what xbmc understands.

mk

What are the advantages of doing this way? Is there any code that goes within mediasources.xml file?
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 05:08 PM
Post: #10
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: [Tutorial] Shared Library / Shared Sources
(2nd Jun, 2013 04:28 PM)MM3 Wrote:  What are the advantages of doing this way? Is there any code that goes within mediasources.xml file?

you media sources (and changes in scrappers settings defined on those sources) always read from the central location, updated as well only there.

it's like the shared db, you can add a source / favorite on any xbmc and you will see it on all other installations of xbmc and vice versa.

the path substitution means the files are not going to be copied to local machine. they are shared from the one location.

it's also possible to share add-ons settings this way. as soon as you install new add-on which already you have configured on other pc / atv / rpi, the add-on will work with the global shared setting. with more xbmc installations you don't have to walk always around the house to update & configure each installation.

(and in case of crash/reinstall you just install clean xbmc, the same set of modules and all other is taken from central location, so in few seconds you have the same media as before)

mk

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 09:26 PM
Post: #11
brantje Offline
Tester
Posts: 305
Joined: Dec 2012
Reputation: 32
RE: [Tutorial] Shared Library / Shared Sources
I still have to lookup, how i can share addons arcoss xbmc's

XBian Skin Beta Testing
Clock Screensaver

If you liked my help, click on "Thanks" to show your appreciation.
Find all posts by this user
Quote this message in a reply
2nd Jun, 2013, 10:01 PM
Post: #12
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: [Tutorial] Shared Library / Shared Sources
(2nd Jun, 2013 09:26 PM)brantje Wrote:  I still have to lookup, how i can share addons arcoss xbmc's

this is bit tricky. method how to achieve is the same - path substitution - or mount to xbmcs addon directory.

normally, Thumbnails, add-on_data, mediasources and sources works with no issues. With addon scripts you can run into troubles from two reasons:

1) different versions and dependencies according to installed xbmc
2) the fact, that xbmc keeps addons physically in add ons folder, but informations about them in Databases/Addons.db. This db can't be moved to shared SQL and sqlite provides no locking/sharing mechanism.

so by substituting addon path (or centrally mounting it) you will not make your xbmc installation be aware of the addons. there needs to be related record in Databases/Addons.db sqlite db. and to this, you are not able to provide shared access (if you start more than xbmc at a time).

so once again, music and video library can be central "shared", thumbnails folder, addon_data, sources.xml, mediasources.xml, favorites.

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
3rd Jun, 2013, 07:13 PM
Post: #13
MM3 Offline
Registered
Posts: 9
Joined: May 2013
Reputation: 0
RE: [Tutorial] Shared Library / Shared Sources
(2nd Jun, 2013 05:08 PM)mk01 Wrote:  
(2nd Jun, 2013 04:28 PM)MM3 Wrote:  What are the advantages of doing this way? Is there any code that goes within mediasources.xml file?

you media sources (and changes in scrappers settings defined on those sources) always read from the central location, updated as well only there.

it's like the shared db, you can add a source / favorite on any xbmc and you will see it on all other installations of xbmc and vice versa.

the path substitution means the files are not going to be copied to local machine. they are shared from the one location.

it's also possible to share add-ons settings this way. as soon as you install new add-on which already you have configured on other pc / atv / rpi, the add-on will work with the global shared setting. with more xbmc installations you don't have to walk always around the house to update & configure each installation.

(and in case of crash/reinstall you just install clean xbmc, the same set of modules and all other is taken from central location, so in few seconds you have the same media as before)

mk

Ok, I am convinced. So can you described the steps for not so literate? Is it something like this:

1. Create mediasources.xml file. I'm not sure of its contents? Or is it a blank file that xbmc will write to? Place that file on my NAS, say in my media share/directory in a directory I created called 'xbmcdata'.
2. Do the same for the sources.xml - again is this file blank and will be written to when set up on one of the xbmc's? Or is the contents of the sources folder the same as it is now - pointing to the correct share/directories?
3. Edit the advancedsettings.xml file on each machine by adding the above code, eg, (from my Pi):

Code:
<advancedsettings>
<videodatabase>
        <type>mysql</type>
        <host>10.0.0.5</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </videodatabase>

<musicdatabase>
        <type>mysql</type>
        <host>10.0.0.5</host>
        <port>3306</port>
        <user>xbmc</user>
        <pass>xbmc</pass>
    </musicdatabase>

     <videolibrary>
          <importwatchedstate>true</importwatchedstate>
     </videolibrary>

<pathsubstitution>
<substitute>
    <from>special://masterprofile/sources.xml</from>
    <to>smb://10.0.0.5/Media/xbmcdata/sources.xml</to>
</substitute>
<substitute>
    <from>special://masterprofile/mediasources.xml</from>
    <to>smb://10.0.0.5/Media/xbmcdata/mediasources.xml</to>
</substitute>
</pathsubstitution>

<network>
        <cachemembuffersize>20971520</cachemembuffersize>
   </network>
   <fanartres>540</fanartres>
   <imageres>256</imageres>
   <gputempcommand>echo "$(/opt/vc/bin/vcgencmd measure_temp | grep -o "[0-9]\{2\}") C"</gputempcommand>
   <cputempcommand>echo "$(/opt/vc/bin/vcgencmd measure_temp | grep -o "[0-9]\{2\}") C"</cputempcommand>
   <lookandfeel>
        <webserver>true</webserver>
        <guires>720</guires>
   </lookandfeel>
   <bginfoloadermaxthreads>2</bginfoloadermaxthreads>
   <video>
     <adjustrefreshrate>  
       <override>
         <fps>23.976</fps>
         <refresh>24.0</refresh>
       </override>
     </adjustrefreshrate>
   </video>
</advancedsettings>

4. Do the same for each machine - Mac, RPi, Apple TV, omitting the RPi specific stuff in the advancesettings.xml file.

Is that about right?

Thanks in advance.
Find all posts by this user
Quote this message in a reply
3rd Jun, 2013, 08:15 PM
Post: #14
mk01 Offline
Registered
Posts: 2,485
Joined: Mar 2013
Reputation: 209
RE: [Tutorial] Shared Library / Shared Sources
yes !

Wink

only that from the file you posted is 1/2 RPi relevant Wink

Please read rules and do a search before you post! . FAQs . How to post log file? . Looking for answers? Please start here
Find all posts by this user
Quote this message in a reply
3rd Jun, 2013, 10:45 PM
Post: #15
MM3 Offline
Registered
Posts: 9
Joined: May 2013
Reputation: 0
RE: [Tutorial] Shared Library / Shared Sources
Thanks. Got something right for a change Cool

Which bit is not Pi relevant? The files on my other machines don't have the network, video, gpu, cpu, refreshrate, fanart or imageres code. I though those portions came from the standard xbian instal of this file?

Edit: are the sources and mediasources files I place on the NAS blank until they are populated by xbmc?

cheers
Find all posts by this user
Quote this message in a reply
« Next Oldest | Next Newest »
Pages (2): 1 2 Next »
Post Reply 


Possibly Related Threads...
Thread: Author Replies Views: Last Post
Question [SOLVED] XMBC doesn't start automatically with nfs shared configured Lukeid 11 34,565 24th Mar, 2014 10:55 AM
Last Post: mk01
  Shared Library ilgrank 5 19,784 19th Jul, 2013 04:13 AM
Last Post: ilgrank
  Multiple Pi with shared library Calp87 1 7,393 19th May, 2013 07:58 PM
Last Post: rikardo1979
  [PROBLEM] can't access a shared folder on my laptop(windows 8) xhuntrkillerx 4 16,831 3rd May, 2013 01:40 AM
Last Post: xhuntrkillerx
  [PROBLEM] Can't see shared folders with Win7 Muertomatao 4 14,800 19th Mar, 2013 04:12 AM
Last Post: Muertomatao

  • View a Printable Version
  • Send this Thread to a Friend
  • Subscribe to this thread
Forum Jump:

Current time: 10th May, 2025, 06:53 AM Powered By MyBB, © 2002-2025 MyBB Group.