The Free Software Media System - Server Backend & API
added sync original quality
Luke Pulverenti6f55ff220a89
diff --git a/MediaBrowser.Model/Sync/SyncQuality.cs b/MediaBrowser.Model/Sync/SyncQuality.csindex d34ad22c28..27ee756a32 100644--- a/MediaBrowser.Model/Sync/SyncQuality.cs+++ b/MediaBrowser.Model/Sync/SyncQuality.cs@@ -16,6 +16,10 @@ namespace MediaBrowser.Model.Sync/// <summary>/// The best/// </summary>- High = 2+ High = 2,+ /// <summary>+ /// The original+ /// </summary>+ Original = 3}}diff --git a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.jsonindex 9d2c98c831..d5958358d7 100644--- a/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json+++ b/MediaBrowser.Server.Implementations/Localization/JavaScript/javascript.json@@ -97,7 +97,7 @@"HeaderSelectSubtitles": "Select Subtitles","ButtonMarkForRemoval": "Remove from device","ButtonUnmarkForRemoval": "Cancel removal from device",- "LabelSyncQualityHelp": "Use high quality for the maximum supported quality by the device. Medium and low quality will reduce the allowed bitrate.",+ "LabelSyncQualityHelp": "Use high quality for the maximum supported quality by the device. Medium and low quality will reduce the allowed bitrate. Original will sync the original file, regardless of whether the device is capable of playing it or not.","LabelDefaultStream": "(Default)","LabelForcedStream": "(Forced)","LabelDefaultForcedStream": "(Default/Forced)",@@ -708,6 +708,7 @@"LabelSyncTo": "Sync to:","LabelSyncJobName": "Sync job name:","LabelQuality": "Quality:",+ "OptionOriginal": "Original","OptionHigh": "High","OptionMedium": "Medium","OptionLow": "Low",diff --git a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.csindex e9d9dc46f3..a254d862cb 100644--- a/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs+++ b/MediaBrowser.Server.Implementations/Sync/SyncJobProcessor.cs@@ -486,7 +486,8 @@ namespace MediaBrowser.Server.Implementations.SyncstreamInfo.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.SyncjobItem.Status = SyncJobItemStatus.Converting;}- if (streamInfo.PlayMethod == PlayMethod.Transcode)+ if (requiresVideoTranscoding){// Save the job item now since conversion could take a whileawait _syncManager.UpdateSyncJobItemInternal(jobItem).ConfigureAwait(false);@@ -673,7 +674,7 @@ namespace MediaBrowser.Server.Implementations.SyncjobItem.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.Syncprivate 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.csindex 0114d734aa..098e2b0959 100644--- a/MediaBrowser.Server.Implementations/Sync/SyncManager.cs+++ b/MediaBrowser.Server.Implementations/Sync/SyncManager.cs@@ -457,10 +457,30 @@ namespace MediaBrowser.Server.Implementations.Syncreturn 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;