Files
jellyfin-plugin-floatplane/doc/research/reference-sources/hydra_apiConfig.brs
claude 9e33a343ab
Some checks failed
release / build-release (push) Has been cancelled
Floatplane channel plugin for Jellyfin 10.10.x: browse, HLS proxy, cookie session, CI release
- IChannel: creators -> sub-channels -> video posts (public listing API, search mapped)
- IRequiresMediaInfoCallback -> signed proxy URLs; stream controller rewrites HLS so the
  AES-128 key is fetched server-side with the session cookie, segments stay on the CDN
- delivery/info cached per token lifetime and throttled (~2/min)
- config page: paste sails.sid + validate, extra creators, quality, search test
- scripts/package.sh -> plugin folder + zip + md5 + manifest.json; Gitea release workflow
- research docs, HAR analysis (HAR itself gitignored), install-pi5.sh

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-10-25 09:42:27 +01:00

77 lines
1.9 KiB
Plaintext

' API Configuration Utility
function ApiConfig() as Object
apiConfigObj = {
environment: "prod"
' Base URLs for different environments
baseUrls: {
prod: "https://www.floatplane.com"
preprod: "https://pp.floatplane.com"
}
' Auth server URL
authBaseUrl: "https://auth.floatplane.com"
' Realm names for different environments
realms: {
prod: "floatplane"
preprod: "floatplane-pp"
}
getApiBaseUrl: function() as String
if m.environment = "preprod"
return m.baseUrls.preprod
else
return m.baseUrls.prod
end if
end function
' Get the auth server base URL
getAuthBaseUrl: function() as String
return m.authBaseUrl
end function
' Get the realm name for the current environment
getRealm: function() as String
if m.environment = "preprod"
return m.realms.preprod
else
return m.realms.prod
end if
end function
' Build a full API URL from path
buildApiUrl: function(path as String) as String
baseUrl = m.getApiBaseUrl()
if path.Left(1) <> "/"
path = "/" + path
end if
return baseUrl + path
end function
' Build a full auth URL from path
buildAuthUrl: function(path as String) as String
baseUrl = m.getAuthBaseUrl()
if path.Left(1) <> "/"
path = "/" + path
end if
return baseUrl + path
end function
' Build a realm-specific auth URL (e.g., /realms/{realm}/protocol/...)
buildRealmAuthUrl: function(path as String) as String
realm = m.getRealm()
' Remove leading slash from path if present, we'll add it after realm
if path.Left(1) = "/"
path = path.Mid(1)
end if
realmPath = "/realms/" + realm + "/protocol/" + path
return m.buildAuthUrl(realmPath)
end function
}
return apiConfigObj
end function