Some checks failed
release / build-release (push) Has been cancelled
- 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>
77 lines
1.9 KiB
Plaintext
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
|
|
|