get channel media info at runtime

This commit is contained in:
Luke Pulverenti
2014-11-18 21:45:12 -05:00
parent 124754a04f
commit dc8c24ed29
21 changed files with 171 additions and 25 deletions

View File

@@ -453,6 +453,14 @@ namespace MediaBrowser.Server.Implementations.Connect
throw new ArgumentNullException("ConnectServerId");
}
var sendingUser = GetUser(sendingUserId);
var requesterUserName = sendingUser.ConnectUserName;
if (string.IsNullOrWhiteSpace(requesterUserName))
{
throw new ArgumentException("A Connect account is required in order to send invitations.");
}
string connectUserId = null;
var result = new UserLinkResult();
@@ -482,14 +490,6 @@ namespace MediaBrowser.Server.Implementations.Connect
}
}
var sendingUser = GetUser(sendingUserId);
var requesterUserName = sendingUser.ConnectUserName;
if (string.IsNullOrWhiteSpace(requesterUserName))
{
requesterUserName = sendingUser.Name;
}
if (string.IsNullOrWhiteSpace(connectUserId))
{
return await SendNewUserInvitation(requesterUserName, connectUsername).ConfigureAwait(false);
@@ -781,6 +781,7 @@ namespace MediaBrowser.Server.Implementations.Connect
user.Configuration.EnableLiveTvManagement = false;
user.Configuration.EnableContentDeletion = false;
user.Configuration.EnableRemoteControlOfOtherUsers = false;
user.Configuration.EnableSharedDeviceControl = false;
user.Configuration.IsAdministrator = false;
if (currentPendingEntry != null)