From 6f55ff220a891fd63f6da7e329d8f4765341bdf3 Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Mon, 9 Feb 2015 15:54:04 -0500 Subject: added sync original quality --- .../Sync/SyncJobProcessor.cs | 9 +++++---- .../Sync/SyncManager.cs | 20 ++++++++++++++++++++ 2 files changed, 25 insertions(+), 4 deletions(-) (limited to 'MediaBrowser.Server.Implementations/Sync') diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs index e9d9dc46f..a254d862c 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs @@ -486,7 +486,8 @@ namespace MediaBrowser.Server.Implementations.Sync streamInfo.GetExternalSubtitles("dummy", false); // Mark as requiring conversion if transcoding the video, or if any subtitles need to be extracted - var requiresConversion = streamInfo.PlayMethod == PlayMethod.Transcode || externalSubs.Any(i => RequiresExtraction(i, mediaSource)); + var requiresVideoTranscoding = streamInfo.PlayMethod == PlayMethod.Transcode && job.Quality != SyncQuality.Original; + var requiresConversion = requiresVideoTranscoding || externalSubs.Any(i => RequiresExtraction(i, mediaSource)); if (requiresConversion && !enableConversion) { @@ -501,7 +502,7 @@ namespace MediaBrowser.Server.Implementations.Sync jobItem.Status = SyncJobItemStatus.Converting; } - if (streamInfo.PlayMethod == PlayMethod.Transcode) + if (requiresVideoTranscoding) { // Save the job item now since conversion could take a while await _syncManager.UpdateSyncJobItemInternal(jobItem).ConfigureAwait(false); @@ -673,7 +674,7 @@ namespace MediaBrowser.Server.Implementations.Sync jobItem.MediaSourceId = streamInfo.MediaSourceId; jobItem.TemporaryPath = GetTemporaryPath(jobItem); - if (streamInfo.PlayMethod == PlayMethod.Transcode) + if (streamInfo.PlayMethod == PlayMethod.Transcode && job.Quality != SyncQuality.Original) { if (!enableConversion) { @@ -760,7 +761,7 @@ namespace MediaBrowser.Server.Implementations.Sync private async Task SyncGeneric(SyncJobItem jobItem, BaseItem item, CancellationToken cancellationToken) { jobItem.OutputPath = item.Path; - + jobItem.Progress = 50; jobItem.Status = SyncJobItemStatus.ReadyToTransfer; await _syncManager.UpdateSyncJobItemInternal(jobItem).ConfigureAwait(false); diff --git a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs index 0114d734a..098e2b095 100644 --- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs +++ b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs @@ -457,10 +457,30 @@ namespace MediaBrowser.Server.Implementations.Sync return false; } + if (video.VideoType == VideoType.BluRay || video.VideoType == VideoType.Dvd || video.VideoType == VideoType.HdDvd) + { + return false; + } + + if (video.IsPlaceHolder) + { + return false; + } + + if (video.IsArchive) + { + return false; + } + if (video.IsStacked) { return false; } + + if (video.IsShortcut) + { + return false; + } } var game = item as Game; -- cgit v1.2.3