midgetspy/Sick-Beard — pull request #301 by xombiemp (2012-02-14 18:47:49+00:00)
Title: Redirect to listening port on reboot after config change

This commit will redirect to the proper url after a reboot if the
config changed the port or protocol (http/https) that the server is
listening to.
Previously it would just time out.

This changes the ajax request to jsonp to allow for cross domain requests, which it is when you change the protocol or port.

If going from http to https or https on a different port, the script will wait 5 seconds after the shutdown and then automatically redirect to the new url. This is because if the SSL certificate is self-signed, or otherwise untrusted, the ajax request will break.