Vero4k changed IP, can't scan new shows on USB connected drive

Hello, I hope you can help because I’m out of ideas.

I’ll set the scene quickly:
Recently I noticed that my new TV show didn’t show up, and the Update Library on Startup scan got stuck at 83% for about 5 minutes before failing (I assumed).
Spent a while d1ciking around and noticed in the logs a lot of this:

2020-02-28 23:06:20.143 T:3925861088 WARNING: Process directory 'smb://192.168.0.8/Elements/tv/Grimm/' does not exist - skipping scan.

“Ah hah!” I thought. My Vero4k’s IP is 192.168.50.231, not 0.8. It used to be 0.8, but I changed routers.

I can’t for the life of me figure out how to change this in the UI, so I went into FTP and found a few files in /home/osmc/.kodi/userdata:

  • mediasources.xml
  • passwords.xml
  • sources.xml

all referenced the 192.168.0.8 address. So I updated them all to the 50.231 address, and rebooted the Vero4k.

However, the logs STILL show the system trying to search in the 0.8 address, as per my log snippet above. How do I change this? I actually don’t really care about the watched/unwatched database stuff, I’m happy to just delete all my video sources and re-add them if that helps, but I can’t work out how to do that (and I’ve googled and clicked around; if there’s a way it’s not intuitive). How can I do this?

One thing to note - I run OSMC with a MySQL database (running on the Vero4k) so my laptop running Kodi can share the database and stay in sync. Ignore the laptop for the moment though, I haven’t even tried running that yet, I just want to fix the Vero4k. The advancedsettings.xml file on the Vero4k points at 127.0.0.1 (and always has), so there’s no IP issues there.
Does the MySQL db store the source IP in it directly? I guess this might explain the issue if so. And if so, can I just wipe the MySQL db somehow and start again? If so, how do I do this?

full logs here:
https://paste.osmc.tv/ebubedenox

advancedsettings.xml:

<videodatabase>
  <name>MyVideos</name>
  <host>127.0.0.1</host>
  <user>osmc</user>
  <pass>osmc</pass>
  <type>mysql</type>
  <port>3306</port>
</videodatabase>

Thanks!

If you change the IP address of your sources you have 3 choices:

  1. Manually change the address in the MySQL database
  2. Use path substitution
  3. Rescan the items into the database.

I suggest either 1 or 3

In cases like this - NFS network shares etc, when I change routers i manually configure the IP address to be allocated to network serving devices in the router’s DHCP config, as it’s generally easier to make that one change than having to make changes on every device that is trying to reach them.

This would be the simplest as all you should need to do is update one or two files…

<?xml version="1.0" encoding="utf-8"?>
<advancedsettings>
	<videodatabase>
		<name>MyVideos</name>
		<host>127.0.0.1</host>
		<user>osmc</user>
		<pass>osmc</pass>
		<type>mysql</type>
		<port>3306</port>
	</videodatabase>
	<musicdatabase>
		<name>MyMusic</name>
		<host>127.0.0.1</host>
		<user>osmc</user>
		<pass>osmc</pass>
		<type>mysql</type>
		<port>3306</port>
	</musicdatabase>
	<pathsubstitution>
		<substitute>
			<from>smb://192.168.0.8/</from>
			<to>smb://192.168.50.231/</to>
		</substitute>
	</pathsubstitution>
	<videolibrary>
		<importwatchedstate>true</importwatchedstate>
		<importresumepoint>true</importresumepoint>
	</videolibrary>
</advancedsettings>

If you are using a password protected share you will probably also have to update the IP address in ~/.kodi/userdata/passwords.xml

Thanks everyone for your suggestions. fzinken can I ask why you’re not recommending path substitution? Is there a downside I should be aware of?

Just long term house keeping. You start down the way of path substitution, you will always have to maintain that substitution on all clients. If preserving watched status is not important, rescanning is the best option.

What @ActionA writes. Why having a additional step of translation done on each client when you can do a simple onetime change in the database

Can OP just not change the original IP back?

Technically most likely, but as it was a netmask change most likely it’s a bit late for that.

OK, considering I already have a pretty customised setup (running MySQL on the Vero4k), this small addition isn’t much extra to the other housekeeping I have.

how do i do this? I guess i need an SQL browser and would have to connect to the SQL db on the vero? It’s been literally decades since I’ve done any SQL work, and I don’t have any sql browser, and honestly can’t remember whatever sa password I setup on the db (although I could probably figure it out). path substitution is SO much easier… but if you could outline the steps I’d be grateful, always ready to learn!

actually I did consider this but wasn’t sure I was even barking up the right tree to start with, my searches came up with no useful results, so I posted here as a last resort. Changing my network’s IP scheme again is pain in the ass also.

All that said, it appears the substitution did work correctly, but the main issue I was having (that made me notice this problem in the first place) isn’t solved - the tv show I added still doesn’t show up. Further analysis of the logs shows that the show “Empire” isn’t getting scraped properly. I did some reading on using NFO files to point it at the correct Empire show, but it appears I would need to create an NFO for every single episode. No thanks. The scraper identified it as “Junkyard Empire”, and I’ll just leave it like that.

Side note: a tool that can auto-generate nfo files for a tv show would be awesome - just enter the tvdb URL/ID and the episode filename format and click a button and out pops 50 NFO files? sign me up.

This is not correct. There is the ‘normal’ NFO files which specify specific information that will add to the database for a specific file. There is a second type of NFO file called a parsing NFO which instead just contains a url to where your scraper should be pulling the info from. Also TV shows work a bit different than movies as there is the information about the show itself, and this dictates how episodes are scraped.

Most likely what you need to do is simply remove any NFO files for the show in question and then bring up the information window for that show (not an episode) and hit refresh. This will update the scraping pointers if they changed. If this brings in the wrong show then you need to go to the website of the scraper your using and find the show it should be and copy the url and paste it in a text file titled “tvshow.nfo” and put that in the root directory that contains that shows media files. Refresh from info again selecting the options to scan all files and when it asks if you want to ignore local information select “no”.

That is already a thing that exists. Personally i’m not a fan of using full NFO files unless you have a very specific reason for doing so, or you are only using them on shows that have already been canceled.

Well technically you could do it with some SQL commands via the mysql command line but yes using a SQL browser/editor would be easier. You either could install phpmyadmin on the Vero (but that pulls quite some packages or any other MySQL editor on your PC depending on the OS.

TMM https://www.tinymediamanager.org/

Yes, I read about the parsing NFO which was my ideal solution, but it didn’t work for me. Possibly i put in a scraper URL that wasn’t the scraper I’m using? This was another thing I couldn’t work out - how do I find out what scraper I’m using for TV shows (and movies)?

Next question: I use the format where I have a sub folder for each season. So eg:

\Empire\Season 3\Empire.2015.S03E01.mkv
\Empire\Season 3\Empire.2015.S03E02.mkv
\Empire\Season 3\Empire.2015.S03E03.mkv

\Empire\Season 4\Empire.2015.S04E01.mkv
\Empire\Season 4\Empire.2015.S04E02.mkv

etc. Which folder does the tvshow.nfo file go in?

This whole thing was pretty confusing. The parsing NFO page only briefly talks about TV shows, and the NFO files/TV Show page clearly states “For one TV Show with 10 episodes, you will require 11 nfo files.”, and makes no mention of the parsing NFO standard. I think there is lots of opportunity to improve these pages. I’m pretty technical and it was very unclear to me.

totally agree. I don’t want to create an NFO for every file (and as mentioned previously, if this is what I needed to do then I wasn’t going to bother).

Actually as part of the SQL install on the Vero the instructions required me to install phpmyadmin along with mysql and apache… so I guess i do have it there. hmm i wonder what the URL is to access it.

cool! will check it out if i’m desperate :stuck_out_tongue:

You obviously accessed is as your screenshot was from phpmyadmin

When you setup your sources in the “videos” section you choose a scraping source. If you need to remind yourself what it is then go back there, context menu on the source where those files are stored and select “change content”. The information provider will most likely be The TVDB or The Movie Database. Depending on which one the url for the show your looking for, and what needs to be in the parsing nfo, is either…

https://www.themoviedb.org/tv/61733-empire
or
https://thetvdb.com/series/empire-2015

This nfo should contain exactly one url and no other text. The root directory is the top most directory of the TV show (Empire in your case) and how you store the episodes below that has no bearing, and you don’t need any other files in any subfolders your using.

On a related topic your issue is being partially caused by how your naming your root folder. In this case “Empire” is not a particularly unique name for a show. With some of these types of titles you have to also add the year to the folder name “Empire (2015)” to get the show to pick up without any extra effort. This is a bit hit and miss though as adding the year can sometimes confuse the scraper.

sorry which screenshot? I haven’t posted any screenshot?

OK, I have seen these instructions before. Maybe i’m fully retarded, but I can’t find it. I’ll be explicit about how I’m trying:

  1. Click the cog on the main OSMC/Kodi screen to bring up a screen with the heading System. This is I guess the main settings page, it has File manager, Add-ons, System information, Event log on the top row, you get it.

  2. I select the Media option

  3. In the following screen I select the Library left nav menu item, and choose Videos... under the Manage Sources section.

  4. The next screen is titled Videos, it appears to have the two video sources I added in the past (tv and movies), as well as my USB connected hard drive, Auto-mounted drives, .., and + Add videos....

  5. I press the left arrow on my remote to bring up the contextual menu, and the options i’m offered are:

    Viewtype
    Sort by
    Order
    Search
    Filter
    Update library
    Edit nodes.

There’s nothing about “change content”.
6. “Fine”, I think. I’ll go into one of the actual sources and see if that helps. So I click the “tv” source option, and it loads what is essentially a folder view of the tv folder on my USB hdd.
7. I press the left arrow on the remote again, and this time i’m offered these options:

Sort by
Order
Search
Filter
Update library.   

Again, no “change content”. Am I doing something wrong?

Yep i figure this was the case when it found some other weird show with the word empire in it. I actually already tried renaming the folder to Empire (2015) but it didn’t really help. Is there a way I can be even more prescriptive in the folder name?

sorry, for whatever reason I mixed up two different threads.

Stay away from the file manager, it’s not what you need here.

From the main menu, there should be Videos>files>add source.
https://kodi.wiki/view/Adding_video_sources

To elaborate a bit on what ActionA posted the sources in the file manager are completely independant of all the library functions and can’t be used for this purpose. In a standard install you should see listing for Movies, TV Shows, and Videos and the home screen. Movies and TV Shows are views of your Library, and Videos is the section that should have probably been titled as “Sources” and where you need to go. If you don’t see that menu then you may have hidden it from view. If this is the case you will need to go to settings (the cog)>interface>skin>configure skin> and then find the option to turn it back on. The exact option depends on what skin your using but I can tell you with Estuary its >main menu items>videos [enable] and in the OSMC skin it would be >general>customize home menu>videos>enabled [enable]