From a5c7e91620a0a73b72692838da68e29ef8c89dcb Mon Sep 17 00:00:00 2001 From: Luke Pulverenti Date: Thu, 31 Jul 2014 22:58:37 -0400 Subject: [PATCH] add hls abs setting --- MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs | 13 +++++++++++++ MediaBrowser.Model/ApiClient/IApiClient.cs | 8 ++++++++ Nuget/MediaBrowser.Common.Internal.nuspec | 4 ++-- Nuget/MediaBrowser.Common.nuspec | 2 +- Nuget/MediaBrowser.Model.Signed.nuspec | 2 +- Nuget/MediaBrowser.Server.Core.nuspec | 4 ++-- 6 files changed, 27 insertions(+), 6 deletions(-) diff --git a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs index c00e0c18b..10543351b 100644 --- a/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs +++ b/MediaBrowser.Api/Playback/Hls/DynamicHlsService.cs @@ -22,6 +22,12 @@ namespace MediaBrowser.Api.Playback.Hls [Api(Description = "Gets a video stream using HTTP live streaming.")] public class GetMasterHlsVideoStream : VideoStreamRequest { + public bool EnableAdaptiveBitrateStreaming { get; set; } + + public GetMasterHlsVideoStream() + { + EnableAdaptiveBitrateStreaming = true; + } } [Route("/Videos/{Id}/main.m3u8", "GET")] @@ -375,6 +381,13 @@ namespace MediaBrowser.Api.Playback.Hls private bool EnableAdaptiveBitrateStreaming(StreamState state) { + var request = state.Request as GetMasterHlsVideoStream; + + if (request != null && !request.EnableAdaptiveBitrateStreaming) + { + return false; + } + if (string.IsNullOrWhiteSpace(state.MediaPath)) { // Opening live streams is so slow it's not even worth it diff --git a/MediaBrowser.Model/ApiClient/IApiClient.cs b/MediaBrowser.Model/ApiClient/IApiClient.cs index f4f45ec8e..40b918550 100644 --- a/MediaBrowser.Model/ApiClient/IApiClient.cs +++ b/MediaBrowser.Model/ApiClient/IApiClient.cs @@ -286,6 +286,14 @@ namespace MediaBrowser.Model.ApiClient /// query Task GetItemsAsync(ItemQuery query, CancellationToken cancellationToken); + /// + /// Gets the user views. + /// + /// The user identifier. + /// The cancellation token. + /// Task<ItemsResult>. + Task GetUserViews(string userId, CancellationToken cancellationToken); + /// /// Gets the instant mix from song async. /// diff --git a/Nuget/MediaBrowser.Common.Internal.nuspec b/Nuget/MediaBrowser.Common.Internal.nuspec index 884fbe48d..ce34a1b30 100644 --- a/Nuget/MediaBrowser.Common.Internal.nuspec +++ b/Nuget/MediaBrowser.Common.Internal.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common.Internal - 3.0.421 + 3.0.422 MediaBrowser.Common.Internal Luke ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains common components shared by Media Browser Theater and Media Browser Server. Not intended for plugin developer consumption. Copyright © Media Browser 2013 - + diff --git a/Nuget/MediaBrowser.Common.nuspec b/Nuget/MediaBrowser.Common.nuspec index 853dc464e..5f09afa68 100644 --- a/Nuget/MediaBrowser.Common.nuspec +++ b/Nuget/MediaBrowser.Common.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Common - 3.0.421 + 3.0.422 MediaBrowser.Common Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Model.Signed.nuspec b/Nuget/MediaBrowser.Model.Signed.nuspec index e9355ab48..df036cc98 100644 --- a/Nuget/MediaBrowser.Model.Signed.nuspec +++ b/Nuget/MediaBrowser.Model.Signed.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Model.Signed - 3.0.421 + 3.0.422 MediaBrowser.Model - Signed Edition Media Browser Team ebr,Luke,scottisafool diff --git a/Nuget/MediaBrowser.Server.Core.nuspec b/Nuget/MediaBrowser.Server.Core.nuspec index 9d80d47bc..ee54f248b 100644 --- a/Nuget/MediaBrowser.Server.Core.nuspec +++ b/Nuget/MediaBrowser.Server.Core.nuspec @@ -2,7 +2,7 @@ MediaBrowser.Server.Core - 3.0.421 + 3.0.422 Media Browser.Server.Core Media Browser Team ebr,Luke,scottisafool @@ -12,7 +12,7 @@ Contains core components required to build plugins for Media Browser Server. Copyright © Media Browser 2013 - +