mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-06-05 07:18:47 +01:00
Merge pull request #10141 from Bond-009/nullable3
This commit is contained in:
@@ -66,7 +66,7 @@ namespace MediaBrowser.Controller.Drawing
|
||||
/// <returns>Guid.</returns>
|
||||
string GetImageCacheTag(BaseItem item, ItemImageInfo image);
|
||||
|
||||
string GetImageCacheTag(BaseItem item, ChapterInfo chapter);
|
||||
string? GetImageCacheTag(BaseItem item, ChapterInfo chapter);
|
||||
|
||||
string? GetImageCacheTag(User user);
|
||||
|
||||
|
||||
@@ -1864,7 +1864,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// <exception cref="ArgumentException">Backdrops should be accessed using Item.Backdrops.</exception>
|
||||
public bool HasImage(ImageType type, int imageIndex)
|
||||
{
|
||||
return GetImageInfo(type, imageIndex) != null;
|
||||
return GetImageInfo(type, imageIndex) is not null;
|
||||
}
|
||||
|
||||
public void SetImage(ItemImageInfo image, int index)
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
#nullable disable
|
||||
|
||||
#pragma warning disable CS1591
|
||||
|
||||
using System;
|
||||
@@ -14,7 +12,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Gets or sets the path.
|
||||
/// </summary>
|
||||
/// <value>The path.</value>
|
||||
public string Path { get; set; }
|
||||
public required string Path { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type.
|
||||
@@ -36,9 +34,9 @@ namespace MediaBrowser.Controller.Entities
|
||||
/// Gets or sets the blurhash.
|
||||
/// </summary>
|
||||
/// <value>The blurhash.</value>
|
||||
public string BlurHash { get; set; }
|
||||
public string? BlurHash { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsLocalFile => Path is null || !Path.StartsWith("http", StringComparison.OrdinalIgnoreCase);
|
||||
public bool IsLocalFile => !Path.StartsWith("http", StringComparison.OrdinalIgnoreCase);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -99,7 +99,7 @@ namespace MediaBrowser.Controller.Entities.TV
|
||||
}
|
||||
|
||||
[JsonIgnore]
|
||||
public bool IsInSeasonFolder => FindParent<Season>() != null;
|
||||
public bool IsInSeasonFolder => FindParent<Season>() is not null;
|
||||
|
||||
[JsonIgnore]
|
||||
public string SeriesPresentationUniqueKey { get; set; }
|
||||
|
||||
@@ -333,7 +333,7 @@ namespace MediaBrowser.Controller.Entities
|
||||
|
||||
protected override bool IsActiveRecording()
|
||||
{
|
||||
return LiveTvManager.GetActiveRecordingInfo(Path) != null;
|
||||
return LiveTvManager.GetActiveRecordingInfo(Path) is not null;
|
||||
}
|
||||
|
||||
public override bool CanDelete()
|
||||
|
||||
@@ -217,7 +217,7 @@ namespace MediaBrowser.Controller.Library
|
||||
/// <returns><c>true</c> if [contains file system entry by name] [the specified name]; otherwise, <c>false</c>.</returns>
|
||||
public bool ContainsFileSystemEntryByName(string name)
|
||||
{
|
||||
return GetFileSystemEntryByName(name) != null;
|
||||
return GetFileSystemEntryByName(name) is not null;
|
||||
}
|
||||
|
||||
public string GetCollectionType()
|
||||
|
||||
@@ -2692,7 +2692,7 @@ namespace MediaBrowser.Controller.MediaEncoding
|
||||
string args = string.Empty;
|
||||
|
||||
// http://ffmpeg.org/ffmpeg-all.html#toc-Complex-filtergraphs-1
|
||||
if (state.VideoStream != null && videoProcessFilters.Contains("-filter_complex", StringComparison.Ordinal))
|
||||
if (state.VideoStream is not null && videoProcessFilters.Contains("-filter_complex", StringComparison.Ordinal))
|
||||
{
|
||||
int videoStreamIndex = FindIndex(state.MediaSource.MediaStreams, state.VideoStream);
|
||||
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
#nullable enable
|
||||
|
||||
using System.Collections.Generic;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace MediaBrowser.Controller.Security
|
||||
|
||||
Reference in New Issue
Block a user