mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 10:04:44 +01:00
connect updates
This commit is contained in:
22
MediaBrowser.Model/ApiClient/ApiHelpers.cs
Normal file
22
MediaBrowser.Model/ApiClient/ApiHelpers.cs
Normal file
@@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace MediaBrowser.Model.ApiClient
|
||||
{
|
||||
public static class ApiHelpers
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the name of the slug.
|
||||
/// </summary>
|
||||
/// <param name="name">The name.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
public static string GetSlugName(string name)
|
||||
{
|
||||
if (string.IsNullOrEmpty(name))
|
||||
{
|
||||
throw new ArgumentNullException("name");
|
||||
}
|
||||
|
||||
return name.Replace('/', '-').Replace('?', '-').Replace('&', '-');
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,7 @@ namespace MediaBrowser.Model.ApiClient
|
||||
Unavailable = 1,
|
||||
ServerSignIn = 2,
|
||||
SignedIn = 3,
|
||||
ServerSelection = 4
|
||||
ServerSelection = 4,
|
||||
ConnectSignIn = 5
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
|
||||
namespace MediaBrowser.Model.ApiClient
|
||||
@@ -18,5 +19,15 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// </summary>
|
||||
/// <value>The status code.</value>
|
||||
public HttpStatusCode StatusCode { get; set; }
|
||||
/// <summary>
|
||||
/// Gets or sets the headers.
|
||||
/// </summary>
|
||||
/// <value>The headers.</value>
|
||||
public Dictionary<string, string> Headers { get; set; }
|
||||
|
||||
public HttpResponseEventArgs()
|
||||
{
|
||||
Headers = new Dictionary<string, string>();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ namespace MediaBrowser.Model.ApiClient
|
||||
/// <summary>
|
||||
/// Occurs when [remote logged out].
|
||||
/// </summary>
|
||||
event EventHandler<EventArgs> RemoteLoggedOut;
|
||||
event EventHandler<GenericEventArgs<RemoteLogoutReason>> RemoteLoggedOut;
|
||||
|
||||
/// <summary>
|
||||
/// Occurs when [authenticated].
|
||||
|
||||
9
MediaBrowser.Model/ApiClient/RemoteLogoutReason.cs
Normal file
9
MediaBrowser.Model/ApiClient/RemoteLogoutReason.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
|
||||
namespace MediaBrowser.Model.ApiClient
|
||||
{
|
||||
public enum RemoteLogoutReason
|
||||
{
|
||||
GeneralAccesError = 0,
|
||||
ParentalControlRestriction = 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user