Library refresh failure on reboot

Afternoon all, hope you’re well.

This is more likely a KODI issue but as I frequent here regularly and you seem like such a friendly bunch I thought I’d ask here first. The problem is actually occurring on my Vero 4k+ so I’m not out of order in doing so :smiley:

Only a minor issue, but I recently swapped out 2 external USB drives (1.4Tb and 4TB) for one 16TB drive. All are NTFS and all are recognised correctly by the Vero. All are/were using a powered USB hub.

There’s also an SD/MMC card which I just use for the rotating wallpapers.

It all worked fine before but now there’s the new drive it doesn’t do a media refresh upon reboot because the drive isn’t appearing in time. The log lists 1000s of missing folders, which all work when you do a manual refresh 10 seconds later.

is there a way to delay the refresh to give the drive time to be detected?

Thanks in advance.

It sounds like the drive is slow / takes some time to spin up.

Some logs could be helpful.

If you go to the network section of the My OSMC add-on and check the “Wait for network” option this may add in a little bit of a delay. It may be worth trying for a quick and dirty.

I’d actually recommend to just turn off the update library at Kodi startup and just manually update it when needed. If your using a OSMC remote you can hold down (long-press) the play button when your on the home screen to initiate a library update. If your adding content from a PC over the network and just need to update when you do that then you can actually just remotely kick off the update from the PC after you finish the transfer using the web interface or json-rpc.

I’m sure the logs won’t help, it’s definitely the drive is slow. If I do a refresh and then reboot, it does a boot-refresh correctly because the drive is already spinning.

Thanks for these. I added the ‘Wait for network’ but it’s wired and fixed IP so I doubt that adds anything useful.

Is there any way to remap the long-press pause to refresh Music rather than Videos, that’s pretty damned useful and will do away my issue.

Of course. If we are talking about the OSMC remote it doesn’t have a pause but rather a play/pause which would just need an xml file in ~/.kodi/userdata/keymaps with…

<?xml version="1.0" encoding="UTF-8"?>
<keymap>
	<Home>
		<keyboard>
			<play_pause mod="longpress">UpdateLibrary(music)</play_pause>
		</keyboard>
	</Home>
</keymap>

Although you could just as easy configure it to another button (or window) if you wished…

Brilliant thanks, I’ve setup the play-pause to do Music (as that’s the one I update most often) and also a batch file on the PC to refresh both remotely.

1 Like

You might be interested in checking out the batch file I wrote that allows for easy multi-client updating, cleaning, and pulling version information I posted here…