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
+4748 -4545

No files matched your search

+23 -23
View File
@@ -13,35 +13,35 @@
"tanstack-router-dev": "tsr watch" "tanstack-router-dev": "tsr watch"
}, },
"dependencies": { "dependencies": {
"@emotion/react": "^11.13.0", "@emotion/react": "^11.13.3",
"@emotion/styled": "^11.13.0", "@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", "@fontsource-variable/noto-sans": "^5.0.5",
"@jellyfin/sdk": "0.10.0", "@jellyfin/sdk": "0.10.0",
"@million/lint": "1.0.0-rc.84", "@million/lint": "1.0.0-rc.84",
"@mui/lab": "5.0.0-alpha.173", "@mui/lab": "6.0.0-beta.8",
"@mui/material": "6.0.0-alpha.14", "@mui/material": "6.0.0",
"@react-spring/web": "^9.7.4", "@react-spring/web": "^9.7.4",
"@tanem/react-nprogress": "^5.0.51", "@tanem/react-nprogress": "^5.0.51",
"@tanstack/react-query": "^5.51.15", "@tanstack/react-query": "^5.52.2",
"@tanstack/react-query-devtools": "^5.51.15", "@tanstack/react-query-devtools": "^5.52.2",
"@tanstack/react-router": "^1.45.11", "@tanstack/react-router": "^1.51.0",
"@tanstack/react-virtual": "^3.8.3", "@tanstack/react-virtual": "^3.10.4",
"@tauri-apps/api": "2.0.0-beta.15", "@tauri-apps/api": "2.0.0-beta.15",
"@tauri-apps/plugin-clipboard-manager": "2.1.0-beta.5", "@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-store": "github:tauri-apps/tauri-plugin-store#v2",
"@tauri-apps/plugin-updater": "2.0.0-beta.7", "@tauri-apps/plugin-updater": "2.0.0-rc.0",
"@types/node": "^22.0.0", "@types/node": "^22.5.0",
"@types/react": "^18.3.3", "@types/react": "^18.3.4",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^18.3.0",
"axios": "^1.7.2", "axios": "^1.7.5",
"axios-tauri-api-adapter": "^0.2.1", "axios-tauri-api-adapter": "^0.2.2",
"blurhash": "^2.0.5", "blurhash": "^2.0.5",
"framer-motion": "^11.3.19", "framer-motion": "^11.3.30",
"jassub": "^1.7.16", "jassub": "^1.7.17",
"lodash": "^4.17.21", "lodash": "^4.17.21",
"material-symbols": "^0.21.2", "material-symbols": "^0.22.2",
"million": "^3.1.11", "million": "^3.1.11",
"notistack": "^3.0.1", "notistack": "^3.0.1",
"react": "18.3.1", "react": "18.3.1",
@@ -57,21 +57,21 @@
"remark-gfm": "^4.0.0", "remark-gfm": "^4.0.0",
"typescript": "^5.5.4", "typescript": "^5.5.4",
"vite-plugin-svgr": "^4.2.0", "vite-plugin-svgr": "^4.2.0",
"wavesurfer.js": "^7.8.2", "wavesurfer.js": "^7.8.4",
"zustand": "^4.5.4" "zustand": "^4.5.5"
}, },
"devDependencies": { "devDependencies": {
"@babel/plugin-proposal-optional-chaining-assign": "^7.24.7", "@babel/plugin-proposal-optional-chaining-assign": "^7.24.7",
"@biomejs/biome": "^1.8.3", "@biomejs/biome": "^1.8.3",
"@tanstack/router-cli": "^1.45.8", "@tanstack/router-cli": "^1.51.0",
"@tanstack/router-devtools": "^1.45.11", "@tanstack/router-devtools": "^1.51.0",
"@tanstack/router-vite-plugin": "^1.45.8", "@tanstack/router-vite-plugin": "^1.51.0",
"@tauri-apps/cli": "2.0.0-beta.22", "@tauri-apps/cli": "2.0.0-beta.22",
"@types/lodash": "^4.17.7", "@types/lodash": "^4.17.7",
"@vitejs/plugin-react": "^4.3.1", "@vitejs/plugin-react": "^4.3.1",
"prop-types": "^15.8.1", "prop-types": "^15.8.1",
"sass": "^1.77.8", "sass": "^1.77.8",
"vite": "^5.3.5" "vite": "^5.4.2"
}, },
"license": "GPL-3.0-only" "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-keys",
"store:allow-load", "store:allow-load",
"updater:allow-check", "updater:allow-check",
"updater:allow-download-and-install", "updater:allow-download-and-install"
"window:default",
"window:allow-set-fullscreen"
] ]
} }
+9 -10
View File
@@ -1,17 +1,16 @@
{ {
"$schema": "../gen/schemas/desktop-schema.json",
"identifier": "migrated", "identifier": "migrated",
"description": "permissions that were migrated from v1", "description": "permissions that were migrated from v1",
"local": true, "local": true,
"windows": [ "windows": ["main"],
"main"
],
"permissions": [ "permissions": [
"path:default", "core:path:default",
"event:default", "core:event:default",
"window:default", "core:window:default",
"app:default", "core:app:default",
"resources:default", "core:resources:default",
"menu:default", "core:menu:default",
"tray: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("login") ||
location.pathname.includes("setup") || location.pathname.includes("setup") ||
location.pathname.includes("server") || location.pathname.includes("server") ||
location.pathname === "/player/" || location.pathname === "/player" ||
location.pathname.includes("error") || location.pathname.includes("error") ||
location.pathname === "/" location.pathname === "/"
) { ) {
+1 -1
View File
@@ -1,7 +1,7 @@
import Divider from "@mui/material/Divider"; import Divider from "@mui/material/Divider";
import Grid from "@mui/material/Grid2";
import Skeleton from "@mui/material/Skeleton"; import Skeleton from "@mui/material/Skeleton";
import Typography from "@mui/material/Typography"; import Typography from "@mui/material/Typography";
import Grid from "@mui/material/Unstable_Grid2";
import EpisodeSkeleton from "./episode"; import EpisodeSkeleton from "./episode";
export const SeasonSelectorSkeleton = () => { 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 ErrorCodeImport } from './routes/error/$code'
import { Route as ApiSearchImport } from './routes/_api/search' import { Route as ApiSearchImport } from './routes/_api/search'
import { Route as ApiLoginImport } from './routes/_api/login' 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 ApiSearchIndexImport } from './routes/_api/search/index'
import { Route as ApiPlayerIndexImport } from './routes/_api/player/index' import { Route as ApiPlayerIndexImport } from './routes/_api/player/index'
import { Route as ApiHomeIndexImport } from './routes/_api/home/index' import { Route as ApiHomeIndexImport } from './routes/_api/home/index'
@@ -64,6 +65,11 @@ const ApiLoginRoute = ApiLoginImport.update({
getParentRoute: () => ApiRoute, getParentRoute: () => ApiRoute,
} as any) } as any)
const ApiLibraryRoute = ApiLibraryImport.update({
path: '/library',
getParentRoute: () => ApiRoute,
} as any)
const ApiSearchIndexRoute = ApiSearchIndexImport.update({ const ApiSearchIndexRoute = ApiSearchIndexImport.update({
path: '/', path: '/',
getParentRoute: () => ApiSearchRoute, getParentRoute: () => ApiSearchRoute,
@@ -130,8 +136,8 @@ const ApiLoginListRoute = ApiLoginListImport.update({
} as any) } as any)
const ApiLibraryIdRoute = ApiLibraryIdImport.update({ const ApiLibraryIdRoute = ApiLibraryIdImport.update({
path: '/library/$id', path: '/$id',
getParentRoute: () => ApiRoute, getParentRoute: () => ApiLibraryRoute,
} as any) } as any)
const ApiItemIdRoute = ApiItemIdImport.update({ const ApiItemIdRoute = ApiItemIdImport.update({
@@ -182,6 +188,13 @@ declare module '@tanstack/react-router' {
preLoaderRoute: typeof ApiImport preLoaderRoute: typeof ApiImport
parentRoute: typeof rootRoute parentRoute: typeof rootRoute
} }
'/_api/library': {
id: '/_api/library'
path: '/library'
fullPath: '/library'
preLoaderRoute: typeof ApiLibraryImport
parentRoute: typeof ApiImport
}
'/_api/login': { '/_api/login': {
id: '/_api/login' id: '/_api/login'
path: '/login' path: '/login'
@@ -240,10 +253,10 @@ declare module '@tanstack/react-router' {
} }
'/_api/library/$id': { '/_api/library/$id': {
id: '/_api/library/$id' id: '/_api/library/$id'
path: '/library/$id' path: '/$id'
fullPath: '/library/$id' fullPath: '/library/$id'
preLoaderRoute: typeof ApiLibraryIdImport preLoaderRoute: typeof ApiLibraryIdImport
parentRoute: typeof ApiImport parentRoute: typeof ApiLibraryImport
} }
'/_api/login/list': { '/_api/login/list': {
id: '/_api/login/list' id: '/_api/login/list'
@@ -351,6 +364,7 @@ declare module '@tanstack/react-router' {
export const routeTree = rootRoute.addChildren({ export const routeTree = rootRoute.addChildren({
IndexRoute, IndexRoute,
ApiRoute: ApiRoute.addChildren({ ApiRoute: ApiRoute.addChildren({
ApiLibraryRoute: ApiLibraryRoute.addChildren({ ApiLibraryIdRoute }),
ApiLoginRoute: ApiLoginRoute.addChildren({ ApiLoginRoute: ApiLoginRoute.addChildren({
ApiLoginListRoute, ApiLoginListRoute,
ApiLoginManualRoute, ApiLoginManualRoute,
@@ -362,7 +376,6 @@ export const routeTree = rootRoute.addChildren({
ApiBoxsetIdRoute, ApiBoxsetIdRoute,
ApiEpisodeIdRoute, ApiEpisodeIdRoute,
ApiItemIdRoute, ApiItemIdRoute,
ApiLibraryIdRoute,
ApiPersonIdRoute, ApiPersonIdRoute,
ApiPlayerAudioRoute, ApiPlayerAudioRoute,
ApiPlaylistIdRoute, ApiPlaylistIdRoute,
@@ -399,6 +412,7 @@ export const routeTree = rootRoute.addChildren({
"/_api": { "/_api": {
"filePath": "_api.tsx", "filePath": "_api.tsx",
"children": [ "children": [
"/_api/library",
"/_api/login", "/_api/login",
"/_api/search", "/_api/search",
"/_api/album/$id", "/_api/album/$id",
@@ -406,7 +420,6 @@ export const routeTree = rootRoute.addChildren({
"/_api/boxset/$id", "/_api/boxset/$id",
"/_api/episode/$id", "/_api/episode/$id",
"/_api/item/$id", "/_api/item/$id",
"/_api/library/$id",
"/_api/person/$id", "/_api/person/$id",
"/_api/player/audio", "/_api/player/audio",
"/_api/playlist/$id", "/_api/playlist/$id",
@@ -416,6 +429,13 @@ export const routeTree = rootRoute.addChildren({
"/_api/player/" "/_api/player/"
] ]
}, },
"/_api/library": {
"filePath": "_api/library.tsx",
"parent": "/_api",
"children": [
"/_api/library/$id"
]
},
"/_api/login": { "/_api/login": {
"filePath": "_api/login.tsx", "filePath": "_api/login.tsx",
"parent": "/_api", "parent": "/_api",
@@ -457,7 +477,7 @@ export const routeTree = rootRoute.addChildren({
}, },
"/_api/library/$id": { "/_api/library/$id": {
"filePath": "_api/library/$id.tsx", "filePath": "_api/library/$id.tsx",
"parent": "/_api" "parent": "/_api/library"
}, },
"/_api/login/list": { "/_api/login/list": {
"filePath": "_api/login/list.tsx", "filePath": "_api/login/list.tsx",
+1 -1
View File
@@ -264,7 +264,7 @@ export const Route = createRootRouteWithContext<ApiContext>()({
<AudioPlayer /> <AudioPlayer />
<Outlet /> <Outlet />
<ReactQueryDevtools /> <ReactQueryDevtools />
<TanStackRouterDevtools /> {/* <TanStackRouterDevtools /> */}
</SnackbarProvider> </SnackbarProvider>
</ThemeProvider> </ThemeProvider>
</Suspense> </Suspense>
+8 -2
View File
@@ -49,9 +49,9 @@ import {
import { useBackdropStore } from "@/utils/store/backdrop"; import { useBackdropStore } from "@/utils/store/backdrop";
import "./album.scss"; import "./album.scss";
import IconLink from "@/components/iconLink";
import TagChip from "@/components/tagChip"; import TagChip from "@/components/tagChip";
import { Link, createFileRoute } from "@tanstack/react-router"; import { Link, createFileRoute } from "@tanstack/react-router";
import lyricsIcon from "../../../assets/icons/lyrics.svg";
function TabPanel(props) { function TabPanel(props) {
const { children, value, index, ...other } = props; const { children, value, index, ...other } = props;
@@ -201,6 +201,7 @@ function MusicAlbumTitlePage() {
className="scrollY padded-top item item-album" className="scrollY padded-top item item-album"
ref={pageRef} ref={pageRef}
> >
<div className="item-info-container">
<div className="item-info"> <div className="item-info">
<Typography className="item-info-name" variant="h3"> <Typography className="item-info-name" variant="h3">
{item.data.Name} {item.data.Name}
@@ -278,9 +279,13 @@ function MusicAlbumTitlePage() {
variant="subtitle2" variant="subtitle2"
style={{ style={{
opacity: 0.6, opacity: 0.6,
display: "flex",
alignItems: "center",
gap: "0.6em",
}} }}
fontWeight={300} fontWeight={300}
> >
{track.HasLyrics && <img src={lyricsIcon} alt="lyrics" />}
{track.Artists?.join(", ")} {track.Artists?.join(", ")}
</Typography> </Typography>
</div> </div>
@@ -346,10 +351,11 @@ function MusicAlbumTitlePage() {
))} ))}
</div> </div>
</div> </div>
</div>
{similarItems.data.TotalRecordCount > 0 && ( {similarItems.data.TotalRecordCount > 0 && (
<CardScroller <CardScroller
title="You might also like" title="You might also like"
displayCards={5} displayCards={7}
disableDecoration disableDecoration
> >
{similarItems.data.Items.map((similar) => { {similarItems.data.Items.map((similar) => {
+5 -3
View File
@@ -1,11 +1,13 @@
$border-radius: 20px; $border-radius: 20px;
.item-album { .item-album {
grid-template-columns: 1fr 25%;
display: grid;
gap: 3em;
.item-info { .item-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
&-container {
grid-template-columns: 1fr 25%;
display: grid;
gap: 3em;
}
gap: 1.2em; gap: 1.2em;
&-sidebar { &-sidebar {
display: flex; 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,
};
},
});
+55 -10
View File
@@ -65,10 +65,10 @@ import { useWindowVirtualizer } from "@tanstack/react-virtual";
import type { AxiosResponse } from "axios"; import type { AxiosResponse } from "axios";
import "./library.scss"; import "./library.scss";
import LibraryItemsSkeleton from "@/components/skeleton/libraryItems"; 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 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 = ["movies", "tvshows", "music", "books"];
type allowedFilters = Partial<CollectionType>[]; type allowedFilters = Partial<CollectionType>[];
@@ -97,6 +97,7 @@ export const Route = createFileRoute("/_api/library/$id")({
function LibraryView() { function LibraryView() {
const api = Route.useRouteContext().api; const api = Route.useRouteContext().api;
const navigate = useNavigate();
const { id } = Route.useParams(); const { id } = Route.useParams();
@@ -123,7 +124,7 @@ function LibraryView() {
staleTime: 0, staleTime: 0,
}); });
const [currentViewType, setCurrentViewType] = useState<BaseItemKind>( const [currentViewType, setCurrentViewType] = useState<BaseItemKind | "Artist">(
undefined!, undefined!,
); );
const availableViewTypes: ViewObject[] = useMemo(() => { const availableViewTypes: ViewObject[] = useMemo(() => {
@@ -190,7 +191,19 @@ function LibraryView() {
default: default:
result = []; result = [];
} }
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); setCurrentViewType(result?.[0]?.value);
}
return result; return result;
}, [currentLib.data?.CollectionType]); }, [currentLib.data?.CollectionType]);
@@ -205,6 +218,18 @@ function LibraryView() {
const [sortBy, setSortBy] = useState<ItemSortBy>("Name"); const [sortBy, setSortBy] = useState<ItemSortBy>("Name");
const [sortAscending, setSortAscending] = useState(true); 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(() => { const sortByOptions: SortByObject[] = useMemo(() => {
let result: SortByObject[] = undefined!; let result: SortByObject[] = undefined!;
switch (currentViewType) { switch (currentViewType) {
@@ -414,10 +439,19 @@ function LibraryView() {
]; ];
break; break;
} }
// 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); setSortBy(result?.[0]?.value);
}
return result; return result;
}, [currentLib.data?.CollectionType, currentViewType]); }, [currentLib.data?.CollectionType, currentViewType]);
useLayoutEffect(() => {}, [sortByOptions]);
const [filters, setFilters] = useState<Record<string, undefined | boolean>>({ const [filters, setFilters] = useState<Record<string, undefined | boolean>>({
isPlayed: false, isPlayed: false,
@@ -775,9 +809,16 @@ function LibraryView() {
select select
value={sortBy ?? "Name"} value={sortBy ?? "Name"}
size="small" size="small"
onChange={(e: ChangeEvent<HTMLSelectElement>) => onChange={(e) => {
setSortBy(e.target.value) setSortBy(e.target.value);
} sessionStorage.setItem(
`library-${currentLib.data?.Id}-config_sort`,
JSON.stringify({
sortAscending,
sortBy: e.target.value,
}),
);
}}
> >
{sortByOptions.map((item) => ( {sortByOptions.map((item) => (
<MenuItem key={item.value} value={item.value}> <MenuItem key={item.value} value={item.value}>
@@ -792,9 +833,13 @@ function LibraryView() {
select select
value={currentViewType} value={currentViewType}
size="small" size="small"
onChange={(e: ChangeEvent<HTMLSelectElement>) => onChange={(e) => {
setCurrentViewType(e.target.value) setCurrentViewType(e.target.value);
} sessionStorage.setItem(
`library-${currentLib.data?.Id}-config_currentViewType`,
e.target.value,
);
}}
> >
{availableViewTypes.map((item) => ( {availableViewTypes.map((item) => (
<MenuItem key={item.value} value={item.value}> <MenuItem key={item.value} value={item.value}>
+45 -6
View File
@@ -1,5 +1,5 @@
.audio { .audio {
&-hidden{ &-hidden {
transform: translateY(-100%); transform: translateY(-100%);
} }
&-info { &-info {
@@ -43,29 +43,68 @@
gap: 1em; gap: 1em;
} }
} }
&-queue{ &-queue {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
width: 100%; width: 100%;
align-items: center; align-items: center;
gap: 1em; gap: 1em;
margin-top: 2em; margin-top: 2em;
&-track{ &-track {
display: grid; display: grid;
grid-template-columns: 3em 1fr 6em; grid-template-columns: 3em 1fr 6em;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
width: 100%; width: 100%;
gap: 1em; gap: 1em;
&-info-name{ &-info-name {
transition: $transition-time-fast; transition: $transition-time-fast;
} }
&.active{ &.active {
.audio-queue-track-info-name{ .audio-queue-track-info-name {
color: $clr-accent-default; color: $clr-accent-default;
font-weight: 500; 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;
}
}
} }
+109 -12
View File
@@ -3,7 +3,13 @@ import { useAudioPlayback } from "@/utils/store/audioPlayback";
import useQueue from "@/utils/store/queue"; import useQueue from "@/utils/store/queue";
import { Fab, IconButton, Slider, Typography } from "@mui/material"; import { Fab, IconButton, Slider, Typography } from "@mui/material";
import { createFileRoute } from "@tanstack/react-router"; 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 "./audio.scss";
import LikeButton from "@/components/buttons/likeButton"; import LikeButton from "@/components/buttons/likeButton";
@@ -24,8 +30,10 @@ function AudioPlayerRoute() {
const api = useApiInContext((s) => s.api); const api = useApiInContext((s) => s.api);
const [queue, currentTrack] = useQueue((s) => [s.tracks, s.currentItemIndex]); const [queue, currentTrack] = useQueue((s) => [s.tracks, s.currentItemIndex]);
const [item] = useAudioPlayback((s) => [s.item]); const [item] = useAudioPlayback((s) => [s.item]);
const audioPlayer: HTMLAudioElement | null = const audioPlayer: HTMLAudioElement | null = useMemo(
document.querySelector("#audio-player"); () => document.querySelector("#audio-player"),
[item],
);
const [isScrubbing, setIsScrubbing] = useState(false); 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 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, audioPlayer?.currentTime ?? 0,
); );
const [showLyrics, setShowLyrics] = useState(false);
const lyrics = useQuery({ const lyrics = useQuery({
queryKey: ["player", "audio", item?.Id, "lyrics"], queryKey: ["player", "audio", item?.Id, "lyrics"],
queryFn: async () => queryFn: async () =>
await getLyricsApi(api).getLyrics({ (
await getLyricsApi(api).searchRemoteLyrics({
itemId: item?.Id, itemId: item?.Id,
}), })
).data,
enabled: Boolean(item?.Id), enabled: Boolean(item?.Id),
}); });
useEffect(() => { useEffect(() => {
audioPlayer?.addEventListener("timeupdate", () => { 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 ( 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-container">
<div className="audio-info-image-container"> <div className="audio-info-image-container">
{item?.ImageTags?.Primary ? ( {item?.ImageTags?.Primary ? (
@@ -77,10 +106,14 @@ function AudioPlayerRoute() {
> >
by {item?.Artists?.join(", ")} by {item?.Artists?.join(", ")}
</Typography> </Typography>
<div
className="flex flex-row"
style={{ gap: "1em", alignItems: "center" }}
>
<Typography variant="subtitle2" className="opacity-07">
{getRuntimeMusic(secToTicks(audioPlayer?.currentTime) ?? 0)}
</Typography>
<Slider <Slider
style={{
marginTop: "1.2em",
}}
value={isScrubbing ? sliderProgress : secToTicks(progress)} value={isScrubbing ? sliderProgress : secToTicks(progress)}
max={item?.RunTimeTicks ?? 1} max={item?.RunTimeTicks ?? 1}
step={1} step={1}
@@ -118,6 +151,18 @@ function AudioPlayerRoute() {
}, },
}} }}
/> />
<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"> <div className="audio-info-controls">
<PlayPreviousButton /> <PlayPreviousButton />
<IconButton <IconButton
@@ -132,7 +177,9 @@ function AudioPlayerRoute() {
color="white" color="white"
size="large" size="large"
onClick={() => onClick={() =>
audioPlayer?.paused ? audioPlayer.play() : audioPlayer?.pause() audioPlayer?.paused
? audioPlayer.play()
: audioPlayer?.pause()
} }
> >
<span <span
@@ -153,8 +200,58 @@ function AudioPlayerRoute() {
</IconButton> </IconButton>
<PlayNextButton /> <PlayNextButton />
</div> </div>
<IconButton onClick={() => setShowLyrics((s) => !s)}>
<span
className={
showLyrics
? "material-symbols-rounded fill"
: "material-symbols-rounded"
}
>
lyrics
</span>
</IconButton>
</div> </div>
</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"> <div className="audio-queue-container">
<Typography variant="h5">Queue:</Typography> <Typography variant="h5">Queue:</Typography>
<div className="audio-queue"> <div className="audio-queue">
+8
View File
@@ -40,6 +40,7 @@ import PlayNextButton from "@/components/buttons/playNextButton";
import PlayPreviousButton from "@/components/buttons/playPreviousButtom"; import PlayPreviousButton from "@/components/buttons/playPreviousButtom";
import QueueButton from "@/components/buttons/queueButton"; import QueueButton from "@/components/buttons/queueButton";
import OutroCard from "@/components/outroCard"; import OutroCard from "@/components/outroCard";
import useQueue from "@/utils/store/queue";
import { createFileRoute, useRouter } from "@tanstack/react-router"; import { createFileRoute, useRouter } from "@tanstack/react-router";
import type { OnProgressProps } from "react-player/base"; import type { OnProgressProps } from "react-player/base";
import subtitleFont from "./Noto-Sans-Indosphere.ttf"; import subtitleFont from "./Noto-Sans-Indosphere.ttf";
@@ -98,6 +99,10 @@ function VideoPlayer() {
state.playsessionId, state.playsessionId,
state.intro, state.intro,
]); ]);
const [currentQueueItemIndex, queue] = useQueue((s) => [
s.currentItemIndex,
s.tracks,
]);
const [loading, setLoading] = useState(true); const [loading, setLoading] = useState(true);
const [settingsMenu, setSettingsMenu] = useState(null); const [settingsMenu, setSettingsMenu] = useState(null);
@@ -330,6 +335,9 @@ function VideoPlayer() {
}, [progress]); }, [progress]);
const showUpNextCard = useMemo(() => { 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 (introInfo?.Credits) {
if ( if (
ticksToSec(progress) >= introInfo?.Credits.ShowSkipPromptAt && ticksToSec(progress) >= introInfo?.Credits.ShowSkipPromptAt &&
+23 -53
View File
@@ -265,7 +265,7 @@ function SearchPage() {
)} )}
{episodes.isSuccess && episodes.data.TotalRecordCount > 0 && ( {episodes.isSuccess && episodes.data.TotalRecordCount > 0 && (
<CardScroller title="Episodes" displayCards={4} disableDecoration> <CardScroller title="Episodes" displayCards={4} disableDecoration>
{episodes.data.SearchHints.map((episode) => { {episodes.data.SearchHints?.map((episode) => {
return ( return (
<EpisodeCard <EpisodeCard
key={episode.Id} key={episode.Id}
@@ -280,9 +280,9 @@ function SearchPage() {
})} })}
</CardScroller> </CardScroller>
)} )}
{audio.isSuccess && audio.data.Items.length > 0 && ( {audio.isSuccess && audio.data.Items?.length > 0 && (
<CardScroller title="Audio" displayCards={8} disableDecoration> <CardScroller title="Audio" displayCards={8} disableDecoration>
{audio.data.Items.map((item, index) => ( {audio.data.Items?.map((item, index) => (
<Card <Card
key={item.Id} key={item.Id}
item={item} item={item}
@@ -291,20 +291,14 @@ function SearchPage() {
cardCaption={item.ProductionYear} cardCaption={item.ProductionYear}
cardType="square" cardType="square"
queryKey={["search", "items", "Audio", query]} queryKey={["search", "items", "Audio", query]}
userId={user.data.Id} userId={user.data?.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
/> />
))} ))}
</CardScroller> </CardScroller>
)} )}
{musicAlbum.isSuccess && musicAlbum.data.Items.length > 0 && ( {musicAlbum.isSuccess && musicAlbum.data.Items?.length > 0 && (
<CardScroller title="Albums" displayCards={8} disableDecoration> <CardScroller title="Albums" displayCards={8} disableDecoration>
{musicAlbum.data.Items.map((item, index) => ( {musicAlbum.data.Items?.map((item, index) => (
<Card <Card
key={item.Id} key={item.Id}
item={item} item={item}
@@ -314,20 +308,14 @@ function SearchPage() {
cardCaption={item.AlbumArtist} cardCaption={item.AlbumArtist}
cardType={"square"} cardType={"square"}
queryKey={["search", "items", "MusicAlbum", query]} queryKey={["search", "items", "MusicAlbum", query]}
userId={user.data.Id} userId={user.data?.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
/> />
))} ))}
</CardScroller> </CardScroller>
)} )}
{book.isSuccess && book.data.Items.length > 0 && ( {book.isSuccess && book.data.Items?.length > 0 && (
<CardScroller title="Books" displayCards={8} disableDecoration> <CardScroller title="Books" displayCards={8} disableDecoration>
{book.data.Items.map((item, index) => ( {book.data.Items?.map((item, index) => (
<Card <Card
key={item.Id} key={item.Id}
item={item} item={item}
@@ -337,20 +325,14 @@ function SearchPage() {
disableOverlay disableOverlay
cardType={"portrait"} cardType={"portrait"}
queryKey={["search", "items", "Book", query]} queryKey={["search", "items", "Book", query]}
userId={user.data.Id} userId={user.data?.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
/> />
))} ))}
</CardScroller> </CardScroller>
)} )}
{musicArtists.isSuccess && musicArtists.data.Items.length > 0 && ( {musicArtists.isSuccess && musicArtists.data.Items?.length > 0 && (
<CardScroller title="Artists" displayCards={8} disableDecoration> <CardScroller title="Artists" displayCards={8} disableDecoration>
{musicArtists.data.Items.map((item) => ( {musicArtists.data.Items?.map((item) => (
<Card <Card
key={item.Id} key={item.Id}
item={item} item={item}
@@ -359,20 +341,14 @@ function SearchPage() {
disableOverlay disableOverlay
cardType={"square"} cardType={"square"}
queryKey={["search", "items", "MusicArtists", query]} queryKey={["search", "items", "MusicArtists", query]}
userId={user.data.Id} userId={user.data?.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
/> />
))} ))}
</CardScroller> </CardScroller>
)} )}
{person.isSuccess && person.data.Items.length > 0 && ( {person.isSuccess && person.data.Items?.length > 0 && (
<CardScroller title="People" displayCards={8} disableDecoration> <CardScroller title="People" displayCards={8} disableDecoration>
{person.data.Items.map((item) => ( {person.data.Items?.map((item) => (
<Card <Card
key={item.Id} key={item.Id}
item={item} item={item}
@@ -381,13 +357,7 @@ function SearchPage() {
disableOverlay disableOverlay
cardType={"square"} cardType={"square"}
queryKey={["search", "items", "Person", query]} queryKey={["search", "items", "Person", query]}
userId={user.data.Id} userId={user.data?.Id}
imageBlurhash={
!!item.ImageBlurHashes?.Primary &&
item.ImageBlurHashes?.Primary[
Object.keys(item.ImageBlurHashes.Primary)[0]
]
}
/> />
))} ))}
</CardScroller> </CardScroller>
@@ -401,14 +371,14 @@ function SearchPage() {
book.isSuccess && book.isSuccess &&
musicArtists.isSuccess && musicArtists.isSuccess &&
person.isSuccess && person.isSuccess &&
movies.data.Items.length === 0 && movies.data.Items?.length === 0 &&
series.data.Items.length === 0 && series.data.Items?.length === 0 &&
audio.data.Items.length === 0 && audio.data.Items?.length === 0 &&
musicAlbum.data.Items.length === 0 && musicAlbum.data.Items?.length === 0 &&
book.data.Items.length === 0 && book.data.Items?.length === 0 &&
musicArtists.data.Items.length === 0 && musicArtists.data.Items?.length === 0 &&
person.data.Items?.length === 0 && person.data.Items?.length === 0 &&
episodes.data.SearchHints?.length === 0 && ( episodes.data?.SearchHints?.length === 0 && (
<div <div
style={{ style={{
height: "calc(100vh - 12em)", height: "calc(100vh - 12em)",