aboutsummaryrefslogtreecommitdiff
path: root/MediaBrowser.Server.Implementations
diff options
context:
space:
mode:
authorLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-15 19:33:06 -0500
committerLuke Pulverenti <luke.pulverenti@gmail.com>2015-02-15 19:33:06 -0500
commit8051ea9b1bebcccfa1471c1a3db0e03fd7a70bcd (patch)
tree2d3762a3bc0b2f581043aed093d06077d75c5926 /MediaBrowser.Server.Implementations
parent18ff8aba74593f4ad47aba5f001c812b2c9393fe (diff)
update javascript connection manager to latest feature set
Diffstat (limited to 'MediaBrowser.Server.Implementations')
-rw-r--r--MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs17
-rw-r--r--MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs2
2 files changed, 14 insertions, 5 deletions
diff --git a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs b/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs
index 10e50e497..7415fe092 100644
--- a/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs
+++ b/MediaBrowser.Server.Implementations/FileOrganization/EpisodeFileOrganizer.cs
@@ -210,7 +210,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
try
{
- _fileSystem.DeleteFile(path);
+ DeleteLibraryFile(path);
}
catch (IOException ex)
{
@@ -224,6 +224,15 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
}
}
+ private void DeleteLibraryFile(string path)
+ {
+ var filename = Path.GetFileNameWithoutExtension(path);
+
+ _fileSystem.DeleteFile(path);
+
+ // Now find other files
+ }
+
private List<string> GetOtherDuplicatePaths(string targetPath, Series series, int seasonNumber, int episodeNumber, int? endingEpisodeNumber)
{
var episodePaths = series.GetRecursiveChildren()
@@ -281,11 +290,11 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
Directory.CreateDirectory(Path.GetDirectoryName(result.TargetPath));
- var copy = File.Exists(result.TargetPath);
+ var targetAlreadyExists = File.Exists(result.TargetPath);
try
{
- if (copy || options.CopyOriginalFile)
+ if (targetAlreadyExists || options.CopyOriginalFile)
{
File.Copy(result.OriginalPath, result.TargetPath, true);
}
@@ -312,7 +321,7 @@ namespace MediaBrowser.Server.Implementations.FileOrganization
_libraryMonitor.ReportFileSystemChangeComplete(result.TargetPath, true);
}
- if (copy && !options.CopyOriginalFile)
+ if (targetAlreadyExists && !options.CopyOriginalFile)
{
try
{
diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs
index a254d862c..139d752fa 100644
--- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs
+++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs
@@ -483,7 +483,7 @@ namespace MediaBrowser.Server.Implementations.Sync
// No sense creating external subs if we're already burning one into the video
var externalSubs = streamInfo.SubtitleDeliveryMethod == SubtitleDeliveryMethod.Encode ?
new List<SubtitleStreamInfo>() :
- streamInfo.GetExternalSubtitles("dummy", false);
+ streamInfo.GetExternalSubtitles(false);
// Mark as requiring conversion if transcoding the video, or if any subtitles need to be extracted
var requiresVideoTranscoding = streamInfo.PlayMethod == PlayMethod.Transcode && job.Quality != SyncQuality.Original;