New: Now checks the file size of moved episodes to verify if the transfer was completed successfully to be able to detect errors with mounted network storage.

This commit is contained in:
Taloth Saldono 2014-11-15 01:42:22 +01:00
parent aa4fca7177
commit 5effca92b8
20 changed files with 747 additions and 289 deletions

View file

@ -16,6 +16,7 @@ namespace NzbDrone.Update.UpdateEngine
public class InstallUpdateService : IInstallUpdateService
{
private readonly IDiskProvider _diskProvider;
private readonly IDiskTransferService _diskTransferService;
private readonly IDetectApplicationType _detectApplicationType;
private readonly ITerminateNzbDrone _terminateNzbDrone;
private readonly IAppFolderInfo _appFolderInfo;
@ -26,6 +27,7 @@ namespace NzbDrone.Update.UpdateEngine
private readonly Logger _logger;
public InstallUpdateService(IDiskProvider diskProvider,
IDiskTransferService diskTransferService,
IDetectApplicationType detectApplicationType,
ITerminateNzbDrone terminateNzbDrone,
IAppFolderInfo appFolderInfo,
@ -36,6 +38,7 @@ namespace NzbDrone.Update.UpdateEngine
Logger logger)
{
_diskProvider = diskProvider;
_diskTransferService = diskTransferService;
_detectApplicationType = detectApplicationType;
_terminateNzbDrone = terminateNzbDrone;
_appFolderInfo = appFolderInfo;
@ -93,7 +96,7 @@ namespace NzbDrone.Update.UpdateEngine
_diskProvider.EmptyFolder(installationFolder);
_logger.Info("Copying new files to target folder");
_diskProvider.CopyFolder(_appFolderInfo.GetUpdatePackageFolder(), installationFolder);
_diskTransferService.TransferFolder(_appFolderInfo.GetUpdatePackageFolder(), installationFolder, TransferMode.Copy, false);
// Set executable flag on Sonarr app
if (OsInfo.IsOsx)