diff options
| author | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-08-18 20:13:47 -0400 |
|---|---|---|
| committer | Luke Pulverenti <luke.pulverenti@gmail.com> | 2016-08-18 20:13:47 -0400 |
| commit | 23949f83e5001f0be8cbd233faecbab84530c17c (patch) | |
| tree | 32c4764310cc2fa0d5b91f985a9b81896b142a24 /MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs | |
| parent | eb36b009cab033ab339c2cc521f3aeab0dc744fd (diff) | |
| parent | ba9f322ababbaf6d309060dd41991c1d7ae281b0 (diff) | |
Merge branch 'dev' of https://github.com/MediaBrowser/Emby into dev
Diffstat (limited to 'MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs index 60d515e12..9e16613e6 100644 --- a/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs +++ b/MediaBrowser.Server.Implementations/FileOrganization/FileOrganizationService.cs @@ -112,8 +112,13 @@ namespace MediaBrowser.Server.Implementations.FileOrganization var organizer = new EpisodeFileOrganizer(this, _config, _fileSystem, _logger, _libraryManager, _libraryMonitor, _providerManager); - await organizer.OrganizeEpisodeFile(result.OriginalPath, GetAutoOrganizeOptions(), true, CancellationToken.None) + var organizeResult = await organizer.OrganizeEpisodeFile(result.OriginalPath, GetAutoOrganizeOptions(), true, CancellationToken.None) .ConfigureAwait(false); + + if (organizeResult.Status != FileSortingStatus.Success) + { + throw new Exception(result.StatusMessage); + } } public Task ClearLog() @@ -126,7 +131,12 @@ namespace MediaBrowser.Server.Implementations.FileOrganization var organizer = new EpisodeFileOrganizer(this, _config, _fileSystem, _logger, _libraryManager, _libraryMonitor, _providerManager); - await organizer.OrganizeWithCorrection(request, GetAutoOrganizeOptions(), CancellationToken.None).ConfigureAwait(false); + var result = await organizer.OrganizeWithCorrection(request, GetAutoOrganizeOptions(), CancellationToken.None).ConfigureAwait(false); + + if (result.Status != FileSortingStatus.Success) + { + throw new Exception(result.StatusMessage); + } } public QueryResult<SmartMatchInfo> GetSmartMatchInfos(FileOrganizationResultQuery query) |
