commit
bda4afeede
|
@ -1030,6 +1030,18 @@ namespace Emby.Server.Implementations.Sync
|
||||||
{
|
{
|
||||||
await CancelJobItem(jobItem.Id).ConfigureAwait(false);
|
await CancelJobItem(jobItem.Id).ConfigureAwait(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var syncJobResult = await GetJobs(new SyncJobQuery
|
||||||
|
{
|
||||||
|
ItemId = item,
|
||||||
|
TargetId = targetId
|
||||||
|
|
||||||
|
}).ConfigureAwait(false);
|
||||||
|
|
||||||
|
foreach (var job in syncJobResult.Items)
|
||||||
|
{
|
||||||
|
await CancelJob(job.Id).ConfigureAwait(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -360,6 +360,11 @@ namespace Emby.Server.Implementations.Sync
|
||||||
whereClauses.Add("UserId=?");
|
whereClauses.Add("UserId=?");
|
||||||
paramList.Add(query.UserId);
|
paramList.Add(query.UserId);
|
||||||
}
|
}
|
||||||
|
if (!string.IsNullOrWhiteSpace(query.ItemId))
|
||||||
|
{
|
||||||
|
whereClauses.Add("ItemIds like ?");
|
||||||
|
paramList.Add("%" + query.ItemId + "%");
|
||||||
|
}
|
||||||
if (query.SyncNewContent.HasValue)
|
if (query.SyncNewContent.HasValue)
|
||||||
{
|
{
|
||||||
whereClauses.Add("SyncNewContent=?");
|
whereClauses.Add("SyncNewContent=?");
|
||||||
|
|
|
@ -1967,10 +1967,15 @@ namespace MediaBrowser.Api.Playback
|
||||||
state.OutputVideoCodec = state.VideoRequest.VideoCodec;
|
state.OutputVideoCodec = state.VideoRequest.VideoCodec;
|
||||||
state.OutputVideoBitrate = GetVideoBitrateParamValue(state.VideoRequest, state.VideoStream, state.OutputVideoCodec);
|
state.OutputVideoBitrate = GetVideoBitrateParamValue(state.VideoRequest, state.VideoStream, state.OutputVideoCodec);
|
||||||
|
|
||||||
if (state.OutputVideoBitrate.HasValue)
|
if (videoRequest != null)
|
||||||
|
{
|
||||||
|
TryStreamCopy(state, videoRequest);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (state.OutputVideoBitrate.HasValue && !string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))
|
||||||
{
|
{
|
||||||
var resolution = ResolutionNormalizer.Normalize(
|
var resolution = ResolutionNormalizer.Normalize(
|
||||||
state.VideoStream == null ? (int?)null : state.VideoStream.BitRate,
|
state.VideoStream == null ? (int?) null : state.VideoStream.BitRate,
|
||||||
state.OutputVideoBitrate.Value,
|
state.OutputVideoBitrate.Value,
|
||||||
state.VideoStream == null ? null : state.VideoStream.Codec,
|
state.VideoStream == null ? null : state.VideoStream.Codec,
|
||||||
state.OutputVideoCodec,
|
state.OutputVideoCodec,
|
||||||
|
@ -1980,13 +1985,12 @@ namespace MediaBrowser.Api.Playback
|
||||||
videoRequest.MaxWidth = resolution.MaxWidth;
|
videoRequest.MaxWidth = resolution.MaxWidth;
|
||||||
videoRequest.MaxHeight = resolution.MaxHeight;
|
videoRequest.MaxHeight = resolution.MaxHeight;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
ApplyDeviceProfileSettings(state);
|
ApplyDeviceProfileSettings(state);
|
||||||
|
}
|
||||||
if (videoRequest != null)
|
else
|
||||||
{
|
{
|
||||||
TryStreamCopy(state, videoRequest);
|
ApplyDeviceProfileSettings(state);
|
||||||
}
|
}
|
||||||
|
|
||||||
state.OutputFilePath = GetOutputFilePath(state);
|
state.OutputFilePath = GetOutputFilePath(state);
|
||||||
|
|
|
@ -24,6 +24,7 @@ namespace MediaBrowser.Model.Sync
|
||||||
/// <value>The user identifier.</value>
|
/// <value>The user identifier.</value>
|
||||||
public string UserId { get; set; }
|
public string UserId { get; set; }
|
||||||
public string ExcludeTargetIds { get; set; }
|
public string ExcludeTargetIds { get; set; }
|
||||||
|
public string ItemId { get; set; }
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets the status.
|
/// Gets or sets the status.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user