Update source/utils/misc.brs

Co-authored-by: Charles Ewert <cewert@gmail.com>
This commit is contained in:
Austin Crandall 2023-09-14 19:08:04 -04:00 committed by GitHub
parent 6b16ed9d2e
commit d4483a2f48
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -199,9 +199,8 @@ function inferServerUrl(url as string) as string
' TODO
' if response code is a 300 redirect then we should return the redirect url
' Make sure this happens or make it happen
if resp.GetResponseCode() = 200
if resp.GetResponseCode() = 200 and isJellyfinServer(resp.GetString())
selectedUrl = hosts.lookup(resp.GetSourceIdentity().ToStr())
isJellyfinServer(resp.GetString())
print "Successfully inferred server URL: " selectedUrl
return selectedUrl
end if