소스 검색

update EpisodeFileOrganizer

Luke Pulverenti 9 년 전
부모
커밋
bd38cb7a8b
1개의 변경된 파일17개의 추가작업 그리고 4개의 파일을 삭제
  1. 17 4
      MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs

+ 17 - 4
MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs

@@ -286,16 +286,29 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
             {
                 if (options.TvOptions.CopyOriginalFile && fileExists && IsSameEpisode(sourcePath, newPath))
                 {
-                    _logger.Info("File {0} already copied to new path {1}, stopping organization", sourcePath, newPath);
+                    var msg = string.Format("File '{0}' already copied to new path '{1}', stopping organization", sourcePath, newPath);
+                    _logger.Info(msg);
                     result.Status = FileSortingStatus.SkippedExisting;
-                    result.StatusMessage = string.Empty;
+                    result.StatusMessage = msg;
+                    return;
+                }
+
+                if (fileExists)
+                {
+                    var msg = string.Format("File '{0}' already exists as '{1}', stopping organization", sourcePath, newPath);
+                    _logger.Info(msg);
+                    result.Status = FileSortingStatus.SkippedExisting;
+                    result.StatusMessage = msg;
+                    result.TargetPath = newPath;
                     return;
                 }
 
-                if (fileExists || otherDuplicatePaths.Count > 0)
+                if (otherDuplicatePaths.Count > 0)
                 {
+                    var msg = string.Format("File '{0}' already exists as '{1}', stopping organization", sourcePath, otherDuplicatePaths);
+                    _logger.Info(msg);
                     result.Status = FileSortingStatus.SkippedExisting;
-                    result.StatusMessage = string.Empty;
+                    result.StatusMessage = msg;
                     result.DuplicatePaths = otherDuplicatePaths;
                     return;
                 }