Clean search page's code #34
This commit is contained in:
1 file changed
+78
-392
+78
-392
@@ -17,6 +17,7 @@ import useDebounce from "../../utils/hooks/useDebounce";
|
|||||||
|
|
||||||
import "./search.module.scss";
|
import "./search.module.scss";
|
||||||
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import { getPersonsApi } from "@jellyfin/sdk/lib/utils/api/persons-api";
|
||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
import { Card } from "../../components/card/card";
|
import { Card } from "../../components/card/card";
|
||||||
@@ -112,7 +113,7 @@ const SearchPage = () => {
|
|||||||
cacheTime: 0,
|
cacheTime: 0,
|
||||||
});
|
});
|
||||||
const musicArtists = useQuery({
|
const musicArtists = useQuery({
|
||||||
queryKey: ["search", "items", "MusicArtist", searchParam],
|
queryKey: ["search", "items", "MusicArtists", searchParam],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const result = await getItemsApi(window.api).getItemsByUserId({
|
const result = await getItemsApi(window.api).getItemsByUserId({
|
||||||
userId: user.data.Id,
|
userId: user.data.Id,
|
||||||
@@ -129,11 +130,9 @@ const SearchPage = () => {
|
|||||||
const person = useQuery({
|
const person = useQuery({
|
||||||
queryKey: ["search", "items", "Person", searchParam],
|
queryKey: ["search", "items", "Person", searchParam],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const result = await getItemsApi(window.api).getItemsByUserId({
|
const result = await getPersonsApi(window.api).getPersons({
|
||||||
userId: user.data.Id,
|
userId: user.data.Id,
|
||||||
searchTerm,
|
searchTerm,
|
||||||
includeItemTypes: [BaseItemKind.Person],
|
|
||||||
recursive: true,
|
|
||||||
limit: itemLimit,
|
limit: itemLimit,
|
||||||
});
|
});
|
||||||
return result.data;
|
return result.data;
|
||||||
@@ -142,58 +141,6 @@ const SearchPage = () => {
|
|||||||
cacheTime: 0,
|
cacheTime: 0,
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* @typedef {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} BaseItemDto
|
|
||||||
* @type {[BaseItemDto[], Function]}
|
|
||||||
*/
|
|
||||||
// const [movies, setMovies] = useState([]);
|
|
||||||
// const [series, setSeries] = useState([]);
|
|
||||||
// const [audios, setAudios] = useState([]);
|
|
||||||
// const [musicAlbum, setMusicAlbum] = useState([]);
|
|
||||||
// const [books, setBooks] = useState([]);
|
|
||||||
// const [musicArtists, setMusicArtists] = useState([]);
|
|
||||||
// const [persons, setPersons] = useState([]);
|
|
||||||
|
|
||||||
// useEffect(() => {
|
|
||||||
// if (items.isSuccess) {
|
|
||||||
// setMovies(
|
|
||||||
// items.data.Items.filter(
|
|
||||||
// (item) => item.Type == BaseItemKind.Movie,
|
|
||||||
// ).slice(0, itemLimit),
|
|
||||||
// );
|
|
||||||
// setSeries(
|
|
||||||
// items.data.Items.filter(
|
|
||||||
// (item) => item.Type == BaseItemKind.Series,
|
|
||||||
// ).slice(0, itemLimit),
|
|
||||||
// );
|
|
||||||
// setAudios(
|
|
||||||
// items.data.Items.filter(
|
|
||||||
// (item) => item.Type == BaseItemKind.Audio,
|
|
||||||
// ).slice(0, itemLimit),
|
|
||||||
// );
|
|
||||||
// setMusicAlbum(
|
|
||||||
// items.data.Items.filter(
|
|
||||||
// (item) => item.Type == BaseItemKind.MusicAlbum,
|
|
||||||
// ).slice(0, itemLimit),
|
|
||||||
// );
|
|
||||||
// setBooks(
|
|
||||||
// items.data.Items.filter(
|
|
||||||
// (item) => item.Type == BaseItemKind.Book,
|
|
||||||
// ).slice(0, itemLimit),
|
|
||||||
// );
|
|
||||||
// setMusicArtists(
|
|
||||||
// items.data.Items.filter(
|
|
||||||
// (item) => item.Type == BaseItemKind.MusicArtist,
|
|
||||||
// ).slice(0, itemLimit),
|
|
||||||
// );
|
|
||||||
// setPersons(
|
|
||||||
// items.data.Items.filter(
|
|
||||||
// (item) => item.Type == BaseItemKind.Person,
|
|
||||||
// ).slice(0, itemLimit),
|
|
||||||
// );
|
|
||||||
// }
|
|
||||||
// }, [items.isSuccess]);
|
|
||||||
|
|
||||||
const [setBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
const [setBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -208,6 +155,7 @@ const SearchPage = () => {
|
|||||||
display: "flex",
|
display: "flex",
|
||||||
flexDirection: "column",
|
flexDirection: "column",
|
||||||
gap: "0.5em",
|
gap: "0.5em",
|
||||||
|
paddingBottom: "2em",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="search-header">
|
<div className="search-header">
|
||||||
@@ -240,52 +188,16 @@ const SearchPage = () => {
|
|||||||
{movies.data.Items.map((item, index) => (
|
{movies.data.Items.map((item, index) => (
|
||||||
<Card
|
<Card
|
||||||
item={item}
|
item={item}
|
||||||
seriesId={item.SeriesId}
|
cardTitle={item.Name}
|
||||||
cardTitle={
|
|
||||||
item.Type == BaseItemKind.Episode
|
|
||||||
? item.SeriesName
|
|
||||||
: item.Name
|
|
||||||
}
|
|
||||||
imageType={"Primary"}
|
imageType={"Primary"}
|
||||||
cardCaption={
|
cardCaption={item.ProductionYear}
|
||||||
item.Type == BaseItemKind.Episode
|
cardType="portrait"
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
queryKey={[
|
||||||
: item.Type ==
|
"search",
|
||||||
BaseItemKind.Series
|
"items",
|
||||||
? `${item.ProductionYear} - ${
|
"Movie",
|
||||||
!!item.EndDate
|
searchParam,
|
||||||
? new Date(
|
]}
|
||||||
item.EndDate,
|
|
||||||
).toLocaleString(
|
|
||||||
[],
|
|
||||||
{
|
|
||||||
year: "numeric",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: "Present"
|
|
||||||
}`
|
|
||||||
: item.ProductionYear
|
|
||||||
}
|
|
||||||
disableOverlay={
|
|
||||||
item.Type == BaseItemKind.Person ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio
|
|
||||||
}
|
|
||||||
cardType={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type == BaseItemKind.Audio ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio ||
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={[]}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
!!item.ImageBlurHashes?.Primary &&
|
!!item.ImageBlurHashes?.Primary &&
|
||||||
@@ -309,52 +221,26 @@ const SearchPage = () => {
|
|||||||
{series.data.Items.map((item, index) => (
|
{series.data.Items.map((item, index) => (
|
||||||
<Card
|
<Card
|
||||||
item={item}
|
item={item}
|
||||||
seriesId={item.SeriesId}
|
cardTitle={item.Name}
|
||||||
cardTitle={
|
|
||||||
item.Type == BaseItemKind.Episode
|
|
||||||
? item.SeriesName
|
|
||||||
: item.Name
|
|
||||||
}
|
|
||||||
imageType={"Primary"}
|
imageType={"Primary"}
|
||||||
cardCaption={
|
cardCaption={`${
|
||||||
item.Type == BaseItemKind.Episode
|
item.ProductionYear
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
} - ${
|
||||||
: item.Type ==
|
!!item.EndDate
|
||||||
BaseItemKind.Series
|
? new Date(
|
||||||
? `${item.ProductionYear} - ${
|
item.EndDate,
|
||||||
!!item.EndDate
|
).toLocaleString([], {
|
||||||
? new Date(
|
year: "numeric",
|
||||||
item.EndDate,
|
})
|
||||||
).toLocaleString(
|
: "Present"
|
||||||
[],
|
}`}
|
||||||
{
|
cardType="portrait"
|
||||||
year: "numeric",
|
queryKey={[
|
||||||
},
|
"search",
|
||||||
)
|
"items",
|
||||||
: "Present"
|
"Series",
|
||||||
}`
|
searchParam,
|
||||||
: item.ProductionYear
|
]}
|
||||||
}
|
|
||||||
disableOverlay={
|
|
||||||
item.Type == BaseItemKind.Person ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio
|
|
||||||
}
|
|
||||||
cardType={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type == BaseItemKind.Audio ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio ||
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={[]}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
!!item.ImageBlurHashes?.Primary &&
|
!!item.ImageBlurHashes?.Primary &&
|
||||||
@@ -378,52 +264,16 @@ const SearchPage = () => {
|
|||||||
{audio.data.Items.map((item, index) => (
|
{audio.data.Items.map((item, index) => (
|
||||||
<Card
|
<Card
|
||||||
item={item}
|
item={item}
|
||||||
seriesId={item.SeriesId}
|
cardTitle={item.Name}
|
||||||
cardTitle={
|
|
||||||
item.Type == BaseItemKind.Episode
|
|
||||||
? item.SeriesName
|
|
||||||
: item.Name
|
|
||||||
}
|
|
||||||
imageType={"Primary"}
|
imageType={"Primary"}
|
||||||
cardCaption={
|
cardCaption={item.ProductionYear}
|
||||||
item.Type == BaseItemKind.Episode
|
cardType="square"
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
queryKey={[
|
||||||
: item.Type ==
|
"search",
|
||||||
BaseItemKind.Series
|
"items",
|
||||||
? `${item.ProductionYear} - ${
|
"Audio",
|
||||||
!!item.EndDate
|
searchParam,
|
||||||
? new Date(
|
]}
|
||||||
item.EndDate,
|
|
||||||
).toLocaleString(
|
|
||||||
[],
|
|
||||||
{
|
|
||||||
year: "numeric",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: "Present"
|
|
||||||
}`
|
|
||||||
: item.ProductionYear
|
|
||||||
}
|
|
||||||
disableOverlay={
|
|
||||||
item.Type == BaseItemKind.Person ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio
|
|
||||||
}
|
|
||||||
cardType={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type == BaseItemKind.Audio ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio ||
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={[]}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
!!item.ImageBlurHashes?.Primary &&
|
!!item.ImageBlurHashes?.Primary &&
|
||||||
@@ -449,62 +299,16 @@ const SearchPage = () => {
|
|||||||
<Card
|
<Card
|
||||||
item={item}
|
item={item}
|
||||||
seriesId={item.SeriesId}
|
seriesId={item.SeriesId}
|
||||||
cardTitle={
|
cardTitle={item.Name}
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Episode
|
|
||||||
? item.SeriesName
|
|
||||||
: item.Name
|
|
||||||
}
|
|
||||||
imageType={"Primary"}
|
imageType={"Primary"}
|
||||||
cardCaption={
|
cardCaption={item.AlbumArtist}
|
||||||
item.Type ==
|
cardType={"square"}
|
||||||
BaseItemKind.Episode
|
queryKey={[
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
"search",
|
||||||
: item.Type ==
|
"items",
|
||||||
BaseItemKind.Series
|
"MusicAlbum",
|
||||||
? `${
|
searchParam,
|
||||||
item.ProductionYear
|
]}
|
||||||
} - ${
|
|
||||||
!!item.EndDate
|
|
||||||
? new Date(
|
|
||||||
item.EndDate,
|
|
||||||
).toLocaleString(
|
|
||||||
[],
|
|
||||||
{
|
|
||||||
year: "numeric",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: "Present"
|
|
||||||
}`
|
|
||||||
: item.ProductionYear
|
|
||||||
}
|
|
||||||
disableOverlay={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Person ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Studio
|
|
||||||
}
|
|
||||||
cardType={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Audio ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Studio ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Playlist
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={[]}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
!!item.ImageBlurHashes
|
!!item.ImageBlurHashes
|
||||||
@@ -529,52 +333,17 @@ const SearchPage = () => {
|
|||||||
{book.data.Items.map((item, index) => (
|
{book.data.Items.map((item, index) => (
|
||||||
<Card
|
<Card
|
||||||
item={item}
|
item={item}
|
||||||
seriesId={item.SeriesId}
|
cardTitle={item.Name}
|
||||||
cardTitle={
|
|
||||||
item.Type == BaseItemKind.Episode
|
|
||||||
? item.SeriesName
|
|
||||||
: item.Name
|
|
||||||
}
|
|
||||||
imageType={"Primary"}
|
imageType={"Primary"}
|
||||||
cardCaption={
|
cardCaption={item.ProductionYear}
|
||||||
item.Type == BaseItemKind.Episode
|
disableOverlay
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
cardType={"portrait"}
|
||||||
: item.Type ==
|
queryKey={[
|
||||||
BaseItemKind.Series
|
"search",
|
||||||
? `${item.ProductionYear} - ${
|
"items",
|
||||||
!!item.EndDate
|
"Book",
|
||||||
? new Date(
|
searchParam,
|
||||||
item.EndDate,
|
]}
|
||||||
).toLocaleString(
|
|
||||||
[],
|
|
||||||
{
|
|
||||||
year: "numeric",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: "Present"
|
|
||||||
}`
|
|
||||||
: item.ProductionYear
|
|
||||||
}
|
|
||||||
disableOverlay={
|
|
||||||
item.Type == BaseItemKind.Person ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio
|
|
||||||
}
|
|
||||||
cardType={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type == BaseItemKind.Audio ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio ||
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={[]}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
!!item.ImageBlurHashes?.Primary &&
|
!!item.ImageBlurHashes?.Primary &&
|
||||||
@@ -600,63 +369,16 @@ const SearchPage = () => {
|
|||||||
(item, index) => (
|
(item, index) => (
|
||||||
<Card
|
<Card
|
||||||
item={item}
|
item={item}
|
||||||
seriesId={item.SeriesId}
|
cardTitle={item.Name}
|
||||||
cardTitle={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Episode
|
|
||||||
? item.SeriesName
|
|
||||||
: item.Name
|
|
||||||
}
|
|
||||||
imageType={"Primary"}
|
imageType={"Primary"}
|
||||||
cardCaption={
|
disableOverlay
|
||||||
item.Type ==
|
cardType={"square"}
|
||||||
BaseItemKind.Episode
|
queryKey={[
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
"search",
|
||||||
: item.Type ==
|
"items",
|
||||||
BaseItemKind.Series
|
"MusicArtists",
|
||||||
? `${
|
searchParam,
|
||||||
item.ProductionYear
|
]}
|
||||||
} - ${
|
|
||||||
!!item.EndDate
|
|
||||||
? new Date(
|
|
||||||
item.EndDate,
|
|
||||||
).toLocaleString(
|
|
||||||
[],
|
|
||||||
{
|
|
||||||
year: "numeric",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: "Present"
|
|
||||||
}`
|
|
||||||
: item.ProductionYear
|
|
||||||
}
|
|
||||||
disableOverlay={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Person ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Studio
|
|
||||||
}
|
|
||||||
cardType={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Audio ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Studio ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.Playlist
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={[]}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
!!item.ImageBlurHashes
|
!!item.ImageBlurHashes
|
||||||
@@ -684,52 +406,16 @@ const SearchPage = () => {
|
|||||||
{person.data.Items.map((item, index) => (
|
{person.data.Items.map((item, index) => (
|
||||||
<Card
|
<Card
|
||||||
item={item}
|
item={item}
|
||||||
seriesId={item.SeriesId}
|
cardTitle={item.Name}
|
||||||
cardTitle={
|
|
||||||
item.Type == BaseItemKind.Episode
|
|
||||||
? item.SeriesName
|
|
||||||
: item.Name
|
|
||||||
}
|
|
||||||
imageType={"Primary"}
|
imageType={"Primary"}
|
||||||
cardCaption={
|
disableOverlay
|
||||||
item.Type == BaseItemKind.Episode
|
cardType={"square"}
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
queryKey={[
|
||||||
: item.Type ==
|
"search",
|
||||||
BaseItemKind.Series
|
"items",
|
||||||
? `${item.ProductionYear} - ${
|
"Person",
|
||||||
!!item.EndDate
|
searchParam,
|
||||||
? new Date(
|
]}
|
||||||
item.EndDate,
|
|
||||||
).toLocaleString(
|
|
||||||
[],
|
|
||||||
{
|
|
||||||
year: "numeric",
|
|
||||||
},
|
|
||||||
)
|
|
||||||
: "Present"
|
|
||||||
}`
|
|
||||||
: item.ProductionYear
|
|
||||||
}
|
|
||||||
disableOverlay={
|
|
||||||
item.Type == BaseItemKind.Person ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio
|
|
||||||
}
|
|
||||||
cardType={
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicAlbum ||
|
|
||||||
item.Type == BaseItemKind.Audio ||
|
|
||||||
item.Type == BaseItemKind.Genre ||
|
|
||||||
item.Type ==
|
|
||||||
BaseItemKind.MusicGenre ||
|
|
||||||
item.Type == BaseItemKind.Studio ||
|
|
||||||
item.Type == BaseItemKind.Playlist
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={[]}
|
|
||||||
userId={user.data.Id}
|
userId={user.data.Id}
|
||||||
imageBlurhash={
|
imageBlurhash={
|
||||||
!!item.ImageBlurHashes?.Primary &&
|
!!item.ImageBlurHashes?.Primary &&
|
||||||
|
|||||||
Reference in new issue
Block a user