mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-22 18:14:42 +01:00
Merge remote-tracking branch 'remotes/upstream/master' into kestrel_poc
This commit is contained in:
@@ -36,9 +36,7 @@ namespace MediaBrowser.Controller.Dto
|
||||
.ToArray();
|
||||
|
||||
public bool ContainsField(ItemFields field)
|
||||
{
|
||||
return AllItemFields.Contains(field);
|
||||
}
|
||||
=> Fields.Contains(field);
|
||||
|
||||
public DtoOptions(bool allFields)
|
||||
{
|
||||
@@ -47,15 +45,7 @@ namespace MediaBrowser.Controller.Dto
|
||||
EnableUserData = true;
|
||||
AddCurrentProgram = true;
|
||||
|
||||
if (allFields)
|
||||
{
|
||||
Fields = AllItemFields;
|
||||
}
|
||||
else
|
||||
{
|
||||
Fields = new ItemFields[] { };
|
||||
}
|
||||
|
||||
Fields = allFields ? AllItemFields : Array.Empty<ItemFields>();
|
||||
ImageTypes = AllImageTypes;
|
||||
}
|
||||
|
||||
|
||||
@@ -57,9 +57,7 @@ namespace MediaBrowser.Controller.Dto
|
||||
/// <param name="options">The options.</param>
|
||||
/// <param name="user">The user.</param>
|
||||
/// <param name="owner">The owner.</param>
|
||||
BaseItemDto[] GetBaseItemDtos(BaseItem[] items, DtoOptions options, User user = null, BaseItem owner = null);
|
||||
|
||||
BaseItemDto[] GetBaseItemDtos(List<BaseItem> items, DtoOptions options, User user = null, BaseItem owner = null);
|
||||
BaseItemDto[] GetBaseItemDtos(IReadOnlyList<BaseItem> items, DtoOptions options, User user = null, BaseItem owner = null);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the item by name dto.
|
||||
|
||||
@@ -810,37 +810,19 @@ namespace MediaBrowser.Controller.Entities
|
||||
{
|
||||
if (query.ItemIds.Length > 0)
|
||||
{
|
||||
var result = LibraryManager.GetItemsResult(query);
|
||||
|
||||
if (query.OrderBy.Length == 0)
|
||||
{
|
||||
var ids = query.ItemIds.ToList();
|
||||
|
||||
// Try to preserve order
|
||||
result.Items = result.Items.OrderBy(i => ids.IndexOf(i.Id)).ToArray();
|
||||
}
|
||||
return result;
|
||||
return LibraryManager.GetItemsResult(query);
|
||||
}
|
||||
|
||||
return GetItemsInternal(query);
|
||||
}
|
||||
|
||||
public BaseItem[] GetItemList(InternalItemsQuery query)
|
||||
public IReadOnlyList<BaseItem> GetItemList(InternalItemsQuery query)
|
||||
{
|
||||
query.EnableTotalRecordCount = false;
|
||||
|
||||
if (query.ItemIds.Length > 0)
|
||||
{
|
||||
var result = LibraryManager.GetItemList(query);
|
||||
|
||||
if (query.OrderBy.Length == 0)
|
||||
{
|
||||
var ids = query.ItemIds.ToList();
|
||||
|
||||
// Try to preserve order
|
||||
return result.OrderBy(i => ids.IndexOf(i.Id)).ToArray();
|
||||
}
|
||||
return result.ToArray();
|
||||
return LibraryManager.GetItemList(query);
|
||||
}
|
||||
|
||||
return GetItemsInternal(query).Items;
|
||||
|
||||
@@ -1904,7 +1904,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
flags.Add("+ignidx");
|
||||
}
|
||||
if (state.GenPtsInput)
|
||||
if (state.GenPtsInput || string.Equals(state.OutputVideoCodec, "copy", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
flags.Add("+genpts");
|
||||
}
|
||||
|
||||
@@ -6,6 +6,7 @@ using MediaBrowser.Model.Dlna;
|
||||
using MediaBrowser.Model.Entities;
|
||||
using MediaBrowser.Model.IO;
|
||||
using MediaBrowser.Model.MediaInfo;
|
||||
using MediaBrowser.Model.System;
|
||||
|
||||
namespace MediaBrowser.Controller.MediaEncoding
|
||||
{
|
||||
@@ -14,7 +15,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
/// </summary>
|
||||
public interface IMediaEncoder : ITranscoderSupport
|
||||
{
|
||||
string EncoderLocationType { get; }
|
||||
FFmpegLocation EncoderLocation { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the encoder path.
|
||||
@@ -91,7 +92,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
/// <returns>System.String.</returns>
|
||||
string EscapeSubtitleFilterPath(string path);
|
||||
|
||||
void Init();
|
||||
void SetFFmpegPath();
|
||||
|
||||
void UpdateEncoderPath(string path, string pathType);
|
||||
bool SupportsEncoder(string encoder);
|
||||
|
||||
@@ -32,16 +32,17 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
var bytes = Encoding.UTF8.GetBytes(Environment.NewLine + line);
|
||||
|
||||
// If ffmpeg process is closed, the state is disposed, so don't write to target in that case
|
||||
if (!target.CanWrite)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
await target.WriteAsync(bytes, 0, bytes.Length).ConfigureAwait(false);
|
||||
await target.FlushAsync().ConfigureAwait(false);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (ObjectDisposedException)
|
||||
{
|
||||
//TODO Investigate and properly fix.
|
||||
// Don't spam the log. This doesn't seem to throw in windows, but sometimes under linux
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "Error reading ffmpeg log");
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace MediaBrowser.Controller.Security
|
||||
{
|
||||
public interface IEncryptionManager
|
||||
{
|
||||
/// <summary>
|
||||
/// Encrypts the string.
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string EncryptString(string value);
|
||||
|
||||
/// <summary>
|
||||
/// Decrypts the string.
|
||||
/// </summary>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <returns>System.String.</returns>
|
||||
string DecryptString(string value);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user