Android SQL and SMB Share
#1
Hi,

my setup is this:
All media files are stored on an NAS, accessible via SMB share.
The database is mysql, also on the NAS.
New media are inserted from one PC only, which has the NAS share folders as source. All other PCs get the database from mysql.
All PCs running XBMC can access the media share via the user's name/password.

Is it possible to enter/store a user/pw combo in the android version of XBMC to access the media share? (Remember, the android XBMC gets the file list via mysql, not directly via smb share)

thanks,
mike
Reply
#2
I have the same setup. I use the same XML files on my Ubuntu and Android devices. Advancedsettings, Mediasources and Sources all point to the NAS MySQL DB and Shares. Username and PW is in the XML.

Works great across all devices.

Cheers
Spart
6 x Raspberry Pi Model B & B+ Pi2 & 3 Zotac Mag Ubuntu 14.04.1 - Ubuntu 14.04.1 Test Machine Kodi Nightly - RocketNAS 8TB Usable Raid 6 Ubuntu 14.04.1 RocketNAS Build
Reply
#3
Spart,
thanks for the answer.

Do you have uname/pw for the db access or for the share access in the xml file?

Is your media share pw protected or does xbmc access as guest?

I got it to work after I opened the share for guests, but I would rather like to close it again and provide xbmc with a pw for the share.

mike
Reply
#4
Both! SQL acess is password protected and the shares are password protected.

See below hope this helps:

advancedsettings.xml

<advancedsettings>
<videoextensions>
<add>.html</add>
</videoextensions>
<videodatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>YOUR USER</user>
<pass>YOUR PASSWORD</pass>
</videodatabase>
<musicdatabase>
<type>mysql</type>
<host>xxx.xxx.xxx.xxx</host>
<port>3306</port>
<user>YOUR USER</user>
<pass>YOUR PASSWORD</pass>
</musicdatabase>
<importwatchedstate>true</importwatchedstate>
</advancedsettings>

mediasources.xml

<mediasources>
<network>
<location id="0">smb://username:password@SHARE/TV</location>
<location id="1">smb://username:password@SHARE/DVDS/</location>
<location id="2">smb://username:password@SHARE/Music/</location>
<location id="3">smb://username:password@SHARE/OTHER/</location>
</network>
</mediasources>

sources.xml

<sources>
<programs>
<default pathversion="1"></default>
</programs>
<video>
<default pathversion="1"></default>
<source>
<name>Recorded TV</name>
<path pathversion="1">smb://username:password@SHARE/TV/</path>
</source>
<source>
<name>DVDS</name>
<path pathversion="1">smb://username:password@SHARE/DVDS/</path>
</source>
</video>
<music>
<default pathversion="1"></default>
<source>
<name>Music</name>
<path pathversion="1">smb://username:password@SHARE/Music/</path>
</source>
</music>
<pictures>
<default pathversion="1"></default>
<source>
<name>Photos</name>
<path pathversion="1">smb://username:password@SHARE/Photos/</path>
</source>
</pictures>
<files>
<default pathversion="1"></default>
</files>
</sources>
6 x Raspberry Pi Model B & B+ Pi2 & 3 Zotac Mag Ubuntu 14.04.1 - Ubuntu 14.04.1 Test Machine Kodi Nightly - RocketNAS 8TB Usable Raid 6 Ubuntu 14.04.1 RocketNAS Build
Reply
#5
That looks great, I'll try that. Thanks heaps!
Reply
#6
You're welcome took me ages to get this to work initially. Now if I could only get someone to help me with the Frodo RC1 Android and MySql issues.........

Have fun
Spart
6 x Raspberry Pi Model B & B+ Pi2 & 3 Zotac Mag Ubuntu 14.04.1 - Ubuntu 14.04.1 Test Machine Kodi Nightly - RocketNAS 8TB Usable Raid 6 Ubuntu 14.04.1 RocketNAS Build
Reply

Logout Mark Read Team Forum Stats Members Help
SQL and SMB Share0