mirror of
https://github.com/jellyfin/jellyfin.git
synced 2026-03-27 12:31:57 +00:00
Lowercase CollectionTypeOptions to match legacy experience (#11272)
This commit is contained in:
@@ -1,25 +0,0 @@
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Jellyfin.Extensions.Json.Converters
|
||||
{
|
||||
/// <summary>
|
||||
/// Converts an object to a lowercase string.
|
||||
/// </summary>
|
||||
/// <typeparam name="T">The object type.</typeparam>
|
||||
public class JsonLowerCaseConverter<T> : JsonConverter<T>
|
||||
{
|
||||
/// <inheritdoc />
|
||||
public override T? Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
return JsonSerializer.Deserialize<T>(ref reader, options);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public override void Write(Utf8JsonWriter writer, T value, JsonSerializerOptions options)
|
||||
{
|
||||
writer.WriteStringValue(value?.ToString()?.ToLowerInvariant());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -159,7 +159,7 @@ public sealed class RecordingsManager : IRecordingsManager, IDisposable
|
||||
{
|
||||
Locations = [customPath],
|
||||
Name = "Recorded Movies",
|
||||
CollectionType = CollectionTypeOptions.Movies
|
||||
CollectionType = CollectionTypeOptions.movies
|
||||
};
|
||||
}
|
||||
|
||||
@@ -172,7 +172,7 @@ public sealed class RecordingsManager : IRecordingsManager, IDisposable
|
||||
{
|
||||
Locations = [customPath],
|
||||
Name = "Recorded Shows",
|
||||
CollectionType = CollectionTypeOptions.TvShows
|
||||
CollectionType = CollectionTypeOptions.tvshows
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user