jellyfin / jellyfin-roku

The Official Roku Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
449 stars 137 forks source link

Expand server detection logic to require less input #1278

Closed sevenrats closed 1 year ago

sevenrats commented 1 year ago

right now we normalize the url deterministically into either 8096 or 8920 based on whether or not tls is used. We should break this loop out to check for the server at a list of inferred addresses in order of priority, such that, for example, when we type in 192.168.1.2, we would check for a server at http://192.168.1.2:8096, then http://192.168.1.2:80, then https://192.168.1.2:8920, then https://192.168.1.2:443, continuing until we find a jellyfin server. Or, if https is declared, then we will simply begin with https guesses. If proto and port are declared, we will use the string and not guess at all. Caveats: Obviously this could cause problems if people are running multiple servers over multiple protocols at the same place. Do we care? It would be trivial to avoid, but not intuitive. This is an extremely edge case anyway. It may also potentially lengthen the process time if we dont use concurrent requests, but it looks like we do have asynchronous gets in brightscript so it should not be impossible to do so.

sevenrats commented 1 year ago

duplicate of 366