mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-16 23:26:22 +00:00
Merge branch 'master' into mediabrowser-controller-entities
This commit is contained in:
@@ -17,6 +17,12 @@ namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
public class Channel : Folder
|
||||
{
|
||||
[JsonIgnore]
|
||||
public override bool SupportsInheritedParentImages => false;
|
||||
|
||||
[JsonIgnore]
|
||||
public override SourceType SourceType => SourceType.Channel;
|
||||
|
||||
public override bool IsVisible(User user)
|
||||
{
|
||||
var blockedChannelsPreference = user.GetPreferenceValues<Guid>(PreferenceKind.BlockedChannels);
|
||||
@@ -39,12 +45,6 @@ namespace MediaBrowser.Controller.Channels
|
||||
return base.IsVisible(user);
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public override bool SupportsInheritedParentImages => false;
|
||||
|
||||
[JsonIgnore]
|
||||
public override SourceType SourceType => SourceType.Channel;
|
||||
|
||||
protected override QueryResult<BaseItem> GetItemsInternal(InternalItemsQuery query)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1002, CA2227, CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1002, CA2227, CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1819, CS1591
|
||||
|
||||
namespace MediaBrowser.Controller.Channels
|
||||
{
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1002, CA2227, CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.Channels;
|
||||
|
||||
@@ -12,6 +12,8 @@ namespace MediaBrowser.Controller.Chapters
|
||||
/// <summary>
|
||||
/// Saves the chapters.
|
||||
/// </summary>
|
||||
/// <param name="itemId">The item.</param>
|
||||
/// <param name="chapters">The set of chapters.</param>
|
||||
void SaveChapters(Guid itemId, IReadOnlyList<ChapterInfo> chapters);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA2227, CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -32,6 +32,7 @@ namespace MediaBrowser.Controller.Collections
|
||||
/// Creates the collection.
|
||||
/// </summary>
|
||||
/// <param name="options">The options.</param>
|
||||
/// <returns>BoxSet wrapped in an awaitable task.</returns>
|
||||
Task<BoxSet> CreateCollectionAsync(CollectionCreationOptions options);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -57,6 +57,15 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// <summary>
|
||||
/// Encode an image.
|
||||
/// </summary>
|
||||
/// <param name="inputPath">Input path of image.</param>
|
||||
/// <param name="dateModified">Date modified.</param>
|
||||
/// <param name="outputPath">Output path of image.</param>
|
||||
/// <param name="autoOrient">Auto-orient image.</param>
|
||||
/// <param name="orientation">Desired orientation of image.</param>
|
||||
/// <param name="quality">Quality of encoded image.</param>
|
||||
/// <param name="options">Image processing options.</param>
|
||||
/// <param name="outputFormat">Image format of output.</param>
|
||||
/// <returns>Path of encoded image.</returns>
|
||||
string EncodeImage(string inputPath, DateTime dateModified, string outputPath, bool autoOrient, ImageOrientation? orientation, int quality, ImageProcessingOptions options, ImageFormat outputFormat);
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1711, CS1591
|
||||
|
||||
using System;
|
||||
using System.IO;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#nullable disable
|
||||
#pragma warning disable CA1002
|
||||
|
||||
using System.Collections.Generic;
|
||||
using Jellyfin.Data.Entities;
|
||||
|
||||
@@ -143,8 +143,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
}
|
||||
|
||||
// Hybrid VPP tonemapping for QSV with VAAPI
|
||||
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
if (isLinux && string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
|
||||
if (OperatingSystem.IsLinux() && string.Equals(options.HardwareAccelerationType, "qsv", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
// Limited to HEVC for now since the filter doesn't accept master data from VP9.
|
||||
return IsColorDepth10(state)
|
||||
@@ -503,9 +502,9 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var isQsvEncoder = outputVideoCodec.IndexOf("qsv", StringComparison.OrdinalIgnoreCase) != -1;
|
||||
var isNvdecDecoder = videoDecoder.Contains("cuda", StringComparison.OrdinalIgnoreCase);
|
||||
var isCuvidHevcDecoder = videoDecoder.Contains("hevc_cuvid", StringComparison.OrdinalIgnoreCase);
|
||||
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
var isMacOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
|
||||
var isWindows = OperatingSystem.IsWindows();
|
||||
var isLinux = OperatingSystem.IsLinux();
|
||||
var isMacOS = OperatingSystem.IsMacOS();
|
||||
var isTonemappingSupported = IsTonemappingSupported(state, encodingOptions);
|
||||
var isVppTonemappingSupported = IsVppTonemappingSupported(state, encodingOptions);
|
||||
|
||||
@@ -1983,7 +1982,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
|
||||
var videoSizeParam = string.Empty;
|
||||
var videoDecoder = GetHardwareAcceleratedVideoDecoder(state, options) ?? string.Empty;
|
||||
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
var isLinux = OperatingSystem.IsLinux();
|
||||
|
||||
var isVaapiDecoder = videoDecoder.IndexOf("vaapi", StringComparison.OrdinalIgnoreCase) != -1;
|
||||
var isVaapiH264Encoder = outputVideoCodec.IndexOf("h264_vaapi", StringComparison.OrdinalIgnoreCase) != -1;
|
||||
@@ -2528,7 +2527,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
var isCuvidHevcDecoder = videoDecoder.Contains("hevc_cuvid", StringComparison.OrdinalIgnoreCase);
|
||||
var isLibX264Encoder = outputVideoCodec.IndexOf("libx264", StringComparison.OrdinalIgnoreCase) != -1;
|
||||
var isLibX265Encoder = outputVideoCodec.IndexOf("libx265", StringComparison.OrdinalIgnoreCase) != -1;
|
||||
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
var isLinux = OperatingSystem.IsLinux();
|
||||
var isColorDepth10 = IsColorDepth10(state);
|
||||
var isTonemappingSupported = IsTonemappingSupported(state, options);
|
||||
var isVppTonemappingSupported = IsVppTonemappingSupported(state, options);
|
||||
@@ -3572,8 +3571,8 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
/// </summary>
|
||||
public string GetHwaccelType(EncodingJobInfo state, EncodingOptions options, string videoCodec, bool isColorDepth10)
|
||||
{
|
||||
var isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
|
||||
var isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
|
||||
var isWindows = OperatingSystem.IsWindows();
|
||||
var isLinux = OperatingSystem.IsLinux();
|
||||
var isWindows8orLater = Environment.OSVersion.Version.Major > 6 || (Environment.OSVersion.Version.Major == 6 && Environment.OSVersion.Version.Minor > 1);
|
||||
var isDxvaSupported = _mediaEncoder.SupportsHwaccel("dxva2") || _mediaEncoder.SupportsHwaccel("d3d11va");
|
||||
var isCodecAvailable = options.HardwareDecodingCodecs.Contains(videoCodec, StringComparer.OrdinalIgnoreCase);
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1002, CA2227, CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1002, CA2227, CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA2227, CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CA1819, CS1591
|
||||
#pragma warning disable CA1002, CA1819, CS1591
|
||||
|
||||
using System.Collections.Generic;
|
||||
using MediaBrowser.Model.IO;
|
||||
|
||||
@@ -31,6 +31,9 @@ namespace MediaBrowser.Controller.Providers
|
||||
/// <summary>
|
||||
/// Queues the refresh.
|
||||
/// </summary>
|
||||
/// <param name="itemId">Item ID.</param>
|
||||
/// <param name="options">MetadataRefreshOptions for operation.</param>
|
||||
/// <param name="priority">RefreshPriority for operation.</param>
|
||||
void QueueRefresh(Guid itemId, MetadataRefreshOptions options, RefreshPriority priority);
|
||||
|
||||
/// <summary>
|
||||
@@ -85,6 +88,13 @@ namespace MediaBrowser.Controller.Providers
|
||||
/// <summary>
|
||||
/// Saves the image.
|
||||
/// </summary>
|
||||
/// <param name="item">Image to save.</param>
|
||||
/// <param name="source">Source of image.</param>
|
||||
/// <param name="mimeType">Mime type image.</param>
|
||||
/// <param name="type">Type of image.</param>
|
||||
/// <param name="imageIndex">Index of image.</param>
|
||||
/// <param name="saveLocallyWithMedia">Option to save locally.</param>
|
||||
/// <param name="cancellationToken">CancellationToken to use with operation.</param>
|
||||
/// <returns>Task.</returns>
|
||||
Task SaveImage(BaseItem item, string source, string mimeType, ImageType type, int? imageIndex, bool? saveLocallyWithMedia, CancellationToken cancellationToken);
|
||||
|
||||
@@ -93,6 +103,11 @@ namespace MediaBrowser.Controller.Providers
|
||||
/// <summary>
|
||||
/// Adds the metadata providers.
|
||||
/// </summary>
|
||||
/// <param name="imageProviders">Image providers to use.</param>
|
||||
/// <param name="metadataServices">Metadata services to use.</param>
|
||||
/// <param name="metadataProviders">Metadata providers to use.</param>
|
||||
/// <param name="metadataSavers">Metadata savers to use.</param>
|
||||
/// <param name="externalIds">External IDs to use.</param>
|
||||
void AddParts(
|
||||
IEnumerable<IImageProvider> imageProviders,
|
||||
IEnumerable<IMetadataService> metadataServices,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1819, CS1591
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
@@ -10,6 +10,15 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
public class ImageRefreshOptions
|
||||
{
|
||||
public ImageRefreshOptions(IDirectoryService directoryService)
|
||||
{
|
||||
ImageRefreshMode = MetadataRefreshMode.Default;
|
||||
DirectoryService = directoryService;
|
||||
|
||||
ReplaceImages = Array.Empty<ImageType>();
|
||||
IsAutomated = true;
|
||||
}
|
||||
|
||||
public MetadataRefreshMode ImageRefreshMode { get; set; }
|
||||
|
||||
public IDirectoryService DirectoryService { get; private set; }
|
||||
@@ -20,15 +29,6 @@ namespace MediaBrowser.Controller.Providers
|
||||
|
||||
public bool IsAutomated { get; set; }
|
||||
|
||||
public ImageRefreshOptions(IDirectoryService directoryService)
|
||||
{
|
||||
ImageRefreshMode = MetadataRefreshMode.Default;
|
||||
DirectoryService = directoryService;
|
||||
|
||||
ReplaceImages = Array.Empty<ImageType>();
|
||||
IsAutomated = true;
|
||||
}
|
||||
|
||||
public bool IsReplacingImage(ImageType type)
|
||||
{
|
||||
return ImageRefreshMode == MetadataRefreshMode.FullRefresh &&
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA2227, CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1819, CS1591
|
||||
|
||||
using System;
|
||||
using System.Linq;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA1002, CA2227, CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#pragma warning disable CS1591
|
||||
#pragma warning disable CA2227, CS1591
|
||||
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
@@ -9,16 +9,16 @@ namespace MediaBrowser.Controller.Providers
|
||||
{
|
||||
public class SongInfo : ItemLookupInfo
|
||||
{
|
||||
public IReadOnlyList<string> AlbumArtists { get; set; }
|
||||
|
||||
public string Album { get; set; }
|
||||
|
||||
public IReadOnlyList<string> Artists { get; set; }
|
||||
|
||||
public SongInfo()
|
||||
{
|
||||
Artists = Array.Empty<string>();
|
||||
AlbumArtists = Array.Empty<string>();
|
||||
}
|
||||
|
||||
public IReadOnlyList<string> AlbumArtists { get; set; }
|
||||
|
||||
public string Album { get; set; }
|
||||
|
||||
public IReadOnlyList<string> Artists { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -13,14 +13,12 @@ namespace MediaBrowser.Controller.Security
|
||||
/// Creates the specified information.
|
||||
/// </summary>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <returns>Task.</returns>
|
||||
void Create(AuthenticationInfo info);
|
||||
|
||||
/// <summary>
|
||||
/// Updates the specified information.
|
||||
/// </summary>
|
||||
/// <param name="info">The information.</param>
|
||||
/// <returns>Task.</returns>
|
||||
void Update(AuthenticationInfo info);
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user