diff options
Diffstat (limited to 'MediaBrowser.Server.Implementations/Sync/SyncHelper.cs')
| -rw-r--r-- | MediaBrowser.Server.Implementations/Sync/SyncHelper.cs | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/MediaBrowser.Server.Implementations/Sync/SyncHelper.cs b/MediaBrowser.Server.Implementations/Sync/SyncHelper.cs new file mode 100644 index 000000000..006284ee1 --- /dev/null +++ b/MediaBrowser.Server.Implementations/Sync/SyncHelper.cs @@ -0,0 +1,24 @@ +using System; + +namespace MediaBrowser.Server.Implementations.Sync +{ + public class SyncHelper + { + public static int? AdjustBitrate(int? profileBitrate, string quality) + { + if (profileBitrate.HasValue) + { + if (string.Equals(quality, "medium", StringComparison.OrdinalIgnoreCase)) + { + profileBitrate = Convert.ToInt32(profileBitrate.Value * .75); + } + else if (string.Equals(quality, "low", StringComparison.OrdinalIgnoreCase)) + { + profileBitrate = Convert.ToInt32(profileBitrate.Value*.5); + } + } + + return profileBitrate; + } + } +} |
