Merge pull request #18132 from mm-workspace/fix-channel-item-type-name

Fix the item type name of BaseItemKind.Channel
This commit is contained in:
Cody Robibero authored and GitHub committed 2026-09-25 06:24:52 -04:00
commit 4a2d7aa0be
2 files changed
+27 -1

No files matched your search

@@ -1,8 +1,8 @@
using System.Collections.Frozen;
using System.Collections.Generic;
using System.Threading.Channels;
using Emby.Server.Implementations.Playlists;
using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Channels;
using MediaBrowser.Controller.Entities;
using MediaBrowser.Controller.Entities.Audio;
using MediaBrowser.Controller.Entities.Movies;
@@ -0,0 +1,26 @@
using System;
using System.Linq;
using Emby.Server.Implementations.Data;
using Jellyfin.Data.Enums;
using MediaBrowser.Controller.Entities;
using Xunit;
namespace Jellyfin.Server.Implementations.Tests.Data;
public class ItemTypeLookupTests
{
public static TheoryData<BaseItemKind> MappedKinds()
=> new(new ItemTypeLookup().BaseItemKindNames.Keys);
[Theory]
[MemberData(nameof(MappedKinds))]
public void BaseItemKindNames_Kind_NamesAnItemType(BaseItemKind kind)
{
var name = new ItemTypeLookup().BaseItemKindNames[kind];
var type = AppDomain.CurrentDomain.GetAssemblies().Select(a => a.GetType(name)).FirstOrDefault(t => t is not null);
Assert.NotNull(type);
Assert.True(typeof(BaseItem).IsAssignableFrom(type), $"{name} is not an item type.");
}
}