Kavita is a fast, feature rich, cross platform reading server. Built with the goal of being a full solution for all your reading needs. Setup your own server and share your reading collection with your friends and family.
C# annotationscbzcomicinfocomicscomics-readercross-platformcsharpepubepub-readerfreelinuxmangamedia-servermetadataopdsopds-feedpdfself-hostedubooquitywindows
using System;
using API.DTOs.Scrobbling;
using API.Entities.Enums;
namespace API.Helpers;
public static class LibraryTypeHelper
{
public static MediaFormat GetFormat(LibraryType libraryType)
{
return libraryType switch
{
LibraryType.Manga => MediaFormat.Manga,
LibraryType.Comic => MediaFormat.Comic,
LibraryType.Book => MediaFormat.LightNovel,
_ => throw new ArgumentOutOfRangeException(nameof(libraryType), libraryType, null)
};
}
}