Merge branch 'master' into network-rewrite

This commit is contained in:
Shadowghost
2022-12-07 17:40:24 +01:00
397 changed files with 2090 additions and 2340 deletions

View File

@@ -191,7 +191,7 @@ namespace Emby.Server.Implementations.EntryPoints
lock (_libraryChangedSyncLock)
{
if (LibraryUpdateTimer == null)
if (LibraryUpdateTimer is null)
{
LibraryUpdateTimer = new Timer(
LibraryUpdateTimerCallback,
@@ -227,7 +227,7 @@ namespace Emby.Server.Implementations.EntryPoints
lock (_libraryChangedSyncLock)
{
if (LibraryUpdateTimer == null)
if (LibraryUpdateTimer is null)
{
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite);
}
@@ -254,7 +254,7 @@ namespace Emby.Server.Implementations.EntryPoints
lock (_libraryChangedSyncLock)
{
if (LibraryUpdateTimer == null)
if (LibraryUpdateTimer is null)
{
LibraryUpdateTimer = new Timer(LibraryUpdateTimerCallback, null, LibraryUpdateDuration, Timeout.Infinite);
}
@@ -299,7 +299,7 @@ namespace Emby.Server.Implementations.EntryPoints
SendChangeNotifications(_itemsAdded.ToList(), itemsUpdated, _itemsRemoved.ToList(), foldersAddedTo, foldersRemovedFrom, CancellationToken.None).GetAwaiter().GetResult();
if (LibraryUpdateTimer != null)
if (LibraryUpdateTimer is not null)
{
LibraryUpdateTimer.Dispose();
LibraryUpdateTimer = null;
@@ -475,7 +475,7 @@ namespace Emby.Server.Implementations.EntryPoints
{
if (dispose)
{
if (LibraryUpdateTimer != null)
if (LibraryUpdateTimer is not null)
{
LibraryUpdateTimer.Dispose();
LibraryUpdateTimer = null;

View File

@@ -51,7 +51,7 @@ namespace Emby.Server.Implementations.EntryPoints
lock (_syncLock)
{
if (_updateTimer == null)
if (_updateTimer is null)
{
_updateTimer = new Timer(
UpdateTimerCallback,
@@ -75,11 +75,11 @@ namespace Emby.Server.Implementations.EntryPoints
var baseItem = e.Item;
// Go up one level for indicators
if (baseItem != null)
if (baseItem is not null)
{
var parent = baseItem.GetOwner() ?? baseItem.GetParent();
if (parent != null)
if (parent is not null)
{
keys.Add(parent);
}
@@ -97,7 +97,7 @@ namespace Emby.Server.Implementations.EntryPoints
SendNotifications(changes, CancellationToken.None).GetAwaiter().GetResult();
if (_updateTimer != null)
if (_updateTimer is not null)
{
_updateTimer.Dispose();
_updateTimer = null;
@@ -145,7 +145,7 @@ namespace Emby.Server.Implementations.EntryPoints
public void Dispose()
{
if (_updateTimer != null)
if (_updateTimer is not null)
{
_updateTimer.Dispose();
_updateTimer = null;