diff options
Diffstat (limited to 'MediaBrowser.Model')
4 files changed, 44 insertions, 4 deletions
diff --git a/MediaBrowser.Model/ApiClient/ServerCredentials.cs b/MediaBrowser.Model/ApiClient/ServerCredentials.cs index 787fb9a0d..dbde4a29a 100644 --- a/MediaBrowser.Model/ApiClient/ServerCredentials.cs +++ b/MediaBrowser.Model/ApiClient/ServerCredentials.cs @@ -30,7 +30,32 @@ namespace MediaBrowser.Model.ApiClient if (index != -1) { - list[index] = server; + var existing = list[index]; + + // Merge the data + existing.DateLastAccessed = new[] { existing.DateLastAccessed, server.DateLastAccessed }.Max(); + + if (!string.IsNullOrEmpty(server.AccessToken)) + { + existing.AccessToken = server.AccessToken; + existing.UserId = server.UserId; + } + if (!string.IsNullOrEmpty(server.RemoteAddress)) + { + existing.RemoteAddress = server.RemoteAddress; + } + if (!string.IsNullOrEmpty(server.LocalAddress)) + { + existing.LocalAddress = server.LocalAddress; + } + if (!string.IsNullOrEmpty(server.Name)) + { + existing.Name = server.Name; + } + if (server.WakeOnLanInfos != null && server.WakeOnLanInfos.Count > 0) + { + existing.WakeOnLanInfos = server.WakeOnLanInfos.ToList(); + } } else { diff --git a/MediaBrowser.Model/Configuration/ServerConfiguration.cs b/MediaBrowser.Model/Configuration/ServerConfiguration.cs index a2e389e70..abb50c5c1 100644 --- a/MediaBrowser.Model/Configuration/ServerConfiguration.cs +++ b/MediaBrowser.Model/Configuration/ServerConfiguration.cs @@ -231,7 +231,6 @@ namespace MediaBrowser.Model.Configuration "Roku", "Chromecast", "iOS", - "Android", "Windows Phone" }; diff --git a/MediaBrowser.Model/Connect/ConnectAuthenticationExchangeResult.cs b/MediaBrowser.Model/Connect/ConnectAuthenticationExchangeResult.cs new file mode 100644 index 000000000..c60224045 --- /dev/null +++ b/MediaBrowser.Model/Connect/ConnectAuthenticationExchangeResult.cs @@ -0,0 +1,17 @@ + +namespace MediaBrowser.Model.Connect +{ + public class ConnectAuthenticationExchangeResult + { + /// <summary> + /// Gets or sets the local user identifier. + /// </summary> + /// <value>The local user identifier.</value> + public string LocalUserId { get; set; } + /// <summary> + /// Gets or sets the access token. + /// </summary> + /// <value>The access token.</value> + public string AccessToken { get; set; } + } +} diff --git a/MediaBrowser.Model/MediaBrowser.Model.csproj b/MediaBrowser.Model/MediaBrowser.Model.csproj index 3faca062a..a58b50f49 100644 --- a/MediaBrowser.Model/MediaBrowser.Model.csproj +++ b/MediaBrowser.Model/MediaBrowser.Model.csproj @@ -11,7 +11,6 @@ <AssemblyName>MediaBrowser.Model</AssemblyName> <FileAlignment>512</FileAlignment> <SolutionDir Condition="$(SolutionDir) == '' Or $(SolutionDir) == '*Undefined*'">..\</SolutionDir> - <RestorePackages>true</RestorePackages> <FodyPath>..\packages\Fody.1.19.1.0</FodyPath> <ProductVersion>10.0.0</ProductVersion> <SchemaVersion>2.0</SchemaVersion> @@ -98,6 +97,7 @@ <Compile Include="Configuration\PeopleMetadataOptions.cs" /> <Compile Include="Configuration\XbmcMetadataOptions.cs" /> <Compile Include="Configuration\SubtitlePlaybackMode.cs" /> + <Compile Include="Connect\ConnectAuthenticationExchangeResult.cs" /> <Compile Include="Connect\ConnectAuthenticationResult.cs" /> <Compile Include="Connect\ConnectAuthorization.cs" /> <Compile Include="Connect\ConnectUser.cs" /> @@ -424,7 +424,6 @@ xcopy "$(TargetPath)" "$(SolutionDir)\Nuget\dlls\net45\" /y /d /r /i )</PostBuildEvent> </PropertyGroup> - <Import Project="$(SolutionDir)\.nuget\NuGet.targets" /> <Import Project="Fody.targets" /> <!-- To modify your build process, add your task inside one of the targets below and uncomment it. Other similar extension points exist, see Microsoft.Common.targets. |
