aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations/FileOrganization
diff options
context:
space:
mode:
Diffstat (limited to 'MediaBrowser.Server.Implementations/FileOrganization')
-rw-r--r--MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs26
-rw-r--r--MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs1
2 files changed, 13 insertions, 14 deletions
diff --git a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs b/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs
index 5d326f1ca..d44811886 100644
--- a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs
+++ b/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs
@@ -180,7 +180,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
result.StatusMessage = string.Empty;
return;
}
-
+
if (fileExists || otherDuplicatePaths.Count > 0)
{
result.Status = FileSortingStatus.SkippedExisting;
@@ -453,24 +453,22 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
private bool IsSameEpisode(string sourcePath, string newPath)
{
+ var sourceFileInfo = new FileInfo(sourcePath);
+ var destinationFileInfo = new FileInfo(newPath);
- FileInfo sourceFileInfo = new FileInfo(sourcePath);
- FileInfo destinationFileInfo = new FileInfo(newPath);
-
- try
- {
- if (sourceFileInfo.Length == destinationFileInfo.Length)
- {
- return true;
- }
- }
- catch (FileNotFoundException)
+ try
+ {
+ if (sourceFileInfo.Length == destinationFileInfo.Length)
{
- return false;
+ return true;
}
-
+ }
+ catch (FileNotFoundException)
+ {
return false;
+ }
+ return false;
}
}
}
diff --git a/MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs b/MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs
index 23d0363cb..7f936791a 100644
--- a/MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs
+++ b/MediaBrowser.Server.Implementations/FileOrganization/NameUtils.cs
@@ -67,6 +67,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
.Replace("!", " ")
.Replace("(", " ")
.Replace(")", " ")
+ .Replace(":", " ")
.Replace(",", " ")
.Replace("-", " ")
.Replace(" a ", String.Empty, StringComparison.OrdinalIgnoreCase)