Your ROOT_URL in app.ini is https://git.cloudchain.link/ but you are visiting https://dash.bss.nz/open-source-mirrors/jellyfin/src/commit/8e58f713a9e9f4f0313aac63d9c363c14293246f/Jellyfin.Api/ModelBinders/NullableEnumModelBinderProvider.cs You should set ROOT_URL correctly, otherwise the web may not work correctly.
jellyfin/Jellyfin.Api/ModelBinders/NullableEnumModelBinderProv...

28 lines
893 B

using System;
using Microsoft.AspNetCore.Mvc.ModelBinding;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Logging;
namespace Jellyfin.Api.ModelBinders
{
/// <summary>
/// Nullable enum model binder provider.
/// </summary>
public class NullableEnumModelBinderProvider : IModelBinderProvider
{
/// <inheritdoc />
public IModelBinder? GetBinder(ModelBinderProviderContext context)
{
var nullableType = Nullable.GetUnderlyingType(context.Metadata.ModelType);
if (nullableType == null || !nullableType.IsEnum)
{
// Type isn't nullable or isn't an enum.
return null;
}
var logger = context.Services.GetRequiredService<ILogger<NullableEnumModelBinder>>();
return new NullableEnumModelBinder(logger);
}
}
}