mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-05-22 08:37:23 +01:00
Run tree-wide dotnet format
This commit is contained in:
@@ -132,7 +132,7 @@ namespace Emby.Server.Implementations.AppBase
|
||||
}
|
||||
else
|
||||
{
|
||||
_configurationFactories = [.._configurationFactories, factory];
|
||||
_configurationFactories = [.. _configurationFactories, factory];
|
||||
}
|
||||
|
||||
_configurationStores = _configurationFactories
|
||||
|
||||
@@ -240,15 +240,15 @@ public class ChapterManager : IChapterManager
|
||||
public void SaveChapters(BaseItem item, IReadOnlyList<ChapterInfo> chapters)
|
||||
{
|
||||
if (!Supports(item))
|
||||
{
|
||||
_logger.LogWarning("Attempted to save chapters for unsupported item type {Type}: {Name} ({Id})", item.GetType().Name, item.Name, item.Id);
|
||||
return;
|
||||
}
|
||||
{
|
||||
_logger.LogWarning("Attempted to save chapters for unsupported item type {Type}: {Name} ({Id})", item.GetType().Name, item.Name, item.Id);
|
||||
return;
|
||||
}
|
||||
|
||||
// Remove any chapters that are outside of the runtime of the item
|
||||
var validChapters = chapters.Where(c => c.StartPositionTicks < item.RunTimeTicks).ToList();
|
||||
_chapterRepository.SaveChapters(item.Id, validChapters);
|
||||
}
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public ChapterInfo? GetChapter(Guid baseItemId, int index)
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Emby.Server.Implementations.Library
|
||||
'[' => ']',
|
||||
'(' => ')',
|
||||
'{' => '}',
|
||||
_ => '\0'
|
||||
_ => '\0'
|
||||
};
|
||||
if (attributeCloser != '\0' && (str[attributeEnd] == '=' || str[attributeEnd] == '-'))
|
||||
{
|
||||
|
||||
@@ -31,7 +31,7 @@ namespace Emby.Server.Implementations.Library.Resolvers.TV
|
||||
/// </summary>
|
||||
/// <param name="logger">The logger.</param>
|
||||
/// <param name="namingOptions">The naming options.</param>
|
||||
public SeriesResolver(ILogger<SeriesResolver> logger, NamingOptions namingOptions)
|
||||
public SeriesResolver(ILogger<SeriesResolver> logger, NamingOptions namingOptions)
|
||||
{
|
||||
_logger = logger;
|
||||
_namingOptions = namingOptions;
|
||||
|
||||
@@ -318,13 +318,13 @@ namespace Emby.Server.Implementations.Localization
|
||||
// A lot of countries don't explicitly have a separate rating for adult content
|
||||
if (ratings.All(x => x.RatingScore?.Score != 1000))
|
||||
{
|
||||
ratings.Add(new ParentalRating("XXX", new(1000, null)));
|
||||
ratings.Add(new ParentalRating("XXX", new(1000, null)));
|
||||
}
|
||||
|
||||
// A lot of countries don't explicitly have a separate rating for banned content
|
||||
if (ratings.All(x => x.RatingScore?.Score != 1001))
|
||||
{
|
||||
ratings.Add(new ParentalRating("Banned", new(1001, null)));
|
||||
ratings.Add(new ParentalRating("Banned", new(1001, null)));
|
||||
}
|
||||
|
||||
return [.. ratings.OrderBy(r => r.RatingScore?.Score).ThenBy(r => r.RatingScore?.SubScore)];
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Threading;
|
||||
|
||||
@@ -386,7 +386,7 @@ namespace Emby.Server.Implementations.Session
|
||||
{
|
||||
if (session is null)
|
||||
{
|
||||
return;
|
||||
return;
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(info.MediaSourceId))
|
||||
|
||||
@@ -89,11 +89,11 @@ public class SystemManager : ISystemManager
|
||||
.GetVirtualFolders()
|
||||
.Where(e => !string.IsNullOrWhiteSpace(e.ItemId)) // this should not be null but for some users it is.
|
||||
.Select(e => new LibraryStorageInfo()
|
||||
{
|
||||
Id = Guid.Parse(e.ItemId),
|
||||
Name = e.Name,
|
||||
Folders = e.Locations.Select(f => StorageHelper.GetFreeSpaceOf(f)).ToArray()
|
||||
});
|
||||
{
|
||||
Id = Guid.Parse(e.ItemId),
|
||||
Name = e.Name,
|
||||
Folders = e.Locations.Select(f => StorageHelper.GetFreeSpaceOf(f)).ToArray()
|
||||
});
|
||||
|
||||
return new SystemStorageInfo()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user