diff --git a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs index fa86ac36d..5ba96283b 100644 --- a/Emby.Server.Implementations/LiveTv/LiveTvManager.cs +++ b/Emby.Server.Implementations/LiveTv/LiveTvManager.cs @@ -477,7 +477,8 @@ namespace Emby.Server.Implementations.LiveTv if (!(service is EmbyTV.EmbyTV)) { - // We can't trust that we'll be able to direct stream it through emby server, no matter what the provider says + // We can't trust that we'll be able to direct stream it through emby server, no matter what the provider says + mediaSource.SupportsDirectPlay = false; mediaSource.SupportsDirectStream = false; mediaSource.SupportsTranscoding = true; foreach (var stream in mediaSource.MediaStreams) diff --git a/MediaBrowser.Api/Playback/MediaInfoService.cs b/MediaBrowser.Api/Playback/MediaInfoService.cs index fcd18bfe4..55fe738e8 100644 --- a/MediaBrowser.Api/Playback/MediaInfoService.cs +++ b/MediaBrowser.Api/Playback/MediaInfoService.cs @@ -127,7 +127,7 @@ namespace MediaBrowser.Api.Playback SetDeviceSpecificData(item, result.MediaSource, profile, authInfo, request.MaxStreamingBitrate, request.StartTimeTicks ?? 0, result.MediaSource.Id, request.AudioStreamIndex, - request.SubtitleStreamIndex, request.MaxAudioChannels, request.PlaySessionId, request.UserId, true, true, true, true, true, true); + request.SubtitleStreamIndex, request.MaxAudioChannels, request.PlaySessionId, request.UserId, request.EnableDirectPlay, request.ForceDirectPlayRemoteMediaSource, request.EnableDirectStream, true, true, true); } else { diff --git a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs index 913967352..025f1bc7a 100644 --- a/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs +++ b/MediaBrowser.Model/MediaInfo/LiveStreamRequest.cs @@ -15,9 +15,15 @@ namespace MediaBrowser.Model.MediaInfo public string ItemId { get; set; } public DeviceProfile DeviceProfile { get; set; } + public bool EnableDirectPlay { get; set; } + public bool EnableDirectStream { get; set; } + public bool ForceDirectPlayRemoteMediaSource { get; set; } + public LiveStreamRequest() { - + ForceDirectPlayRemoteMediaSource = true; + EnableDirectPlay = true; + EnableDirectStream = true; } public LiveStreamRequest(AudioOptions options) diff --git a/MediaBrowser.Providers/Manager/ImageSaver.cs b/MediaBrowser.Providers/Manager/ImageSaver.cs index 4bd504409..91c366df5 100644 --- a/MediaBrowser.Providers/Manager/ImageSaver.cs +++ b/MediaBrowser.Providers/Manager/ImageSaver.cs @@ -226,7 +226,6 @@ namespace MediaBrowser.Providers.Manager return retryPath; } - private SemaphoreSlim _imageSaveSemaphore = new SemaphoreSlim(1, 1); /// /// Saves the image to location. /// @@ -240,8 +239,6 @@ namespace MediaBrowser.Providers.Manager var parentFolder = _fileSystem.GetDirectoryName(path); - await _imageSaveSemaphore.WaitAsync(cancellationToken).ConfigureAwait(false); - try { _libraryMonitor.ReportFileSystemChangeBeginning(path); @@ -263,8 +260,6 @@ namespace MediaBrowser.Providers.Manager } finally { - _imageSaveSemaphore.Release(); - _libraryMonitor.ReportFileSystemChangeComplete(path, false); _libraryMonitor.ReportFileSystemChangeComplete(parentFolder, false); }