mirror of
https://github.com/jellyfin/jellyfin.git
synced 2024-09-06 11:34:57 +02:00
More style changes
This commit is contained in:
parent
93e535d3a1
commit
ca37ca291f
2 changed files with 4 additions and 7 deletions
|
@ -686,7 +686,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
var enableDlnaHeaders = !string.IsNullOrWhiteSpace(request.Params) /*||
|
var enableDlnaHeaders = !string.IsNullOrWhiteSpace(request.Params) /*||
|
||||||
string.Equals(Request.Headers.Get("GetContentFeatures.DLNA.ORG"), "1", StringComparison.OrdinalIgnoreCase)*/;
|
string.Equals(Request.Headers.Get("GetContentFeatures.DLNA.ORG"), "1", StringComparison.OrdinalIgnoreCase)*/;
|
||||||
|
|
||||||
var state = new StreamState(MediaSourceManager, Logger, TranscodingJobType)
|
var state = new StreamState(MediaSourceManager, TranscodingJobType)
|
||||||
{
|
{
|
||||||
Request = request,
|
Request = request,
|
||||||
RequestedUrl = url,
|
RequestedUrl = url,
|
||||||
|
@ -756,11 +756,11 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
mediaSource = string.IsNullOrEmpty(request.MediaSourceId)
|
mediaSource = string.IsNullOrEmpty(request.MediaSourceId)
|
||||||
? mediaSources[0]
|
? mediaSources[0]
|
||||||
: mediaSources.FirstOrDefault(i => string.Equals(i.Id, request.MediaSourceId));
|
: mediaSources.Find(i => string.Equals(i.Id, request.MediaSourceId));
|
||||||
|
|
||||||
if (mediaSource == null && request.MediaSourceId.Equals(request.Id))
|
if (mediaSource == null && request.MediaSourceId.Equals(request.Id))
|
||||||
{
|
{
|
||||||
mediaSource = mediaSources.First();
|
mediaSource = mediaSources[0];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,13 +2,11 @@ using System;
|
||||||
using MediaBrowser.Controller.Library;
|
using MediaBrowser.Controller.Library;
|
||||||
using MediaBrowser.Controller.MediaEncoding;
|
using MediaBrowser.Controller.MediaEncoding;
|
||||||
using MediaBrowser.Model.Dlna;
|
using MediaBrowser.Model.Dlna;
|
||||||
using Microsoft.Extensions.Logging;
|
|
||||||
|
|
||||||
namespace MediaBrowser.Api.Playback
|
namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
public class StreamState : EncodingJobInfo, IDisposable
|
public class StreamState : EncodingJobInfo, IDisposable
|
||||||
{
|
{
|
||||||
private readonly ILogger _logger;
|
|
||||||
private readonly IMediaSourceManager _mediaSourceManager;
|
private readonly IMediaSourceManager _mediaSourceManager;
|
||||||
private bool _disposed = false;
|
private bool _disposed = false;
|
||||||
|
|
||||||
|
@ -99,11 +97,10 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
public TranscodingJob TranscodingJob { get; set; }
|
public TranscodingJob TranscodingJob { get; set; }
|
||||||
|
|
||||||
public StreamState(IMediaSourceManager mediaSourceManager, ILogger logger, TranscodingJobType transcodingType)
|
public StreamState(IMediaSourceManager mediaSourceManager, TranscodingJobType transcodingType)
|
||||||
: base(transcodingType)
|
: base(transcodingType)
|
||||||
{
|
{
|
||||||
_mediaSourceManager = mediaSourceManager;
|
_mediaSourceManager = mediaSourceManager;
|
||||||
_logger = logger;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public override void ReportTranscodingProgress(TimeSpan? transcodingPosition, float framerate, double? percentComplete, long bytesTranscoded, int? bitRate)
|
public override void ReportTranscodingProgress(TimeSpan? transcodingPosition, float framerate, double? percentComplete, long bytesTranscoded, int? bitRate)
|
||||||
|
|
Loading…
Reference in a new issue