mirror of
https://github.com/jellyfin/jellyfin.git
synced 2025-06-03 21:54:26 -04:00
Apply suggestions from code review
Co-authored-by: Cody Robibero <cody@robibe.ro>
This commit is contained in:
parent
5267851e64
commit
473628ba3a
@ -12,7 +12,7 @@ using MediaBrowser.Controller.Persistence;
|
|||||||
using MediaBrowser.Controller.Playlists;
|
using MediaBrowser.Controller.Playlists;
|
||||||
using MediaBrowser.Model.Querying;
|
using MediaBrowser.Model.Querying;
|
||||||
|
|
||||||
namespace Jellyfin.Server.Implementations.Item;
|
namespace Emby.Server.Implementations.Data;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Provides static topic based lookups for the BaseItemKind.
|
/// Provides static topic based lookups for the BaseItemKind.
|
||||||
|
@ -97,7 +97,7 @@ public class MoviesController : BaseJellyfinApiController
|
|||||||
DtoOptions = dtoOptions
|
DtoOptions = dtoOptions
|
||||||
};
|
};
|
||||||
|
|
||||||
var recentlyPlayedMovies = _libraryManager.GetItemList(query)!;
|
var recentlyPlayedMovies = _libraryManager.GetItemList(query);
|
||||||
|
|
||||||
var itemTypes = new List<BaseItemKind> { BaseItemKind.Movie };
|
var itemTypes = new List<BaseItemKind> { BaseItemKind.Movie };
|
||||||
if (_serverConfigurationManager.Configuration.EnableExternalContentInSuggestions)
|
if (_serverConfigurationManager.Configuration.EnableExternalContentInSuggestions)
|
||||||
|
@ -6,7 +6,7 @@ using System.ComponentModel.DataAnnotations.Schema;
|
|||||||
namespace Jellyfin.Data.Entities;
|
namespace Jellyfin.Data.Entities;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents an Key-Value relaten of an BaseItem's provider.
|
/// Represents a Key-Value relation of an BaseItem's provider.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class BaseItemProvider
|
public class BaseItemProvider
|
||||||
{
|
{
|
||||||
|
@ -6,10 +6,6 @@ namespace Jellyfin.Data.Entities;
|
|||||||
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
#pragma warning disable CS1591 // Missing XML comment for publicly visible type or member
|
||||||
public class MediaStreamInfo
|
public class MediaStreamInfo
|
||||||
{
|
{
|
||||||
public MediaStreamInfo()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
public required Guid ItemId { get; set; }
|
public required Guid ItemId { get; set; }
|
||||||
|
|
||||||
public required BaseItemEntity Item { get; set; }
|
public required BaseItemEntity Item { get; set; }
|
||||||
|
@ -37,7 +37,7 @@ public class MediaStreamRepository(IDbContextFactory<JellyfinDbContext> dbProvid
|
|||||||
public IReadOnlyList<MediaStream> GetMediaStreams(MediaStreamQuery filter)
|
public IReadOnlyList<MediaStream> GetMediaStreams(MediaStreamQuery filter)
|
||||||
{
|
{
|
||||||
using var context = dbProvider.CreateDbContext();
|
using var context = dbProvider.CreateDbContext();
|
||||||
return TranslateQuery(context.MediaStreamInfos, filter).ToList().Select(Map).ToImmutableArray();
|
return TranslateQuery(context.MediaStreamInfos, filter).AsEnumerable().Select(Map).ToImmutableArray();
|
||||||
}
|
}
|
||||||
|
|
||||||
private string? GetPathToSave(string? path)
|
private string? GetPathToSave(string? path)
|
||||||
|
@ -51,7 +51,7 @@ public interface IItemTypeLookup
|
|||||||
public IReadOnlyList<BaseItemKind> ArtistsTypes { get; }
|
public IReadOnlyList<BaseItemKind> ArtistsTypes { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets mapping for all BaseItemKinds and their expected serialisaition target.
|
/// Gets mapping for all BaseItemKinds and their expected serialization target.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public IDictionary<BaseItemKind, string?> BaseItemKindNames { get; }
|
public IDictionary<BaseItemKind, string?> BaseItemKindNames { get; }
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public interface IPeopleRepository
|
|||||||
/// Gets the people.
|
/// Gets the people.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter">The query.</param>
|
/// <param name="filter">The query.</param>
|
||||||
/// <returns>List<PersonInfo>.</returns>
|
/// <returns>The list of people matching the filter.</returns>
|
||||||
IReadOnlyList<PersonInfo> GetPeople(InternalPeopleQuery filter);
|
IReadOnlyList<PersonInfo> GetPeople(InternalPeopleQuery filter);
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@ -28,6 +28,6 @@ public interface IPeopleRepository
|
|||||||
/// Gets the people names.
|
/// Gets the people names.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="filter">The query.</param>
|
/// <param name="filter">The query.</param>
|
||||||
/// <returns>List<System.String>.</returns>
|
/// <returns>The list of people names matching the filter.</returns>
|
||||||
IReadOnlyList<string> GetPeopleNames(InternalPeopleQuery filter);
|
IReadOnlyList<string> GetPeopleNames(InternalPeopleQuery filter);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user