<% if (plugins.anilist) { %>

Anilist

<% if (plugins.anilist.error) { %>
<%= plugins.anilist.error.message %>
<% } else { %>
Favorites genres: <%= plugins.anilist.user.genres.join(", ") %>
<%= f(plugins.anilist.user.stats.anime.minutesWatched) %> minute<%= s(plugins.anilist.user.stats.anime.minutesWatched) %> watched
<%= f(plugins.anilist.user.stats.manga.chaptersRead) %> chapter<%= s(plugins.anilist.user.stats.manga.chaptersRead) %> read
<% for (const media of Object.keys(plugins.anilist.lists)) { %> <% for (const list of plugins.anilist.sections) { %> <% if (plugins.anilist.lists?.[media]?.[list]?.length) { %>

<%= {favorites:`Favorites ${media}s`, watching:"Currently watching", reading:"Currently reading"}[list] %>

<% for (const {name, type, description, release, status, genres, scores, progress, released, artwork} of plugins.anilist.lists[media][list]) { %>
<%= name %>
<% if (type === "ANIME") { %> Anime <% } else if (type === "MANGA") { %> Manga <% } else { %> Other <% } %>
<%= status === "NOT_YET_RELEASED" ? "Not yet released" : `${release} ${{FINISHED:"", RELEASING:"(releasing)", NOT_YET_RELEASED:"(unreleased)", CANCELLED:"(cancelled)", HIATUS:"(hiatus)"}[status]}` %>
<% if (scores.community) { %>
<%= scores.community %>%
<% } %> <% if (Number.isFinite(progress)) { %>
<% if (progress === released) { %> <% } else { %> <% } %> <%= type === "ANIME" ? "Episode" : type === "MANGA" ? "Chapter" : "" %> <%= progress %><%= released ? `/${released}` : "" %>
<% } else { %>
<%= progress %><%= released %> <%= type === "ANIME" ? `episode${s(released)}` : type === "MANGA" ? `chapter${s(released)}` : "" %>
<% } %>
<%= genres.join(", ") %>
<%= description %>
<% } %>
<% } %> <% } %> <% } %> <% if (plugins.anilist.sections.includes("characters")) { %>

Favorites characters

<% for (const {name, artwork} of plugins.anilist.characters) { %> <% } %>
<% } %>
<% } %>
<% } %>