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: 76
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,880
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: 76
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,880
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: 76
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,880
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: 76
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: 541
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.1 | Transparency! | Flirc case | RetroPie dual-boot
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.1.13 | Belvedere | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
find quote
tjsuominen Offline
Member
Posts: 76
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: 76
Joined: Dec 2012
Reputation: 0
Post: #10
<- Any confirmation on my previous post?
find quote
zerocool_ie Offline
Fan
Posts: 541
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.1 | Transparency! | Flirc case | RetroPie dual-boot
Storage Synology DS411 | 4 x WD RED 6TB
Software MariaDB 10.1.13 | Belvedere | Filebot | Ember Media Manager
wiki (wiki) | First time user (wiki) | Debug_Log (wiki) | mysql (wiki) | artwork (wiki)
find quote