Solved Issue - HELP: My NAS ip address changed > can't locate MEDIA

  Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #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!
find quote
BigNoid Offline
Team-Kodi Member
Posts: 3,881
Joined: Jul 2010
Reputation: 153
Location: Below sea level
Post: #2
easiest way is to use path substitution in advancedsettings.xml: Path_substitution (wiki)
find quote
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #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
find quote
BigNoid Offline
Team-Kodi Member
Posts: 3,881
Joined: Jul 2010
Reputation: 153
Location: Below sea level
Post: #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.
find quote
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #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.
find quote
BigNoid Offline
Team-Kodi Member
Posts: 3,881
Joined: Jul 2010
Reputation: 153
Location: Below sea level
Post: #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.
find quote
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #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).
find quote
zerocool_ie Offline
Fan
Posts: 543
Joined: Jun 2012
Reputation: 21
Location: Ireland
Post: #8
this will help you:
HOW-TO:Update_SQL_databases_when_files_move (wiki)

2x R-Pi3 LibreELEC v8.0.2 | Transparency! | Flirc case | RetroPie dual-boot
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.2.6 | Belvedere | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
find quote
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #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
find quote
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #10
<- Any confirmation on my previous post?
find quote
zerocool_ie Offline
Fan
Posts: 543
Joined: Jun 2012
Reputation: 21
Location: Ireland
Post: #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!

2x R-Pi3 LibreELEC v8.0.2 | Transparency! | Flirc case | RetroPie dual-boot
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.2.6 | Belvedere | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
find quote
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #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!
(This post was last modified: 2017-06-01 13:13 by tjsuominen.)
find quote
kimkl Offline
Grandpa Simpson
Posts: 347
Joined: Mar 2016
Reputation: 3
Location: Holbaek, Denmark
Post: #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

Grandpa Simpson: Unfortunately, like all true stories, this one has a crappy ending.
Your story's have an ending?
English is not my native language; please excuse typing errors.
Banned Add-Ons
find quote
tjsuominen Offline
Member
Posts: 80
Joined: Dec 2012
Reputation: 0
Post: #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
find quote
Karellen Offline
Super Moderator
Posts: 2,221
Joined: Apr 2017
Reputation: 32
Location: Melbourne, Australia
Post: #15
Thread marked solved.

My Signature
Links to : Forum Rules | Banned Add-Ons | Debug Log | Free Movies/TV Shows |


find quote