Solved HELP: My NAS ip address changed > can't locate MEDIA
#1
Hi all,

I needed to to change my NAS ip address for various reasons. My NAS holds both my movies and music. After the ip change, I did following on KODI:

1. In .kodi/userdata modified my sources.xml file containing the new ip-addr. of the NAS
2. In .kodi/userdata modified my mediasources.xml to contain the new up-addr. of the NAS
3. Created ./kodi/userdata/advancedsettings.xml file to contain two SMB substitutes (for Movies and Music) to contain new ip-addr.
4. Rebooted KODI.

>>

Kodi starts but still seems not locating properly my media sources. So, two questions:

1) Was the abovementioned process correct or did I miss something?
2) If it was NOT correct, what is THE easiest way to have my Movie and Music libraries up&running using the new ip for the NAS?

Much appreciated for step by step instructions.


PS. I'm running OpenElec 6.0.3 with KODI 15.2 (yeah, I know...). After I get this up & running, will move to LibreElec with latest kodi too!
Reply
#2
easiest way is to use path substitution in advancedsettings.xml: http://kodi.wiki/view/Path_substitution
Reply
#3
My advancedsettings.xml is:

<advancedsettings>
<pathsubstitution>
<substitute>
<from>SMB://<oldip>/share1/Music/</from>
<to>SMB://<newip>/share1/Music/</to>
</substitute>
<substitute>
<from>SMB://<oldip>/share1/Movies/</from>
<to>SMB://<newip>/share1/Movies/</to>
</substitute>
</pathsubstitution>
</advancedsettings>

Is that correct (just imagine the ip's aroud <oldip> and <newip>? Do I need to do something else to refresh?

I also have the sources.xml and mediasources.xml files to contain new addr.

//timo
Reply
#4
I would leave sources etc as is with the old ip address until you rebuild the library. Path substitution also works in the files node. You can just add 1 entry btw:

<pathsubstitution>
<substitute>
<from>SMB://<oldip>/</from>
<to>SMB://<newip>/</to>
</substitute>
That will cover everything.

If you want to rebuild your library and have everything with a hostname for example so you won't run into this again, I suggest exporting your library to separate files. Add importwatchedstate and importresumepoint (both to true) to advanced settings.xml. Then nothing is lost when re-adding sources and scanning to the library.
Reply
#5
1. I renamed the sources etc. so they shall not be loaded.
2. Did the simple way of pathsubstitution
3. Rebooted KODI

-> in KODI ui there's text's

"Loading media information from files..." <-> "Prepairing"... Is it:

- re-building the database or
- should I do something manually to take changes into account?

I have ~200 movies in my library and 300 CD's.
Reply
#6
Yeah music is more problematic, I don't know of an easy way to restore that library.
That popup is for music files. Because you have renamed your sources it wil scan those to the library again. Bring all sources back to how they were before the ip change and if you clean library all should be how it was. The path substitution will take care of the ip change.
Reply
#7
For some reason, seems the pathsubstitution isn't working (not for me, at least). The movie metadata is all there, but when I try to play a movie, Kodi UI freezes upon trying to locate (?) the media. My advancedsettings.xml is located @ ./kodi/userdata

Anything I would need to do to the MyMusic* and MyVideos* files if I'd still wanna pursue this...

Seems my next options are:

1) revert back to the old ip address (doable, for sure) or
2) Install LibreElec from scratch (long weekend @ some point).
Reply
#8
this will help you:
HOW-TO:Update_SQL_databases_when_files_move (wiki)
4x R-Pi4b LibreELEC v10 | Aeon Nox: SiLVO | Flirc cases
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.4.19 | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
Reply
#9
Thx @zerocool_ie.

A few things: Just to confirm (as it was not 100% clear to me from the Wiki-post):

1) I need only ONE of the mentioned "Required software" e.g. Db Browser for SQLite (and not all three of them)?
2) For the .db files, I guess I'll take the latest ones for modification? (yeah, for sure, backup those 1st)
3) Any other actions needed after replacing the .db files and modified sources.xml (except reboot)?

Thx for help!

//timo
Reply
#10
<- Any confirmation on my previous post?
Reply
#11
(2017-05-19, 07:59)tjsuominen Wrote: 1) I need only ONE of the mentioned "Required software" e.g. Db Browser for SQLite (and not all three of them)?
Yep, just one

(2017-05-19, 07:59)tjsuominen Wrote: 2) For the .db files, I guess I'll take the latest ones for modification? (yeah, for sure, backup those 1st)
Normally yes, but check the last modified date on the file.
Database_versions (wiki)

(2017-05-19, 07:59)tjsuominen Wrote: 3) Any other actions needed after replacing the .db files and modified sources.xml (except reboot)?
Don't think so

Good luck!
4x R-Pi4b LibreELEC v10 | Aeon Nox: SiLVO | Flirc cases
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.4.19 | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
Reply
#12
OK - something is not YET correct - what I have done:

1) Did the dB modifications according the great instructions > success with no errors
2) Updated sources.xml > should be OK

After that:

- Movie metadata (images, attributes etc.) appear ok BUT
- when I try to play a movie > Kodi just "hangs" (does not seem to locate the file) >>>

Appears my kodi.log -file consists of errors such as...
Code:
18:32:26 T:139690623612672 WARNING: Process directory 'smb://192.168.1.62/share1/Movies/' does not exist - skipping scan.

And for Music:
Code:
20:02:00 T:139689239504640   ERROR: SMBDirectory->GetDirectory: Unable to open directory : 'smb://192.168.1.62/share1/Music/Skid%20Row'

The ip and path is correct for sure, BUT could I have done an error with the SQL update commands - specifically as I included the ' ' signs in all of the update commands:
Code:
UPDATE episode SET c18 = REPLACE(c18,'smb://<oldip>/share1/Movies/', 'smb://<newip>/share1/Movies/');

One more thing. I have a mediasources.xml file with:
<location id="0">smb://<username:passwd>@192.168.1.62/share1</location> >

Should the SQL update commands be then WITHOUT the 'share1' > so just
Code:
smb://<oldip>/Movies/', 'smb://<newip>/Movies/

Any further guidance... MUCH appreciated!
Reply
#13
@tjsuominen
My 2 cents, found this on another Website
OpenELEC settings, enable the option "Wait for network before starting KODI"

But my experience with OpenELEC is limited, so do not know if my find is any help.
Am currently playing around with Ubuntu, on my Dads old lappie, and trying to manage my frustration as to why the darn thing WILL not shut down, after i click shut down.
Big Grin
just a quick final note, because if this was Windows i would say your not logged as Administrator/SU when your accessing new share, or you have not added users to new share address in the conf .(hmm hope this is not confusing or looks like rubbish)
Hope this make sense good luck m8
English is not my native language; please excuse typing errors.
Grampa Simpson: Unfortunately, like all true stories, this one has a crappy ending. You have a story with an ending.
Grampa, are you sure you're okay to drive at night? Grampa: It's night?
Banned add-ons
Reply
#14
Problem solved:

1st of all, thx for the great documentation link for the "HOW-TO" part.

The actual problem after SQL mods was, of course, that after IP addr. change, the username/pw for the NAS smb mount had to be re-typed. Sorted that out and now everything is more or less up&running. In addition, I took cdART manager into use and that brings some more great graphics / data into Kodi and my collection.

Problem solved!

Now next step is to update OE into fresher version OR into LE Smile Let's see.

//timo
Reply
#15
Thread marked solved.
My Signature
Links to : Official:Forum rules (wiki) | Official:Forum rules/Banned add-ons (wiki) | Debug Log (wiki)
Links to : HOW-TO:Create Music Library (wiki) | HOW-TO:Create_Video_Library (wiki)  ||  Artwork (wiki) | Basic controls (wiki) | Import-export library (wiki) | Movie sets (wiki) | Movie universe (wiki) | NFO files (wiki) | Quick start guide (wiki)
Reply

Logout Mark Read Team Forum Stats Members Help
HELP: My NAS ip address changed > can't locate MEDIA0