Vero 4k+ not loading first file on boot

FYI it is prefered for you not to do that as it will be overwritten by updates. If you make a new advancedsettings.xml file in ~/.kodi/userdata any arguments there will override both Kodi and the one OSMC ships with. The Samba timeout is not going to have an effect with a mount as Kodi doesn’t know it is communicating over a network. That playlisttimeout setting was a bit of a shot in the dark. There is not a lot of information on it and some of that is conflicting. It was worth a shot.

I would be curious to know if you enabled settings>system>power saving>try to wakeup remote servers on access would have an effect if you switched back over to system mounts and then used a path substitution to redirect the smb path over to the system mount. If done that way would kodi’s samba timeout setting then work? I don’t know but it might be worth trying.

Could you elaborate? I’m guessing you mean mount up the remote share on fstab and symlink smb://my/path over to it (and update my media library to point to the fake smb symlink)?

As your just testing I wouldn’t modify your whole library but just add a new source to test. What I mean is that if your test file is server/TV/show then make (or just use your existing) system mount to /mnt/TV and add kodi source as smb://server/TV and then in an advancedsettings.xml file you path sub with

<advancedsettings>
 <pathsubstitution>
  <substitute>
    <from>smb://server/TV/</from>
    <to>/mnt/TV/</to>
  </substitute>
 </pathsubstitution>
</advancedsettings>

With the idea being that Kodi might treat if different enough to get around your timeout issues. I would test it myself but figuring out how to simulate your issue on my network would be kind of tricky.

@moriya Just a thought here, but do you have ‘Wait for network’ enabled in My OSMC > Network ?

@bmillham Yeah, “wait for network” is enabled.

@darwindesign Interesting. I could give this a shot, although I’m starting to wonder if it’s a timeout issue given this is occurring even when the drive is warmed up and mounted successfully.

If it is an external disk you should be able to hear or feel if the drive is spun up. I doesn’t happen to be set at a really low sleep time does it? Also when you say you bulk updated the sqlite db did you just mean you rescanned your library in Kodi or something else?

If it is an external disk you should be able to hear or feel if the drive is spun up. I doesn’t happen to be set at a really low sleep time does it?

Nope, you can definitely feel when when it’s spun up, and the problem remains when this is the case - it just fails faster.

Also when you say you bulk updated the sqlite db did you just mean you rescanned your library in Kodi or something else?

I did a little brain surgery by running some update * commands on the dbs in /.kodi/userdata/Database using sqlite3 and string-replaced the paths. There’s probably a better “official” way to do it, but this has worked fine for me in the past and AFAIK the end result is the same.

The whole thing is just baffling to me because:

  1. I cannot find a descriptive error for why the first file is failing
  2. It seems to fail regardless of how the share is mounted or whether the drive is hot or not and
  3. Everything works perfectly fine after that first failure

If you try the first access from the file manager in settings does the first play fail like it does from the library view?

Nope, it works fine if you play the first file that way. Afterwards, all subsequent plays from the library play fine as well.

That would seem to indicate that something went awry with your database mod. I think the next logical step would be to try with a fresh database and see if the problem goes away…

Let’s test with Kodi default settings. Enter the following commands with an SSH connection.

systemctl stop mediacenter
mv ~/.kodi ~/kodi.bak
systemctl start mediacenter

If needed you can restore:

systemctl stop mediacenter
mv ~/.kodi ~/kodi.bk2
mv ~/kodi.bak ~/.kodi
systemctl start mediacenter

If your original setup was restored as expected and you want get rid of the unneeded clean install you can delete that with the following command.

rm -r ~/kodi.bk2

But I’m an engineer, we never do anything wrong!

…yeah, that’s, uh, quite possible. I’ll try a clean setup and see what happens. Thanks again for all the help!

You may want to consider switching to a MySQL database if you are creating a new database. That way you are ready for when you get a 2nd Vero :wink:

Welp, that didn’t work. Fresh install, rebuilt my movies, and exact same behavior - first file bombs, second file works fine. Thanks y’all for being troopers, but I think at this point given how little I reboot the box it’s looking like it might be best to just deal with a little annoyance.

Did you try the MySQL database instead?

Hi,

Have you tried disabling and re-enabling wait for network in MyOSMC. Seen issues in the past (although I thought it had fixed, maybe a regression.) Where its enabled but kodi isn’t waiting for the network, but was fixed on re-enabling.

Thanks Tom.

Just to make sure we are on the same page, when you say fresh install do you mean you downloaded a new copy of OSMC and reinstalled from scratch, moved the Kodi folder so it built a new one with default settings, or something else.

I’m finding this one rather hard to wrap my head around. What i’ve gathered in this thread is that Kodi smb paths didn’t display this behavior but system mounts did with both fstab and autofs. This would point to an issue with the mount but if that was true it would be expected that playing a file from file manager would also display the same behavior. There being a difference between file manager and the Library would point to something happening with either the db or a plug-in. Removing the existing install would have removed both of these things and so if it is still happening that then points back at some kind of a system level issue. This is very curious.

I don’t suppose switching to ethernet is an option is it?

Sorry, by “fresh instal” I mean moved the kodi folder and built a new one with default settings.

That summary sounds right to me. SMB Paths did not have an issue (except playback issues, of course, leading to switching to system mounts), but both fstab and autofs mounts have displayed the issue exactly as you’ve laid out, unless you use the file manager, and of course as mentioned once the issue has been encountered once, all subsequent plays work fine (except for the initial file). It’s really, really odd behavior.

EDIT: Oh, and sorry, unfortunately switching to ethernet isn’t an option right now due to where the box is.

One thing I don’t see that you tried that I asked you to (I may have missed it). Have you tried using the IP instead of the hostname to mount?

And have you ticker “Wait for Network” after clearing Kodi folder.

Yes, ‘wait for network’ is ticked after I cleared the folder, and yes, I’ve tried IP address with the same result.