Jump to content

Suggestion: Delayed Startup Option


dcrdev

Recommended Posts

dcrdev

I run both an instance of Emby server and Kodi on the same machine, as I use the machine as my main htpc I've got Kodi auto-starting on boot. Unfortunately because I'm running Emby in docker it can take some time to startup. More often than not Kodi starts before Emby and I get an error message back from the addon.

 

The addon doesn't appear to try to reconnect, I have to browse to it under the programs menu in order to establish the connection. I was thinking it could be quite useful to have a 'sleep' option within the addon configuration. This would effectively delay the initial connection attempt by a specified amount of time.

Link to comment
Share on other sites

  • 2 weeks later...
dcrdev

Thanks and sorry for the delayed reply. This has actually gotten worse - ontop of not auto reconnecting, when it does connect the library is not refreshed automatically. I have to exit kodi and start it again in order to get updated content.

 

Here is my log:

http://pastebin.com/7jrZ44dL

Link to comment
Share on other sites

feerlessleadr

Not really an answer to your question, but you could try delaying the start of kodi for a short period of time to allow Emby to start up. Not totally familiar with Linux, but I've done that many times on Windows, and it has worked ok.

Link to comment
Share on other sites

Angelblue05

From the looks of your log, it seems requests(which is what we use to connect to your server) completely crashes. I've never seen this happen.

 

It's as if when trying to connect to your server, we get a good status response, even if the server is unreachable?

 

 

Sent from my iPhone using Tapatalk

Link to comment
Share on other sites

dcrdev

I think that'll be the fact I'm running the docker container - the bridged ports do return a valid http status code even before emby starts. I've got emby running as a systemd service abstraction - I could in theory make kodi wait for that, but as things stand I'm using the default kodi xsession as oppose to a service in order to start kodi. 

 

What I'm trying to wrap my head around is why emby doesn't auto reconnect, given that I can manually go into the addon menu and connect within about a second of startup. Additionally I'm curious why the library isn't reloading on new media being added, without exiting kodi. As I mentioned in my other thread, this is an issue that has only sprung up with the most recent update and I have tried erasing my kodi profile (~/.kodi) and starting again without success.

 

Thanks

Link to comment
Share on other sites

Angelblue05

Ok give me a few to try changing something. I'll have a version for you to test.

 

Instead of restarting Kodi, you can always just reload the kodi profile btw.

 

Sent from my iPhone using Tapatalk

Edited by Angelblue05
Link to comment
Share on other sites

dcrdev

Ok give me a few to try changing something. I'll have a version for you to test.

 

Instead of restarting Kodi, you can always just reload the kodi profile btw.

 

Sent from my iPhone using Tapatalk

 

Ok thanks for the help, really appreciated - I'll feedback once you have the new version.

 

In regards to reloading the kodi profile, I have already removed the entire profile and started again, but it didn't make a difference.

 

Thanks

Link to comment
Share on other sites

dcrdev

Ok that version did reconnect after a few seconds or so, but did display a "server is unreachable" message; it would be nice if that was suppressed until a certain number of attempts are made, but not a big deal.

 

It didn't solve the issue of reloading the library though, I still had to restart kodi for the changes to appear.

 

Here is my log:

http://pastebin.com/NJ6tceyJ

 

Thanks again for the help.

  • Like 1
Link to comment
Share on other sites

Angelblue05

This was only to try and fix the reconnection.

 

Oops, can you please enable the add-on debug, otherwise I don't see much. In the add-on settings > advanced tab > change the log level to Info and post that log.

Link to comment
Share on other sites

dcrdev

I did indeed - it was a persistent problem and not something that just happened once.

 

However funnily enough on this occasion - it didn't reconnect, so I'm not really sure what to say.

 

Edit: Although looking at the log myself, it still appears to be returning a 503 status code which equates to "service unavailable".

Edited by dcrdev
Link to comment
Share on other sites

Angelblue05

Edit: Although looking at the log myself, it still appears to be returning a 503 status code which equates to "service unavailable".

 

Well, that part is Kodi and there's nothing I can do about this, even with a delay. The artwork is already added to the database, Kodi is probably looking to load widget artwork or something.

Link to comment
Share on other sites

dcrdev

With the beta addon which I had installed a couple of days ago it would reload the database upon new media being added - could the addon not do the same upon the initial sync?

Link to comment
Share on other sites

Angelblue05

It should always update instantly, unless there's a bunch of updates going, then there might be a delay. In your case, something is crashing the entire process, but I can't tell with your last log because there's no errors. In the one before I see some errors, but not what happened before because debug was not enabled....

 

If you can maybe provide another log. Leave Kodi running longer than 2 minutes, thanks.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...