update legacy hd homerun support

This commit is contained in:
Luke Pulverenti
2017-03-07 13:27:56 -05:00
parent 9e74d834a7
commit 9fa6868af3
27 changed files with 206 additions and 13 deletions

View File

@@ -409,18 +409,41 @@ namespace Emby.Server.Implementations.Library
if (options.DeleteFileLocation && locationType != LocationType.Remote && locationType != LocationType.Virtual)
{
// Assume only the first is required
// Add this flag to GetDeletePaths if required in the future
var isRequiredForDelete = true;
foreach (var fileSystemInfo in item.GetDeletePaths().ToList())
{
if (fileSystemInfo.IsDirectory)
try
{
_logger.Debug("Deleting path {0}", fileSystemInfo.FullName);
_fileSystem.DeleteDirectory(fileSystemInfo.FullName, true);
if (fileSystemInfo.IsDirectory)
{
_logger.Debug("Deleting path {0}", fileSystemInfo.FullName);
_fileSystem.DeleteDirectory(fileSystemInfo.FullName, true);
}
else
{
_logger.Debug("Deleting path {0}", fileSystemInfo.FullName);
_fileSystem.DeleteFile(fileSystemInfo.FullName);
}
}
else
catch (IOException)
{
_logger.Debug("Deleting path {0}", fileSystemInfo.FullName);
_fileSystem.DeleteFile(fileSystemInfo.FullName);
if (isRequiredForDelete)
{
throw;
}
}
catch (UnauthorizedAccessException)
{
if (isRequiredForDelete)
{
throw;
}
}
isRequiredForDelete = false;
}
if (parent != null)

View File

@@ -434,6 +434,11 @@ namespace Emby.Server.Implementations.Library
Policy = user.Policy
};
if (!hasPassword && Users.Count() == 1)
{
dto.EnableAutoLogin = true;
}
var image = user.GetImageInfo(ImageType.Primary, 0);
if (image != null)