Applied coding style

This commit is contained in:
JPVenson
2024-11-17 11:03:43 +00:00
parent 17e4485b94
commit b39553611d
18 changed files with 33 additions and 38 deletions

View File

@@ -28,9 +28,9 @@ namespace Emby.Server.Implementations.Data
_dbProvider = dbProvider;
}
public Task Run(IProgress<double> progress, CancellationToken cancellationToken)
public async Task Run(IProgress<double> progress, CancellationToken cancellationToken)
{
return CleanDeadItems(cancellationToken, progress);
await CleanDeadItems(cancellationToken, progress).ConfigureAwait(false);
}
private async Task CleanDeadItems(CancellationToken cancellationToken, IProgress<double> progress)

View File

@@ -1,12 +1,8 @@
using System;
using System.Collections.Frozen;
using System.Collections.Generic;
using System.Collections.Immutable;
using System.Linq;
using System.Threading.Channels;
using Emby.Server.Implementations.Playlists;
using Jellyfin.Data.Enums;
using Jellyfin.Server.Implementations;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Entities.Movies;
@@ -14,7 +10,6 @@ using MediaBrowser.Controller.Entities.TV;
using MediaBrowser.Controller.LiveTv;
using MediaBrowser.Controller.Persistence;
using MediaBrowser.Controller.Playlists;
using MediaBrowser.Model.Querying;
namespace Emby.Server.Implementations.Data;
@@ -23,7 +18,6 @@ public class ItemTypeLookup : IItemTypeLookup
{
/// <inheritdoc />
public IReadOnlyList<string> MusicGenreTypes { get; } = [
typeof(Audio).FullName!,
typeof(MusicVideo).FullName!,
typeof(MusicAlbum).FullName!,

View File

@@ -1810,11 +1810,11 @@ namespace Emby.Server.Implementations.Library
/// <inheritdoc />
public void CreateItem(BaseItem item, BaseItem? parent)
{
CreateItems(new[] { item }, parent, CancellationToken.None);
CreateOrUpdateItems(new[] { item }, parent, CancellationToken.None);
}
/// <inheritdoc />
public void CreateItems(IReadOnlyList<BaseItem> items, BaseItem? parent, CancellationToken cancellationToken)
public void CreateOrUpdateItems(IReadOnlyList<BaseItem> items, BaseItem? parent, CancellationToken cancellationToken)
{
_itemRepository.SaveItems(items, cancellationToken);
@@ -2971,10 +2971,11 @@ namespace Emby.Server.Implementations.Library
{
if (createEntity)
{
CreateItems([personEntity], null, CancellationToken.None);
CreateOrUpdateItems([personEntity], null, CancellationToken.None);
}
await RunMetadataSavers(personEntity, itemUpdateType).ConfigureAwait(false);
CreateOrUpdateItems([personEntity], null, CancellationToken.None);
}
}
}

View File

@@ -218,7 +218,7 @@ namespace Emby.Server.Implementations.Library
list.Add(source);
}
return SortMediaSources(list).ToImmutableArray();
return SortMediaSources(list).ToArray();
}
/// <inheritdoc />>