feat: add subtitle support #337

This commit is contained in:
Prayag Prajapati committed 2024-08-27 19:12:46 +05:30
1 parent 8106b714a1
commit cec17b270a
20 files changed
+4958 -4755

No files matched your search

+23 -23
View File
@@ -13,35 +13,35 @@
"tanstack-router-dev": "tsr watch"
},
"dependencies": {
"@emotion/react": "^11.13.0",
"@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0",
"@fontsource-variable/jetbrains-mono": "^5.0.21",
"@fontsource-variable/jetbrains-mono": "^5.0.22",
"@fontsource-variable/noto-sans": "^5.0.5",
"@jellyfin/sdk": "0.10.0",
"@million/lint": "1.0.0-rc.84",
"@mui/lab": "5.0.0-alpha.173",
"@mui/material": "6.0.0-alpha.14",
"@mui/lab": "6.0.0-beta.8",
"@mui/material": "6.0.0",
"@react-spring/web": "^9.7.4",
"@tanem/react-nprogress": "^5.0.51",
"@tanstack/react-query": "^5.51.15",
"@tanstack/react-query-devtools": "^5.51.15",
"@tanstack/react-router": "^1.45.11",
"@tanstack/react-virtual": "^3.8.3",
"@tanstack/react-query": "^5.52.2",
"@tanstack/react-query-devtools": "^5.52.2",
"@tanstack/react-router": "^1.51.0",
"@tanstack/react-virtual": "^3.10.4",
"@tauri-apps/api": "2.0.0-beta.15",
"@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.5",
"@tauri-apps/plugin-process": "2.0.0-beta.7",
"@tauri-apps/plugin-process": "2.0.0-rc.0",
"@tauri-apps/plugin-store": "github:tauri-apps/tauri-plugin-store#v2",
"@tauri-apps/plugin-updater": "2.0.0-beta.7",
"@types/node": "^22.0.0",
"@types/react": "^18.3.3",
"@tauri-apps/plugin-updater": "2.0.0-rc.0",
"@types/node": "^22.5.0",
"@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0",
"axios": "^1.7.2",
"axios-tauri-api-adapter": "^0.2.1",
"axios": "^1.7.5",
"axios-tauri-api-adapter": "^0.2.2",
"blurhash": "^2.0.5",
"framer-motion": "^11.3.19",
"jassub": "^1.7.16",
"framer-motion": "^11.3.30",
"jassub": "^1.7.17",
"lodash": "^4.17.21",
"material-symbols": "^0.21.2",
"material-symbols": "^0.22.2",
"million": "^3.1.11",
"notistack": "^3.0.1",
"react": "18.3.1",
@@ -57,21 +57,21 @@
"remark-gfm": "^4.0.0",
"typescript": "^5.5.4",
"vite-plugin-svgr": "^4.2.0",
"wavesurfer.js": "^7.8.2",
"zustand": "^4.5.4"
"wavesurfer.js": "^7.8.4",
"zustand": "^4.5.5"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining-assign": "^7.24.7",
"@biomejs/biome": "^1.8.3",
"@tanstack/router-cli": "^1.45.8",
"@tanstack/router-devtools": "^1.45.11",
"@tanstack/router-vite-plugin": "^1.45.8",
"@tanstack/router-cli": "^1.51.0",
"@tanstack/router-devtools": "^1.51.0",
"@tanstack/router-vite-plugin": "^1.51.0",
"@tauri-apps/cli": "2.0.0-beta.22",
"@types/lodash": "^4.17.7",
"@vitejs/plugin-react": "^4.3.1",
"prop-types": "^15.8.1",
"sass": "^1.77.8",
"vite": "^5.3.5"
"vite": "^5.4.2"
},
"license": "GPL-3.0-only"
}
+651 -757
View File
File diff suppressed because it is too large. Load diff
+1 -3
View File
@@ -12,8 +12,6 @@
"store:allow-keys",
"store:allow-load",
"updater:allow-check",
"updater:allow-download-and-install",
"window:default",
"window:allow-set-fullscreen"
"updater:allow-download-and-install"
]
}
+14 -15
View File
@@ -1,17 +1,16 @@
{
"identifier": "migrated",
"description": "permissions that were migrated from v1",
"local": true,
"windows": [
"main"
],
"permissions": [
"path:default",
"event:default",
"window:default",
"app:default",
"resources:default",
"menu:default",
"tray:default"
]
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "migrated",
"description": "permissions that were migrated from v1",
"local": true,
"windows": ["main"],
"permissions": [
"core:path:default",
"core:event:default",
"core:window:default",
"core:app:default",
"core:resources:default",
"core:menu:default",
"core:tray:default"
]
}
+1 -1
View File
@@ -1 +1 @@
{"app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"clipboard-manager":{"default_permission":{"identifier":"default","description":"No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n","permissions":[]},"permissions":{"allow-clear":{"identifier":"allow-clear","description":"Enables the clear command without any pre-configured scope.","commands":{"allow":["clear"],"deny":[]}},"allow-read-image":{"identifier":"allow-read-image","description":"Enables the read_image command without any pre-configured scope.","commands":{"allow":["read_image"],"deny":[]}},"allow-read-text":{"identifier":"allow-read-text","description":"Enables the read_text command without any pre-configured scope.","commands":{"allow":["read_text"],"deny":[]}},"allow-write-html":{"identifier":"allow-write-html","description":"Enables the write_html command without any pre-configured scope.","commands":{"allow":["write_html"],"deny":[]}},"allow-write-image":{"identifier":"allow-write-image","description":"Enables the write_image command without any pre-configured scope.","commands":{"allow":["write_image"],"deny":[]}},"allow-write-text":{"identifier":"allow-write-text","description":"Enables the write_text command without any pre-configured scope.","commands":{"allow":["write_text"],"deny":[]}},"deny-clear":{"identifier":"deny-clear","description":"Denies the clear command without any pre-configured scope.","commands":{"allow":[],"deny":["clear"]}},"deny-read-image":{"identifier":"deny-read-image","description":"Denies the read_image command without any pre-configured scope.","commands":{"allow":[],"deny":["read_image"]}},"deny-read-text":{"identifier":"deny-read-text","description":"Denies the read_text command without any pre-configured scope.","commands":{"allow":[],"deny":["read_text"]}},"deny-write-html":{"identifier":"deny-write-html","description":"Denies the write_html command without any pre-configured scope.","commands":{"allow":[],"deny":["write_html"]}},"deny-write-image":{"identifier":"deny-write-image","description":"Denies the write_image command without any pre-configured scope.","commands":{"allow":[],"deny":["write_image"]}},"deny-write-text":{"identifier":"deny-write-text","description":"Denies the write_text command without any pre-configured scope.","commands":{"allow":[],"deny":["write_text"]}}},"permission_sets":{},"global_scope_schema":null},"event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-listen",Line truncated
{"clipboard-manager":{"default_permission":{"identifier":"default","description":"No features are enabled by default, as we believe\nthe clipboard can be inherently dangerous and it is \napplication specific if read and/or write access is needed.\n\nClipboard interaction needs to be explicitly enabled.\n","permissions":[]},"permissions":{"allow-clear":{"identifier":"allow-clear","description":"Enables the clear command without any pre-configured scope.","commands":{"allow":["clear"],"deny":[]}},"allow-read-image":{"identifier":"allow-read-image","description":"Enables the read_image command without any pre-configured scope.","commands":{"allow":["read_image"],"deny":[]}},"allow-read-text":{"identifier":"allow-read-text","description":"Enables the read_text command without any pre-configured scope.","commands":{"allow":["read_text"],"deny":[]}},"allow-write-html":{"identifier":"allow-write-html","description":"Enables the write_html command without any pre-configured scope.","commands":{"allow":["write_html"],"deny":[]}},"allow-write-image":{"identifier":"allow-write-image","description":"Enables the write_image command without any pre-configured scope.","commands":{"allow":["write_image"],"deny":[]}},"allow-write-text":{"identifier":"allow-write-text","description":"Enables the write_text command without any pre-configured scope.","commands":{"allow":["write_text"],"deny":[]}},"deny-clear":{"identifier":"deny-clear","description":"Denies the clear command without any pre-configured scope.","commands":{"allow":[],"deny":["clear"]}},"deny-read-image":{"identifier":"deny-read-image","description":"Denies the read_image command without any pre-configured scope.","commands":{"allow":[],"deny":["read_image"]}},"deny-read-text":{"identifier":"deny-read-text","description":"Denies the read_text command without any pre-configured scope.","commands":{"allow":[],"deny":["read_text"]}},"deny-write-html":{"identifier":"deny-write-html","description":"Denies the write_html command without any pre-configured scope.","commands":{"allow":[],"deny":["write_html"]}},"deny-write-image":{"identifier":"deny-write-image","description":"Denies the write_image command without any pre-configured scope.","commands":{"allow":[],"deny":["write_image"]}},"deny-write-text":{"identifier":"deny-write-text","description":"Denies the write_text command without any pre-configured scope.","commands":{"allow":[],"deny":["write_text"]}}},"permission_sets":{},"global_scope_schema":null},"core:app":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["allow-version","allow-name","allow-tauri-version"]},"permissions":{"allow-app-hide":{"identifier":"allow-app-hide","description":"Enables the app_hide command without any pre-configured scope.","commands":{"allow":["app_hide"],"deny":[]}},"allow-app-show":{"identifier":"allow-app-show","description":"Enables the app_show command without any pre-configured scope.","commands":{"allow":["app_show"],"deny":[]}},"allow-default-window-icon":{"identifier":"allow-default-window-icon","description":"Enables the default_window_icon command without any pre-configured scope.","commands":{"allow":["default_window_icon"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-tauri-version":{"identifier":"allow-tauri-version","description":"Enables the tauri_version command without any pre-configured scope.","commands":{"allow":["tauri_version"],"deny":[]}},"allow-version":{"identifier":"allow-version","description":"Enables the version command without any pre-configured scope.","commands":{"allow":["version"],"deny":[]}},"deny-app-hide":{"identifier":"deny-app-hide","description":"Denies the app_hide command without any pre-configured scope.","commands":{"allow":[],"deny":["app_hide"]}},"deny-app-show":{"identifier":"deny-app-show","description":"Denies the app_show command without any pre-configured scope.","commands":{"allow":[],"deny":["app_show"]}},"deny-default-window-icon":{"identifier":"deny-default-window-icon","description":"Denies the default_window_icon command without any pre-configured scope.","commands":{"allow":[],"deny":["default_window_icon"]}},"deny-name":{"identifier":"deny-name","description":"Denies the name command without any pre-configured scope.","commands":{"allow":[],"deny":["name"]}},"deny-tauri-version":{"identifier":"deny-tauri-version","description":"Denies the tauri_version command without any pre-configured scope.","commands":{"allow":[],"deny":["tauri_version"]}},"deny-version":{"identifier":"deny-version","description":"Denies the version command without any pre-configured scope.","commands":{"allow":[],"deny":["version"]}}},"permission_sets":{},"global_scope_schema":null},"core:event":{"default_permission":{"identifier":"default","description":"Default permissions for the plugin.","permissions":["alloLine truncated
+1 -1
View File
@@ -1 +1 @@
{"main-capabilities":{"identifier":"main-capabilities","description":"Capability for desktop window","local":true,"windows":["main"],"permissions":["store:allow-get","store:allow-set","store:allow-save","store:allow-clear","store:allow-delete","store:allow-keys","store:allow-load","updater:allow-check","updater:allow-download-and-install","window:default","window:allow-set-fullscreen"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["path:default","event:default","window:default","app:default","resources:default","menu:default","tray:default"]}}
{"main-capabilities":{"identifier":"main-capabilities","description":"Capability for desktop window","local":true,"windows":["main"],"permissions":["store:allow-get","store:allow-set","store:allow-save","store:allow-clear","store:allow-delete","store:allow-keys","store:allow-load","updater:allow-check","updater:allow-download-and-install"]},"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:path:default","core:event:default","core:window:default","core:app:default","core:resources:default","core:menu:default","core:tray:default"]}}
File diff suppressed because it is too large. Load diff
File diff suppressed because it is too large. Load diff
+1 -1
View File
@@ -129,7 +129,7 @@ export const AppBar = () => {
location.pathname.includes("login") ||
location.pathname.includes("setup") ||
location.pathname.includes("server") ||
location.pathname === "/player/" ||
location.pathname === "/player" ||
location.pathname.includes("error") ||
location.pathname === "/"
) {
+1 -1
View File
@@ -1,7 +1,7 @@
import Divider from "@mui/material/Divider";
import Grid from "@mui/material/Grid2";
import Skeleton from "@mui/material/Skeleton";
import Typography from "@mui/material/Typography";
import Grid from "@mui/material/Unstable_Grid2";
import EpisodeSkeleton from "./episode";
export const SeasonSelectorSkeleton = () => {
+27 -7
View File
@@ -16,6 +16,7 @@ import { Route as IndexImport } from './routes/index'
import { Route as ErrorCodeImport } from './routes/error/$code'
import { Route as ApiSearchImport } from './routes/_api/search'
import { Route as ApiLoginImport } from './routes/_api/login'
import { Route as ApiLibraryImport } from './routes/_api/library'
import { Route as ApiSearchIndexImport } from './routes/_api/search/index'
import { Route as ApiPlayerIndexImport } from './routes/_api/player/index'
import { Route as ApiHomeIndexImport } from './routes/_api/home/index'
@@ -64,6 +65,11 @@ const ApiLoginRoute = ApiLoginImport.update({
getParentRoute: () => ApiRoute,
} as any)
const ApiLibraryRoute = ApiLibraryImport.update({
path: '/library',
getParentRoute: () => ApiRoute,
} as any)
const ApiSearchIndexRoute = ApiSearchIndexImport.update({
path: '/',
getParentRoute: () => ApiSearchRoute,
@@ -130,8 +136,8 @@ const ApiLoginListRoute = ApiLoginListImport.update({
} as any)
const ApiLibraryIdRoute = ApiLibraryIdImport.update({
path: '/library/$id',
getParentRoute: () => ApiRoute,
path: '/$id',
getParentRoute: () => ApiLibraryRoute,
} as any)
const ApiItemIdRoute = ApiItemIdImport.update({
@@ -182,6 +188,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ApiImport
parentRoute: typeof rootRoute
}
'/_api/library': {
id: '/_api/library'
path: '/library'
fullPath: '/library'
preLoaderRoute: typeof ApiLibraryImport
parentRoute: typeof ApiImport
}
'/_api/login': {
id: '/_api/login'
path: '/login'
@@ -240,10 +253,10 @@ declare module '@tanstack/react-router' {
}
'/_api/library/$id': {
id: '/_api/library/$id'
path: '/library/$id'
path: '/$id'
fullPath: '/library/$id'
preLoaderRoute: typeof ApiLibraryIdImport
parentRoute: typeof ApiImport
parentRoute: typeof ApiLibraryImport
}
'/_api/login/list': {
id: '/_api/login/list'
@@ -351,6 +364,7 @@ declare module '@tanstack/react-router' {
export const routeTree = rootRoute.addChildren({
IndexRoute,
ApiRoute: ApiRoute.addChildren({
ApiLibraryRoute: ApiLibraryRoute.addChildren({ ApiLibraryIdRoute }),
ApiLoginRoute: ApiLoginRoute.addChildren({
ApiLoginListRoute,
ApiLoginManualRoute,
@@ -362,7 +376,6 @@ export const routeTree = rootRoute.addChildren({
ApiBoxsetIdRoute,
ApiEpisodeIdRoute,
ApiItemIdRoute,
ApiLibraryIdRoute,
ApiPersonIdRoute,
ApiPlayerAudioRoute,
ApiPlaylistIdRoute,
@@ -399,6 +412,7 @@ export const routeTree = rootRoute.addChildren({
"/_api": {
"filePath": "_api.tsx",
"children": [
"/_api/library",
"/_api/login",
"/_api/search",
"/_api/album/$id",
@@ -406,7 +420,6 @@ export const routeTree = rootRoute.addChildren({
"/_api/boxset/$id",
"/_api/episode/$id",
"/_api/item/$id",
"/_api/library/$id",
"/_api/person/$id",
"/_api/player/audio",
"/_api/playlist/$id",
@@ -416,6 +429,13 @@ export const routeTree = rootRoute.addChildren({
"/_api/player/"
]
},
"/_api/library": {
"filePath": "_api/library.tsx",
"parent": "/_api",
"children": [
"/_api/library/$id"
]
},
"/_api/login": {
"filePath": "_api/login.tsx",
"parent": "/_api",
@@ -457,7 +477,7 @@ export const routeTree = rootRoute.addChildren({
},
"/_api/library/$id": {
"filePath": "_api/library/$id.tsx",
"parent": "/_api"
"parent": "/_api/library"
},
"/_api/login/list": {
"filePath": "_api/login/list.tsx",
+1 -1
View File
@@ -264,7 +264,7 @@ export const Route = createRootRouteWithContext<ApiContext>()({
<AudioPlayer />
<Outlet />
<ReactQueryDevtools />
<TanStackRouterDevtools />
{/* <TanStackRouterDevtools /> */}
</SnackbarProvider>
</ThemeProvider>
</Suspense>
+146 -140
View File
@@ -49,9 +49,9 @@ import {
import { useBackdropStore } from "@/utils/store/backdrop";
import "./album.scss";
import IconLink from "@/components/iconLink";
import TagChip from "@/components/tagChip";
import { Link, createFileRoute } from "@tanstack/react-router";
import lyricsIcon from "../../../assets/icons/lyrics.svg";
function TabPanel(props) {
const { children, value, index, ...other } = props;
@@ -201,155 +201,161 @@ function MusicAlbumTitlePage() {
className="scrollY padded-top item item-album"
ref={pageRef}
>
<div className="item-info">
<Typography className="item-info-name" variant="h3">
{item.data.Name}
</Typography>
<div className="flex flex-align-center item-info-album-info">
<div className="flex flex-align-center">
<span
className="material-symbols-rounded"
style={{
opacity: 0.7,
}}
>
artist
</span>
<Typography ml={1}>{item.data.AlbumArtist}</Typography>
</div>
<Typography className="opacity-07">
{item.data.ProductionYear}
<div className="item-info-container">
<div className="item-info">
<Typography className="item-info-name" variant="h3">
{item.data.Name}
</Typography>
<Typography className="opacity-07">
{musicTracks.data?.TotalRecordCount > 1
? `${musicTracks.data?.TotalRecordCount} songs`
: `1 song`}
</Typography>
<Typography className="opacity-07">
{getRuntimeCompact(item.data.CumulativeRunTimeTicks)}
</Typography>
</div>
<div className="item-info-buttons">
<PlayButton
item={item}
audio
itemType={item.data.Type}
userId={user.data?.Id}
/>
<LikeButton
itemId={item.data.Id}
isFavorite={item.data.UserData?.IsFavorite}
queryKey={["item", "musicTracks"]}
userId={user.data?.Id}
itemName={item.data.Name}
/>
</div>
<div className="item-info-track-container">
<div className="item-info-track header">
<span className="material-symbols-rounded index">tag</span>
<Typography variant="subtitle1">Title</Typography>
<Typography variant="subtitle1">Duration</Typography>
</div>
{musicTracks.data?.Items?.map((track, index) => (
<div
className={
currentPlayingItem?.Id === track.Id
? "item-info-track playing"
: "item-info-track"
}
key={track.Id}
onClick={() =>
handlePlayback(index, track, musicTracks.data.Items)
}
>
<div className="index-container">
<span className="material-symbols-rounded fill ">
play_arrow
</span>
<Typography className="index">
{track.IndexNumber ?? "-"}
</Typography>
</div>
<div className="item-info-track-info">
<Typography className="item-info-track-info-name">
{track.Name}
</Typography>
<Typography
variant="subtitle2"
style={{
opacity: 0.6,
}}
fontWeight={300}
>
{track.Artists?.join(", ")}
</Typography>
</div>
<Typography>{getRuntimeMusic(track.RunTimeTicks)}</Typography>
<div className="flex flex-align-center">
<LikeButton
itemId={track.Id}
isFavorite={track.UserData?.IsFavorite}
queryKey={["item", "musicTracks"]}
userId={user.data?.Id}
itemName={track.Name}
/>
</div>
<div className="flex flex-align-center item-info-album-info">
<div className="flex flex-align-center">
<span
className="material-symbols-rounded"
style={{
opacity: 0.7,
}}
>
artist
</span>
<Typography ml={1}>{item.data.AlbumArtist}</Typography>
</div>
))}
</div>
</div>
<div className="item-info-sidebar">
<div className="item-info-sidebar-image-container">
{item.data.ImageTags?.Primary ? (
<img
className="item-info-sidebar-image"
alt={item.data.Name ?? "Album"}
src={api.getItemImageUrl(item.data.Id, "Primary", {
tag: item.data.ImageTags.Primary,
quality: 90,
})}
<Typography className="opacity-07">
{item.data.ProductionYear}
</Typography>
<Typography className="opacity-07">
{musicTracks.data?.TotalRecordCount > 1
? `${musicTracks.data?.TotalRecordCount} songs`
: `1 song`}
</Typography>
<Typography className="opacity-07">
{getRuntimeCompact(item.data.CumulativeRunTimeTicks)}
</Typography>
</div>
<div className="item-info-buttons">
<PlayButton
item={item}
audio
itemType={item.data.Type}
userId={user.data?.Id}
/>
) : (
<div className="item-info-sidebar-icon">
{getTypeIcon("MusicAlbum")}
<LikeButton
itemId={item.data.Id}
isFavorite={item.data.UserData?.IsFavorite}
queryKey={["item", "musicTracks"]}
userId={user.data?.Id}
itemName={item.data.Name}
/>
</div>
<div className="item-info-track-container">
<div className="item-info-track header">
<span className="material-symbols-rounded index">tag</span>
<Typography variant="subtitle1">Title</Typography>
<Typography variant="subtitle1">Duration</Typography>
</div>
)}
</div>
<div
className="flex flex-align-center"
style={{ gap: "1em", flexWrap: "wrap" }}
>
{item.data.GenreItems?.map((genre) => (
<TagChip label={genre.Name} key={genre.Id} />
))}
</div>
<div className="flex flex-column item-info-sidebar-artist-container">
{item.data.ArtistItems?.map((artist) => (
<Link
to="/artist/$id"
params={{ id: artist.Id }}
className="item-info-sidebar-artist"
key={artist.Id}
>
<div className="item-info-sidebar-artist-image-container">
<img
className="item-info-sidebar-artist-image"
alt={artist.Name ?? "Artist"}
src={api.getItemImageUrl(artist.Id, "Primary", {
quality: 90,
})}
/>
<span className="material-symbols-rounded">artist</span>
{musicTracks.data?.Items?.map((track, index) => (
<div
className={
currentPlayingItem?.Id === track.Id
? "item-info-track playing"
: "item-info-track"
}
key={track.Id}
onClick={() =>
handlePlayback(index, track, musicTracks.data.Items)
}
>
<div className="index-container">
<span className="material-symbols-rounded fill ">
play_arrow
</span>
<Typography className="index">
{track.IndexNumber ?? "-"}
</Typography>
</div>
<div className="item-info-track-info">
<Typography className="item-info-track-info-name">
{track.Name}
</Typography>
<Typography
variant="subtitle2"
style={{
opacity: 0.6,
display: "flex",
alignItems: "center",
gap: "0.6em",
}}
fontWeight={300}
>
{track.HasLyrics && <img src={lyricsIcon} alt="lyrics" />}
{track.Artists?.join(", ")}
</Typography>
</div>
<Typography>{getRuntimeMusic(track.RunTimeTicks)}</Typography>
<div className="flex flex-align-center">
<LikeButton
itemId={track.Id}
isFavorite={track.UserData?.IsFavorite}
queryKey={["item", "musicTracks"]}
userId={user.data?.Id}
itemName={track.Name}
/>
</div>
</div>
<Typography>{artist.Name}</Typography>
</Link>
))}
))}
</div>
</div>
<div className="item-info-sidebar">
<div className="item-info-sidebar-image-container">
{item.data.ImageTags?.Primary ? (
<img
className="item-info-sidebar-image"
alt={item.data.Name ?? "Album"}
src={api.getItemImageUrl(item.data.Id, "Primary", {
tag: item.data.ImageTags.Primary,
quality: 90,
})}
/>
) : (
<div className="item-info-sidebar-icon">
{getTypeIcon("MusicAlbum")}
</div>
)}
</div>
<div
className="flex flex-align-center"
style={{ gap: "1em", flexWrap: "wrap" }}
>
{item.data.GenreItems?.map((genre) => (
<TagChip label={genre.Name} key={genre.Id} />
))}
</div>
<div className="flex flex-column item-info-sidebar-artist-container">
{item.data.ArtistItems?.map((artist) => (
<Link
to="/artist/$id"
params={{ id: artist.Id }}
className="item-info-sidebar-artist"
key={artist.Id}
>
<div className="item-info-sidebar-artist-image-container">
<img
className="item-info-sidebar-artist-image"
alt={artist.Name ?? "Artist"}
src={api.getItemImageUrl(artist.Id, "Primary", {
quality: 90,
})}
/>
<span className="material-symbols-rounded">artist</span>
</div>
<Typography>{artist.Name}</Typography>
</Link>
))}
</div>
</div>
</div>
{similarItems.data.TotalRecordCount > 0 && (
<CardScroller
title="You might also like"
displayCards={5}
displayCards={7}
disableDecoration
>
{similarItems.data.Items.map((similar) => {
+5 -3
View File
@@ -1,11 +1,13 @@
$border-radius: 20px;
.item-album {
grid-template-columns: 1fr 25%;
display: grid;
gap: 3em;
.item-info {
display: flex;
flex-direction: column;
&-container {
grid-template-columns: 1fr 25%;
display: grid;
gap: 3em;
}
gap: 1.2em;
&-sidebar {
display: flex;
+41
View File
@@ -0,0 +1,41 @@
import type {
BaseItemKind,
ItemSortBy,
} from "@jellyfin/sdk/lib/generated-client";
import { createFileRoute } from "@tanstack/react-router";
type LibraryParamType = {
currentViewType: BaseItemKind;
sortAscending: boolean;
sortBy: ItemSortBy;
filters: {
isPlayed: boolean;
isUnPlayed: boolean;
isResumable: boolean;
isFavorite: boolean;
isLiked: boolean;
isUnliked: boolean;
hasSubtitles: boolean;
hasTrailer: boolean;
hasSpecialFeature: boolean;
hasThemeSong: boolean;
hasThemeVideo: boolean;
isBluRay: boolean;
isDVD: boolean;
isHD: undefined | boolean;
isSD: boolean;
is4K: boolean;
is3D: boolean;
};
};
export const Route = createFileRoute("/_api/library")({
validateSearch: (search: Record<string, any>): LibraryParamType => {
return {
currentViewType: search.viewType,
sortAscending: search.sortAscending,
sortBy: search.sortBy,
filters: search.filters,
};
},
});
+57 -12
View File
@@ -65,10 +65,10 @@ import { useWindowVirtualizer } from "@tanstack/react-virtual";
import type { AxiosResponse } from "axios";
import "./library.scss";
import LibraryItemsSkeleton from "@/components/skeleton/libraryItems";
import { createFileRoute } from "@tanstack/react-router";
import { createFileRoute, useNavigate } from "@tanstack/react-router";
type SortByObject = { title: string; value: ItemSortBy };
type ViewObject = { title: string; value: BaseItemKind };
type ViewObject = { title: string; value: BaseItemKind | "Artist" };
// type allowedFilters = ["movies", "tvshows", "music", "books"];
type allowedFilters = Partial<CollectionType>[];
@@ -97,6 +97,7 @@ export const Route = createFileRoute("/_api/library/$id")({
function LibraryView() {
const api = Route.useRouteContext().api;
const navigate = useNavigate();
const { id } = Route.useParams();
@@ -123,7 +124,7 @@ function LibraryView() {
staleTime: 0,
});
const [currentViewType, setCurrentViewType] = useState<BaseItemKind>(
const [currentViewType, setCurrentViewType] = useState<BaseItemKind | "Artist">(
undefined!,
);
const availableViewTypes: ViewObject[] = useMemo(() => {
@@ -190,7 +191,19 @@ function LibraryView() {
default:
result = [];
}
setCurrentViewType(result?.[0]?.value);
if (
sessionStorage.getItem(
`library-${currentLib.data?.Id}-config_currentViewType`,
)
) {
setCurrentViewType(
sessionStorage.getItem(
`library-${currentLib.data?.Id}-config_currentViewType`,
) as BaseItemKind | "Artist",
);
} else {
setCurrentViewType(result?.[0]?.value);
}
return result;
}, [currentLib.data?.CollectionType]);
@@ -205,6 +218,18 @@ function LibraryView() {
const [sortBy, setSortBy] = useState<ItemSortBy>("Name");
const [sortAscending, setSortAscending] = useState(true);
useEffect(() => {
// I don't know why this works, don't ask...
const cachedVal = sessionStorage.getItem(
`library-${currentLib.data?.Id}-config_sort`,
) as unknown as {
sortAscending: boolean;
sortBy: ItemSortBy;
};
if (cachedVal) {
setSortAscending(cachedVal.sortAscending);
}
}, [currentLib.data?.Id]);
const sortByOptions: SortByObject[] = useMemo(() => {
let result: SortByObject[] = undefined!;
switch (currentViewType) {
@@ -414,10 +439,19 @@ function LibraryView() {
];
break;
}
setSortBy(result?.[0]?.value);
// And they say typescript makes your code better :|
const cachedVal = JSON.parse(sessionStorage.getItem(`library-${currentLib.data?.Id}-config_sort`) as string);
// as {
// sortAscending: boolean;
// sortBy: ItemSortBy;
// }
if (cachedVal) {
setSortBy(cachedVal.sortBy);
} else {
setSortBy(result?.[0]?.value);
}
return result;
}, [currentLib.data?.CollectionType, currentViewType]);
useLayoutEffect(() => {}, [sortByOptions]);
const [filters, setFilters] = useState<Record<string, undefined | boolean>>({
isPlayed: false,
@@ -775,9 +809,16 @@ function LibraryView() {
select
value={sortBy ?? "Name"}
size="small"
onChange={(e: ChangeEvent<HTMLSelectElement>) =>
setSortBy(e.target.value)
}
onChange={(e) => {
setSortBy(e.target.value);
sessionStorage.setItem(
`library-${currentLib.data?.Id}-config_sort`,
JSON.stringify({
sortAscending,
sortBy: e.target.value,
}),
);
}}
>
{sortByOptions.map((item) => (
<MenuItem key={item.value} value={item.value}>
@@ -792,9 +833,13 @@ function LibraryView() {
select
value={currentViewType}
size="small"
onChange={(e: ChangeEvent<HTMLSelectElement>) =>
setCurrentViewType(e.target.value)
}
onChange={(e) => {
setCurrentViewType(e.target.value);
sessionStorage.setItem(
`library-${currentLib.data?.Id}-config_currentViewType`,
e.target.value,
);
}}
>
{availableViewTypes.map((item) => (
<MenuItem key={item.value} value={item.value}>
+45 -6
View File
@@ -1,5 +1,5 @@
.audio {
&-hidden{
&-hidden {
transform: translateY(-100%);
}
&-info {
@@ -43,29 +43,68 @@
gap: 1em;
}
}
&-queue{
&-queue {
display: flex;
flex-direction: column;
width: 100%;
align-items: center;
gap: 1em;
margin-top: 2em;
&-track{
&-track {
display: grid;
grid-template-columns: 3em 1fr 6em;
align-items: center;
justify-content: center;
width: 100%;
gap: 1em;
&-info-name{
&-info-name {
transition: $transition-time-fast;
}
&.active{
.audio-queue-track-info-name{
&.active {
.audio-queue-track-info-name {
color: $clr-accent-default;
font-weight: 500;
}
}
}
}
&-lyrics {
max-height: 40vh;
overflow:visible;
background: rgb(255 255 255 / 0.05);
// border: 1px solid rgb(255 255 255 / 0.2);
padding: 2em;
position: relative;
margin-bottom: 2em;
border-radius: 20px;
&-line {
width: fit-content;
white-space: wrap;
text-align: center;
font-size: 1.5em;
opacity: 0.5;
transform: scale(1);
transition: transform $transition-time-default;
&[data-active-lyric="true"] {
opacity: 1;
transform: scale(1.2);
}
}
&[data-has-synced-lyrics="false"] {
.audio-lyrics-line {
opacity: 1;
}
}
&-container {
display: flex;
flex-direction: column;
overflow-y: scroll;
height: calc(40vh - 4em);
width: 100%;
overflow-x: visible !important;
align-items: center;
position: relative;
top: 0;
}
}
}
+174 -77
View File
@@ -3,7 +3,13 @@ import { useAudioPlayback } from "@/utils/store/audioPlayback";
import useQueue from "@/utils/store/queue";
import { Fab, IconButton, Slider, Typography } from "@mui/material";
import { createFileRoute } from "@tanstack/react-router";
import React, { useCallback, useEffect, useRef, useState } from "react";
import React, {
useCallback,
useEffect,
useMemo,
useRef,
useState,
} from "react";
import "./audio.scss";
import LikeButton from "@/components/buttons/likeButton";
@@ -24,8 +30,10 @@ function AudioPlayerRoute() {
const api = useApiInContext((s) => s.api);
const [queue, currentTrack] = useQueue((s) => [s.tracks, s.currentItemIndex]);
const [item] = useAudioPlayback((s) => [s.item]);
const audioPlayer: HTMLAudioElement | null =
document.querySelector("#audio-player");
const audioPlayer: HTMLAudioElement | null = useMemo(
() => document.querySelector("#audio-player"),
[item],
);
const [isScrubbing, setIsScrubbing] = useState(false);
const [sliderProgress, setSliderProgress] = useState<number | number[]>(0); // this state hold the slider scrubbing value allowing user to scrub track without changing current time
@@ -33,23 +41,44 @@ function AudioPlayerRoute() {
audioPlayer?.currentTime ?? 0,
);
const [showLyrics, setShowLyrics] = useState(false);
const lyrics = useQuery({
queryKey: ["player", "audio", item?.Id, "lyrics"],
queryFn: async () =>
await getLyricsApi(api).getLyrics({
itemId: item?.Id,
}),
(
await getLyricsApi(api).searchRemoteLyrics({
itemId: item?.Id,
})
).data,
enabled: Boolean(item?.Id),
});
useEffect(() => {
audioPlayer?.addEventListener("timeupdate", () => {
setProgress(audioPlayer.currentTime);
setProgress(audioPlayer.currentTime ?? 0);
});
}, [item?.Id]);
console.log(audioPlayer);
}, [item?.Id, currentTrack]);
const lyricsContainer = useRef<HTMLDivElement | null>(null);
useEffect(() => {
if (showLyrics) {
const currentLyric = document.querySelector("[data-active-lyric='true']");
currentLyric?.scrollIntoView({
block: "nearest",
inline: "nearest",
behavior: "smooth",
});
}
}, [showLyrics, audioPlayer?.currentTime]);
return (
<div className="scrollY padded-top flex flex-column" style={{ gap: "1em" }}>
<div
className="scrollY padded-top flex flex-column"
style={{ gap: "1em" }}
key={queue[currentTrack]?.Id}
>
<div className="audio-info-container">
<div className="audio-info-image-container">
{item?.ImageTags?.Primary ? (
@@ -77,84 +106,152 @@ function AudioPlayerRoute() {
>
by {item?.Artists?.join(", ")}
</Typography>
<Slider
style={{
marginTop: "1.2em",
}}
value={isScrubbing ? sliderProgress : secToTicks(progress)}
max={item?.RunTimeTicks ?? 1}
step={1}
onChange={(_, newVal) => {
setIsScrubbing(true);
setSliderProgress(newVal);
}}
onChangeCommitted={(_, newVal) => {
setIsScrubbing(false);
Array.isArray(newVal)
? setProgress(ticksToSec(newVal[0]))
: setProgress(ticksToSec(newVal));
audioPlayer?.currentTime = Array.isArray(newVal)
? ticksToSec(newVal[0])
: ticksToSec(newVal);
}}
sx={{
"& .MuiSlider-thumb": {
width: 14,
height: 14,
transition: "0.1s ease-in-out",
opacity: 0,
"&.Mui-active": {
width: 20,
height: 20,
<div
className="flex flex-row"
style={{ gap: "1em", alignItems: "center" }}
>
<Typography variant="subtitle2" className="opacity-07">
{getRuntimeMusic(secToTicks(audioPlayer?.currentTime) ?? 0)}
</Typography>
<Slider
value={isScrubbing ? sliderProgress : secToTicks(progress)}
max={item?.RunTimeTicks ?? 1}
step={1}
onChange={(_, newVal) => {
setIsScrubbing(true);
setSliderProgress(newVal);
}}
onChangeCommitted={(_, newVal) => {
setIsScrubbing(false);
Array.isArray(newVal)
? setProgress(ticksToSec(newVal[0]))
: setProgress(ticksToSec(newVal));
audioPlayer?.currentTime = Array.isArray(newVal)
? ticksToSec(newVal[0])
: ticksToSec(newVal);
}}
sx={{
"& .MuiSlider-thumb": {
width: 14,
height: 14,
transition: "0.1s ease-in-out",
opacity: 0,
"&.Mui-active": {
width: 20,
height: 20,
opacity: 1,
},
},
"&:hover .MuiSlider-thumb": {
opacity: 1,
},
},
"&:hover .MuiSlider-thumb": {
opacity: 1,
},
"& .MuiSlider-rail": {
opacity: 0.28,
background: "white",
},
}}
/>
<div className="audio-info-controls">
<PlayPreviousButton />
<IconButton
onClick={() => {
audioPlayer?.currentTime -= SEEK_AMOUNT;
"& .MuiSlider-rail": {
opacity: 0.28,
background: "white",
},
}}
>
<span className="material-symbols-rounded">fast_rewind</span>
</IconButton>
<Fab
disabled={!audioPlayer?.readyState}
color="white"
size="large"
onClick={() =>
audioPlayer?.paused ? audioPlayer.play() : audioPlayer?.pause()
}
>
<span
className="fill material-symbols-rounded"
style={{
fontSize: "2.4em",
/>
<Typography variant="subtitle2" className="opacity-07">
{getRuntimeMusic(item?.RunTimeTicks ?? 0)}
</Typography>
</div>
<div
style={{
display: "flex",
alignItems: "center",
justifyContent: "center",
width: "100%",
}}
>
<div className="audio-info-controls">
<PlayPreviousButton />
<IconButton
onClick={() => {
audioPlayer?.currentTime -= SEEK_AMOUNT;
}}
>
{audioPlayer?.paused ? "play_arrow" : "pause"}
<span className="material-symbols-rounded">fast_rewind</span>
</IconButton>
<Fab
disabled={!audioPlayer?.readyState}
color="white"
size="large"
onClick={() =>
audioPlayer?.paused
? audioPlayer.play()
: audioPlayer?.pause()
}
>
<span
className="fill material-symbols-rounded"
style={{
fontSize: "2.4em",
}}
>
{audioPlayer?.paused ? "play_arrow" : "pause"}
</span>
</Fab>
<IconButton
onClick={() => {
audioPlayer?.currentTime += SEEK_AMOUNT;
}}
>
<span className="material-symbols-rounded">fast_forward</span>
</IconButton>
<PlayNextButton />
</div>
<IconButton onClick={() => setShowLyrics((s) => !s)}>
<span
className={
showLyrics
? "material-symbols-rounded fill"
: "material-symbols-rounded"
}
>
lyrics
</span>
</Fab>
<IconButton
onClick={() => {
audioPlayer?.currentTime += SEEK_AMOUNT;
}}
>
<span className="material-symbols-rounded">fast_forward</span>
</IconButton>
<PlayNextButton />
</div>
</div>
</div>
{showLyrics && (
<div
className="audio-lyrics"
data-has-synced-lyrics={Boolean(
lyrics.data?.[0]?.Lyrics?.Metadata?.IsSynced,
)}
>
<div className="audio-lyrics-container" ref={lyricsContainer}>
{lyrics.data?.[1]?.Lyrics?.Lyrics?.map((lyric, index) => (
<div
className="audio-lyrics-line"
key={`${lyric.Text}${index}`}
data-active-lyric={
secToTicks(audioPlayer?.currentTime) >= lyric.Start &&
secToTicks(audioPlayer?.currentTime) <
(lyrics.data?.[0]?.Lyrics?.Lyrics?.[index + 1]?.Start ?? 0)
}
>
{lyric.Text}
</div>
))}
</div>
{!lyrics.data?.[0]?.Lyrics?.Metadata?.IsSynced && (
<Typography
className="flex flex-align-center"
style={{
position: "absolute",
bottom: "-2em",
opacity: 0.7,
gap: "0.4em",
}}
>
<span className="material-symbols-rounded">info</span>
Synced subtitles no available
</Typography>
)}
</div>
)}
<div className="audio-queue-container">
<Typography variant="h5">Queue:</Typography>
<div className="audio-queue">
+8
View File
@@ -40,6 +40,7 @@ import PlayNextButton from "@/components/buttons/playNextButton";
import PlayPreviousButton from "@/components/buttons/playPreviousButtom";
import QueueButton from "@/components/buttons/queueButton";
import OutroCard from "@/components/outroCard";
import useQueue from "@/utils/store/queue";
import { createFileRoute, useRouter } from "@tanstack/react-router";
import type { OnProgressProps } from "react-player/base";
import subtitleFont from "./Noto-Sans-Indosphere.ttf";
@@ -98,6 +99,10 @@ function VideoPlayer() {
state.playsessionId,
state.intro,
]);
const [currentQueueItemIndex, queue] = useQueue((s) => [
s.currentItemIndex,
s.tracks,
]);
const [loading, setLoading] = useState(true);
const [settingsMenu, setSettingsMenu] = useState(null);
@@ -330,6 +335,9 @@ function VideoPlayer() {
}, [progress]);
const showUpNextCard = useMemo(() => {
if (queue[currentQueueItemIndex]?.Id === queue[queue.length - 1]?.Id) {
return false; // Check if the current playing episode is last episode in queue
}
if (introInfo?.Credits) {
if (
ticksToSec(progress) >= introInfo?.Credits.ShowSkipPromptAt &&
+23 -53
View File
@@ -265,7 +265,7 @@ function SearchPage() {
)}
{episodes.isSuccess && episodes.data.TotalRecordCount > 0 && (
<CardScroller title="Episodes" displayCards={4} disableDecoration>
{episodes.data.SearchHints.map((episode) => {
{episodes.data.SearchHints?.map((episode) => {
return (
<EpisodeCard
key={episode.Id}
@@ -280,9 +280,9 @@ function SearchPage() {
})}
</CardScroller>
)}
{audio.isSuccess && audio.data.Items.length > 0 && (
{audio.isSuccess && audio.data.Items?.length > 0 && (
<CardScroller title="Audio" displayCards={8} disableDecoration>
{audio.data.Items.map((item, index) => (
{audio.data.Items?.map((item, index) => (
<Card
key={item.Id}
item={item}
@@ -291,20 +291,14 @@ function SearchPage() {
cardCaption={item.ProductionYear}
cardType="square"
queryKey={["search", "items", "Audio", query]}
userId={user.data.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
userId={user.data?.Id}
/>
))}
</CardScroller>
)}
{musicAlbum.isSuccess && musicAlbum.data.Items.length > 0 && (
{musicAlbum.isSuccess && musicAlbum.data.Items?.length > 0 && (
<CardScroller title="Albums" displayCards={8} disableDecoration>
{musicAlbum.data.Items.map((item, index) => (
{musicAlbum.data.Items?.map((item, index) => (
<Card
key={item.Id}
item={item}
@@ -314,20 +308,14 @@ function SearchPage() {
cardCaption={item.AlbumArtist}
cardType={"square"}
queryKey={["search", "items", "MusicAlbum", query]}
userId={user.data.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
userId={user.data?.Id}
/>
))}
</CardScroller>
)}
{book.isSuccess && book.data.Items.length > 0 && (
{book.isSuccess && book.data.Items?.length > 0 && (
<CardScroller title="Books" displayCards={8} disableDecoration>
{book.data.Items.map((item, index) => (
{book.data.Items?.map((item, index) => (
<Card
key={item.Id}
item={item}
@@ -337,20 +325,14 @@ function SearchPage() {
disableOverlay
cardType={"portrait"}
queryKey={["search", "items", "Book", query]}
userId={user.data.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
userId={user.data?.Id}
/>
))}
</CardScroller>
)}
{musicArtists.isSuccess && musicArtists.data.Items.length > 0 && (
{musicArtists.isSuccess && musicArtists.data.Items?.length > 0 && (
<CardScroller title="Artists" displayCards={8} disableDecoration>
{musicArtists.data.Items.map((item) => (
{musicArtists.data.Items?.map((item) => (
<Card
key={item.Id}
item={item}
@@ -359,20 +341,14 @@ function SearchPage() {
disableOverlay
cardType={"square"}
queryKey={["search", "items", "MusicArtists", query]}
userId={user.data.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
userId={user.data?.Id}
/>
))}
</CardScroller>
)}
{person.isSuccess && person.data.Items.length > 0 && (
{person.isSuccess && person.data.Items?.length > 0 && (
<CardScroller title="People" displayCards={8} disableDecoration>
{person.data.Items.map((item) => (
{person.data.Items?.map((item) => (
<Card
key={item.Id}
item={item}
@@ -381,13 +357,7 @@ function SearchPage() {
disableOverlay
cardType={"square"}
queryKey={["search", "items", "Person", query]}
userId={user.data.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
userId={user.data?.Id}
/>
))}
</CardScroller>
@@ -401,14 +371,14 @@ function SearchPage() {
book.isSuccess &&
musicArtists.isSuccess &&
person.isSuccess &&
movies.data.Items.length === 0 &&
series.data.Items.length === 0 &&
audio.data.Items.length === 0 &&
musicAlbum.data.Items.length === 0 &&
book.data.Items.length === 0 &&
musicArtists.data.Items.length === 0 &&
movies.data.Items?.length === 0 &&
series.data.Items?.length === 0 &&
audio.data.Items?.length === 0 &&
musicAlbum.data.Items?.length === 0 &&
book.data.Items?.length === 0 &&
musicArtists.data.Items?.length === 0 &&
person.data.Items?.length === 0 &&
episodes.data.SearchHints?.length === 0 && (
episodes.data?.SearchHints?.length === 0 && (
<div
style={{
height: "calc(100vh - 12em)",