Convert CollectionType to use lowercase enum names
This commit is contained in:
@@ -131,8 +131,8 @@ public class GenresController : BaseJellyfinApiController
|
||||
|
||||
QueryResult<(BaseItem, ItemCounts)> result;
|
||||
if (parentItem is ICollectionFolder parentCollectionFolder
|
||||
&& (parentCollectionFolder.CollectionType == CollectionType.Music
|
||||
|| parentCollectionFolder.CollectionType == CollectionType.MusicVideos))
|
||||
&& (parentCollectionFolder.CollectionType == CollectionType.music
|
||||
|| parentCollectionFolder.CollectionType == CollectionType.musicvideos))
|
||||
{
|
||||
result = _libraryManager.GetMusicGenres(query);
|
||||
}
|
||||
|
||||
@@ -171,7 +171,7 @@ public class ItemUpdateController : BaseJellyfinApiController
|
||||
info.ContentTypeOptions = GetContentTypeOptions(true).ToArray();
|
||||
info.ContentType = configuredContentType;
|
||||
|
||||
if (inheritedContentType is null || inheritedContentType == CollectionType.TvShows)
|
||||
if (inheritedContentType is null || inheritedContentType == CollectionType.tvshows)
|
||||
{
|
||||
info.ContentTypeOptions = info.ContentTypeOptions
|
||||
.Where(i => string.IsNullOrWhiteSpace(i.Value)
|
||||
|
||||
@@ -275,7 +275,7 @@ public class ItemsController : BaseJellyfinApiController
|
||||
collectionType = hasCollectionType.CollectionType;
|
||||
}
|
||||
|
||||
if (collectionType == CollectionType.Playlists)
|
||||
if (collectionType == CollectionType.playlists)
|
||||
{
|
||||
recursive = true;
|
||||
includeItemTypes = new[] { BaseItemKind.Playlist };
|
||||
|
||||
@@ -927,15 +927,15 @@ public class LibraryController : BaseJellyfinApiController
|
||||
{
|
||||
return contentType switch
|
||||
{
|
||||
CollectionType.BoxSets => new[] { "BoxSet" },
|
||||
CollectionType.Playlists => new[] { "Playlist" },
|
||||
CollectionType.Movies => new[] { "Movie" },
|
||||
CollectionType.TvShows => new[] { "Series", "Season", "Episode" },
|
||||
CollectionType.Books => new[] { "Book" },
|
||||
CollectionType.Music => new[] { "MusicArtist", "MusicAlbum", "Audio", "MusicVideo" },
|
||||
CollectionType.HomeVideos => new[] { "Video", "Photo" },
|
||||
CollectionType.Photos => new[] { "Video", "Photo" },
|
||||
CollectionType.MusicVideos => new[] { "MusicVideo" },
|
||||
CollectionType.boxsets => new[] { "BoxSet" },
|
||||
CollectionType.playlists => new[] { "Playlist" },
|
||||
CollectionType.movies => new[] { "Movie" },
|
||||
CollectionType.tvshows => new[] { "Series", "Season", "Episode" },
|
||||
CollectionType.books => new[] { "Book" },
|
||||
CollectionType.music => new[] { "MusicArtist", "MusicAlbum", "Audio", "MusicVideo" },
|
||||
CollectionType.homevideos => new[] { "Video", "Photo" },
|
||||
CollectionType.photos => new[] { "Video", "Photo" },
|
||||
CollectionType.musicvideos => new[] { "MusicVideo" },
|
||||
_ => new[] { "Series", "Season", "Episode", "Movie" }
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user