MySQL sync not working with SMB link and user // pass
#1
Hi all,

I have a PC running XBMC (on windows) and a raspberry pi (on raspbmc). I have a nas with mysql and I have created an advancesettings.xml file on both installs.

I have done also the pathsubstitution for the video share and the username and password is entered in this xml file for the smb share for both devices.

The problem I have is that when the PC enters all the movies I have in the mysql database it is entering the link as smb://ip.address/movie/xxx.avi. Then on the raspberry pi, because it doesn't see the username password, it thinks it is not there because my smb server refuses guest.

Is there a way to say in xbmc that for the ip address of my smb share drive, it needs to use a specific credential or is it possible that the link it enters in the mysql database includes the username password?

Thanks for your help,

John.
Reply
#2
Advancedsettings should have the location of your mysql database and the login for mysql.

Sources.xml should include the username and password (obviously!)
Code:
smb://USERNAME:PASSWORD@NAS/share/videos/

If you think setting up two sources the same is a hassle you could use path substitution to point to a general sources.xml (still needs a password in it though).
IMHO when only using two XBMC machines it is more work setting up path substitution than just adding a source on both sides Smile

If I misunderstood, please post your advancedsettings.xml here
Reply
#3
Hi, thanks for the reply but that is something i have already done. the thing is that when i click on a movie it says it can t find it. And when i check the information about the movie in the db, i see the path to the movie doesn t include the user pass of the share drive. I think it is workin in windows because i have recorded the user pass of the share in windows already but i don t know how to do that in raspbmc.

Hope it is better explained.

Thanks,

John.
Reply
#4
Hi
I'm using a NAS like you and all is working fine using this on sources.xml

<video>
<default pathversion="1"></default>
<source>
<name>Movies</name>
<path pathversion="1">smb://xbmc:xbmcxbmc@Sharecenter/Movies/</path>
</source>
</video>

Perharps you can get more clues using the advanced logging.
Also, have you tried the credentials from Windows?
Reply
#5
John, please just post your advancedsettings and sources.xml so we can have a look
Reply
#6
Hi all,

Thanks for the help so far. Here is the content of my 2 files:
sources.xml
<sources>
<programs>
<default pathversion="1"></default>
</programs>
<video>
<default pathversion="1"></default>
<source>
<name>Anime Enfants</name>
<path pathversion="1">smb://xbmc:[email protected]/Anime/</path>
</source>
<source>
<name>Films</name>
<path pathversion="1">smb://xbmc:[email protected]/Films/</path>
<lockmode>1</lockmode>
<lockcode>81dc9bdb52d04dc20036dbd8313ed055</lockcode>
<badpwdcount>0</badpwdcount>
</source>
<source>
<name>Series</name>
<path pathversion="1">smb://xbmc:[email protected]/Series/</path>
<lockmode>1</lockmode>
<lockcode>81dc9bdb52d04dc20036dbd8313ed055</lockcode>
<badpwdcount>0</badpwdcount>
</source>
<source>
<name>Manga</name>
<path pathversion="1">smb://xbmc:[email protected]/Manga/</path>
<lockmode>1</lockmode>
<lockcode>81dc9bdb52d04dc20036dbd8313ed055</lockcode>
<badpwdcount>0</badpwdcount>
</source>
<source>
<name>Films famille</name>
<path pathversion="1">smb://xbmc:[email protected]/Video/Jiajia/Films finished/</path>
</source>
</video>
<music>
<default pathversion="1"></default>
<source>
<name>Music</name>
<path pathversion="1">smb://xbmc:[email protected]/music/</path>
</source>
</music>
<pictures>
<default pathversion="1"></default>
</pictures>
<files>
<default pathversion="1"></default>
</files>
</sources>


advancedsettings.xml
<advancedsettings>
<videodatabase>
<type>mysql</type>
<host>10.0.0.100</host>
<port>3306</port>
<user>xbmc</user>
<pass>xbox123</pass>
</videodatabase>

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

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

<pathsubstitution>
<substitute>
<from>special://profile/playlists/</from>
<to>SMB://xbmc:[email protected]/xbmc/playlists/</to>
</substitute>
<substitute>
<from>special://profile/keymaps/</from>
<to>SMB://xbmc:[email protected]/xbmc/keymaps/</to>
</substitute>
<substitute>
<from>special://profile/sources.xml</from>
<to>SMB://xbmc:[email protected]/xbmc/sources.xml</to>
</substitute>
<substitute>
<from>special://profile/favourites.xml</from>
<to>SMB://xbmc:[email protected]/xbmc/favourites.xml</to>
</substitute>
</pathsubstitution>
</advancedsettings>


When I am in my raspbmc, if I go to files, I can play the movie just fine. But when I go to the library mode and I try to play the file it says the file no longer exists do you want to delete. And then if I hit the letter c and click on movie information, I can see the path to the movie that is smb://10.0.0.100/Movie/some film.avi and there I don't see the user:pass@ in the path.

Thanks,

John.
Reply
#7
I had a similar problem that was solved by putting the passwords in a seperate passwords.xml instead of the sources.xml.
The structure of the passwords.xml is:
Code:
<passwords>
<path>
<from pathversion="1">smb://server/</from>
<to pathversion="1">smb://USERNAME:PASSWORD@server/</to>
</path>
</passwords>
As you can see it works as a sort of path substitution. I use an IP name instead of an address but it should work the same way.
I preferred it this way so I could easily seperate the logon accounts from the actual paths.

Hope this helps,
Allard.
I think all righthtinking people in this country are sick and tired of being told that ordinary, decent people are fed up in this country with being sick and tired.
Reply
#8
Did you add the passwords at a later stage?
I have the idea that your library doesn't contain the passwords because you added them later.

In that case PH-SYM's suggestion would help you.
Reply
#9
Hi guys,

you are great, the passwords file did the job.

Thanks for the help.

John.
Reply

Logout Mark Read Team Forum Stats Members Help
MySQL sync not working with SMB link and user // pass0