mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-04-20 17:14:42 +01:00
Merge branch 'master' into mediaencoding
This commit is contained in:
@@ -155,7 +155,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
public bool EnableGroupByMetadataKey { get; set; }
|
||||
public bool? HasChapterImages { get; set; }
|
||||
|
||||
public ValueTuple<string, SortOrder>[] OrderBy { get; set; }
|
||||
public IReadOnlyList<(string, SortOrder)> OrderBy { get; set; }
|
||||
|
||||
public DateTime? MinDateCreated { get; set; }
|
||||
public DateTime? MinDateLastSaved { get; set; }
|
||||
|
||||
@@ -226,14 +226,16 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
|
||||
query.AncestorWithPresentationUniqueKey = null;
|
||||
query.SeriesPresentationUniqueKey = seriesKey;
|
||||
if (query.OrderBy.Length == 0)
|
||||
if (query.OrderBy.Count == 0)
|
||||
{
|
||||
query.OrderBy = new[] { ItemSortBy.SortName }.Select(i => new ValueTuple<string, SortOrder>(i, SortOrder.Ascending)).ToArray();
|
||||
}
|
||||
|
||||
if (query.IncludeItemTypes.Length == 0)
|
||||
{
|
||||
query.IncludeItemTypes = new[] { typeof(Episode).Name, typeof(Season).Name };
|
||||
}
|
||||
|
||||
query.IsVirtualItem = false;
|
||||
return LibraryManager.GetItemsResult(query);
|
||||
}
|
||||
|
||||
@@ -450,14 +450,16 @@ namespace MediaBrowser.Controller.Entities
|
||||
return SortAndPage(items, totalRecordLimit, query, libraryManager, true);
|
||||
}
|
||||
|
||||
public static QueryResult<BaseItem> SortAndPage(IEnumerable<BaseItem> items,
|
||||
public static QueryResult<BaseItem> SortAndPage(
|
||||
IEnumerable<BaseItem> items,
|
||||
int? totalRecordLimit,
|
||||
InternalItemsQuery query,
|
||||
ILibraryManager libraryManager, bool enableSorting)
|
||||
ILibraryManager libraryManager,
|
||||
bool enableSorting)
|
||||
{
|
||||
if (enableSorting)
|
||||
{
|
||||
if (query.OrderBy.Length > 0)
|
||||
if (query.OrderBy.Count > 0)
|
||||
{
|
||||
items = libraryManager.Sort(items, query.User, query.OrderBy);
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using MediaBrowser.Common;
|
||||
using MediaBrowser.Model.System;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace MediaBrowser.Controller
|
||||
{
|
||||
@@ -87,5 +88,9 @@ namespace MediaBrowser.Controller
|
||||
|
||||
string ExpandVirtualPath(string path);
|
||||
string ReverseVirtualPath(string path);
|
||||
|
||||
Task ExecuteHttpHandlerAsync(HttpContext context, Func<Task> next);
|
||||
|
||||
Task ExecuteWebsocketHandlerAsync(HttpContext context, Func<Task> next);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,24 +10,12 @@ namespace MediaBrowser.Controller
|
||||
/// <value>The root folder path.</value>
|
||||
string RootFolderPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the application resources path. This is the path to the folder containing resources that are deployed as part of the application
|
||||
/// </summary>
|
||||
/// <value>The application resources path.</value>
|
||||
string ApplicationResourcesPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the default user view directory. Used if no specific user view is defined.
|
||||
/// </summary>
|
||||
/// <value>The default user views path.</value>
|
||||
string DefaultUserViewsPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to localization data.
|
||||
/// </summary>
|
||||
/// <value>The localization path.</value>
|
||||
string LocalizationPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the People directory
|
||||
/// </summary>
|
||||
@@ -87,8 +75,13 @@ namespace MediaBrowser.Controller
|
||||
/// </summary>
|
||||
/// <value>The internal metadata path.</value>
|
||||
string InternalMetadataPath { get; }
|
||||
|
||||
string VirtualInternalMetadataPath { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the path to the artists directory.
|
||||
/// </summary>
|
||||
/// <value>The artists path.</value>
|
||||
string ArtistsPath { get; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -9,7 +9,7 @@ using MediaBrowser.Model.Entities;
|
||||
namespace MediaBrowser.Controller.Library
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface IUserDataManager
|
||||
/// Interface IUserDataManager.
|
||||
/// </summary>
|
||||
public interface IUserDataManager
|
||||
{
|
||||
@@ -26,13 +26,11 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <param name="userData">The user data.</param>
|
||||
/// <param name="reason">The reason.</param>
|
||||
/// <param name="cancellationToken">The cancellation token.</param>
|
||||
/// <returns>Task.</returns>
|
||||
void SaveUserData(Guid userId, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken);
|
||||
void SaveUserData(User userId, BaseItem item, UserItemData userData, UserDataSaveReason reason, CancellationToken cancellationToken);
|
||||
|
||||
UserItemData GetUserData(User user, BaseItem item);
|
||||
|
||||
UserItemData GetUserData(string userId, BaseItem item);
|
||||
UserItemData GetUserData(Guid userId, BaseItem item);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -49,20 +49,13 @@ namespace MediaBrowser.Controller.Library
|
||||
event EventHandler<GenericEventArgs<User>> UserLockedOut;
|
||||
|
||||
/// <summary>
|
||||
/// Gets a User by Id.
|
||||
/// Gets a user by Id.
|
||||
/// </summary>
|
||||
/// <param name="id">The id.</param>
|
||||
/// <returns>The user with the specified Id, or <c>null</c> if the user doesn't exist.</returns>
|
||||
/// <exception cref="ArgumentException"><c>id</c> is an empty Guid.</exception>
|
||||
User GetUserById(Guid id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the user by identifier.
|
||||
/// </summary>
|
||||
/// <param name="id">The identifier.</param>
|
||||
/// <returns>User.</returns>
|
||||
User GetUserById(string id);
|
||||
|
||||
/// <summary>
|
||||
/// Gets the name of the user by.
|
||||
/// </summary>
|
||||
|
||||
@@ -2542,13 +2542,25 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
case "h264":
|
||||
if (_mediaEncoder.SupportsDecoder("h264_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("h264", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v h264_mmal";
|
||||
return "-c:v h264_mmal ";
|
||||
}
|
||||
break;
|
||||
case "mpeg2video":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg2_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg2video", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg2_mmal";
|
||||
return "-c:v mpeg2_mmal ";
|
||||
}
|
||||
break;
|
||||
case "mpeg4":
|
||||
if (_mediaEncoder.SupportsDecoder("mpeg4_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("mpeg4", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v mpeg4_mmal ";
|
||||
}
|
||||
break;
|
||||
case "vc1":
|
||||
if (_mediaEncoder.SupportsDecoder("vc1_mmal") && encodingOptions.HardwareDecodingCodecs.Contains("vc1", StringComparer.OrdinalIgnoreCase))
|
||||
{
|
||||
return "-c:v vc1_mmal ";
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -1,9 +1,12 @@
|
||||
using MediaBrowser.Controller.Entities;
|
||||
using MediaBrowser.Model.Services;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace MediaBrowser.Controller.Net
|
||||
{
|
||||
public interface IAuthService
|
||||
{
|
||||
void Authenticate(IRequest request, IAuthenticationAttributes authAttribtues);
|
||||
User Authenticate(HttpRequest request, IAuthenticationAttributes authAttribtues);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -181,7 +181,7 @@ namespace MediaBrowser.Controller.Playlists
|
||||
{
|
||||
Recursive = true,
|
||||
IsFolder = false,
|
||||
OrderBy = new[] { ItemSortBy.SortName }.Select(i => new ValueTuple<string, SortOrder>(i, SortOrder.Ascending)).ToArray(),
|
||||
OrderBy = new[] { (ItemSortBy.SortName, SortOrder.Ascending) },
|
||||
MediaTypes = new[] { mediaType },
|
||||
EnableTotalRecordCount = false,
|
||||
DtoOptions = options
|
||||
|
||||
Reference in New Issue
Block a user