commit
15df2ec3e9
|
@ -635,6 +635,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
existingTimer.Status == RecordingStatus.Completed)
|
existingTimer.Status == RecordingStatus.Completed)
|
||||||
{
|
{
|
||||||
existingTimer.Status = RecordingStatus.New;
|
existingTimer.Status = RecordingStatus.New;
|
||||||
|
existingTimer.IsManual = true;
|
||||||
_timerProvider.Update(existingTimer);
|
_timerProvider.Update(existingTimer);
|
||||||
return Task.FromResult(existingTimer.Id);
|
return Task.FromResult(existingTimer.Id);
|
||||||
}
|
}
|
||||||
|
@ -663,6 +664,7 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
RecordingHelper.CopyProgramInfoToTimerInfo(programInfo, timer);
|
RecordingHelper.CopyProgramInfoToTimerInfo(programInfo, timer);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timer.IsManual = true;
|
||||||
_timerProvider.Add(timer);
|
_timerProvider.Add(timer);
|
||||||
return Task.FromResult(timer.Id);
|
return Task.FromResult(timer.Id);
|
||||||
}
|
}
|
||||||
|
@ -758,6 +760,8 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
existingTimer.PostPaddingSeconds = updatedTimer.PostPaddingSeconds;
|
existingTimer.PostPaddingSeconds = updatedTimer.PostPaddingSeconds;
|
||||||
existingTimer.IsPostPaddingRequired = updatedTimer.IsPostPaddingRequired;
|
existingTimer.IsPostPaddingRequired = updatedTimer.IsPostPaddingRequired;
|
||||||
existingTimer.IsPrePaddingRequired = updatedTimer.IsPrePaddingRequired;
|
existingTimer.IsPrePaddingRequired = updatedTimer.IsPrePaddingRequired;
|
||||||
|
|
||||||
|
_timerProvider.Update(existingTimer);
|
||||||
}
|
}
|
||||||
|
|
||||||
return Task.FromResult(true);
|
return Task.FromResult(true);
|
||||||
|
@ -2203,6 +2207,11 @@ namespace Emby.Server.Implementations.LiveTv.EmbyTV
|
||||||
|
|
||||||
private bool ShouldCancelTimerForSeriesTimer(SeriesTimerInfo seriesTimer, TimerInfo timer)
|
private bool ShouldCancelTimerForSeriesTimer(SeriesTimerInfo seriesTimer, TimerInfo timer)
|
||||||
{
|
{
|
||||||
|
if (timer.IsManual)
|
||||||
|
{
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (!seriesTimer.RecordAnyTime)
|
if (!seriesTimer.RecordAnyTime)
|
||||||
{
|
{
|
||||||
if (Math.Abs(seriesTimer.StartDate.TimeOfDay.Ticks - timer.StartDate.TimeOfDay.Ticks) >= TimeSpan.FromMinutes(5).Ticks)
|
if (Math.Abs(seriesTimer.StartDate.TimeOfDay.Ticks - timer.StartDate.TimeOfDay.Ticks) >= TimeSpan.FromMinutes(5).Ticks)
|
||||||
|
|
|
@ -954,8 +954,11 @@ namespace Emby.Server.Implementations.Session
|
||||||
{
|
{
|
||||||
var session = GetSessionToRemoteControl(sessionId);
|
var session = GetSessionToRemoteControl(sessionId);
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(controllingSessionId))
|
||||||
|
{
|
||||||
var controllingSession = GetSession(controllingSessionId);
|
var controllingSession = GetSession(controllingSessionId);
|
||||||
AssertCanControl(session, controllingSession);
|
AssertCanControl(session, controllingSession);
|
||||||
|
}
|
||||||
|
|
||||||
return session.SessionController.SendGeneralCommand(command, cancellationToken);
|
return session.SessionController.SendGeneralCommand(command, cancellationToken);
|
||||||
}
|
}
|
||||||
|
@ -1042,12 +1045,15 @@ namespace Emby.Server.Implementations.Session
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(controllingSessionId))
|
||||||
|
{
|
||||||
var controllingSession = GetSession(controllingSessionId);
|
var controllingSession = GetSession(controllingSessionId);
|
||||||
AssertCanControl(session, controllingSession);
|
AssertCanControl(session, controllingSession);
|
||||||
if (controllingSession.UserId.HasValue)
|
if (controllingSession.UserId.HasValue)
|
||||||
{
|
{
|
||||||
command.ControllingUserId = controllingSession.UserId.Value.ToString("N");
|
command.ControllingUserId = controllingSession.UserId.Value.ToString("N");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
await session.SessionController.SendPlayCommand(command, cancellationToken).ConfigureAwait(false);
|
await session.SessionController.SendPlayCommand(command, cancellationToken).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
@ -1136,12 +1142,15 @@ namespace Emby.Server.Implementations.Session
|
||||||
{
|
{
|
||||||
var session = GetSessionToRemoteControl(sessionId);
|
var session = GetSessionToRemoteControl(sessionId);
|
||||||
|
|
||||||
|
if (!string.IsNullOrWhiteSpace(controllingSessionId))
|
||||||
|
{
|
||||||
var controllingSession = GetSession(controllingSessionId);
|
var controllingSession = GetSession(controllingSessionId);
|
||||||
AssertCanControl(session, controllingSession);
|
AssertCanControl(session, controllingSession);
|
||||||
if (controllingSession.UserId.HasValue)
|
if (controllingSession.UserId.HasValue)
|
||||||
{
|
{
|
||||||
command.ControllingUserId = controllingSession.UserId.Value.ToString("N");
|
command.ControllingUserId = controllingSession.UserId.Value.ToString("N");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return session.SessionController.SendPlaystateCommand(command, cancellationToken);
|
return session.SessionController.SendPlaystateCommand(command, cancellationToken);
|
||||||
}
|
}
|
||||||
|
|
|
@ -127,7 +127,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
SetDeviceSpecificData(item, result.MediaSource, profile, authInfo, request.MaxStreamingBitrate,
|
SetDeviceSpecificData(item, result.MediaSource, profile, authInfo, request.MaxStreamingBitrate,
|
||||||
request.StartTimeTicks ?? 0, result.MediaSource.Id, request.AudioStreamIndex,
|
request.StartTimeTicks ?? 0, result.MediaSource.Id, request.AudioStreamIndex,
|
||||||
request.SubtitleStreamIndex, request.MaxAudioChannels, request.PlaySessionId, request.UserId);
|
request.SubtitleStreamIndex, request.MaxAudioChannels, request.PlaySessionId, request.UserId, true, true, true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -169,7 +169,7 @@ namespace MediaBrowser.Api.Playback
|
||||||
{
|
{
|
||||||
var mediaSourceId = request.MediaSourceId;
|
var mediaSourceId = request.MediaSourceId;
|
||||||
|
|
||||||
SetDeviceSpecificData(request.Id, info, profile, authInfo, request.MaxStreamingBitrate ?? profile.MaxStreamingBitrate, request.StartTimeTicks ?? 0, mediaSourceId, request.AudioStreamIndex, request.SubtitleStreamIndex, request.MaxAudioChannels, request.UserId);
|
SetDeviceSpecificData(request.Id, info, profile, authInfo, request.MaxStreamingBitrate ?? profile.MaxStreamingBitrate, request.StartTimeTicks ?? 0, mediaSourceId, request.AudioStreamIndex, request.SubtitleStreamIndex, request.MaxAudioChannels, request.UserId, request.EnableDirectPlay, request.EnableDirectStream, request.EnableTranscoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
return info;
|
return info;
|
||||||
|
@ -251,13 +251,16 @@ namespace MediaBrowser.Api.Playback
|
||||||
int? audioStreamIndex,
|
int? audioStreamIndex,
|
||||||
int? subtitleStreamIndex,
|
int? subtitleStreamIndex,
|
||||||
int? maxAudioChannels,
|
int? maxAudioChannels,
|
||||||
string userId)
|
string userId,
|
||||||
|
bool enableDirectPlay,
|
||||||
|
bool enableDirectStream,
|
||||||
|
bool enableTranscoding)
|
||||||
{
|
{
|
||||||
var item = _libraryManager.GetItemById(itemId);
|
var item = _libraryManager.GetItemById(itemId);
|
||||||
|
|
||||||
foreach (var mediaSource in result.MediaSources)
|
foreach (var mediaSource in result.MediaSources)
|
||||||
{
|
{
|
||||||
SetDeviceSpecificData(item, mediaSource, profile, auth, maxBitrate, startTimeTicks, mediaSourceId, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, result.PlaySessionId, userId);
|
SetDeviceSpecificData(item, mediaSource, profile, auth, maxBitrate, startTimeTicks, mediaSourceId, audioStreamIndex, subtitleStreamIndex, maxAudioChannels, result.PlaySessionId, userId, enableDirectPlay, enableDirectStream, enableTranscoding);
|
||||||
}
|
}
|
||||||
|
|
||||||
SortMediaSources(result, maxBitrate);
|
SortMediaSources(result, maxBitrate);
|
||||||
|
@ -274,7 +277,10 @@ namespace MediaBrowser.Api.Playback
|
||||||
int? subtitleStreamIndex,
|
int? subtitleStreamIndex,
|
||||||
int? maxAudioChannels,
|
int? maxAudioChannels,
|
||||||
string playSessionId,
|
string playSessionId,
|
||||||
string userId)
|
string userId,
|
||||||
|
bool enableDirectPlay,
|
||||||
|
bool enableDirectStream,
|
||||||
|
bool enableTranscoding)
|
||||||
{
|
{
|
||||||
var streamBuilder = new StreamBuilder(_mediaEncoder, Logger);
|
var streamBuilder = new StreamBuilder(_mediaEncoder, Logger);
|
||||||
|
|
||||||
|
@ -297,6 +303,19 @@ namespace MediaBrowser.Api.Playback
|
||||||
|
|
||||||
var user = _userManager.GetUserById(userId);
|
var user = _userManager.GetUserById(userId);
|
||||||
|
|
||||||
|
if (!enableDirectPlay)
|
||||||
|
{
|
||||||
|
mediaSource.SupportsDirectPlay = false;
|
||||||
|
}
|
||||||
|
if (!enableDirectStream)
|
||||||
|
{
|
||||||
|
mediaSource.SupportsDirectStream = false;
|
||||||
|
}
|
||||||
|
if (!enableTranscoding)
|
||||||
|
{
|
||||||
|
mediaSource.SupportsTranscoding = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (mediaSource.SupportsDirectPlay)
|
if (mediaSource.SupportsDirectPlay)
|
||||||
{
|
{
|
||||||
var supportsDirectStream = mediaSource.SupportsDirectStream;
|
var supportsDirectStream = mediaSource.SupportsDirectStream;
|
||||||
|
|
|
@ -88,6 +88,8 @@ namespace MediaBrowser.Controller.LiveTv
|
||||||
/// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value>
|
/// <value><c>true</c> if this instance is post padding required; otherwise, <c>false</c>.</value>
|
||||||
public bool IsPostPaddingRequired { get; set; }
|
public bool IsPostPaddingRequired { get; set; }
|
||||||
|
|
||||||
|
public bool IsManual { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the priority.
|
/// Gets or sets the priority.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
|
@ -23,5 +23,16 @@ namespace MediaBrowser.Model.MediaInfo
|
||||||
public string LiveStreamId { get; set; }
|
public string LiveStreamId { get; set; }
|
||||||
|
|
||||||
public DeviceProfile DeviceProfile { get; set; }
|
public DeviceProfile DeviceProfile { get; set; }
|
||||||
|
|
||||||
|
public bool EnableDirectPlay { get; set; }
|
||||||
|
public bool EnableDirectStream { get; set; }
|
||||||
|
public bool EnableTranscoding { get; set; }
|
||||||
|
|
||||||
|
public PlaybackInfoRequest()
|
||||||
|
{
|
||||||
|
EnableDirectPlay = true;
|
||||||
|
EnableDirectStream = true;
|
||||||
|
EnableTranscoding = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
|
||||||
[assembly: AssemblyVersion("3.2.1.110")]
|
[assembly: AssemblyVersion("3.2.1.111")]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user