2014-10-27 03:06:01 +00:00
|
|
|
|
using MediaBrowser.Model.Configuration;
|
|
|
|
|
|
2014-08-25 03:54:45 +00:00
|
|
|
|
namespace MediaBrowser.Server.Implementations.Connect
|
|
|
|
|
{
|
|
|
|
|
public class ServerRegistrationResponse
|
|
|
|
|
{
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
public string Url { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string AccessKey { get; set; }
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public class UpdateServerRegistrationResponse
|
|
|
|
|
{
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
public string Url { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
}
|
2014-09-14 15:10:51 +00:00
|
|
|
|
|
|
|
|
|
public class GetConnectUserResponse
|
|
|
|
|
{
|
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
public string Name { get; set; }
|
|
|
|
|
public string DisplayName { get; set; }
|
|
|
|
|
public string Email { get; set; }
|
2014-09-14 17:25:46 +00:00
|
|
|
|
public bool IsActive { get; set; }
|
2014-09-14 15:10:51 +00:00
|
|
|
|
public string ImageUrl { get; set; }
|
|
|
|
|
}
|
2014-09-14 17:12:47 +00:00
|
|
|
|
|
|
|
|
|
public class ServerUserAuthorizationResponse
|
|
|
|
|
{
|
2014-09-14 23:39:06 +00:00
|
|
|
|
public string Id { get; set; }
|
|
|
|
|
public string ServerId { get; set; }
|
|
|
|
|
public string UserId { get; set; }
|
|
|
|
|
public string AccessToken { get; set; }
|
|
|
|
|
public string DateCreated { get; set; }
|
|
|
|
|
public bool IsActive { get; set; }
|
|
|
|
|
public string AcceptStatus { get; set; }
|
|
|
|
|
public string UserType { get; set; }
|
2014-10-13 20:23:31 +00:00
|
|
|
|
public string UserImageUrl { get; set; }
|
2014-10-13 20:14:53 +00:00
|
|
|
|
public string UserName { get; set; }
|
2014-09-14 17:12:47 +00:00
|
|
|
|
}
|
2014-10-27 03:06:01 +00:00
|
|
|
|
|
|
|
|
|
public class ConnectUserPreferences
|
|
|
|
|
{
|
|
|
|
|
public string[] PreferredAudioLanguages { get; set; }
|
|
|
|
|
public bool PlayDefaultAudioTrack { get; set; }
|
|
|
|
|
public string[] PreferredSubtitleLanguages { get; set; }
|
|
|
|
|
public SubtitlePlaybackMode SubtitleMode { get; set; }
|
|
|
|
|
public bool GroupMoviesIntoBoxSets { get; set; }
|
|
|
|
|
|
|
|
|
|
public ConnectUserPreferences()
|
|
|
|
|
{
|
|
|
|
|
PreferredAudioLanguages = new string[] { };
|
|
|
|
|
PreferredSubtitleLanguages = new string[] { };
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static ConnectUserPreferences FromUserConfiguration(UserConfiguration config)
|
|
|
|
|
{
|
|
|
|
|
return new ConnectUserPreferences
|
|
|
|
|
{
|
|
|
|
|
GroupMoviesIntoBoxSets = config.GroupMoviesIntoBoxSets,
|
|
|
|
|
PlayDefaultAudioTrack = config.PlayDefaultAudioTrack,
|
|
|
|
|
SubtitleMode = config.SubtitleMode,
|
|
|
|
|
PreferredAudioLanguages = string.IsNullOrWhiteSpace(config.AudioLanguagePreference) ? new string[] { } : new[] { config.AudioLanguagePreference },
|
|
|
|
|
PreferredSubtitleLanguages = string.IsNullOrWhiteSpace(config.SubtitleLanguagePreference) ? new string[] { } : new[] { config.SubtitleLanguagePreference }
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public void MergeInto(UserConfiguration config)
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
2014-10-27 21:45:50 +00:00
|
|
|
|
|
|
|
|
|
public class UserPreferencesDto<T>
|
|
|
|
|
{
|
|
|
|
|
public T data { get; set; }
|
|
|
|
|
}
|
2014-08-25 03:54:45 +00:00
|
|
|
|
}
|