mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
update EpisodeFileOrganizer
This commit is contained in:
parent
d0ca9b1c07
commit
bd38cb7a8b
1 changed files with 17 additions and 4 deletions
|
@ -286,16 +286,29 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
|
||||||
{
|
{
|
||||||
if (options.TvOptions.CopyOriginalFile && fileExists && IsSameEpisode(sourcePath, newPath))
|
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.Status = FileSortingStatus.SkippedExisting;
|
||||||
result.StatusMessage = string.Empty;
|
result.StatusMessage = msg;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (fileExists || otherDuplicatePaths.Count > 0)
|
if (fileExists)
|
||||||
{
|
{
|
||||||
|
var msg = string.Format("File '{0}' already exists as '{1}', stopping organization", sourcePath, newPath);
|
||||||
|
_logger.Info(msg);
|
||||||
result.Status = FileSortingStatus.SkippedExisting;
|
result.Status = FileSortingStatus.SkippedExisting;
|
||||||
result.StatusMessage = string.Empty;
|
result.StatusMessage = msg;
|
||||||
|
result.TargetPath = newPath;
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
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 = msg;
|
||||||
result.DuplicatePaths = otherDuplicatePaths;
|
result.DuplicatePaths = otherDuplicatePaths;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue