updated nuget

This commit is contained in:
Luke Pulverenti
2014-12-02 22:13:03 -05:00
parent c48458f215
commit 56f6b0335c
52 changed files with 498 additions and 746 deletions

View File

@@ -3,6 +3,7 @@ namespace MediaBrowser.Model.ApiClient
public enum ConnectionMode
{
Local = 1,
Remote = 2
Remote = 2,
Manual = 3
}
}

View File

@@ -413,7 +413,7 @@ namespace MediaBrowser.Model.ApiClient
/// </summary>
/// <param name="query">The query.</param>
/// <returns>Task{ItemsResult}.</returns>
Task<ItemsResult> GetUpcomingEpisodesAsync(NextUpQuery query);
Task<ItemsResult> GetUpcomingEpisodesAsync(UpcomingEpisodesQuery query);
/// <summary>
/// Gets a genre

View File

@@ -50,10 +50,14 @@ namespace MediaBrowser.Model.ApiClient
{
existing.RemoteAddress = server.RemoteAddress;
}
if (!existing.IsLocalAddressFixed && !string.IsNullOrEmpty(server.LocalAddress))
if (!string.IsNullOrEmpty(server.LocalAddress))
{
existing.LocalAddress = server.LocalAddress;
}
if (!string.IsNullOrEmpty(server.ManualAddress))
{
existing.LocalAddress = server.ManualAddress;
}
if (!string.IsNullOrEmpty(server.Name))
{
existing.Name = server.Name;
@@ -62,9 +66,9 @@ namespace MediaBrowser.Model.ApiClient
{
existing.WakeOnLanInfos = server.WakeOnLanInfos.ToList();
}
if (server.IsLocalAddressFixed)
if (server.LastConnectionMode.HasValue)
{
existing.IsLocalAddressFixed = true;
existing.LastConnectionMode = server.LastConnectionMode;
}
}
else

View File

@@ -18,5 +18,10 @@ namespace MediaBrowser.Model.ApiClient
/// </summary>
/// <value>The name.</value>
public string Name { get; set; }
/// <summary>
/// Gets or sets the endpoint address.
/// </summary>
/// <value>The endpoint address.</value>
public string EndpointAddress { get; set; }
}
}

View File

@@ -11,14 +11,14 @@ namespace MediaBrowser.Model.ApiClient
public String Id { get; set; }
public String LocalAddress { get; set; }
public String RemoteAddress { get; set; }
public String ManualAddress { get; set; }
public String UserId { get; set; }
public String AccessToken { get; set; }
public List<WakeOnLanInfo> WakeOnLanInfos { get; set; }
public DateTime DateLastAccessed { get; set; }
public String ExchangeToken { get; set; }
public UserLinkType? UserLinkType { get; set; }
public bool IsLocalAddressFixed { get; set; }
public ConnectionMode? LastConnectionMode { get; set; }
public ServerInfo()
{
@@ -30,7 +30,7 @@ namespace MediaBrowser.Model.ApiClient
Name = systemInfo.ServerName;
Id = systemInfo.Id;
if (!IsLocalAddressFixed && !string.IsNullOrEmpty(systemInfo.LocalAddress))
if (!string.IsNullOrEmpty(systemInfo.LocalAddress))
{
LocalAddress = systemInfo.LocalAddress;
}
@@ -55,5 +55,20 @@ namespace MediaBrowser.Model.ApiClient
}
}
}
public string GetAddress(ConnectionMode mode)
{
switch (mode)
{
case ConnectionMode.Local:
return LocalAddress;
case ConnectionMode.Manual:
return ManualAddress;
case ConnectionMode.Remote:
return RemoteAddress;
default:
throw new ArgumentException("Unexpected ConnectionMode");
}
}
}
}