update connect

This commit is contained in:
Luke Pulverenti
2014-10-14 00:22:17 -04:00
parent 16bc1f35ff
commit 1d70f5469f
18 changed files with 136 additions and 85 deletions

View File

@@ -25,7 +25,7 @@ namespace MediaBrowser.Controller.Connect
/// </summary>
/// <param name="userId">The user identifier.</param>
/// <returns>Task.</returns>
Task RemoveLink(string userId);
Task RemoveConnect(string userId);
/// <summary>
/// Invites the user.

View File

@@ -35,7 +35,7 @@ namespace MediaBrowser.Controller.Entities
public string ConnectUserName { get; set; }
public string ConnectUserId { get; set; }
public UserLinkType ConnectLinkType { get; set; }
public UserLinkType? ConnectLinkType { get; set; }
public string ConnectAccessKey { get; set; }
/// <summary>

View File

@@ -128,6 +128,7 @@ namespace MediaBrowser.Controller.Entities
public bool HasSubtitles { get; set; }
public bool IsPlaceHolder { get; set; }
public bool IsShortcut { get; set; }
/// <summary>
/// Gets or sets the tags.

View File

@@ -55,16 +55,16 @@ namespace MediaBrowser.Controller.Library
/// <param name="id">The identifier.</param>
/// <returns>User.</returns>
User GetUserById(string id);
/// <summary>
/// Authenticates a User and returns a result indicating whether or not it succeeded
/// </summary>
/// <param name="username">The username.</param>
/// <param name="password">The password.</param>
/// <param name="passwordSha1">The password sha1.</param>
/// <param name="remoteEndPoint">The remote end point.</param>
/// <returns>Task{System.Boolean}.</returns>
/// <exception cref="System.ArgumentNullException">user</exception>
Task<bool> AuthenticateUser(string username, string password, string remoteEndPoint);
Task<bool> AuthenticateUser(string username, string passwordSha1, string remoteEndPoint);
/// <summary>
/// Refreshes metadata for each user

View File

@@ -38,19 +38,24 @@ namespace MediaBrowser.Controller.Resolvers
// http://wiki.xbmc.org/index.php?title=Media_stubs
var isPlaceHolder = EntityResolutionHelper.IsVideoPlaceHolder(args.Path);
if (EntityResolutionHelper.IsVideoFile(args.Path) || isPlaceHolder)
{
var extension = Path.GetExtension(args.Path);
var extension = Path.GetExtension(args.Path);
var isShortcut = string.Equals(extension, ".strm", StringComparison.OrdinalIgnoreCase);
if (EntityResolutionHelper.IsVideoFile(args.Path) || isPlaceHolder || isShortcut)
{
var type = string.Equals(extension, ".iso", StringComparison.OrdinalIgnoreCase) || string.Equals(extension, ".img", StringComparison.OrdinalIgnoreCase) ?
VideoType.Iso : VideoType.VideoFile;
var path = args.Path;
var video = new TVideoType
{
VideoType = type,
Path = args.Path,
IsInMixedFolder = true,
IsPlaceHolder = isPlaceHolder
IsPlaceHolder = isPlaceHolder,
IsShortcut = isShortcut
};
if (isPlaceHolder)