mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
support adding connect user
This commit is contained in:
@@ -1085,6 +1085,34 @@ namespace MediaBrowser.Server.Implementations.Connect
|
||||
}
|
||||
}
|
||||
|
||||
public async Task AddConnectSupporter(string id)
|
||||
{
|
||||
if (!_securityManager.IsMBSupporter)
|
||||
{
|
||||
throw new InvalidOperationException();
|
||||
}
|
||||
|
||||
var url = GetConnectUrl("keyAssociation");
|
||||
|
||||
url += "?serverId=" + ConnectServerId;
|
||||
url += "&supporterKey=" + _securityManager.SupporterKey;
|
||||
url += "&userId=" + id;
|
||||
|
||||
var options = new HttpRequestOptions
|
||||
{
|
||||
Url = url,
|
||||
CancellationToken = CancellationToken.None
|
||||
};
|
||||
|
||||
SetServerAccessToken(options);
|
||||
SetApplicationHeader(options);
|
||||
|
||||
// No need to examine the response
|
||||
using (var stream = (await _httpClient.SendAsync(options, "POST").ConfigureAwait(false)).Content)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
public async Task RemoveConnectSupporter(string id)
|
||||
{
|
||||
if (!_securityManager.IsMBSupporter)
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
"ButtonOrganize": "Organize",
|
||||
"LinkedToMediaBrowserConnect": "Linked to Media Browser Connect",
|
||||
"HeaderSupporterBenefits": "Supporter Benefits",
|
||||
"HeaderAddUser": "Add User",
|
||||
"LabelAddConnectSupporterHelp": "To add a user who isn't listed, you'll need to first link their accounts to Media Browser Connect from their user profile page.",
|
||||
"LabelPinCode": "Pin code:",
|
||||
"ButtonOk": "Ok",
|
||||
"ButtonCancel": "Cancel",
|
||||
|
||||
Reference in New Issue
Block a user