Jalle19 / xbmc-video-server

Web interface for streaming or downloading media from a Kodi/XBMC library
GNU General Public License v3.0
192 stars 39 forks source link

WOL improve: check backend availability instead connect to backend before trigger wake-on-lan #279

Closed zionio closed 5 years ago

zionio commented 7 years ago

Issue type: enhancement

Before trigger wake-on-lan i think it's better check backend availability instead of try a connection to backend. This prevents display errors to users online and logs.

Expected Behavior Log in -> check backend availability -> trigger wake-on-lan -> connect to backend -> logged in without errors.

Actual Behavior Log in -> connect to backend -> show and log errors to users -> trigger wake-on-lan -> connect to backend -> logged in with errors.

(btw thank you very much for this awesome web interface!)

Galixte commented 7 years ago

Hi @Jalle19,

could you take a look, please ?

Jalle19 commented 7 years ago

@zionio do you mean that instead of getting the "Error 500 - The current backend is not connectable at the moment" error message and the waiting spinner there should be a more friendlier message? Wake-on-LAN can take a long time or it can be completely unsuccessful so it's important to display a waiting page so the user knows something is going on, i.e. we can't just do it all in the background after you click "Log in".

Jalle19 commented 7 years ago

To clarify, the current behavior is like this:

Log in -> Check connectivity -> Render waiting page -> Redirect to index after the backend has woken up

And what you would like is basically the same except with a friendlier waiting page?

Jalle19 commented 5 years ago

Closing, no bandwidth to fix this