Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c7f2c1c8a7 |
No files matched your search
@@ -134,7 +134,7 @@ jobs:
|
|||||||
contents: write # Required for creating/updating releases
|
contents: write # Required for creating/updating releases
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v6.0.1
|
uses: actions/checkout@v6.1.0
|
||||||
|
|
||||||
- name: Download all artifacts
|
- name: Download all artifacts
|
||||||
uses: actions/download-artifact@v7.0.0
|
uses: actions/download-artifact@v7.0.0
|
||||||
|
|||||||
+56
-56
@@ -19,80 +19,80 @@
|
|||||||
"@dnd-kit/utilities": "^3.2.2",
|
"@dnd-kit/utilities": "^3.2.2",
|
||||||
"@emotion/react": "^11.14.0",
|
"@emotion/react": "^11.14.0",
|
||||||
"@emotion/styled": "^11.14.1",
|
"@emotion/styled": "^11.14.1",
|
||||||
"@fontsource-variable/jetbrains-mono": "^5.3.0",
|
"@fontsource-variable/jetbrains-mono": "^5.2.8",
|
||||||
"@fontsource-variable/noto-sans": "^5.3.0",
|
"@fontsource-variable/noto-sans": "^5.2.10",
|
||||||
"@fontsource-variable/plus-jakarta-sans": "^5.3.0",
|
"@fontsource-variable/plus-jakarta-sans": "^5.2.8",
|
||||||
"@fontsource-variable/space-grotesk": "^5.3.0",
|
"@fontsource-variable/space-grotesk": "^5.2.10",
|
||||||
"@jellyfin/sdk": "1.0.1",
|
"@jellyfin/sdk": "0.13.0",
|
||||||
"@mui/lab": "9.0.0-beta.10",
|
"@mui/lab": "7.0.1-beta.21",
|
||||||
"@mui/material": "9.5.0",
|
"@mui/material": "7.3.7",
|
||||||
"@popperjs/core": "^2.11.8",
|
"@popperjs/core": "^2.11.8",
|
||||||
"@react-spring/web": "^10.1.2",
|
"@react-spring/web": "^10.0.3",
|
||||||
"@tanem/react-nprogress": "^7.1.7",
|
"@tanem/react-nprogress": "^5.0.59",
|
||||||
"@tanstack/react-devtools": "^0.10.13",
|
"@tanstack/react-form": "^1.28.0",
|
||||||
"@tanstack/react-form": "^1.33.5",
|
"@tanstack/react-query": "^5.90.20",
|
||||||
"@tanstack/react-query": "^5.104.4",
|
"@tanstack/react-query-devtools": "^5.91.3",
|
||||||
"@tanstack/react-query-devtools": "^5.104.4",
|
"@tanstack/react-router": "^1.158.4",
|
||||||
"@tanstack/react-router": "^1.170.45",
|
"@tanstack/react-router-devtools": "^1.158.4",
|
||||||
"@tanstack/react-router-devtools": "^1.167.2",
|
"@tanstack/react-virtual": "^3.13.18",
|
||||||
"@tanstack/react-virtual": "^3.14.21",
|
"@tauri-apps/api": "2.10.1",
|
||||||
"@tauri-apps/api": "2.12.4",
|
"@tauri-apps/plugin-clipboard-manager": "2.3.2",
|
||||||
"@tauri-apps/plugin-clipboard-manager": "2.5.0",
|
"@tauri-apps/plugin-dialog": "2.6.0",
|
||||||
"@tauri-apps/plugin-dialog": "2.8.3",
|
"@tauri-apps/plugin-global-shortcut": "~2.3.1",
|
||||||
"@tauri-apps/plugin-global-shortcut": "~2.4.1",
|
"@tauri-apps/plugin-notification": "2.3.3",
|
||||||
"@tauri-apps/plugin-notification": "2.7.0",
|
"@tauri-apps/plugin-process": "2.3.1",
|
||||||
"@tauri-apps/plugin-process": "2.4.0",
|
"@tauri-apps/plugin-shell": "~2.3.5",
|
||||||
"@tauri-apps/plugin-shell": "~2.5.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.14.0",
|
"@tauri-apps/plugin-updater": "2.10.0",
|
||||||
"@tauri-apps/plugin-upload": "2.5.0",
|
"@tauri-apps/plugin-upload": "2.4.0",
|
||||||
"@tauri-apps/plugin-window-state": "~2.5.0",
|
"@tauri-apps/plugin-window-state": "~2.4.1",
|
||||||
"@types/node": "^26.6.5",
|
"@types/node": "^25.2.1",
|
||||||
"@types/react": "^19.3.0",
|
"@types/react": "^19.2.13",
|
||||||
"@types/react-dom": "^19.3.0",
|
"@types/react-dom": "^19.2.3",
|
||||||
"axios": "^1.20.0",
|
"axios": "^1.13.4",
|
||||||
"axios-tauri-api-adapter": "^2.0.6",
|
"axios-tauri-api-adapter": "^2.0.6",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
"blurhash-wasm": "^0.2.0",
|
"blurhash-wasm": "^0.2.0",
|
||||||
"immer": "^11.1.21",
|
"immer": "^11.1.3",
|
||||||
"jassub": "^2.5.22",
|
"jassub": "^2.4.1",
|
||||||
"libpgs": "^0.9.0",
|
"libpgs": "^0.8.1",
|
||||||
"lodash": "^4.18.1",
|
"lodash": "^4.17.23",
|
||||||
"material-symbols": "^0.48.0",
|
"material-symbols": "^0.40.2",
|
||||||
"motion": "^14.4.0",
|
"motion": "^12.33.0",
|
||||||
"notistack": "^3.0.2",
|
"notistack": "^3.0.2",
|
||||||
"react": "^19.3.1",
|
"react": "^19.2.4",
|
||||||
"react-blurhash": "^0.3.0",
|
"react-blurhash": "^0.3.0",
|
||||||
"react-dnd": "^16.0.1",
|
"react-dnd": "^16.0.1",
|
||||||
"react-dnd-html5-backend": "^16.0.1",
|
"react-dnd-html5-backend": "^16.0.1",
|
||||||
"react-dom": "^19.3.1",
|
"react-dom": "^19.2.4",
|
||||||
"react-error-boundary": "^6.1.6",
|
"react-error-boundary": "^6.1.0",
|
||||||
"react-intersection-observer": "^11.0.1",
|
"react-intersection-observer": "^10.0.2",
|
||||||
"react-markdown": "^10.1.0",
|
"react-markdown": "^10.1.0",
|
||||||
"react-multi-carousel": "^2.8.6",
|
"react-multi-carousel": "^2.8.6",
|
||||||
"react-player": "^3.4.0",
|
"react-player": "^3.4.0",
|
||||||
"remark-gfm": "^4.0.1",
|
"remark-gfm": "^4.0.1",
|
||||||
"typescript": "^7.0.2",
|
"typescript": "^5.9.3",
|
||||||
"vite-plugin-svgr": "^5.2.0",
|
"vite-plugin-svgr": "^4.5.0",
|
||||||
"vite-plugin-top-level-await": "^1.6.0",
|
"vite-plugin-top-level-await": "^1.6.0",
|
||||||
"wavesurfer.js": "^8.0.3",
|
"wavesurfer.js": "^7.12.1",
|
||||||
"zod": "^4.6.7",
|
"zod": "^4.3.6",
|
||||||
"zustand": "5.0.15"
|
"zustand": "5.0.11"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/plugin-proposal-optional-chaining-assign": "^8.0.1",
|
"@babel/plugin-proposal-optional-chaining-assign": "^7.27.1",
|
||||||
"@biomejs/biome": "^2.5.15",
|
"@biomejs/biome": "^2.3.14",
|
||||||
"@tanstack/router-cli": "^1.167.45",
|
"@tanstack/router-cli": "^1.158.4",
|
||||||
"@tanstack/router-vite-plugin": "^1.167.47",
|
"@tanstack/router-devtools": "^1.158.4",
|
||||||
"@tauri-apps/cli": "2.12.3",
|
"@tanstack/router-vite-plugin": "^1.158.4",
|
||||||
"@types/lodash": "^4.17.26",
|
"@tauri-apps/cli": "2.10.0",
|
||||||
"@vitejs/plugin-react": "^6.1.2",
|
"@types/lodash": "^4.17.23",
|
||||||
|
"@vitejs/plugin-react": "^5.1.3",
|
||||||
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
"babel-plugin-react-compiler": "19.1.0-rc.3",
|
||||||
"eslint-plugin-react-hooks": "7.1.1",
|
"eslint-plugin-react-hooks": "7.0.1",
|
||||||
"prop-types": "^15.8.1",
|
"prop-types": "^15.8.1",
|
||||||
"sass": "^1.105.2",
|
"sass": "^1.97.3",
|
||||||
"vite": "^8.3.4",
|
"vite": "^7.3.1",
|
||||||
"vite-plugin-wasm": "^3.6.0"
|
"vite-plugin-wasm": "^3.5.0"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-only"
|
"license": "GPL-3.0-only"
|
||||||
}
|
}
|
||||||
Generated
+2622
-2948
File diff suppressed because it is too large.
Load diff
+4
-5
@@ -1,5 +1,4 @@
|
|||||||
allowBuilds:
|
onlyBuiltDependencies:
|
||||||
'@parcel/watcher': true
|
- '@parcel/watcher'
|
||||||
'@swc/core': true
|
- core-js
|
||||||
core-js: true
|
- esbuild
|
||||||
lfa-ponyfill: true
|
|
||||||
Generated
+1500
-1244
File diff suppressed because it is too large.
Load diff
@@ -1 +1 @@
|
|||||||
{"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-secret":{"identifier":"allow-write-secret","description":"Enables the write_secret command without any pre-configured scope.","commands":{"allow":["write_secret"],"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-secret":{"identifier":"deny-write-secret","description":"Denies the write_secret command without any pre-configured scope.","commands":{"allow":[],"deny":["write_secret"]}},"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":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"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","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener","allow-supports-multiple-windows"]},"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-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"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-exit":{"identifier":"allow-exit","description":"Enables the exit command without any pre-configured scope.","commands":{"allow":["exit"],"deny":[]}},"allow-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","coLine 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":{"default_permission":{"identifier":"default","description":"Default core plugins set.","permissions":["core:path:default","core:event:default","core:window:default","core:webview:default","core:app:default","core:image:default","core:resources:default","core:menu:default","core:tray:default"]},"permissions":{},"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","allow-identifier","allow-bundle-type","allow-register-listener","allow-remove-listener"]},"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-bundle-type":{"identifier":"allow-bundle-type","description":"Enables the bundle_type command without any pre-configured scope.","commands":{"allow":["bundle_type"],"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-fetch-data-store-identifiers":{"identifier":"allow-fetch-data-store-identifiers","description":"Enables the fetch_data_store_identifiers command without any pre-configured scope.","commands":{"allow":["fetch_data_store_identifiers"],"deny":[]}},"allow-identifier":{"identifier":"allow-identifier","description":"Enables the identifier command without any pre-configured scope.","commands":{"allow":["identifier"],"deny":[]}},"allow-name":{"identifier":"allow-name","description":"Enables the name command without any pre-configured scope.","commands":{"allow":["name"],"deny":[]}},"allow-register-listener":{"identifier":"allow-register-listener","description":"Enables the register_listener command without any pre-configured scope.","commands":{"allow":["register_listener"],"deny":[]}},"allow-remove-data-store":{"identifier":"allow-remove-data-store","description":"Enables the remove_data_store command without any pre-configured scope.","commands":{"allow":["remove_data_store"],"deny":[]}},"allow-remove-listener":{"identifier":"allow-remove-listener","description":"Enables the remove_listener commLine truncated
|
||||||
@@ -422,12 +422,6 @@
|
|||||||
"const": "clipboard-manager:allow-write-image",
|
"const": "clipboard-manager:allow-write-image",
|
||||||
"markdownDescription": "Enables the write_image command without any pre-configured scope."
|
"markdownDescription": "Enables the write_image command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the write_secret command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "clipboard-manager:allow-write-secret",
|
|
||||||
"markdownDescription": "Enables the write_secret command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the write_text command without any pre-configured scope.",
|
"description": "Enables the write_text command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -464,12 +458,6 @@
|
|||||||
"const": "clipboard-manager:deny-write-image",
|
"const": "clipboard-manager:deny-write-image",
|
||||||
"markdownDescription": "Denies the write_image command without any pre-configured scope."
|
"markdownDescription": "Denies the write_image command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the write_secret command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "clipboard-manager:deny-write-secret",
|
|
||||||
"markdownDescription": "Denies the write_secret command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the write_text command without any pre-configured scope.",
|
"description": "Denies the write_text command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -483,10 +471,10 @@
|
|||||||
"markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"
|
"markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`",
|
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "core:app:default",
|
"const": "core:app:default",
|
||||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`"
|
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the app_hide command without any pre-configured scope.",
|
"description": "Enables the app_hide command without any pre-configured scope.",
|
||||||
@@ -512,12 +500,6 @@
|
|||||||
"const": "core:app:allow-default-window-icon",
|
"const": "core:app:allow-default-window-icon",
|
||||||
"markdownDescription": "Enables the default_window_icon command without any pre-configured scope."
|
"markdownDescription": "Enables the default_window_icon command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the exit command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:allow-exit",
|
|
||||||
"markdownDescription": "Enables the exit command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the fetch_data_store_identifiers command without any pre-configured scope.",
|
"description": "Enables the fetch_data_store_identifiers command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -566,12 +548,6 @@
|
|||||||
"const": "core:app:allow-set-dock-visibility",
|
"const": "core:app:allow-set-dock-visibility",
|
||||||
"markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."
|
"markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the supports_multiple_windows command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:allow-supports-multiple-windows",
|
|
||||||
"markdownDescription": "Enables the supports_multiple_windows command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the tauri_version command without any pre-configured scope.",
|
"description": "Enables the tauri_version command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -608,12 +584,6 @@
|
|||||||
"const": "core:app:deny-default-window-icon",
|
"const": "core:app:deny-default-window-icon",
|
||||||
"markdownDescription": "Denies the default_window_icon command without any pre-configured scope."
|
"markdownDescription": "Denies the default_window_icon command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the exit command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:deny-exit",
|
|
||||||
"markdownDescription": "Denies the exit command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the fetch_data_store_identifiers command without any pre-configured scope.",
|
"description": "Denies the fetch_data_store_identifiers command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -662,12 +632,6 @@
|
|||||||
"const": "core:app:deny-set-dock-visibility",
|
"const": "core:app:deny-set-dock-visibility",
|
||||||
"markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."
|
"markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the supports_multiple_windows command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:deny-supports-multiple-windows",
|
|
||||||
"markdownDescription": "Denies the supports_multiple_windows command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the tauri_version command without any pre-configured scope.",
|
"description": "Denies the tauri_version command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1191,10 +1155,10 @@
|
|||||||
"markdownDescription": "Denies the close command without any pre-configured scope."
|
"markdownDescription": "Denies the close command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`",
|
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "core:tray:default",
|
"const": "core:tray:default",
|
||||||
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`"
|
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the get_by_id command without any pre-configured scope.",
|
"description": "Enables the get_by_id command without any pre-configured scope.",
|
||||||
@@ -1226,12 +1190,6 @@
|
|||||||
"const": "core:tray:allow-set-icon-as-template",
|
"const": "core:tray:allow-set-icon-as-template",
|
||||||
"markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."
|
"markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the set_icon_with_as_template command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:tray:allow-set-icon-with-as-template",
|
|
||||||
"markdownDescription": "Enables the set_icon_with_as_template command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the set_menu command without any pre-configured scope.",
|
"description": "Enables the set_menu command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1298,12 +1256,6 @@
|
|||||||
"const": "core:tray:deny-set-icon-as-template",
|
"const": "core:tray:deny-set-icon-as-template",
|
||||||
"markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."
|
"markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the set_icon_with_as_template command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:tray:deny-set-icon-with-as-template",
|
|
||||||
"markdownDescription": "Denies the set_icon_with_as_template command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the set_menu command without any pre-configured scope.",
|
"description": "Denies the set_menu command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1563,16 +1515,10 @@
|
|||||||
"markdownDescription": "Denies the webview_size command without any pre-configured scope."
|
"markdownDescription": "Denies the webview_size command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`",
|
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "core:window:default",
|
"const": "core:window:default",
|
||||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`"
|
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`"
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Enables the activity_name command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:allow-activity-name",
|
|
||||||
"markdownDescription": "Enables the activity_name command without any pre-configured scope."
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the available_monitors command without any pre-configured scope.",
|
"description": "Enables the available_monitors command without any pre-configured scope.",
|
||||||
@@ -1766,12 +1712,6 @@
|
|||||||
"const": "core:window:allow-scale-factor",
|
"const": "core:window:allow-scale-factor",
|
||||||
"markdownDescription": "Enables the scale_factor command without any pre-configured scope."
|
"markdownDescription": "Enables the scale_factor command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the scene_identifier command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:allow-scene-identifier",
|
|
||||||
"markdownDescription": "Enables the scene_identifier command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the set_always_on_bottom command without any pre-configured scope.",
|
"description": "Enables the set_always_on_bottom command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1874,12 +1814,6 @@
|
|||||||
"const": "core:window:allow-set-fullscreen",
|
"const": "core:window:allow-set-fullscreen",
|
||||||
"markdownDescription": "Enables the set_fullscreen command without any pre-configured scope."
|
"markdownDescription": "Enables the set_fullscreen command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the set_fullscreen_on_monitor command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:allow-set-fullscreen-on-monitor",
|
|
||||||
"markdownDescription": "Enables the set_fullscreen_on_monitor command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the set_icon command without any pre-configured scope.",
|
"description": "Enables the set_icon command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2042,12 +1976,6 @@
|
|||||||
"const": "core:window:allow-unminimize",
|
"const": "core:window:allow-unminimize",
|
||||||
"markdownDescription": "Enables the unminimize command without any pre-configured scope."
|
"markdownDescription": "Enables the unminimize command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the activity_name command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:deny-activity-name",
|
|
||||||
"markdownDescription": "Denies the activity_name command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the available_monitors command without any pre-configured scope.",
|
"description": "Denies the available_monitors command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2240,12 +2168,6 @@
|
|||||||
"const": "core:window:deny-scale-factor",
|
"const": "core:window:deny-scale-factor",
|
||||||
"markdownDescription": "Denies the scale_factor command without any pre-configured scope."
|
"markdownDescription": "Denies the scale_factor command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the scene_identifier command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:deny-scene-identifier",
|
|
||||||
"markdownDescription": "Denies the scene_identifier command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the set_always_on_bottom command without any pre-configured scope.",
|
"description": "Denies the set_always_on_bottom command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2348,12 +2270,6 @@
|
|||||||
"const": "core:window:deny-set-fullscreen",
|
"const": "core:window:deny-set-fullscreen",
|
||||||
"markdownDescription": "Denies the set_fullscreen command without any pre-configured scope."
|
"markdownDescription": "Denies the set_fullscreen command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the set_fullscreen_on_monitor command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:deny-set-fullscreen-on-monitor",
|
|
||||||
"markdownDescription": "Denies the set_fullscreen_on_monitor command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the set_icon command without any pre-configured scope.",
|
"description": "Denies the set_icon command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2517,22 +2433,22 @@
|
|||||||
"markdownDescription": "Denies the unminimize command without any pre-configured scope."
|
"markdownDescription": "Denies the unminimize command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`",
|
"description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:default",
|
"const": "dialog:default",
|
||||||
"markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`"
|
"markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
|
"description": "Enables the ask command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:allow-ask",
|
"const": "dialog:allow-ask",
|
||||||
"markdownDescription": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
|
"markdownDescription": "Enables the ask command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
|
"description": "Enables the confirm command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:allow-confirm",
|
"const": "dialog:allow-confirm",
|
||||||
"markdownDescription": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
|
"markdownDescription": "Enables the confirm command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the message command without any pre-configured scope.",
|
"description": "Enables the message command without any pre-configured scope.",
|
||||||
@@ -2553,16 +2469,16 @@
|
|||||||
"markdownDescription": "Enables the save command without any pre-configured scope."
|
"markdownDescription": "Enables the save command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
|
"description": "Denies the ask command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:deny-ask",
|
"const": "dialog:deny-ask",
|
||||||
"markdownDescription": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
|
"markdownDescription": "Denies the ask command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
|
"description": "Denies the confirm command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:deny-confirm",
|
"const": "dialog:deny-confirm",
|
||||||
"markdownDescription": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
|
"markdownDescription": "Denies the confirm command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Denies the message command without any pre-configured scope.",
|
"description": "Denies the message command without any pre-configured scope.",
|
||||||
@@ -2667,10 +2583,10 @@
|
|||||||
"markdownDescription": "Denies the log command without any pre-configured scope."
|
"markdownDescription": "Denies the log command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`",
|
"description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "notification:default",
|
"const": "notification:default",
|
||||||
"markdownDescription": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`"
|
"markdownDescription": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the batch command without any pre-configured scope.",
|
"description": "Enables the batch command without any pre-configured scope.",
|
||||||
@@ -2756,12 +2672,6 @@
|
|||||||
"const": "notification:allow-remove-active",
|
"const": "notification:allow-remove-active",
|
||||||
"markdownDescription": "Enables the remove_active command without any pre-configured scope."
|
"markdownDescription": "Enables the remove_active command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the remove_listener command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "notification:allow-remove-listener",
|
|
||||||
"markdownDescription": "Enables the remove_listener command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the request_permission command without any pre-configured scope.",
|
"description": "Enables the request_permission command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2858,12 +2768,6 @@
|
|||||||
"const": "notification:deny-remove-active",
|
"const": "notification:deny-remove-active",
|
||||||
"markdownDescription": "Denies the remove_active command without any pre-configured scope."
|
"markdownDescription": "Denies the remove_active command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the remove_listener command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "notification:deny-remove-listener",
|
|
||||||
"markdownDescription": "Denies the remove_listener command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the request_permission command without any pre-configured scope.",
|
"description": "Denies the request_permission command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -422,12 +422,6 @@
|
|||||||
"const": "clipboard-manager:allow-write-image",
|
"const": "clipboard-manager:allow-write-image",
|
||||||
"markdownDescription": "Enables the write_image command without any pre-configured scope."
|
"markdownDescription": "Enables the write_image command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the write_secret command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "clipboard-manager:allow-write-secret",
|
|
||||||
"markdownDescription": "Enables the write_secret command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the write_text command without any pre-configured scope.",
|
"description": "Enables the write_text command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -464,12 +458,6 @@
|
|||||||
"const": "clipboard-manager:deny-write-image",
|
"const": "clipboard-manager:deny-write-image",
|
||||||
"markdownDescription": "Denies the write_image command without any pre-configured scope."
|
"markdownDescription": "Denies the write_image command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the write_secret command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "clipboard-manager:deny-write-secret",
|
|
||||||
"markdownDescription": "Denies the write_secret command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the write_text command without any pre-configured scope.",
|
"description": "Denies the write_text command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -483,10 +471,10 @@
|
|||||||
"markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"
|
"markdownDescription": "Default core plugins set.\n#### This default permission set includes:\n\n- `core:path:default`\n- `core:event:default`\n- `core:window:default`\n- `core:webview:default`\n- `core:app:default`\n- `core:image:default`\n- `core:resources:default`\n- `core:menu:default`\n- `core:tray:default`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`",
|
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "core:app:default",
|
"const": "core:app:default",
|
||||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-supports-multiple-windows`"
|
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-version`\n- `allow-name`\n- `allow-tauri-version`\n- `allow-identifier`\n- `allow-bundle-type`\n- `allow-register-listener`\n- `allow-remove-listener`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the app_hide command without any pre-configured scope.",
|
"description": "Enables the app_hide command without any pre-configured scope.",
|
||||||
@@ -512,12 +500,6 @@
|
|||||||
"const": "core:app:allow-default-window-icon",
|
"const": "core:app:allow-default-window-icon",
|
||||||
"markdownDescription": "Enables the default_window_icon command without any pre-configured scope."
|
"markdownDescription": "Enables the default_window_icon command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the exit command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:allow-exit",
|
|
||||||
"markdownDescription": "Enables the exit command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the fetch_data_store_identifiers command without any pre-configured scope.",
|
"description": "Enables the fetch_data_store_identifiers command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -566,12 +548,6 @@
|
|||||||
"const": "core:app:allow-set-dock-visibility",
|
"const": "core:app:allow-set-dock-visibility",
|
||||||
"markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."
|
"markdownDescription": "Enables the set_dock_visibility command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the supports_multiple_windows command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:allow-supports-multiple-windows",
|
|
||||||
"markdownDescription": "Enables the supports_multiple_windows command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the tauri_version command without any pre-configured scope.",
|
"description": "Enables the tauri_version command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -608,12 +584,6 @@
|
|||||||
"const": "core:app:deny-default-window-icon",
|
"const": "core:app:deny-default-window-icon",
|
||||||
"markdownDescription": "Denies the default_window_icon command without any pre-configured scope."
|
"markdownDescription": "Denies the default_window_icon command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the exit command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:deny-exit",
|
|
||||||
"markdownDescription": "Denies the exit command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the fetch_data_store_identifiers command without any pre-configured scope.",
|
"description": "Denies the fetch_data_store_identifiers command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -662,12 +632,6 @@
|
|||||||
"const": "core:app:deny-set-dock-visibility",
|
"const": "core:app:deny-set-dock-visibility",
|
||||||
"markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."
|
"markdownDescription": "Denies the set_dock_visibility command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the supports_multiple_windows command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:app:deny-supports-multiple-windows",
|
|
||||||
"markdownDescription": "Denies the supports_multiple_windows command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the tauri_version command without any pre-configured scope.",
|
"description": "Denies the tauri_version command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1191,10 +1155,10 @@
|
|||||||
"markdownDescription": "Denies the close command without any pre-configured scope."
|
"markdownDescription": "Denies the close command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`",
|
"description": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "core:tray:default",
|
"const": "core:tray:default",
|
||||||
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-icon-with-as-template`\n- `allow-set-show-menu-on-left-click`"
|
"markdownDescription": "Default permissions for the plugin, which enables all commands.\n#### This default permission set includes:\n\n- `allow-new`\n- `allow-get-by-id`\n- `allow-remove-by-id`\n- `allow-set-icon`\n- `allow-set-menu`\n- `allow-set-tooltip`\n- `allow-set-title`\n- `allow-set-visible`\n- `allow-set-temp-dir-path`\n- `allow-set-icon-as-template`\n- `allow-set-show-menu-on-left-click`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the get_by_id command without any pre-configured scope.",
|
"description": "Enables the get_by_id command without any pre-configured scope.",
|
||||||
@@ -1226,12 +1190,6 @@
|
|||||||
"const": "core:tray:allow-set-icon-as-template",
|
"const": "core:tray:allow-set-icon-as-template",
|
||||||
"markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."
|
"markdownDescription": "Enables the set_icon_as_template command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the set_icon_with_as_template command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:tray:allow-set-icon-with-as-template",
|
|
||||||
"markdownDescription": "Enables the set_icon_with_as_template command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the set_menu command without any pre-configured scope.",
|
"description": "Enables the set_menu command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1298,12 +1256,6 @@
|
|||||||
"const": "core:tray:deny-set-icon-as-template",
|
"const": "core:tray:deny-set-icon-as-template",
|
||||||
"markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."
|
"markdownDescription": "Denies the set_icon_as_template command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the set_icon_with_as_template command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:tray:deny-set-icon-with-as-template",
|
|
||||||
"markdownDescription": "Denies the set_icon_with_as_template command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the set_menu command without any pre-configured scope.",
|
"description": "Denies the set_menu command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1563,16 +1515,10 @@
|
|||||||
"markdownDescription": "Denies the webview_size command without any pre-configured scope."
|
"markdownDescription": "Denies the webview_size command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`",
|
"description": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "core:window:default",
|
"const": "core:window:default",
|
||||||
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-activity-name`\n- `allow-scene-identifier`\n- `allow-internal-toggle-maximize`"
|
"markdownDescription": "Default permissions for the plugin.\n#### This default permission set includes:\n\n- `allow-get-all-windows`\n- `allow-scale-factor`\n- `allow-inner-position`\n- `allow-outer-position`\n- `allow-inner-size`\n- `allow-outer-size`\n- `allow-is-fullscreen`\n- `allow-is-minimized`\n- `allow-is-maximized`\n- `allow-is-focused`\n- `allow-is-decorated`\n- `allow-is-resizable`\n- `allow-is-maximizable`\n- `allow-is-minimizable`\n- `allow-is-closable`\n- `allow-is-visible`\n- `allow-is-enabled`\n- `allow-title`\n- `allow-current-monitor`\n- `allow-primary-monitor`\n- `allow-monitor-from-point`\n- `allow-available-monitors`\n- `allow-cursor-position`\n- `allow-theme`\n- `allow-is-always-on-top`\n- `allow-internal-toggle-maximize`"
|
||||||
},
|
|
||||||
{
|
|
||||||
"description": "Enables the activity_name command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:allow-activity-name",
|
|
||||||
"markdownDescription": "Enables the activity_name command without any pre-configured scope."
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the available_monitors command without any pre-configured scope.",
|
"description": "Enables the available_monitors command without any pre-configured scope.",
|
||||||
@@ -1766,12 +1712,6 @@
|
|||||||
"const": "core:window:allow-scale-factor",
|
"const": "core:window:allow-scale-factor",
|
||||||
"markdownDescription": "Enables the scale_factor command without any pre-configured scope."
|
"markdownDescription": "Enables the scale_factor command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the scene_identifier command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:allow-scene-identifier",
|
|
||||||
"markdownDescription": "Enables the scene_identifier command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the set_always_on_bottom command without any pre-configured scope.",
|
"description": "Enables the set_always_on_bottom command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -1874,12 +1814,6 @@
|
|||||||
"const": "core:window:allow-set-fullscreen",
|
"const": "core:window:allow-set-fullscreen",
|
||||||
"markdownDescription": "Enables the set_fullscreen command without any pre-configured scope."
|
"markdownDescription": "Enables the set_fullscreen command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the set_fullscreen_on_monitor command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:allow-set-fullscreen-on-monitor",
|
|
||||||
"markdownDescription": "Enables the set_fullscreen_on_monitor command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the set_icon command without any pre-configured scope.",
|
"description": "Enables the set_icon command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2042,12 +1976,6 @@
|
|||||||
"const": "core:window:allow-unminimize",
|
"const": "core:window:allow-unminimize",
|
||||||
"markdownDescription": "Enables the unminimize command without any pre-configured scope."
|
"markdownDescription": "Enables the unminimize command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the activity_name command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:deny-activity-name",
|
|
||||||
"markdownDescription": "Denies the activity_name command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the available_monitors command without any pre-configured scope.",
|
"description": "Denies the available_monitors command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2240,12 +2168,6 @@
|
|||||||
"const": "core:window:deny-scale-factor",
|
"const": "core:window:deny-scale-factor",
|
||||||
"markdownDescription": "Denies the scale_factor command without any pre-configured scope."
|
"markdownDescription": "Denies the scale_factor command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the scene_identifier command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:deny-scene-identifier",
|
|
||||||
"markdownDescription": "Denies the scene_identifier command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the set_always_on_bottom command without any pre-configured scope.",
|
"description": "Denies the set_always_on_bottom command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2348,12 +2270,6 @@
|
|||||||
"const": "core:window:deny-set-fullscreen",
|
"const": "core:window:deny-set-fullscreen",
|
||||||
"markdownDescription": "Denies the set_fullscreen command without any pre-configured scope."
|
"markdownDescription": "Denies the set_fullscreen command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the set_fullscreen_on_monitor command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "core:window:deny-set-fullscreen-on-monitor",
|
|
||||||
"markdownDescription": "Denies the set_fullscreen_on_monitor command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the set_icon command without any pre-configured scope.",
|
"description": "Denies the set_icon command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2517,22 +2433,22 @@
|
|||||||
"markdownDescription": "Denies the unminimize command without any pre-configured scope."
|
"markdownDescription": "Denies the unminimize command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`",
|
"description": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:default",
|
"const": "dialog:default",
|
||||||
"markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-message`\n- `allow-save`\n- `allow-open`"
|
"markdownDescription": "This permission set configures the types of dialogs\navailable from the dialog plugin.\n\n#### Granted Permissions\n\nAll dialog types are enabled.\n\n\n\n#### This default permission set includes:\n\n- `allow-ask`\n- `allow-confirm`\n- `allow-message`\n- `allow-save`\n- `allow-open`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
|
"description": "Enables the ask command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:allow-ask",
|
"const": "dialog:allow-ask",
|
||||||
"markdownDescription": "Enables the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
|
"markdownDescription": "Enables the ask command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)",
|
"description": "Enables the confirm command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:allow-confirm",
|
"const": "dialog:allow-confirm",
|
||||||
"markdownDescription": "Enables the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `allow-message` and will be removed in v3)"
|
"markdownDescription": "Enables the confirm command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the message command without any pre-configured scope.",
|
"description": "Enables the message command without any pre-configured scope.",
|
||||||
@@ -2553,16 +2469,16 @@
|
|||||||
"markdownDescription": "Enables the save command without any pre-configured scope."
|
"markdownDescription": "Enables the save command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
|
"description": "Denies the ask command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:deny-ask",
|
"const": "dialog:deny-ask",
|
||||||
"markdownDescription": "Denies the ask command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
|
"markdownDescription": "Denies the ask command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)",
|
"description": "Denies the confirm command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "dialog:deny-confirm",
|
"const": "dialog:deny-confirm",
|
||||||
"markdownDescription": "Denies the confirm command without any pre-configured scope. (**DEPRECATED**: This is now an alias to `deny-message` and will be removed in v3)"
|
"markdownDescription": "Denies the confirm command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Denies the message command without any pre-configured scope.",
|
"description": "Denies the message command without any pre-configured scope.",
|
||||||
@@ -2667,10 +2583,10 @@
|
|||||||
"markdownDescription": "Denies the log command without any pre-configured scope."
|
"markdownDescription": "Denies the log command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`",
|
"description": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
"const": "notification:default",
|
"const": "notification:default",
|
||||||
"markdownDescription": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-remove-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`"
|
"markdownDescription": "This permission set configures which\nnotification features are by default exposed.\n\n#### Granted Permissions\n\nIt allows all notification related features.\n\n\n#### This default permission set includes:\n\n- `allow-is-permission-granted`\n- `allow-request-permission`\n- `allow-notify`\n- `allow-register-action-types`\n- `allow-register-listener`\n- `allow-cancel`\n- `allow-get-pending`\n- `allow-remove-active`\n- `allow-get-active`\n- `allow-check-permissions`\n- `allow-show`\n- `allow-batch`\n- `allow-list-channels`\n- `allow-delete-channel`\n- `allow-create-channel`\n- `allow-permission-state`"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"description": "Enables the batch command without any pre-configured scope.",
|
"description": "Enables the batch command without any pre-configured scope.",
|
||||||
@@ -2756,12 +2672,6 @@
|
|||||||
"const": "notification:allow-remove-active",
|
"const": "notification:allow-remove-active",
|
||||||
"markdownDescription": "Enables the remove_active command without any pre-configured scope."
|
"markdownDescription": "Enables the remove_active command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Enables the remove_listener command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "notification:allow-remove-listener",
|
|
||||||
"markdownDescription": "Enables the remove_listener command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Enables the request_permission command without any pre-configured scope.",
|
"description": "Enables the request_permission command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
@@ -2858,12 +2768,6 @@
|
|||||||
"const": "notification:deny-remove-active",
|
"const": "notification:deny-remove-active",
|
||||||
"markdownDescription": "Denies the remove_active command without any pre-configured scope."
|
"markdownDescription": "Denies the remove_active command without any pre-configured scope."
|
||||||
},
|
},
|
||||||
{
|
|
||||||
"description": "Denies the remove_listener command without any pre-configured scope.",
|
|
||||||
"type": "string",
|
|
||||||
"const": "notification:deny-remove-listener",
|
|
||||||
"markdownDescription": "Denies the remove_listener command without any pre-configured scope."
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"description": "Denies the request_permission command without any pre-configured scope.",
|
"description": "Denies the request_permission command without any pre-configured scope.",
|
||||||
"type": "string",
|
"type": "string",
|
||||||
|
|||||||
@@ -69,33 +69,21 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
|||||||
fullWidth
|
fullWidth
|
||||||
maxWidth="sm"
|
maxWidth="sm"
|
||||||
disableScrollLock={true}
|
disableScrollLock={true}
|
||||||
slotProps={{
|
PaperProps={{
|
||||||
paper: {
|
sx: {
|
||||||
sx: {
|
backgroundColor: "rgba(20, 20, 30, 0.7)",
|
||||||
backgroundColor: "rgba(20, 20, 30, 0.7)",
|
backdropFilter: "blur(24px) saturate(180%)",
|
||||||
backdropFilter: "blur(24px) saturate(180%)",
|
backgroundImage:
|
||||||
backgroundImage:
|
"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0))",
|
||||||
"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0))",
|
border: "1px solid rgba(255, 255, 255, 0.08)",
|
||||||
border: "1px solid rgba(255, 255, 255, 0.08)",
|
boxShadow: "0 20px 50px rgba(0,0,0,0.5)",
|
||||||
boxShadow: "0 20px 50px rgba(0,0,0,0.5)",
|
borderRadius: 4,
|
||||||
borderRadius: 4,
|
overflow: "hidden",
|
||||||
overflow: "hidden",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Stack
|
<Stack p={4} spacing={3}>
|
||||||
spacing={3}
|
<Stack spacing={1} alignItems="center">
|
||||||
sx={{
|
|
||||||
p: 4,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Stack
|
|
||||||
spacing={1}
|
|
||||||
sx={{
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span
|
<span
|
||||||
className="material-symbols-rounded"
|
className="material-symbols-rounded"
|
||||||
style={{
|
style={{
|
||||||
@@ -105,22 +93,10 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
|||||||
>
|
>
|
||||||
add_to_queue
|
add_to_queue
|
||||||
</span>
|
</span>
|
||||||
<Typography
|
<Typography variant="h5" fontWeight="bold" textAlign="center">
|
||||||
variant="h5"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Connect to Server
|
Connect to Server
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography variant="body2" color="text.secondary" textAlign="center">
|
||||||
variant="body2"
|
|
||||||
sx={{
|
|
||||||
color: "text.secondary",
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Enter your Jellyfin server address to continue
|
Enter your Jellyfin server address to continue
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -160,14 +136,7 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
|||||||
/>
|
/>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Stack
|
<Stack direction="row" spacing={2} justifyContent="flex-end" pt={1}>
|
||||||
direction="row"
|
|
||||||
spacing={2}
|
|
||||||
sx={{
|
|
||||||
justifyContent: "flex-end",
|
|
||||||
pt: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Button
|
<Button
|
||||||
onClick={() => setAddServerDialog(false)}
|
onClick={() => setAddServerDialog(false)}
|
||||||
color="inherit"
|
color="inherit"
|
||||||
@@ -190,4 +159,4 @@ export default function AddServerDialog(props: AddServerDialogProps) {
|
|||||||
</Stack>
|
</Stack>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -92,9 +92,7 @@ export default function AlbumMusicTrack(props: AlbumMusicTrackProps) {
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: "0.6em",
|
gap: "0.6em",
|
||||||
}}
|
}}
|
||||||
sx={{
|
fontWeight={300}
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{track.HasLyrics && <img src={lyricsIcon} alt="lyrics" />}
|
{track.HasLyrics && <img src={lyricsIcon} alt="lyrics" />}
|
||||||
{track.Artists?.join(", ")}
|
{track.Artists?.join(", ")}
|
||||||
@@ -112,4 +110,4 @@ export default function AlbumMusicTrack(props: AlbumMusicTrackProps) {
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { getUserViewApi } from "@jellyfin/sdk/lib/utils/api/user-view-api";
|
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
||||||
import { Divider, Drawer, List, ListItem, ListItemButton } from "@mui/material";
|
import { Divider, Drawer, List, ListItem, ListItemButton } from "@mui/material";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import React, { useMemo } from "react";
|
import React, { useMemo } from "react";
|
||||||
@@ -8,99 +8,100 @@ import ListItemLink from "../listItemLink";
|
|||||||
import { getTypeIcon } from "../utils/iconsCollection";
|
import { getTypeIcon } from "../utils/iconsCollection";
|
||||||
|
|
||||||
interface NavigationDrawerProps {
|
interface NavigationDrawerProps {
|
||||||
open: boolean;
|
open: boolean;
|
||||||
onClose: () => void;
|
onClose: () => void;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
|
||||||
const api = useApiInContext((s) => s.api);
|
const api = useApiInContext((s) => s.api);
|
||||||
const [user] = useCentralStore((s) => [s.currentUser]);
|
const [user] = useCentralStore((s) => [s.currentUser]);
|
||||||
|
|
||||||
const libraries = useQuery({
|
const libraries = useQuery({
|
||||||
queryKey: ["libraries"],
|
queryKey: ["libraries"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!user?.Id || !api?.accessToken) {
|
if (!user?.Id || !api?.accessToken) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const libs = await getUserViewApi(api).getUserViews({
|
const libs = await getUserViewsApi(api).getUserViews({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
});
|
});
|
||||||
return libs.data;
|
return libs.data;
|
||||||
},
|
},
|
||||||
enabled: !!user?.Id && !!api?.accessToken,
|
enabled: !!user?.Id && !!api?.accessToken,
|
||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
|
|
||||||
const drawerPaperProps = useMemo(() => {
|
const drawerPaperProps = useMemo(() => {
|
||||||
return {
|
return {
|
||||||
className: "glass library-drawer",
|
className: "glass library-drawer",
|
||||||
elevation: 6,
|
elevation: 6,
|
||||||
};
|
};
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Drawer
|
<Drawer
|
||||||
open={open}
|
open={open}
|
||||||
slotProps={{ paper: drawerPaperProps }}
|
slotProps={{ paper: drawerPaperProps }}
|
||||||
className="library-drawer"
|
className="library-drawer"
|
||||||
onClose={onClose}
|
onClose={onClose}
|
||||||
>
|
>
|
||||||
<List>
|
<List>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<ListItemButton onClick={onClose}>
|
<ListItemButton onClick={onClose}>
|
||||||
<span className="material-symbols-rounded">menu_open</span>
|
<span className="material-symbols-rounded">menu_open</span>
|
||||||
<div style={{ marginLeft: "8px" }}>Close</div>
|
<div style={{ marginLeft: "8px" }}>Close</div>
|
||||||
</ListItemButton>
|
</ListItemButton>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
<Divider variant="middle" />
|
<Divider variant="middle" />
|
||||||
<List>
|
<List>
|
||||||
<ListItemLink
|
<ListItemLink
|
||||||
className="library-drawer-item"
|
className="library-drawer-item"
|
||||||
to="/home"
|
to="/home"
|
||||||
icon="home"
|
icon="home"
|
||||||
primary="Home"
|
primary="Home"
|
||||||
onClick={onClose}
|
onClick={onClose}
|
||||||
/>
|
/>
|
||||||
{libraries.isSuccess &&
|
{libraries.isSuccess &&
|
||||||
libraries.data?.Items?.map((library) => (
|
libraries.data?.Items?.map((library) => (
|
||||||
<ListItemLink
|
<ListItemLink
|
||||||
className="library-drawer-item"
|
className="library-drawer-item"
|
||||||
key={library.Id}
|
key={library.Id}
|
||||||
to="/library/$id"
|
to="/library/$id"
|
||||||
params={{ id: library.Id ?? "" }}
|
params={{ id: library.Id ?? "" }}
|
||||||
icon={
|
icon={
|
||||||
library.CollectionType && getTypeIcon(library.CollectionType)
|
library.CollectionType &&
|
||||||
}
|
getTypeIcon(library.CollectionType)
|
||||||
primary={library.Name ?? "Library"}
|
}
|
||||||
onClick={onClose}
|
primary={library.Name ?? "Library"}
|
||||||
/>
|
onClick={onClose}
|
||||||
))}
|
/>
|
||||||
</List>
|
))}
|
||||||
<Divider variant="middle" />
|
</List>
|
||||||
<List>
|
<Divider variant="middle" />
|
||||||
<ListItemLink
|
<List>
|
||||||
to="/settings/preferences"
|
<ListItemLink
|
||||||
icon="settings"
|
to="/settings/preferences"
|
||||||
primary="Settings"
|
icon="settings"
|
||||||
className="library-drawer-item"
|
primary="Settings"
|
||||||
onClick={onClose}
|
className="library-drawer-item"
|
||||||
/>
|
onClick={onClose}
|
||||||
<ListItemLink
|
/>
|
||||||
to="/settings/changeServer"
|
<ListItemLink
|
||||||
icon="dns"
|
to="/settings/changeServer"
|
||||||
primary="Change Server"
|
icon="dns"
|
||||||
className="library-drawer-item"
|
primary="Change Server"
|
||||||
onClick={onClose}
|
className="library-drawer-item"
|
||||||
/>
|
onClick={onClose}
|
||||||
<ListItemLink
|
/>
|
||||||
to="/settings/about"
|
<ListItemLink
|
||||||
icon="info"
|
to="/settings/about"
|
||||||
primary="About"
|
icon="info"
|
||||||
className="library-drawer-item"
|
primary="About"
|
||||||
onClick={onClose}
|
className="library-drawer-item"
|
||||||
/>
|
onClick={onClose}
|
||||||
</List>
|
/>
|
||||||
</Drawer>
|
</List>
|
||||||
);
|
</Drawer>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { UserItemDataDto } from "@jellyfin/sdk/lib/generated-client";
|
import type { UserItemDataDto } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getUserDataApi } from "@jellyfin/sdk/lib/utils/api/user-data-api";
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
import { pink } from "@mui/material/colors";
|
import { pink } from "@mui/material/colors";
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
@@ -32,14 +32,14 @@ export default function LikeButton({
|
|||||||
if (!itemName) return;
|
if (!itemName) return;
|
||||||
if (isFavorite) {
|
if (isFavorite) {
|
||||||
result = (
|
result = (
|
||||||
await getUserDataApi(api).unmarkFavoriteItem({
|
await getUserLibraryApi(api).unmarkFavoriteItem({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
itemId: itemId,
|
itemId: itemId,
|
||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
} else if (!isFavorite) {
|
} else if (!isFavorite) {
|
||||||
result = (
|
result = (
|
||||||
await getUserDataApi(api).markFavoriteItem({
|
await getUserLibraryApi(api).markFavoriteItem({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
itemId: itemId,
|
itemId: itemId,
|
||||||
})
|
})
|
||||||
@@ -80,14 +80,16 @@ export default function LikeButton({
|
|||||||
className="material-symbols-rounded"
|
className="material-symbols-rounded"
|
||||||
style={
|
style={
|
||||||
isFavorite
|
isFavorite
|
||||||
? ({
|
? {
|
||||||
|
//@ts-expect-error
|
||||||
"--fill": mutation.isPending ? 0 : 1,
|
"--fill": mutation.isPending ? 0 : 1,
|
||||||
color: mutation.isPending ? "white" : pink.A700,
|
color: mutation.isPending ? "white" : pink.A700,
|
||||||
} as React.CSSProperties)
|
}
|
||||||
: ({
|
: {
|
||||||
|
//@ts-expect-error
|
||||||
"--fill": mutation.isPending ? 1 : 0,
|
"--fill": mutation.isPending ? 1 : 0,
|
||||||
color: mutation.isPending ? pink.A700 : "white",
|
color: mutation.isPending ? pink.A700 : "white",
|
||||||
} as React.CSSProperties)
|
}
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
favorite
|
favorite
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { green } from "@mui/material/colors";
|
|||||||
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
import { useApiInContext } from "@/utils/store/api";
|
||||||
import { getUserDataApi } from "@jellyfin/sdk/lib/utils/api/user-data-api";
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
import { useSnackbar } from "notistack";
|
import { useSnackbar } from "notistack";
|
||||||
|
|
||||||
export default function MarkPlayedButton({
|
export default function MarkPlayedButton({
|
||||||
@@ -36,12 +36,12 @@ export default function MarkPlayedButton({
|
|||||||
if (!itemName) return;
|
if (!itemName) return;
|
||||||
|
|
||||||
if (!isPlayed) {
|
if (!isPlayed) {
|
||||||
result = await getUserDataApi(api).markPlayedItem({
|
result = await getPlaystateApi(api).markPlayedItem({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
itemId: itemId,
|
itemId: itemId,
|
||||||
});
|
});
|
||||||
} else if (isPlayed) {
|
} else if (isPlayed) {
|
||||||
result = await getUserDataApi(api).markUnplayedItem({
|
result = await getPlaystateApi(api).markUnplayedItem({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
itemId: itemId,
|
itemId: itemId,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import {
|
|||||||
type BaseItemDto,
|
type BaseItemDto,
|
||||||
BaseItemKind,
|
BaseItemKind,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getShowApi } from "@jellyfin/sdk/lib/utils/api/show-api";
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
import type { SxProps } from "@mui/material";
|
import type { SxProps } from "@mui/material";
|
||||||
import Button, { type ButtonProps } from "@mui/material/Button";
|
import Button, { type ButtonProps } from "@mui/material/Button";
|
||||||
import Fab from "@mui/material/Fab";
|
import Fab from "@mui/material/Fab";
|
||||||
@@ -213,7 +213,7 @@ const PlayButton = ({
|
|||||||
if (!item.Id) {
|
if (!item.Id) {
|
||||||
throw new Error("Item ID is not available");
|
throw new Error("Item ID is not available");
|
||||||
}
|
}
|
||||||
const seasons = await getShowApi(api).getSeasons({
|
const seasons = await getTvShowsApi(api).getSeasons({
|
||||||
seriesId: item.Id,
|
seriesId: item.Id,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
|
|||||||
@@ -82,14 +82,14 @@ function SortableQueueItem({
|
|||||||
}
|
}
|
||||||
|
|
||||||
const QueueButton = () => {
|
const QueueButton = () => {
|
||||||
const api = useApiInContext((s) => s.api);
|
const api = useApiInContext((s) => s.api);
|
||||||
|
|
||||||
const [queueItems, currentItemIndex] = useQueue((state) => [
|
const [queueItems, currentItemIndex] = useQueue((state) => [
|
||||||
state.tracks,
|
state.tracks,
|
||||||
state.currentItemIndex,
|
state.currentItemIndex,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
const [open, setOpen] = useState(false);
|
const [open, setOpen] = useState(false);
|
||||||
|
|
||||||
const user = useQuery({
|
const user = useQuery({
|
||||||
queryKey: ["currentUser"],
|
queryKey: ["currentUser"],
|
||||||
@@ -100,293 +100,283 @@ const QueueButton = () => {
|
|||||||
enabled: !!api,
|
enabled: !!api,
|
||||||
});
|
});
|
||||||
|
|
||||||
const sensors = useSensors(
|
const sensors = useSensors(
|
||||||
useSensor(PointerSensor),
|
useSensor(PointerSensor),
|
||||||
useSensor(KeyboardSensor, {
|
useSensor(KeyboardSensor, {
|
||||||
coordinateGetter: sortableKeyboardCoordinates,
|
coordinateGetter: sortableKeyboardCoordinates,
|
||||||
}),
|
}),
|
||||||
);
|
);
|
||||||
|
|
||||||
const upcomingItems = useMemo(() => {
|
const upcomingItems = useMemo(() => {
|
||||||
return queueItems ? queueItems.slice(currentItemIndex + 1) : [];
|
return queueItems ? queueItems.slice(currentItemIndex + 1) : [];
|
||||||
}, [queueItems, currentItemIndex]);
|
}, [queueItems, currentItemIndex]);
|
||||||
|
|
||||||
const upcomingIds = useMemo(() => {
|
const upcomingIds = useMemo(() => {
|
||||||
return upcomingItems.map((item) => item.Id || "");
|
return upcomingItems.map((item) => item.Id || "");
|
||||||
}, [upcomingItems]);
|
}, [upcomingItems]);
|
||||||
|
|
||||||
const handleDragEnd = (event: DragEndEvent) => {
|
const handleDragEnd = (event: DragEndEvent) => {
|
||||||
const { active, over } = event;
|
const { active, over } = event;
|
||||||
|
|
||||||
if (active.id !== over?.id && queueItems) {
|
if (active.id !== over?.id && queueItems) {
|
||||||
const oldIndex = upcomingItems.findIndex((item) => item.Id === active.id);
|
const oldIndex = upcomingItems.findIndex(
|
||||||
const newIndex = upcomingItems.findIndex((item) => item.Id === over?.id);
|
(item) => item.Id === active.id,
|
||||||
|
);
|
||||||
|
const newIndex = upcomingItems.findIndex(
|
||||||
|
(item) => item.Id === over?.id,
|
||||||
|
);
|
||||||
|
|
||||||
if (oldIndex !== -1 && newIndex !== -1) {
|
if (oldIndex !== -1 && newIndex !== -1) {
|
||||||
const newUpcoming = arrayMove(upcomingItems, oldIndex, newIndex);
|
const newUpcoming = arrayMove(upcomingItems, oldIndex, newIndex);
|
||||||
const newQueue = [
|
const newQueue = [
|
||||||
...queueItems.slice(0, currentItemIndex + 1),
|
...queueItems.slice(0, currentItemIndex + 1),
|
||||||
...newUpcoming,
|
...newUpcoming,
|
||||||
];
|
];
|
||||||
reorderQueue(newQueue);
|
reorderQueue(newQueue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDelete = (index: number) => {
|
const handleDelete = (index: number) => {
|
||||||
removeFromQueue(index);
|
removeFromQueue(index);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handlePlay = (index: number) => {
|
const handlePlay = (index: number) => {
|
||||||
playItemFromQueue(index, user.data?.Id, api);
|
playItemFromQueue(index, user.data?.Id, api);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleClear = () => {
|
const handleClear = () => {
|
||||||
clearUpcoming();
|
clearUpcoming();
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleShuffle = () => {
|
const handleShuffle = () => {
|
||||||
shuffleUpcoming();
|
shuffleUpcoming();
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Drawer
|
<Drawer
|
||||||
anchor="right"
|
anchor="right"
|
||||||
open={open}
|
open={open}
|
||||||
onClose={() => setOpen(false)}
|
onClose={() => setOpen(false)}
|
||||||
slotProps={{
|
PaperProps={{
|
||||||
backdrop: {
|
className: "glass",
|
||||||
sx: {
|
sx: {
|
||||||
backgroundColor: "rgba(0, 0, 0, 0.2)",
|
width: 450,
|
||||||
backdropFilter: "blur(4px)",
|
maxWidth: "100%",
|
||||||
},
|
display: "flex",
|
||||||
},
|
flexDirection: "column",
|
||||||
paper: {
|
borderLeft: "1px solid rgba(255, 255, 255, 0.08)",
|
||||||
className: "glass",
|
},
|
||||||
sx: {
|
}}
|
||||||
width: 450,
|
ModalProps={{
|
||||||
maxWidth: "100%",
|
BackdropProps: {
|
||||||
display: "flex",
|
sx: {
|
||||||
flexDirection: "column",
|
backgroundColor: "rgba(0, 0, 0, 0.2)",
|
||||||
borderLeft: "1px solid rgba(255, 255, 255, 0.08)",
|
backdropFilter: "blur(4px)",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
p: 3,
|
|
||||||
display: "flex",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
alignItems: "center",
|
|
||||||
position: "sticky",
|
|
||||||
top: 0,
|
|
||||||
zIndex: 20,
|
|
||||||
borderBottom: "1px solid",
|
|
||||||
borderColor: "rgba(255, 255, 255, 0.08)",
|
|
||||||
backgroundColor: "rgba(20, 20, 30, 0.4)",
|
|
||||||
backdropFilter: "blur(12px)",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
gap: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
variant="h5"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
Play Queue
|
<Box
|
||||||
</Typography>
|
p={3}
|
||||||
<Typography
|
display="flex"
|
||||||
variant="caption"
|
justifyContent="space-between"
|
||||||
sx={{
|
alignItems="center"
|
||||||
color: "text.secondary",
|
sx={{
|
||||||
ml: 1,
|
position: "sticky",
|
||||||
fontWeight: 600,
|
top: 0,
|
||||||
bgcolor: "rgba(255, 255, 255, 0.08)",
|
zIndex: 20,
|
||||||
px: 1,
|
borderBottom: "1px solid",
|
||||||
py: 0.5,
|
borderColor: "rgba(255, 255, 255, 0.08)",
|
||||||
borderRadius: 2,
|
backgroundColor: "rgba(20, 20, 30, 0.4)",
|
||||||
}}
|
backdropFilter: "blur(12px)",
|
||||||
>
|
}}
|
||||||
{queueItems?.length || 0}
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
gap: 0.5,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Tooltip title="Shuffle Upcoming">
|
|
||||||
<span>
|
|
||||||
<IconButton
|
|
||||||
onClick={handleShuffle}
|
|
||||||
size="small"
|
|
||||||
disabled={upcomingItems.length < 2}
|
|
||||||
>
|
|
||||||
<span className="material-symbols-rounded">shuffle</span>
|
|
||||||
</IconButton>
|
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip title="Clear Upcoming">
|
|
||||||
<span>
|
|
||||||
<IconButton
|
|
||||||
onClick={handleClear}
|
|
||||||
size="small"
|
|
||||||
disabled={upcomingItems.length === 0}
|
|
||||||
>
|
|
||||||
<span className="material-symbols-rounded">clear_all</span>
|
|
||||||
</IconButton>
|
|
||||||
</span>
|
|
||||||
</Tooltip>
|
|
||||||
<IconButton onClick={() => setOpen(false)} size="small">
|
|
||||||
<span className="material-symbols-rounded">close</span>
|
|
||||||
</IconButton>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
overflowY: "auto",
|
|
||||||
flex: 1,
|
|
||||||
p: 2,
|
|
||||||
"&::-webkit-scrollbar": { width: 8 },
|
|
||||||
"&::-webkit-scrollbar-track": { background: "transparent" },
|
|
||||||
"&::-webkit-scrollbar-thumb": {
|
|
||||||
background: "rgba(128,128,128,0.2)",
|
|
||||||
borderRadius: 4,
|
|
||||||
},
|
|
||||||
"&::-webkit-scrollbar-thumb:hover": {
|
|
||||||
background: "rgba(128,128,128,0.3)",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{queueItems && queueItems.length > 0 ? (
|
|
||||||
<List disablePadding>
|
|
||||||
{/* Current Item */}
|
|
||||||
{queueItems[currentItemIndex] && (
|
|
||||||
<Box sx={{ mb: 4 }}>
|
|
||||||
<Typography
|
|
||||||
variant="overline"
|
|
||||||
sx={{
|
|
||||||
display: "block",
|
|
||||||
opacity: 0.6,
|
|
||||||
mb: 1,
|
|
||||||
fontWeight: 600,
|
|
||||||
letterSpacing: 1.2,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
NOW PLAYING
|
|
||||||
</Typography>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
bgcolor: "background.paper",
|
|
||||||
borderRadius: 3,
|
|
||||||
overflow: "hidden",
|
|
||||||
boxShadow: 4,
|
|
||||||
border: "1px solid",
|
|
||||||
borderColor: "divider",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<QueueListItem
|
|
||||||
queueItem={queueItems[currentItemIndex]}
|
|
||||||
active={true}
|
|
||||||
isEpisode={
|
|
||||||
queueItems[currentItemIndex].Type === "Episode"
|
|
||||||
}
|
|
||||||
index={currentItemIndex + 1}
|
|
||||||
/>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Upcoming Items */}
|
|
||||||
{upcomingItems.length > 0 && (
|
|
||||||
<>
|
|
||||||
<Typography
|
|
||||||
variant="overline"
|
|
||||||
sx={{
|
|
||||||
display: "block",
|
|
||||||
opacity: 0.6,
|
|
||||||
mb: 1,
|
|
||||||
fontWeight: 600,
|
|
||||||
letterSpacing: 1.2,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
NEXT UP
|
|
||||||
</Typography>
|
|
||||||
<DndContext
|
|
||||||
sensors={sensors}
|
|
||||||
collisionDetection={closestCenter}
|
|
||||||
onDragEnd={handleDragEnd}
|
|
||||||
modifiers={[restrictToVerticalAxis]}
|
|
||||||
>
|
|
||||||
<SortableContext
|
|
||||||
items={upcomingIds}
|
|
||||||
strategy={verticalListSortingStrategy}
|
|
||||||
>
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
gap: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{upcomingItems.map((item, index) => (
|
|
||||||
<SortableQueueItem
|
|
||||||
key={item.Id || index}
|
|
||||||
item={item}
|
|
||||||
onDelete={() =>
|
|
||||||
handleDelete(currentItemIndex + 1 + index)
|
|
||||||
}
|
|
||||||
onPlay={() =>
|
|
||||||
handlePlay(currentItemIndex + 1 + index)
|
|
||||||
}
|
|
||||||
index={currentItemIndex + 1 + index + 1}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</Box>
|
|
||||||
</SortableContext>
|
|
||||||
</DndContext>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
</List>
|
|
||||||
) : (
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
p: 4,
|
|
||||||
textAlign: "center",
|
|
||||||
display: "flex",
|
|
||||||
flexDirection: "column",
|
|
||||||
alignItems: "center",
|
|
||||||
gap: 2,
|
|
||||||
opacity: 0.5,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<span
|
|
||||||
className="material-symbols-rounded"
|
|
||||||
style={{ fontSize: 48 }}
|
|
||||||
>
|
>
|
||||||
queue_music
|
<Box display="flex" alignItems="center" gap={1}>
|
||||||
</span>
|
<Typography variant="h5" fontWeight="bold">
|
||||||
<Typography>Your queue is empty</Typography>
|
Play Queue
|
||||||
</Box>
|
</Typography>
|
||||||
)}
|
<Typography
|
||||||
</Box>
|
variant="caption"
|
||||||
</Drawer>
|
color="text.secondary"
|
||||||
<IconButton onClick={() => setOpen(true)}>
|
sx={{
|
||||||
<span className="material-symbols-rounded">playlist_play</span>
|
ml: 1,
|
||||||
</IconButton>
|
fontWeight: 600,
|
||||||
</>
|
bgcolor: "rgba(255, 255, 255, 0.08)",
|
||||||
);
|
px: 1,
|
||||||
|
py: 0.5,
|
||||||
|
borderRadius: 2,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{queueItems?.length || 0}
|
||||||
|
</Typography>
|
||||||
|
</Box>
|
||||||
|
<Box display="flex" gap={0.5}>
|
||||||
|
<Tooltip title="Shuffle Upcoming">
|
||||||
|
<span>
|
||||||
|
<IconButton
|
||||||
|
onClick={handleShuffle}
|
||||||
|
size="small"
|
||||||
|
disabled={upcomingItems.length < 2}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-rounded">
|
||||||
|
shuffle
|
||||||
|
</span>
|
||||||
|
</IconButton>
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
<Tooltip title="Clear Upcoming">
|
||||||
|
<span>
|
||||||
|
<IconButton
|
||||||
|
onClick={handleClear}
|
||||||
|
size="small"
|
||||||
|
disabled={upcomingItems.length === 0}
|
||||||
|
>
|
||||||
|
<span className="material-symbols-rounded">
|
||||||
|
clear_all
|
||||||
|
</span>
|
||||||
|
</IconButton>
|
||||||
|
</span>
|
||||||
|
</Tooltip>
|
||||||
|
<IconButton onClick={() => setOpen(false)} size="small">
|
||||||
|
<span className="material-symbols-rounded">close</span>
|
||||||
|
</IconButton>
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
overflowY: "auto",
|
||||||
|
flex: 1,
|
||||||
|
p: 2,
|
||||||
|
"&::-webkit-scrollbar": { width: 8 },
|
||||||
|
"&::-webkit-scrollbar-track": { background: "transparent" },
|
||||||
|
"&::-webkit-scrollbar-thumb": {
|
||||||
|
background: "rgba(128,128,128,0.2)",
|
||||||
|
borderRadius: 4,
|
||||||
|
},
|
||||||
|
"&::-webkit-scrollbar-thumb:hover": {
|
||||||
|
background: "rgba(128,128,128,0.3)",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{queueItems && queueItems.length > 0 ? (
|
||||||
|
<List disablePadding>
|
||||||
|
{/* Current Item */}
|
||||||
|
{queueItems[currentItemIndex] && (
|
||||||
|
<Box sx={{ mb: 4 }}>
|
||||||
|
<Typography
|
||||||
|
variant="overline"
|
||||||
|
sx={{
|
||||||
|
display: "block",
|
||||||
|
opacity: 0.6,
|
||||||
|
mb: 1,
|
||||||
|
fontWeight: 600,
|
||||||
|
letterSpacing: 1.2,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
NOW PLAYING
|
||||||
|
</Typography>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
bgcolor: "background.paper",
|
||||||
|
borderRadius: 3,
|
||||||
|
overflow: "hidden",
|
||||||
|
boxShadow: 4,
|
||||||
|
border: "1px solid",
|
||||||
|
borderColor: "divider",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<QueueListItem
|
||||||
|
queueItem={queueItems[currentItemIndex]}
|
||||||
|
active={true}
|
||||||
|
isEpisode={
|
||||||
|
queueItems[currentItemIndex].Type === "Episode"
|
||||||
|
}
|
||||||
|
index={currentItemIndex + 1}
|
||||||
|
/>
|
||||||
|
</Box>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Upcoming Items */}
|
||||||
|
{upcomingItems.length > 0 && (
|
||||||
|
<>
|
||||||
|
<Typography
|
||||||
|
variant="overline"
|
||||||
|
sx={{
|
||||||
|
display: "block",
|
||||||
|
opacity: 0.6,
|
||||||
|
mb: 1,
|
||||||
|
fontWeight: 600,
|
||||||
|
letterSpacing: 1.2,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
NEXT UP
|
||||||
|
</Typography>
|
||||||
|
<DndContext
|
||||||
|
sensors={sensors}
|
||||||
|
collisionDetection={closestCenter}
|
||||||
|
onDragEnd={handleDragEnd}
|
||||||
|
modifiers={[restrictToVerticalAxis]}
|
||||||
|
>
|
||||||
|
<SortableContext
|
||||||
|
items={upcomingIds}
|
||||||
|
strategy={verticalListSortingStrategy}
|
||||||
|
>
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{upcomingItems.map((item, index) => (
|
||||||
|
<SortableQueueItem
|
||||||
|
key={item.Id || index}
|
||||||
|
item={item}
|
||||||
|
onDelete={() =>
|
||||||
|
handleDelete(currentItemIndex + 1 + index)
|
||||||
|
}
|
||||||
|
onPlay={() =>
|
||||||
|
handlePlay(currentItemIndex + 1 + index)
|
||||||
|
}
|
||||||
|
index={currentItemIndex + 1 + index + 1}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</Box>
|
||||||
|
</SortableContext>
|
||||||
|
</DndContext>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
</List>
|
||||||
|
) : (
|
||||||
|
<Box
|
||||||
|
p={4}
|
||||||
|
textAlign="center"
|
||||||
|
display="flex"
|
||||||
|
flexDirection="column"
|
||||||
|
alignItems="center"
|
||||||
|
gap={2}
|
||||||
|
sx={{ opacity: 0.5 }}
|
||||||
|
>
|
||||||
|
<span
|
||||||
|
className="material-symbols-rounded"
|
||||||
|
style={{ fontSize: 48 }}
|
||||||
|
>
|
||||||
|
queue_music
|
||||||
|
</span>
|
||||||
|
<Typography>Your queue is empty</Typography>
|
||||||
|
</Box>
|
||||||
|
)}
|
||||||
|
</Box>
|
||||||
|
</Drawer>
|
||||||
|
<IconButton onClick={() => setOpen(true)}>
|
||||||
|
<span className="material-symbols-rounded">playlist_play</span>
|
||||||
|
</IconButton>
|
||||||
|
</>
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default QueueButton;
|
export default QueueButton;
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
import { getAuthenticationApi } from "@jellyfin/sdk/lib/utils/api/authentication-api";
|
import { getQuickConnectApi } from "@jellyfin/sdk/lib/utils/api/quick-connect-api";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
import { LoadingButton, type LoadingButtonProps } from "@mui/lab";
|
import { LoadingButton, type LoadingButtonProps } from "@mui/lab";
|
||||||
import {
|
import {
|
||||||
Button,
|
Button,
|
||||||
@@ -59,7 +60,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
const quickConnectEnabled = useQuery({
|
const quickConnectEnabled = useQuery({
|
||||||
queryKey: ["quick-connect-button", "check-quick-connect-enabled"],
|
queryKey: ["quick-connect-button", "check-quick-connect-enabled"],
|
||||||
queryFn: api
|
queryFn: api
|
||||||
? async () => await getAuthenticationApi(api).getQuickConnectEnabled()
|
? async () => await getQuickConnectApi(api).getQuickConnectEnabled()
|
||||||
: skipToken,
|
: skipToken,
|
||||||
enabled: Boolean(api),
|
enabled: Boolean(api),
|
||||||
});
|
});
|
||||||
@@ -73,7 +74,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
mutationKey: ["quick-connect-button", "authenticate-user"],
|
mutationKey: ["quick-connect-button", "authenticate-user"],
|
||||||
mutationFn: async () => {
|
mutationFn: async () => {
|
||||||
if (api && quickConnectSecret) {
|
if (api && quickConnectSecret) {
|
||||||
return await getAuthenticationApi(api).authenticateWithQuickConnect(
|
return await getUserApi(api).authenticateWithQuickConnect(
|
||||||
{ quickConnectDto: { Secret: quickConnectSecret } },
|
{ quickConnectDto: { Secret: quickConnectSecret } },
|
||||||
{ headers },
|
{ headers },
|
||||||
);
|
);
|
||||||
@@ -103,7 +104,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
mutationFn: async (secret: string) =>
|
mutationFn: async (secret: string) =>
|
||||||
api &&
|
api &&
|
||||||
(
|
(
|
||||||
await getAuthenticationApi(api).getQuickConnectState(
|
await getQuickConnectApi(api).getQuickConnectState(
|
||||||
{ secret },
|
{ secret },
|
||||||
{ headers },
|
{ headers },
|
||||||
)
|
)
|
||||||
@@ -126,9 +127,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
if (api) {
|
if (api) {
|
||||||
return await getAuthenticationApi(api).initiateQuickConnect({
|
return await getQuickConnectApi(api).initiateQuickConnect({ headers });
|
||||||
headers,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onSuccess: (result) => {
|
onSuccess: (result) => {
|
||||||
@@ -174,7 +173,7 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
(quickConnectCode && !checkQuickConnectStatus.data?.Authenticated),
|
(quickConnectCode && !checkQuickConnectStatus.data?.Authenticated),
|
||||||
)}
|
)}
|
||||||
variant={props.variant ?? "contained"}
|
variant={props.variant ?? "contained"}
|
||||||
onClick={() => initQuickConnect.mutate()}
|
onClick={initQuickConnect.mutate}
|
||||||
>
|
>
|
||||||
{quickConnectEnabled.data?.data
|
{quickConnectEnabled.data?.data
|
||||||
? "Use Quick Connect"
|
? "Use Quick Connect"
|
||||||
@@ -185,12 +184,8 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
onClose={handleQuickConnectClose}
|
onClose={handleQuickConnectClose}
|
||||||
fullWidth
|
fullWidth
|
||||||
maxWidth="xs"
|
maxWidth="xs"
|
||||||
slots={{
|
TransitionComponent={Transition}
|
||||||
transition: Transition,
|
PaperProps={{ className: "glass", sx: { borderRadius: "24px" } }}
|
||||||
}}
|
|
||||||
slotProps={{
|
|
||||||
paper: { className: "glass", sx: { borderRadius: "24px" } },
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<DialogContent
|
<DialogContent
|
||||||
style={{
|
style={{
|
||||||
@@ -201,12 +196,10 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h5"
|
variant="h5"
|
||||||
|
mb={2}
|
||||||
style={{
|
style={{
|
||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
sx={{
|
|
||||||
mb: 2,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
Quick Connect Code:
|
Quick Connect Code:
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -221,6 +214,14 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
<Typography
|
<Typography
|
||||||
variant="h3"
|
variant="h3"
|
||||||
color="textPrimary"
|
color="textPrimary"
|
||||||
|
textAlign="center"
|
||||||
|
sx={{
|
||||||
|
background: "rgb(255 255 255 / 0.1)",
|
||||||
|
width: "fit-content",
|
||||||
|
padding: "0.4em",
|
||||||
|
borderRadius: "10px",
|
||||||
|
cursor: "pointer",
|
||||||
|
}}
|
||||||
onClick={async () => {
|
onClick={async () => {
|
||||||
quickConnectCode && (await writeText(quickConnectCode));
|
quickConnectCode && (await writeText(quickConnectCode));
|
||||||
enqueueSnackbar("Quick Connect Code copied!", {
|
enqueueSnackbar("Quick Connect Code copied!", {
|
||||||
@@ -228,14 +229,6 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
key: "copiedText",
|
key: "copiedText",
|
||||||
});
|
});
|
||||||
}}
|
}}
|
||||||
sx={{
|
|
||||||
textAlign: "center",
|
|
||||||
background: "rgb(255 255 255 / 0.1)",
|
|
||||||
width: "fit-content",
|
|
||||||
padding: "0.4em",
|
|
||||||
borderRadius: "10px",
|
|
||||||
cursor: "pointer",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{quickConnectCode}
|
{quickConnectCode}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -267,4 +260,4 @@ const QuickConnectButton = (props: LoadingButtonProps) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default QuickConnectButton;
|
export default QuickConnectButton;
|
||||||
@@ -22,20 +22,18 @@ const TrailerButton = (props: TrailerButtonType) => {
|
|||||||
maxWidth="md"
|
maxWidth="md"
|
||||||
fullWidth
|
fullWidth
|
||||||
open={dialog}
|
open={dialog}
|
||||||
onClose={() => setDialog(false)}
|
PaperProps={{
|
||||||
slotProps={{
|
className: "glass",
|
||||||
paper: {
|
style: {
|
||||||
className: "glass",
|
overflow: "hidden",
|
||||||
style: {
|
|
||||||
overflow: "hidden",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
onClose={() => setDialog(false)}
|
||||||
>
|
>
|
||||||
{props.trailerItem[0]?.Url && (
|
{props.trailerItem[0]?.Url && (
|
||||||
<ReactPlayer
|
<ReactPlayer
|
||||||
playing={false}
|
playing={false}
|
||||||
src={props.trailerItem[0]?.Url}
|
url={props.trailerItem[0]?.Url}
|
||||||
width="100%"
|
width="100%"
|
||||||
height="auto"
|
height="auto"
|
||||||
style={{
|
style={{
|
||||||
|
|||||||
@@ -16,7 +16,6 @@ import MarkPlayedButton from "../buttons/markPlayedButton";
|
|||||||
import PlayButton from "../buttons/playButton";
|
import PlayButton from "../buttons/playButton";
|
||||||
import { getTypeIcon } from "../utils/iconsCollection";
|
import { getTypeIcon } from "../utils/iconsCollection";
|
||||||
import "./card.scss";
|
import "./card.scss";
|
||||||
import { getItemLinkOptions } from "@/utils/navigation/itemLink";
|
|
||||||
|
|
||||||
interface CardProps {
|
interface CardProps {
|
||||||
item: BaseItemDto;
|
item: BaseItemDto;
|
||||||
@@ -58,7 +57,32 @@ const CardContent = ({
|
|||||||
|
|
||||||
const defaultOnClick = useCallback(() => {
|
const defaultOnClick = useCallback(() => {
|
||||||
if (item?.Id) {
|
if (item?.Id) {
|
||||||
navigate(getItemLinkOptions(item.Id, item?.Type));
|
switch (item?.Type) {
|
||||||
|
case BaseItemKind.BoxSet:
|
||||||
|
navigate({ to: "/boxset/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Episode:
|
||||||
|
navigate({ to: "/episode/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.MusicAlbum:
|
||||||
|
navigate({ to: "/album/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.MusicArtist:
|
||||||
|
navigate({ to: "/artist/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Person:
|
||||||
|
navigate({ to: "/person/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Series:
|
||||||
|
navigate({ to: "/series/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Playlist:
|
||||||
|
navigate({ to: "/playlist/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
navigate({ to: "/item/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}, [item?.Id, item?.Type, navigate]);
|
}, [item?.Id, item?.Type, navigate]);
|
||||||
|
|
||||||
@@ -226,4 +250,4 @@ const CardComponent = (props: CardProps) => {
|
|||||||
return <CardWithInView {...props} />;
|
return <CardWithInView {...props} />;
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Card = memo(CardComponent);
|
export const Card = memo(CardComponent);
|
||||||
@@ -1,13 +1,7 @@
|
|||||||
import React, { type ReactNode, useRef, useState } from "react";
|
import React, { type ReactNode, useRef, useState } from "react";
|
||||||
import CarouselModule from "react-multi-carousel";
|
import Carousel from "react-multi-carousel";
|
||||||
import "react-multi-carousel/lib/styles.css";
|
import "react-multi-carousel/lib/styles.css";
|
||||||
|
|
||||||
// react-multi-carousel is CJS with `exports.default`; Vite 8 hands default imports the whole
|
|
||||||
// `module.exports`, so unwrap `.default` when present.
|
|
||||||
const Carousel = ((
|
|
||||||
CarouselModule as unknown as { default?: typeof CarouselModule }
|
|
||||||
).default ?? CarouselModule) as typeof CarouselModule;
|
|
||||||
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
import IconButton from "@mui/material/IconButton";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import { green, red, yellow } from "@mui/material/colors";
|
|||||||
import Stack from "@mui/material/Stack";
|
import Stack from "@mui/material/Stack";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import { useNavigate } from "@tanstack/react-router";
|
import { useNavigate } from "@tanstack/react-router";
|
||||||
import { motion, type Variants } from "motion/react";
|
import { motion } from "motion/react";
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { endsAt, getRuntime } from "@/utils/date/time";
|
import { endsAt, getRuntime } from "@/utils/date/time";
|
||||||
|
|
||||||
@@ -19,12 +19,8 @@ import LikeButton from "../buttons/likeButton";
|
|||||||
import MarkPlayedButton from "../buttons/markPlayedButton";
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
import PlayButton from "../buttons/playButton";
|
import PlayButton from "../buttons/playButton";
|
||||||
import { getTypeIcon } from "../utils/iconsCollection";
|
import { getTypeIcon } from "../utils/iconsCollection";
|
||||||
import { getItemLinkOptions } from "@/utils/navigation/itemLink";
|
|
||||||
|
|
||||||
const MotionTypography = motion.create(Typography);
|
const textVariants = {
|
||||||
const MotionStack = motion.create(Stack);
|
|
||||||
|
|
||||||
const textVariants: Variants = {
|
|
||||||
initial: (direction: string) => ({
|
initial: (direction: string) => ({
|
||||||
x: direction === "right" ? 40 : -40,
|
x: direction === "right" ? 40 : -40,
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
@@ -34,7 +30,7 @@ const textVariants: Variants = {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
transition: {
|
transition: {
|
||||||
duration: 0.35,
|
duration: 0.35,
|
||||||
ease: [0.2, 0, 0, 1] as const,
|
ease: [0.2, 0, 0, 1],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
exit: (direction: string) => ({
|
exit: (direction: string) => ({
|
||||||
@@ -55,7 +51,32 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
|||||||
|
|
||||||
const handleMoreInfo = () => {
|
const handleMoreInfo = () => {
|
||||||
if (item.Id) {
|
if (item.Id) {
|
||||||
navigate(getItemLinkOptions(item.Id, item.Type));
|
switch (item.Type) {
|
||||||
|
case BaseItemKind.BoxSet:
|
||||||
|
navigate({ to: "/boxset/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Episode:
|
||||||
|
navigate({ to: "/episode/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.MusicAlbum:
|
||||||
|
navigate({ to: "/album/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.MusicArtist:
|
||||||
|
navigate({ to: "/artist/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Person:
|
||||||
|
navigate({ to: "/person/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Series:
|
||||||
|
navigate({ to: "/series/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Playlist:
|
||||||
|
navigate({ to: "/playlist/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
navigate({ to: "/item/$id", params: { id: item.Id } });
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -113,17 +134,19 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
|||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<MotionTypography
|
{/* @ts-ignore */}
|
||||||
|
<Typography
|
||||||
|
component={motion.div}
|
||||||
custom={animationDirection}
|
custom={animationDirection}
|
||||||
variants={textVariants}
|
variants={textVariants}
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
variant="h2"
|
variant="h2"
|
||||||
className="hero-carousel-text"
|
className="hero-carousel-text"
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: 600,
|
|
||||||
overflow: "visible",
|
|
||||||
mb: "5px",
|
mb: "5px",
|
||||||
}}
|
}}
|
||||||
|
fontWeight={600}
|
||||||
|
overflow="visible"
|
||||||
>
|
>
|
||||||
{!item.ImageTags?.Logo ? (
|
{!item.ImageTags?.Logo ? (
|
||||||
item.Name
|
item.Name
|
||||||
@@ -142,18 +165,18 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
|||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</MotionTypography>
|
</Typography>
|
||||||
<MotionStack
|
{/* @ts-ignore */}
|
||||||
|
<Stack
|
||||||
|
component={motion.div}
|
||||||
custom={animationDirection}
|
custom={animationDirection}
|
||||||
variants={textVariants}
|
variants={textVariants}
|
||||||
direction="row"
|
direction="row"
|
||||||
|
gap={2}
|
||||||
className="hero-carousel-info"
|
className="hero-carousel-info"
|
||||||
sx={{
|
mt={1}
|
||||||
gap: 2,
|
justifyItems="flex-start"
|
||||||
mt: 1,
|
alignItems="center"
|
||||||
justifyItems: "flex-start",
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{item.PremiereDate && (
|
{item.PremiereDate && (
|
||||||
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
|
<Typography style={{ opacity: "0.8" }} variant="subtitle2">
|
||||||
@@ -235,29 +258,29 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
|||||||
<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
|
<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
|
||||||
{item.Genres?.slice(0, 4).join(" / ")}
|
{item.Genres?.slice(0, 4).join(" / ")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</MotionStack>
|
</Stack>
|
||||||
<MotionTypography
|
{/* @ts-ignore */}
|
||||||
|
<Typography
|
||||||
|
component={motion.div}
|
||||||
custom={animationDirection}
|
custom={animationDirection}
|
||||||
variants={textVariants}
|
variants={textVariants}
|
||||||
className="hero-carousel-overview"
|
className="hero-carousel-overview"
|
||||||
variant="body1"
|
variant="body1"
|
||||||
sx={{
|
fontWeight={400}
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{item.Overview}
|
{item.Overview}
|
||||||
</MotionTypography>
|
</Typography>
|
||||||
|
|
||||||
<MotionStack
|
{/* @ts-ignore */}
|
||||||
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
|
gap={2}
|
||||||
|
width="100%"
|
||||||
className="hero-carousel-button-container"
|
className="hero-carousel-button-container"
|
||||||
|
alignItems="center"
|
||||||
|
component={motion.div}
|
||||||
custom={animationDirection}
|
custom={animationDirection}
|
||||||
variants={textVariants}
|
variants={textVariants}
|
||||||
sx={{
|
|
||||||
gap: 2,
|
|
||||||
width: "100%",
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<PlayButton
|
<PlayButton
|
||||||
item={item}
|
item={item}
|
||||||
@@ -295,12 +318,7 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
|||||||
>
|
>
|
||||||
More info
|
More info
|
||||||
</Button>
|
</Button>
|
||||||
<Stack
|
<Stack direction="row" gap={1}>
|
||||||
direction="row"
|
|
||||||
sx={{
|
|
||||||
gap: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<LikeButton
|
<LikeButton
|
||||||
itemId={item.Id}
|
itemId={item.Id}
|
||||||
queryKey={["home", "latestMedia"]}
|
queryKey={["home", "latestMedia"]}
|
||||||
@@ -316,7 +334,7 @@ const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
|
|||||||
itemName={item.Name}
|
itemName={item.Name}
|
||||||
/>
|
/>
|
||||||
</Stack>
|
</Stack>
|
||||||
</MotionStack>
|
</Stack>
|
||||||
</motion.div>
|
</motion.div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { getGenreApi } from "@jellyfin/sdk/lib/utils/api/genre-api";
|
import { getGenresApi } from "@jellyfin/sdk/lib/utils/api/genres-api";
|
||||||
|
import { getMusicGenresApi } from "@jellyfin/sdk/lib/utils/api/music-genres-api";
|
||||||
import {
|
import {
|
||||||
Accordion,
|
Accordion,
|
||||||
AccordionDetails,
|
AccordionDetails,
|
||||||
@@ -109,13 +110,13 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
|||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api || !user?.Id || !currentLibraryId) return { Items: [] } as any;
|
if (!api || !user?.Id || !currentLibraryId) return { Items: [] } as any;
|
||||||
if (String(collectionType || "").toLowerCase() === "music") {
|
if (String(collectionType || "").toLowerCase() === "music") {
|
||||||
const res = await getGenreApi(api).getGenres({
|
const res = await getMusicGenresApi(api).getMusicGenres({
|
||||||
parentId: currentLibraryId,
|
parentId: currentLibraryId,
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
});
|
});
|
||||||
return res.data;
|
return res.data;
|
||||||
}
|
}
|
||||||
const res = await getGenreApi(api).getGenres({
|
const res = await getGenresApi(api).getGenres({
|
||||||
parentId: currentLibraryId,
|
parentId: currentLibraryId,
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
});
|
});
|
||||||
@@ -169,9 +170,7 @@ export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
|
|||||||
fullWidth
|
fullWidth
|
||||||
maxWidth="sm"
|
maxWidth="sm"
|
||||||
keepMounted
|
keepMounted
|
||||||
slotProps={{
|
PaperProps={{ className: "glass-dialog-paper" }}
|
||||||
paper: { className: "glass-dialog-paper" },
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<DialogTitle>Filters</DialogTitle>
|
<DialogTitle>Filters</DialogTitle>
|
||||||
<DialogContent
|
<DialogContent
|
||||||
|
|||||||
@@ -1,92 +0,0 @@
|
|||||||
import type { Api } from "@jellyfin/sdk";
|
|
||||||
import type { BaseItemPerson } from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import { Link } from "@tanstack/react-router";
|
|
||||||
import React, { useMemo } from "react";
|
|
||||||
import { getTypeIcon } from "@/components/utils/iconsCollection";
|
|
||||||
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
|
||||||
|
|
||||||
const groups = [
|
|
||||||
{ type: "Actor", title: "Actors" },
|
|
||||||
{ type: "Writer", title: "Writers" },
|
|
||||||
{ type: "Director", title: "Directors" },
|
|
||||||
{ type: "Producer", title: "Producers" },
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
type CastAndCrewProps = {
|
|
||||||
people: BaseItemPerson[] | null | undefined;
|
|
||||||
api: Api | undefined;
|
|
||||||
};
|
|
||||||
|
|
||||||
const CastAndCrew = ({ people, api }: CastAndCrewProps) => {
|
|
||||||
const grouped = useMemo(
|
|
||||||
() =>
|
|
||||||
groups.map((group) => ({
|
|
||||||
...group,
|
|
||||||
people: people?.filter((person) => person.Type === group.type) ?? [],
|
|
||||||
})),
|
|
||||||
[people],
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!people?.length) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<div className="item-detail-cast">
|
|
||||||
<Typography variant="h5" sx={{ mb: 2 }}>
|
|
||||||
Cast & Crew
|
|
||||||
</Typography>
|
|
||||||
{grouped.map(
|
|
||||||
(group) =>
|
|
||||||
group.people.length > 0 && (
|
|
||||||
<div className="item-detail-cast-container" key={group.type}>
|
|
||||||
<Typography variant="h6" className="item-detail-cast-title">
|
|
||||||
{group.title}
|
|
||||||
</Typography>
|
|
||||||
<div className="item-detail-cast-grid">
|
|
||||||
{group.people.map((person) => (
|
|
||||||
<Link
|
|
||||||
className="item-detail-cast-card"
|
|
||||||
key={person.Id}
|
|
||||||
to="/item/$id"
|
|
||||||
params={{ id: person.Id ?? "" }}
|
|
||||||
search={{ type: "Person" }}
|
|
||||||
>
|
|
||||||
{person.PrimaryImageTag ? (
|
|
||||||
<img
|
|
||||||
alt={person.Name ?? ""}
|
|
||||||
src={
|
|
||||||
api &&
|
|
||||||
getImageUrlsApi(api).getItemImageUrlById(
|
|
||||||
person.Id ?? "",
|
|
||||||
"Primary",
|
|
||||||
{
|
|
||||||
quality: 80,
|
|
||||||
fillWidth: 200,
|
|
||||||
fillHeight: 200,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
||||||
className="item-detail-cast-card-image"
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<div className="item-detail-cast-card-icon">
|
|
||||||
{getTypeIcon("Person")}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<div className="item-detail-cast-card-text">
|
|
||||||
<Typography variant="subtitle1">{person.Name}</Typography>
|
|
||||||
<Typography variant="subtitle2" style={{ opacity: 0.5 }}>
|
|
||||||
{person.Role}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
</Link>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
),
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default CastAndCrew;
|
|
||||||
@@ -1,146 +0,0 @@
|
|||||||
import {
|
|
||||||
type BaseItemDto,
|
|
||||||
BaseItemKind,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import { motion } from "motion/react";
|
|
||||||
import React, { type ReactNode, useEffect, useRef } from "react";
|
|
||||||
import LikeButton from "@/components/buttons/likeButton";
|
|
||||||
import MarkPlayedButton from "@/components/buttons/markPlayedButton";
|
|
||||||
import TrailerButton from "@/components/buttons/trailerButton";
|
|
||||||
import IconLink from "@/components/iconLink";
|
|
||||||
import ItemHeader from "@/components/itemHeader";
|
|
||||||
import ShowMoreText from "@/components/showMoreText";
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
|
||||||
import { useBackdropStore } from "@/utils/store/backdrop";
|
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
|
||||||
import type MediaQualityInfo from "@/utils/types/mediaQualityInfo";
|
|
||||||
|
|
||||||
import "./itemDetail.scss";
|
|
||||||
|
|
||||||
export const ExternalLinks = ({ item }: { item: BaseItemDto }) => (
|
|
||||||
<div className="item-detail-external-links">
|
|
||||||
{item.ExternalUrls?.map(
|
|
||||||
(url) =>
|
|
||||||
url.Url &&
|
|
||||||
url.Name && <IconLink key={url.Url} url={url.Url} name={url.Name} />,
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
const getDefaultBackdropHash = (item: BaseItemDto) => {
|
|
||||||
const tag =
|
|
||||||
item.Type === BaseItemKind.Episode
|
|
||||||
? item.ParentBackdropImageTags?.[0]
|
|
||||||
: item.BackdropImageTags?.[0];
|
|
||||||
return (tag && item.ImageBlurHashes?.Backdrop?.[tag]) || "";
|
|
||||||
};
|
|
||||||
|
|
||||||
type ItemDetailLayoutProps = {
|
|
||||||
item: BaseItemDto;
|
|
||||||
/** CSS modifier, rendered as `item-<variant>`. */
|
|
||||||
variant: "default" | "episode" | "series" | "boxset" | "person";
|
|
||||||
mediaQualityInfo?: MediaQualityInfo;
|
|
||||||
backdropSrc?: string | null;
|
|
||||||
/** Blurhash for the app backdrop; defaults to the item's (or an episode's series) backdrop. */
|
|
||||||
backdropHash?: string;
|
|
||||||
/** Play button area; omitted for items that can't be played (people). */
|
|
||||||
playButton?: ReactNode;
|
|
||||||
showTrailer?: boolean;
|
|
||||||
showMarkPlayed?: boolean;
|
|
||||||
/** Extra content under the overview in the main column. */
|
|
||||||
main?: ReactNode;
|
|
||||||
/** Right-hand column next to the overview. */
|
|
||||||
aside?: ReactNode;
|
|
||||||
/** Sections rendered below the overview. */
|
|
||||||
children?: ReactNode;
|
|
||||||
};
|
|
||||||
|
|
||||||
const ItemDetailLayout = ({
|
|
||||||
item,
|
|
||||||
variant,
|
|
||||||
mediaQualityInfo,
|
|
||||||
backdropSrc,
|
|
||||||
backdropHash,
|
|
||||||
playButton,
|
|
||||||
showTrailer = true,
|
|
||||||
showMarkPlayed = true,
|
|
||||||
main,
|
|
||||||
aside,
|
|
||||||
children,
|
|
||||||
}: ItemDetailLayoutProps) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const containerRef = useRef<HTMLDivElement | null>(null);
|
|
||||||
const queryKey = ["item", item.Id ?? ""];
|
|
||||||
|
|
||||||
const setBackdrop = useBackdropStore((s) => s.setBackdrop);
|
|
||||||
const hash = backdropHash ?? getDefaultBackdropHash(item);
|
|
||||||
useEffect(() => {
|
|
||||||
setBackdrop(hash);
|
|
||||||
}, [hash, setBackdrop]);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<motion.div
|
|
||||||
key={item.Id}
|
|
||||||
initial={{ opacity: 0 }}
|
|
||||||
animate={{ opacity: 1 }}
|
|
||||||
transition={{ duration: 0.3, ease: "easeInOut" }}
|
|
||||||
className={`scrollY padded-top flex flex-column item item-detail-page item-${variant}`}
|
|
||||||
ref={containerRef}
|
|
||||||
>
|
|
||||||
<ItemHeader
|
|
||||||
item={item}
|
|
||||||
api={api}
|
|
||||||
mediaQualityInfo={mediaQualityInfo}
|
|
||||||
scrollTargetRef={containerRef}
|
|
||||||
backdropSrc={backdropSrc}
|
|
||||||
>
|
|
||||||
<div className="item-hero-buttons-container">
|
|
||||||
<div className="flex flex-row" style={{ width: "100%" }}>
|
|
||||||
{playButton}
|
|
||||||
</div>
|
|
||||||
<div className="flex flex-row" style={{ gap: "1em" }}>
|
|
||||||
{showTrailer && item.RemoteTrailers && (
|
|
||||||
<TrailerButton
|
|
||||||
trailerItem={item.RemoteTrailers}
|
|
||||||
disabled={item.RemoteTrailers.length === 0}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<LikeButton
|
|
||||||
itemName={item.Name}
|
|
||||||
itemId={item.Id}
|
|
||||||
queryKey={queryKey}
|
|
||||||
isFavorite={item.UserData?.IsFavorite}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
{showMarkPlayed && (
|
|
||||||
<MarkPlayedButton
|
|
||||||
itemName={item.Name}
|
|
||||||
itemId={item.Id}
|
|
||||||
queryKey={queryKey}
|
|
||||||
isPlayed={item.UserData?.Played}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ItemHeader>
|
|
||||||
<div className={aside ? "item-detail" : "item-detail single"}>
|
|
||||||
<div className="fullWidth">
|
|
||||||
{(item.Taglines?.length ?? 0) > 0 && (
|
|
||||||
<Typography variant="h5" sx={{ mb: 2, fontWeight: 300 }}>
|
|
||||||
{item.Taglines?.[0]}
|
|
||||||
</Typography>
|
|
||||||
)}
|
|
||||||
<ShowMoreText content={item.Overview ?? ""} collapsedLines={4} />
|
|
||||||
{main}
|
|
||||||
</div>
|
|
||||||
{aside && <div className="fullWidth">{aside}</div>}
|
|
||||||
</div>
|
|
||||||
{children}
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default ItemDetailLayout;
|
|
||||||
@@ -1,172 +0,0 @@
|
|||||||
import {
|
|
||||||
type BaseItemDto,
|
|
||||||
type MediaStream,
|
|
||||||
MediaStreamType,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
|
||||||
import TextField from "@mui/material/TextField";
|
|
||||||
import React, { useMemo, useState } from "react";
|
|
||||||
import type MediaQualityInfo from "@/utils/types/mediaQualityInfo";
|
|
||||||
|
|
||||||
const titleIncludes = (stream: MediaStream, ...needles: string[]) => {
|
|
||||||
const title = stream.DisplayTitle?.toLocaleLowerCase();
|
|
||||||
return needles.some((needle) => title?.includes(needle));
|
|
||||||
};
|
|
||||||
|
|
||||||
const getMediaQualityInfo = (
|
|
||||||
videoTracks: MediaStream[],
|
|
||||||
audioTracks: MediaStream[],
|
|
||||||
): MediaQualityInfo => ({
|
|
||||||
isAtmos: audioTracks.some((a) => titleIncludes(a, "atmos")),
|
|
||||||
isDolbyVision: videoTracks.some(
|
|
||||||
(v) =>
|
|
||||||
titleIncludes(v, "dv", "dolby vision") ||
|
|
||||||
!!v.VideoDoViTitle ||
|
|
||||||
v.VideoRangeType === "DOVI",
|
|
||||||
),
|
|
||||||
isDts: audioTracks.some(
|
|
||||||
(a) =>
|
|
||||||
titleIncludes(a, "dts") && !titleIncludes(a, "dts-hd ma", "dts-hd.ma"),
|
|
||||||
),
|
|
||||||
isDtsHDMA: audioTracks.some((a) =>
|
|
||||||
titleIncludes(a, "dts-hd ma", "dts-hd.ma"),
|
|
||||||
),
|
|
||||||
isDD: audioTracks.some(
|
|
||||||
(a) =>
|
|
||||||
(titleIncludes(a, "dd") && !titleIncludes(a, "ddp")) ||
|
|
||||||
(titleIncludes(a, "dolby digital") &&
|
|
||||||
!titleIncludes(a, "dolby digital+")),
|
|
||||||
),
|
|
||||||
isDDP: audioTracks.some((a) => titleIncludes(a, "ddp", "dolby digital+")),
|
|
||||||
isUHD: videoTracks.some((v) => titleIncludes(v, "4k", "2160p", "uhd")),
|
|
||||||
isHD: videoTracks.some(
|
|
||||||
(v) =>
|
|
||||||
(titleIncludes(v, "hd") && !titleIncludes(v, "hdr")) ||
|
|
||||||
titleIncludes(v, "1080p", "fhd"),
|
|
||||||
),
|
|
||||||
isSD: videoTracks.some(
|
|
||||||
(v) =>
|
|
||||||
(titleIncludes(v, "sd") && !titleIncludes(v, "sdr")) ||
|
|
||||||
titleIncludes(v, "720p"),
|
|
||||||
),
|
|
||||||
isSDR: videoTracks.some((v) => v.VideoRangeType === "SDR"),
|
|
||||||
isHDR: videoTracks.some(
|
|
||||||
(v) => v.VideoRange === "HDR" || titleIncludes(v, "dv"),
|
|
||||||
),
|
|
||||||
isHDR10: videoTracks.some(
|
|
||||||
(v) => v.VideoRangeType === "HDR10" && !titleIncludes(v, "hdr10+"),
|
|
||||||
),
|
|
||||||
isHDR10Plus: videoTracks.some(
|
|
||||||
(v) => v.VideoRangeType === "HDR10Plus" || titleIncludes(v, "hdr10+"),
|
|
||||||
),
|
|
||||||
isTrueHD: audioTracks.some((a) => titleIncludes(a, "truehd")),
|
|
||||||
isIMAX: videoTracks.some((v) => titleIncludes(v, "imax")),
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Splits an item's media streams into tracks, tracks the user's track selection
|
|
||||||
* (reset whenever the item changes) and derives the media quality badges.
|
|
||||||
*/
|
|
||||||
export const useMediaTracks = (item: BaseItemDto) => {
|
|
||||||
const tracks = useMemo(() => {
|
|
||||||
const streams = item.MediaStreams ?? [];
|
|
||||||
return {
|
|
||||||
video: streams.filter((s) => s.Type === MediaStreamType.Video),
|
|
||||||
audio: streams.filter((s) => s.Type === MediaStreamType.Audio),
|
|
||||||
subtitle: streams.filter((s) => s.Type === MediaStreamType.Subtitle),
|
|
||||||
};
|
|
||||||
}, [item.MediaStreams]);
|
|
||||||
|
|
||||||
const defaults = {
|
|
||||||
itemId: item.Id,
|
|
||||||
video:
|
|
||||||
tracks.video.find((track) => track.IsDefault)?.Index ??
|
|
||||||
tracks.video[0]?.Index ??
|
|
||||||
0,
|
|
||||||
audio: item.MediaSources?.[0]?.DefaultAudioStreamIndex ?? 0,
|
|
||||||
subtitle: item.MediaSources?.[0]?.DefaultSubtitleStreamIndex ?? -1,
|
|
||||||
};
|
|
||||||
const [selection, setSelection] = useState(defaults);
|
|
||||||
if (selection.itemId !== item.Id) {
|
|
||||||
setSelection(defaults);
|
|
||||||
}
|
|
||||||
|
|
||||||
const mediaQualityInfo = useMemo(
|
|
||||||
() => getMediaQualityInfo(tracks.video, tracks.audio),
|
|
||||||
[tracks],
|
|
||||||
);
|
|
||||||
|
|
||||||
return {
|
|
||||||
tracks,
|
|
||||||
selection,
|
|
||||||
setSelection: (patch: Partial<Omit<typeof defaults, "itemId">>) =>
|
|
||||||
setSelection((prev) => ({ ...prev, ...patch })),
|
|
||||||
mediaQualityInfo,
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
type TrackSelectorsProps = Pick<
|
|
||||||
ReturnType<typeof useMediaTracks>,
|
|
||||||
"tracks" | "selection" | "setSelection"
|
|
||||||
>;
|
|
||||||
|
|
||||||
export const TrackSelectors = ({
|
|
||||||
tracks,
|
|
||||||
selection,
|
|
||||||
setSelection,
|
|
||||||
}: TrackSelectorsProps) => (
|
|
||||||
<>
|
|
||||||
{tracks.video.length > 0 && (
|
|
||||||
<TextField
|
|
||||||
label="Video"
|
|
||||||
select
|
|
||||||
style={{ width: "100%", marginBottom: "1em" }}
|
|
||||||
value={selection.video}
|
|
||||||
variant="filled"
|
|
||||||
onChange={(e) => setSelection({ video: Number(e.target.value) })}
|
|
||||||
>
|
|
||||||
{tracks.video.map((track) => (
|
|
||||||
<MenuItem key={track.Index} value={track.Index}>
|
|
||||||
{track.DisplayTitle}
|
|
||||||
</MenuItem>
|
|
||||||
))}
|
|
||||||
</TextField>
|
|
||||||
)}
|
|
||||||
{tracks.audio.length > 0 && (
|
|
||||||
<TextField
|
|
||||||
label="Audio"
|
|
||||||
select
|
|
||||||
style={{ width: "100%", marginBottom: "1em" }}
|
|
||||||
value={selection.audio}
|
|
||||||
variant="filled"
|
|
||||||
onChange={(e) => setSelection({ audio: Number(e.target.value) })}
|
|
||||||
>
|
|
||||||
{tracks.audio.map((track) => (
|
|
||||||
<MenuItem key={track.Index} value={track.Index}>
|
|
||||||
{track.DisplayTitle}
|
|
||||||
</MenuItem>
|
|
||||||
))}
|
|
||||||
</TextField>
|
|
||||||
)}
|
|
||||||
{tracks.subtitle.length > 0 && (
|
|
||||||
<TextField
|
|
||||||
label="Subtitle"
|
|
||||||
select
|
|
||||||
style={{ width: "100%" }}
|
|
||||||
value={selection.subtitle}
|
|
||||||
variant="filled"
|
|
||||||
slotProps={{ select: { MenuProps: { disablePortal: true } } }}
|
|
||||||
onChange={(e) => setSelection({ subtitle: Number(e.target.value) })}
|
|
||||||
>
|
|
||||||
<MenuItem key={-1} value={-1}>
|
|
||||||
No Subtitle
|
|
||||||
</MenuItem>
|
|
||||||
{tracks.subtitle.map((track) => (
|
|
||||||
<MenuItem key={track.Index} value={track.Index}>
|
|
||||||
{track.DisplayTitle}
|
|
||||||
</MenuItem>
|
|
||||||
))}
|
|
||||||
</TextField>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
);
|
|
||||||
@@ -1,67 +0,0 @@
|
|||||||
import {
|
|
||||||
type BaseItemDto,
|
|
||||||
BaseItemKind,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
|
||||||
import React from "react";
|
|
||||||
import { Card } from "@/components/card/card";
|
|
||||||
import CardScroller from "@/components/cardScroller/cardScroller";
|
|
||||||
import { getSimilarItemsQueryOptions } from "@/utils/queries/itemDetail";
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
|
||||||
|
|
||||||
export const getItemCardTitle = (item: BaseItemDto) =>
|
|
||||||
item.Type === BaseItemKind.Episode ? item.SeriesName : item.Name;
|
|
||||||
|
|
||||||
export const getItemCardCaption = (item: BaseItemDto) => {
|
|
||||||
if (item.Type === BaseItemKind.Episode) {
|
|
||||||
return `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`;
|
|
||||||
}
|
|
||||||
if (item.Type === BaseItemKind.Series) {
|
|
||||||
const end = item.EndDate
|
|
||||||
? new Date(item.EndDate).toLocaleString([], { year: "numeric" })
|
|
||||||
: "Present";
|
|
||||||
return `${item.ProductionYear} - ${end}`;
|
|
||||||
}
|
|
||||||
return item.ProductionYear;
|
|
||||||
};
|
|
||||||
|
|
||||||
const SimilarItems = ({ item }: { item: BaseItemDto }) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const id = item.Id ?? "";
|
|
||||||
const similarItems = useQuery(
|
|
||||||
getSimilarItemsQueryOptions(api, user?.Id, id, item.Type),
|
|
||||||
);
|
|
||||||
|
|
||||||
if (!similarItems.data?.TotalRecordCount) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CardScroller
|
|
||||||
title="You might also like"
|
|
||||||
displayCards={7}
|
|
||||||
disableDecoration
|
|
||||||
>
|
|
||||||
{similarItems.data.Items?.map((similar) => (
|
|
||||||
<Card
|
|
||||||
key={similar.Id}
|
|
||||||
item={similar}
|
|
||||||
seriesId={similar.SeriesId}
|
|
||||||
cardTitle={getItemCardTitle(similar)}
|
|
||||||
imageType="Primary"
|
|
||||||
cardCaption={getItemCardCaption(similar)}
|
|
||||||
cardType={
|
|
||||||
similar.Type === BaseItemKind.MusicAlbum ||
|
|
||||||
similar.Type === BaseItemKind.Audio
|
|
||||||
? "square"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={["item", id, "similarItem"]}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</CardScroller>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SimilarItems;
|
|
||||||
@@ -1,58 +0,0 @@
|
|||||||
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
|
||||||
import React from "react";
|
|
||||||
import PlayButton from "@/components/buttons/playButton";
|
|
||||||
import { Card } from "@/components/card/card";
|
|
||||||
import CardScroller from "@/components/cardScroller/cardScroller";
|
|
||||||
import { getCollectionItemsQueryOptions } from "@/utils/queries/itemDetail";
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
|
||||||
import ItemDetailLayout, { ExternalLinks } from "../itemDetailLayout";
|
|
||||||
import SimilarItems, { getItemCardTitle } from "../similarItems";
|
|
||||||
|
|
||||||
const BoxSetView = ({ item }: { item: BaseItemDto }) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const id = item.Id ?? "";
|
|
||||||
const collectionItems = useQuery(
|
|
||||||
getCollectionItemsQueryOptions(api, user?.Id, id),
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ItemDetailLayout
|
|
||||||
item={item}
|
|
||||||
variant="boxset"
|
|
||||||
showTrailer={false}
|
|
||||||
playButton={
|
|
||||||
<PlayButton
|
|
||||||
item={item}
|
|
||||||
itemType={item.Type ?? "BoxSet"}
|
|
||||||
userId={user?.Id}
|
|
||||||
buttonProps={{ fullWidth: true }}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
aside={<ExternalLinks item={item} />}
|
|
||||||
>
|
|
||||||
{(collectionItems.data?.TotalRecordCount ?? 0) > 0 && (
|
|
||||||
<CardScroller title="" displayCards={7} disableDecoration>
|
|
||||||
{collectionItems.data?.Items?.map((collectionItem) => (
|
|
||||||
<Card
|
|
||||||
key={collectionItem.Id}
|
|
||||||
item={collectionItem}
|
|
||||||
seriesId={collectionItem.SeriesId}
|
|
||||||
cardTitle={getItemCardTitle(collectionItem)}
|
|
||||||
imageType="Primary"
|
|
||||||
cardCaption={collectionItem.ProductionYear}
|
|
||||||
cardType="portrait"
|
|
||||||
queryKey={["item", id]}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</CardScroller>
|
|
||||||
)}
|
|
||||||
<SimilarItems item={item} />
|
|
||||||
</ItemDetailLayout>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default BoxSetView;
|
|
||||||
@@ -1,90 +0,0 @@
|
|||||||
import {
|
|
||||||
type BaseItemDto,
|
|
||||||
BaseItemKind,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
|
||||||
import React from "react";
|
|
||||||
import PlayButton from "@/components/buttons/playButton";
|
|
||||||
import { Card } from "@/components/card/card";
|
|
||||||
import CardScroller from "@/components/cardScroller/cardScroller";
|
|
||||||
import { getUpcomingEpisodesQueryOptions } from "@/utils/queries/itemDetail";
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
|
||||||
import CastAndCrew from "../castAndCrew";
|
|
||||||
import ItemDetailLayout, { ExternalLinks } from "../itemDetailLayout";
|
|
||||||
import { TrackSelectors, useMediaTracks } from "../mediaTracks";
|
|
||||||
import SimilarItems from "../similarItems";
|
|
||||||
|
|
||||||
const UpcomingEpisodes = ({ episode }: { episode: BaseItemDto }) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const options = getUpcomingEpisodesQueryOptions(api, user?.Id, episode);
|
|
||||||
const upcomingEpisodes = useQuery(options);
|
|
||||||
|
|
||||||
if (!upcomingEpisodes.data?.Items?.length) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<CardScroller title="Upcoming Episodes" displayCards={4} disableDecoration>
|
|
||||||
{upcomingEpisodes.data.Items.map((upcoming) => (
|
|
||||||
<Card
|
|
||||||
key={upcoming.Id}
|
|
||||||
item={upcoming}
|
|
||||||
cardTitle={upcoming.SeriesName}
|
|
||||||
imageType="Primary"
|
|
||||||
cardCaption={`S${upcoming.ParentIndexNumber}:E${upcoming.IndexNumber} - ${upcoming.Name}`}
|
|
||||||
cardType="thumb"
|
|
||||||
queryKey={options.queryKey as string[]}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</CardScroller>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
/** Movies, episodes, videos and any other playable item. */
|
|
||||||
const DefaultView = ({ item }: { item: BaseItemDto }) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const { tracks, selection, setSelection, mediaQualityInfo } =
|
|
||||||
useMediaTracks(item);
|
|
||||||
const isEpisode = item.Type === BaseItemKind.Episode;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ItemDetailLayout
|
|
||||||
item={item}
|
|
||||||
variant={isEpisode ? "episode" : "default"}
|
|
||||||
mediaQualityInfo={mediaQualityInfo}
|
|
||||||
playButton={
|
|
||||||
<PlayButton
|
|
||||||
item={item}
|
|
||||||
itemType={item.Type ?? "Movie"}
|
|
||||||
audio={item.Type === BaseItemKind.Audio}
|
|
||||||
currentVideoTrack={selection.video}
|
|
||||||
currentAudioTrack={selection.audio}
|
|
||||||
currentSubTrack={selection.subtitle}
|
|
||||||
userId={user?.Id}
|
|
||||||
buttonProps={{ fullWidth: true }}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
aside={
|
|
||||||
<>
|
|
||||||
<TrackSelectors
|
|
||||||
tracks={tracks}
|
|
||||||
selection={selection}
|
|
||||||
setSelection={setSelection}
|
|
||||||
/>
|
|
||||||
<ExternalLinks item={item} />
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<CastAndCrew people={item.People} api={api} />
|
|
||||||
{isEpisode ? (
|
|
||||||
<UpcomingEpisodes episode={item} />
|
|
||||||
) : (
|
|
||||||
<SimilarItems item={item} />
|
|
||||||
)}
|
|
||||||
</ItemDetailLayout>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default DefaultView;
|
|
||||||
@@ -1,145 +0,0 @@
|
|||||||
import {
|
|
||||||
type BaseItemDto,
|
|
||||||
BaseItemKind,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import Divider from "@mui/material/Divider";
|
|
||||||
import Tab from "@mui/material/Tab";
|
|
||||||
import Tabs from "@mui/material/Tabs";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import { useQueries } from "@tanstack/react-query";
|
|
||||||
import { AnimatePresence, motion } from "motion/react";
|
|
||||||
import React, { useState } from "react";
|
|
||||||
import { Card } from "@/components/card/card";
|
|
||||||
import {
|
|
||||||
getPersonItemsQueryOptions,
|
|
||||||
personTabs,
|
|
||||||
} from "@/utils/queries/itemDetail";
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
|
||||||
import ItemDetailLayout, { ExternalLinks } from "../itemDetailLayout";
|
|
||||||
import { getItemCardCaption, getItemCardTitle } from "../similarItems";
|
|
||||||
|
|
||||||
const PersonView = ({ item }: { item: BaseItemDto }) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const id = item.Id ?? "";
|
|
||||||
|
|
||||||
const tabQueries = useQueries({
|
|
||||||
queries: personTabs.map((tab) =>
|
|
||||||
getPersonItemsQueryOptions(api, user?.Id, id, tab),
|
|
||||||
),
|
|
||||||
});
|
|
||||||
|
|
||||||
// Until the user picks a tab, show the first one that has items.
|
|
||||||
const [pickedTab, setPickedTab] = useState<number | null>(null);
|
|
||||||
const allLoaded = tabQueries.every((query) => query.isSuccess);
|
|
||||||
const firstNonEmptyTab = tabQueries.findIndex(
|
|
||||||
(query) => (query.data?.TotalRecordCount ?? 0) > 0,
|
|
||||||
);
|
|
||||||
const activeTab =
|
|
||||||
pickedTab ?? (allLoaded ? Math.max(firstNonEmptyTab, 0) : 0);
|
|
||||||
const [animationDirection, setAnimationDirection] = useState<
|
|
||||||
"forward" | "backwards"
|
|
||||||
>("forward");
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ItemDetailLayout
|
|
||||||
item={item}
|
|
||||||
variant="person"
|
|
||||||
showTrailer={false}
|
|
||||||
showMarkPlayed={false}
|
|
||||||
main={<ExternalLinks item={item} />}
|
|
||||||
aside={
|
|
||||||
<>
|
|
||||||
{item.PremiereDate && (
|
|
||||||
<div>
|
|
||||||
<Typography variant="h6">Birth</Typography>
|
|
||||||
<Typography variant="subtitle1" sx={{ opacity: 0.8 }}>
|
|
||||||
{new Date(item.PremiereDate).toDateString()}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{item.EndDate && (
|
|
||||||
<div>
|
|
||||||
<Typography variant="h6" sx={{ mt: 2 }}>
|
|
||||||
Death
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="subtitle2" sx={{ opacity: 0.8 }}>
|
|
||||||
{new Date(item.EndDate).toDateString()}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div className="item-detail-person-container">
|
|
||||||
<div className="item-detail-person-header">
|
|
||||||
<Tabs
|
|
||||||
variant="scrollable"
|
|
||||||
value={activeTab}
|
|
||||||
onChange={(_, newTab: number) => {
|
|
||||||
setAnimationDirection(
|
|
||||||
newTab > activeTab ? "forward" : "backwards",
|
|
||||||
);
|
|
||||||
setPickedTab(newTab);
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{personTabs.map((tab, index) => (
|
|
||||||
<Tab
|
|
||||||
key={tab.key}
|
|
||||||
label={tab.title}
|
|
||||||
disabled={tabQueries[index].data?.TotalRecordCount === 0}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</Tabs>
|
|
||||||
<Divider />
|
|
||||||
</div>
|
|
||||||
<AnimatePresence>
|
|
||||||
{personTabs.map((tab, index) => {
|
|
||||||
if (index !== activeTab) return null;
|
|
||||||
const query = tabQueries[index];
|
|
||||||
const isWide =
|
|
||||||
tab.kind === BaseItemKind.Photo ||
|
|
||||||
tab.kind === BaseItemKind.Episode;
|
|
||||||
return (
|
|
||||||
<motion.div
|
|
||||||
role="tabpanel"
|
|
||||||
style={{ marginTop: "1em" }}
|
|
||||||
className={`item-detail-person-cards ${isWide ? "col-4" : "col-7"}`}
|
|
||||||
key={tab.key}
|
|
||||||
initial={{
|
|
||||||
opacity: 0,
|
|
||||||
transform:
|
|
||||||
animationDirection === "forward"
|
|
||||||
? "translate(30px)"
|
|
||||||
: "translate(-30px)",
|
|
||||||
}}
|
|
||||||
animate={{ opacity: 1, transform: "translate(0px)" }}
|
|
||||||
transition={{ duration: 0.2, ease: "anticipate" }}
|
|
||||||
>
|
|
||||||
{query.data?.Items?.map((tabItem) => (
|
|
||||||
<Card
|
|
||||||
key={tabItem.Id}
|
|
||||||
item={tabItem}
|
|
||||||
cardTitle={getItemCardTitle(tabItem)}
|
|
||||||
imageType="Primary"
|
|
||||||
cardCaption={getItemCardCaption(tabItem)}
|
|
||||||
cardType={
|
|
||||||
tabItem.Type === BaseItemKind.Episode
|
|
||||||
? "thumb"
|
|
||||||
: "portrait"
|
|
||||||
}
|
|
||||||
queryKey={["item", id, tab.key]}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</motion.div>
|
|
||||||
);
|
|
||||||
})}
|
|
||||||
</AnimatePresence>
|
|
||||||
</div>
|
|
||||||
</ItemDetailLayout>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default PersonView;
|
|
||||||
@@ -1,367 +0,0 @@
|
|||||||
import {
|
|
||||||
type BaseItemDto,
|
|
||||||
BaseItemKind,
|
|
||||||
ItemFields,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
|
||||||
import { getShowApi } from "@jellyfin/sdk/lib/utils/api/show-api";
|
|
||||||
import Chip from "@mui/material/Chip";
|
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
|
||||||
import Divider from "@mui/material/Divider";
|
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
|
||||||
import TextField from "@mui/material/TextField";
|
|
||||||
import Typography from "@mui/material/Typography";
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
|
||||||
import { useNavigate } from "@tanstack/react-router";
|
|
||||||
import { motion } from "motion/react";
|
|
||||||
import React from "react";
|
|
||||||
import LikeButton from "@/components/buttons/likeButton";
|
|
||||||
import MarkPlayedButton from "@/components/buttons/markPlayedButton";
|
|
||||||
import PlayButton from "@/components/buttons/playButton";
|
|
||||||
import { Card } from "@/components/card/card";
|
|
||||||
import CardScroller from "@/components/cardScroller/cardScroller";
|
|
||||||
import EpisodeSkeleton from "@/components/skeleton/episode";
|
|
||||||
import { SeasonSelectorSkeleton } from "@/components/skeleton/seasonSelector";
|
|
||||||
import { getRuntimeCompact, getRuntimeMusic } from "@/utils/date/time";
|
|
||||||
import useDefaultSeason from "@/utils/hooks/useDefaultSeason";
|
|
||||||
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
|
||||||
import {
|
|
||||||
getSeasonsQueryOptions,
|
|
||||||
getSpecialFeaturesQueryOptions,
|
|
||||||
} from "@/utils/queries/itemDetail";
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
|
||||||
import CastAndCrew from "../castAndCrew";
|
|
||||||
import ItemDetailLayout, { ExternalLinks } from "../itemDetailLayout";
|
|
||||||
import SimilarItems from "../similarItems";
|
|
||||||
|
|
||||||
const getEpisodeDateString = (date: Date) =>
|
|
||||||
new Intl.DateTimeFormat(navigator.language ?? "en-US", {
|
|
||||||
dateStyle: "full",
|
|
||||||
}).format(date);
|
|
||||||
|
|
||||||
const SeriesView = ({ item }: { item: BaseItemDto }) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const navigate = useNavigate();
|
|
||||||
const id = item.Id ?? "";
|
|
||||||
|
|
||||||
const seasons = useQuery(getSeasonsQueryOptions(api, user?.Id, id));
|
|
||||||
const specialFeatures = useQuery(
|
|
||||||
getSpecialFeaturesQueryOptions(api, user?.Id, id),
|
|
||||||
);
|
|
||||||
|
|
||||||
const [currentSeason, setCurrentSeason] = useDefaultSeason(seasons, id);
|
|
||||||
const currentSeasonId = seasons.data?.Items?.[currentSeason]?.Id;
|
|
||||||
|
|
||||||
const currentSeasonItem = useQuery({
|
|
||||||
queryKey: ["item", id, "season", currentSeason],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api || !currentSeasonId) return null;
|
|
||||||
const result = await getLibraryApi(api).getItem({
|
|
||||||
userId: user?.Id,
|
|
||||||
itemId: currentSeasonId,
|
|
||||||
});
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
enabled: seasons.isSuccess,
|
|
||||||
networkMode: "always",
|
|
||||||
refetchOnWindowFocus: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
const episodes = useQuery({
|
|
||||||
queryKey: ["item", id, "season", currentSeason, "episodes"],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api) return null;
|
|
||||||
const result = await getShowApi(api).getEpisodes({
|
|
||||||
userId: user?.Id,
|
|
||||||
seriesId: id,
|
|
||||||
seasonId: currentSeasonId,
|
|
||||||
fields: [ItemFields.Overview],
|
|
||||||
isMissing: false,
|
|
||||||
});
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
enabled: seasons.isSuccess,
|
|
||||||
networkMode: "always",
|
|
||||||
refetchOnWindowFocus: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Prefer the selected season's backdrop over the series one.
|
|
||||||
const season = currentSeasonItem.data;
|
|
||||||
const backdropOwner = season?.BackdropImageTags?.length ? season : item;
|
|
||||||
const backdropTag = backdropOwner.BackdropImageTags?.[0];
|
|
||||||
const backdropSrc =
|
|
||||||
api && backdropTag
|
|
||||||
? getImageUrlsApi(api).getItemImageUrlById(
|
|
||||||
backdropOwner.Id ?? "",
|
|
||||||
"Backdrop",
|
|
||||||
{ tag: backdropTag },
|
|
||||||
)
|
|
||||||
: undefined;
|
|
||||||
const backdropHash =
|
|
||||||
(backdropTag && backdropOwner.ImageBlurHashes?.Backdrop?.[backdropTag]) ||
|
|
||||||
"";
|
|
||||||
|
|
||||||
return (
|
|
||||||
<ItemDetailLayout
|
|
||||||
item={item}
|
|
||||||
variant="series"
|
|
||||||
backdropSrc={backdropSrc}
|
|
||||||
backdropHash={backdropHash}
|
|
||||||
playButton={
|
|
||||||
<PlayButton
|
|
||||||
item={item}
|
|
||||||
itemType={BaseItemKind.Series}
|
|
||||||
userId={user?.Id}
|
|
||||||
buttonProps={{ fullWidth: true }}
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
main={<ExternalLinks item={item} />}
|
|
||||||
>
|
|
||||||
{seasons.isPending ? (
|
|
||||||
<SeasonSelectorSkeleton />
|
|
||||||
) : (
|
|
||||||
<div className="item-series-seasons-container">
|
|
||||||
<div
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
width: "100%",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
paddingBottom: " 0.5em",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<div style={{ display: "flex", gap: "1em" }}>
|
|
||||||
<Typography variant="h5">
|
|
||||||
{seasons.data?.Items?.[currentSeason]?.Name}
|
|
||||||
</Typography>
|
|
||||||
<Chip
|
|
||||||
label={
|
|
||||||
episodes.isPending ? (
|
|
||||||
<CircularProgress
|
|
||||||
size={20}
|
|
||||||
style={{
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
episodes.data?.TotalRecordCount
|
|
||||||
)
|
|
||||||
}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div style={{ display: "flex", gap: "0.75em" }}>
|
|
||||||
{season && (
|
|
||||||
<>
|
|
||||||
<LikeButton
|
|
||||||
itemId={season.Id}
|
|
||||||
isFavorite={season.UserData?.IsFavorite}
|
|
||||||
queryKey={["item", id]}
|
|
||||||
userId={user?.Id}
|
|
||||||
itemName={season.Name}
|
|
||||||
/>
|
|
||||||
<MarkPlayedButton
|
|
||||||
itemId={season.Id}
|
|
||||||
isPlayed={season.UserData?.Played}
|
|
||||||
queryKey={["item", id]}
|
|
||||||
userId={user?.Id}
|
|
||||||
itemName={season.Name}
|
|
||||||
/>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<TextField
|
|
||||||
value={currentSeason}
|
|
||||||
onChange={(e) => {
|
|
||||||
const seasonIndex = Number(e.target.value);
|
|
||||||
if (Number.isFinite(seasonIndex)) {
|
|
||||||
setCurrentSeason(seasonIndex);
|
|
||||||
sessionStorage.setItem(
|
|
||||||
`season-${id}`,
|
|
||||||
seasonIndex.toString(),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
select
|
|
||||||
slotProps={{
|
|
||||||
select: { MenuProps: { disableScrollLock: true } },
|
|
||||||
}}
|
|
||||||
size="small"
|
|
||||||
>
|
|
||||||
{seasons.data?.Items?.map((seasonItem, index) => (
|
|
||||||
<MenuItem key={seasonItem.Id} value={index}>
|
|
||||||
{seasonItem.Name}
|
|
||||||
</MenuItem>
|
|
||||||
))}
|
|
||||||
</TextField>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<Divider />
|
|
||||||
<div className="item-detail-episode-container">
|
|
||||||
{episodes.isPending ? (
|
|
||||||
<EpisodeSkeleton />
|
|
||||||
) : (
|
|
||||||
episodes.data?.Items?.map((episode) => (
|
|
||||||
<motion.div
|
|
||||||
key={episode.Id}
|
|
||||||
onClick={() =>
|
|
||||||
navigate({
|
|
||||||
to: "/item/$id",
|
|
||||||
params: { id: episode.Id ?? "" },
|
|
||||||
search: { type: BaseItemKind.Episode },
|
|
||||||
})
|
|
||||||
}
|
|
||||||
initial={{ transform: "translateY(10px)", opacity: 0 }}
|
|
||||||
whileInView={{ opacity: 1, transform: "translateY(0px)" }}
|
|
||||||
viewport={{ once: true }}
|
|
||||||
transition={{ duration: 0.2, ease: "backInOut" }}
|
|
||||||
style={{ width: "100%" }}
|
|
||||||
className="item-detail-episode"
|
|
||||||
>
|
|
||||||
<Typography variant="subtitle1" sx={{ textAlign: "center" }}>
|
|
||||||
{episode.IndexNumberEnd
|
|
||||||
? `${episode.IndexNumber} / ${episode.IndexNumberEnd}`
|
|
||||||
: (episode.IndexNumber ?? 0)}
|
|
||||||
</Typography>
|
|
||||||
<div
|
|
||||||
className={
|
|
||||||
episode.UserData?.Played
|
|
||||||
? "item-detail-episode-image-container watched"
|
|
||||||
: "item-detail-episode-image-container"
|
|
||||||
}
|
|
||||||
>
|
|
||||||
<div className="item-detail-episode-image-overlay">
|
|
||||||
<PlayButton
|
|
||||||
item={episode}
|
|
||||||
itemType={BaseItemKind.Episode}
|
|
||||||
userId={user?.Id}
|
|
||||||
size="medium"
|
|
||||||
buttonProps={{
|
|
||||||
//@ts-expect-error
|
|
||||||
color: "white",
|
|
||||||
style: { color: "black " },
|
|
||||||
}}
|
|
||||||
iconOnly
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
<div className="item-detail-episode-image-icon-container">
|
|
||||||
<span className="material-symbols-rounded item-detail-episode-image-icon">
|
|
||||||
tv_gen
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<img
|
|
||||||
alt={episode.Name ?? ""}
|
|
||||||
src={
|
|
||||||
api &&
|
|
||||||
getImageUrlsApi(api).getItemImageUrlById(
|
|
||||||
episode.Id ?? "",
|
|
||||||
"Primary",
|
|
||||||
{ tag: episode.ImageTags?.Primary, fillHeight: 300 },
|
|
||||||
)
|
|
||||||
}
|
|
||||||
className="item-detail-episode-image"
|
|
||||||
onLoad={(e) => {
|
|
||||||
e.currentTarget.style.opacity = "1";
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
{(episode.UserData?.PlaybackPositionTicks ?? 0) > 0 && (
|
|
||||||
<div className="card-progress-container">
|
|
||||||
<div
|
|
||||||
className="card-progress"
|
|
||||||
style={{
|
|
||||||
width: `${episode.UserData?.PlayedPercentage}%`,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
<div className="item-detail-episode-info">
|
|
||||||
<Typography variant="subtitle1">{episode.Name}</Typography>
|
|
||||||
<div
|
|
||||||
className="flex flex-row flex-align-center"
|
|
||||||
style={{ gap: "0.5em" }}
|
|
||||||
>
|
|
||||||
{episode.PremiereDate && (
|
|
||||||
<Chip
|
|
||||||
variant="filled"
|
|
||||||
label={getEpisodeDateString(
|
|
||||||
new Date(episode.PremiereDate),
|
|
||||||
)}
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
<Typography variant="caption">
|
|
||||||
{getRuntimeCompact(episode.RunTimeTicks ?? 0)}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
<Typography
|
|
||||||
variant="caption"
|
|
||||||
style={{
|
|
||||||
display: "-webkit-box",
|
|
||||||
textOverflow: "ellipsis",
|
|
||||||
overflow: "hidden",
|
|
||||||
WebkitLineClamp: 2,
|
|
||||||
WebkitBoxOrient: "vertical",
|
|
||||||
width: "100%",
|
|
||||||
opacity: 0.7,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{episode.Overview}
|
|
||||||
</Typography>
|
|
||||||
</div>
|
|
||||||
<div
|
|
||||||
className="item-detail-episode-buttons"
|
|
||||||
onClick={(e) => e.stopPropagation()}
|
|
||||||
>
|
|
||||||
<LikeButton
|
|
||||||
itemId={episode.Id}
|
|
||||||
itemName={episode.Name}
|
|
||||||
isFavorite={episode.UserData?.IsFavorite}
|
|
||||||
queryKey={["item", id]}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
<MarkPlayedButton
|
|
||||||
itemId={episode.Id}
|
|
||||||
itemName={episode.Name}
|
|
||||||
isPlayed={episode.UserData?.Played}
|
|
||||||
queryKey={["item", id]}
|
|
||||||
userId={user?.Id}
|
|
||||||
/>
|
|
||||||
</div>
|
|
||||||
</motion.div>
|
|
||||||
))
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
<CastAndCrew people={item.People} api={api} />
|
|
||||||
{(specialFeatures.data?.length ?? 0) > 0 && (
|
|
||||||
<CardScroller
|
|
||||||
title="Special Features"
|
|
||||||
displayCards={7}
|
|
||||||
disableDecoration
|
|
||||||
>
|
|
||||||
{specialFeatures.data?.map((special) => (
|
|
||||||
<Card
|
|
||||||
key={special.Id}
|
|
||||||
item={special}
|
|
||||||
seriesId={special.SeriesId}
|
|
||||||
cardTitle={special.Name}
|
|
||||||
imageType="Primary"
|
|
||||||
cardCaption={getRuntimeMusic(special.RunTimeTicks ?? 0)}
|
|
||||||
cardType="portrait"
|
|
||||||
queryKey={["item", id, "similarItem"]}
|
|
||||||
userId={user?.Id}
|
|
||||||
onClick={() => {}}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</CardScroller>
|
|
||||||
)}
|
|
||||||
<SimilarItems item={item} />
|
|
||||||
</ItemDetailLayout>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
export default SeriesView;
|
|
||||||
@@ -63,34 +63,29 @@ const ItemHeader = ({
|
|||||||
const logoId =
|
const logoId =
|
||||||
isEpisode && parentLogoImageTag ? (item.SeriesId ?? item.Id) : item.Id;
|
isEpisode && parentLogoImageTag ? (item.SeriesId ?? item.Id) : item.Id;
|
||||||
|
|
||||||
const logo = logoTag ? (
|
const logo =
|
||||||
<img
|
logoTag ? (
|
||||||
alt={item.Name ?? ""}
|
<img
|
||||||
src={
|
alt={item.Name ?? ""}
|
||||||
api &&
|
src={
|
||||||
getImageUrlsApi(api).getItemImageUrlById(logoId ?? "", "Logo", {
|
api &&
|
||||||
quality: 90,
|
getImageUrlsApi(api).getItemImageUrlById(logoId ?? "", "Logo", {
|
||||||
fillWidth: 592,
|
quality: 90,
|
||||||
fillHeight: 592,
|
fillWidth: 592,
|
||||||
tag: logoTag,
|
fillHeight: 592,
|
||||||
})
|
tag: logoTag,
|
||||||
}
|
})
|
||||||
onLoad={(e) => {
|
}
|
||||||
e.currentTarget.style.opacity = "1";
|
onLoad={(e) => {
|
||||||
}}
|
e.currentTarget.style.opacity = "1";
|
||||||
className="item-hero-logo"
|
}}
|
||||||
/>
|
className="item-hero-logo"
|
||||||
) : (
|
/>
|
||||||
<Typography
|
) : (
|
||||||
variant="h2"
|
<Typography mb={2} fontWeight={200} variant="h2">
|
||||||
sx={{
|
{isEpisode ? item.SeriesName : item.Name}
|
||||||
mb: 2,
|
</Typography>
|
||||||
fontWeight: 200,
|
);
|
||||||
}}
|
|
||||||
>
|
|
||||||
{isEpisode ? item.SeriesName : item.Name}
|
|
||||||
</Typography>
|
|
||||||
);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="item-hero">
|
<div className="item-hero">
|
||||||
@@ -156,9 +151,8 @@ const ItemHeader = ({
|
|||||||
<div className="item-hero-detail flex flex-column">
|
<div className="item-hero-detail flex flex-column">
|
||||||
{isEpisode && logoId ? (
|
{isEpisode && logoId ? (
|
||||||
<Link
|
<Link
|
||||||
to="/item/$id"
|
to="/series/$id"
|
||||||
params={{ id: logoId }}
|
params={{ id: logoId }}
|
||||||
search={{ type: "Series" }}
|
|
||||||
style={{
|
style={{
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
color: "inherit",
|
color: "inherit",
|
||||||
@@ -171,13 +165,7 @@ const ItemHeader = ({
|
|||||||
logo
|
logo
|
||||||
)}
|
)}
|
||||||
{isEpisode && (
|
{isEpisode && (
|
||||||
<Typography
|
<Typography mb={2} fontWeight={200} variant="h4">
|
||||||
variant="h4"
|
|
||||||
sx={{
|
|
||||||
mb: 2,
|
|
||||||
fontWeight: 200,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{item.ParentIndexNumber !== undefined &&
|
{item.ParentIndexNumber !== undefined &&
|
||||||
item.IndexNumber !== undefined
|
item.IndexNumber !== undefined
|
||||||
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - `
|
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - `
|
||||||
@@ -187,11 +175,9 @@ const ItemHeader = ({
|
|||||||
)}
|
)}
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
sx={{
|
gap={2}
|
||||||
gap: 2,
|
justifyItems="flex-start"
|
||||||
justifyItems: "flex-start",
|
alignItems="center"
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{mediaQualityInfo?.isUHD && (
|
{mediaQualityInfo?.isUHD && (
|
||||||
<img
|
<img
|
||||||
@@ -313,11 +299,9 @@ const ItemHeader = ({
|
|||||||
{mediaQualityInfo && (
|
{mediaQualityInfo && (
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
sx={{
|
gap={2}
|
||||||
gap: 2,
|
justifyItems="flex-start"
|
||||||
justifyItems: "flex-start",
|
alignItems="center"
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{mediaQualityInfo?.isHDR10Plus && (
|
{mediaQualityInfo?.isHDR10Plus && (
|
||||||
<img
|
<img
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import React from "react";
|
|||||||
|
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -30,7 +30,7 @@ export const ArtistAlbum = ({ user, album, boxProps }: ArtistAlbumProps) => {
|
|||||||
queryKey: ["artist", "album", album.Id],
|
queryKey: ["artist", "album", album.Id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
parentId: album.Id,
|
parentId: album.Id,
|
||||||
sortOrder: [SortOrder.Ascending],
|
sortOrder: [SortOrder.Ascending],
|
||||||
@@ -91,15 +91,13 @@ export const ArtistAlbum = ({ user, album, boxProps }: ArtistAlbumProps) => {
|
|||||||
<div className="flex flex-column">
|
<div className="flex flex-column">
|
||||||
<Typography
|
<Typography
|
||||||
variant="h5"
|
variant="h5"
|
||||||
|
fontWeight={300}
|
||||||
style={{ opacity: "0.6" }}
|
style={{ opacity: "0.6" }}
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{album.ProductionYear}
|
{album.ProductionYear}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Link
|
<Link
|
||||||
to="/music/album/$id"
|
to="/album/$id"
|
||||||
params={{ id: album.Id ?? "" }}
|
params={{ id: album.Id ?? "" }}
|
||||||
style={{ color: "white", textDecoration: "none" }}
|
style={{ color: "white", textDecoration: "none" }}
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -10,21 +10,32 @@ import {
|
|||||||
type BaseItemDto,
|
type BaseItemDto,
|
||||||
BaseItemKind,
|
BaseItemKind,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryLatestQueryOptions } from "@/utils/queries/items";
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Latest Media Section
|
* @description Latest Media Section
|
||||||
*/
|
*/
|
||||||
export const LatestMediaSection = ({
|
export const LatestMediaSection = ({
|
||||||
latestMediaLib,
|
latestMediaLib,
|
||||||
}: {
|
}: { latestMediaLib: BaseItemDto }) => {
|
||||||
latestMediaLib: BaseItemDto;
|
|
||||||
}) => {
|
|
||||||
const api = useApiInContext((s) => s.api);
|
const api = useApiInContext((s) => s.api);
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
const user = useCentralStore((s) => s.currentUser);
|
||||||
const data = useQuery(
|
const fetchLatestMedia = async (library: BaseItemDto) => {
|
||||||
getLibraryLatestQueryOptions(api, user?.Id, latestMediaLib.Id),
|
if (!api || !user?.Id) return null;
|
||||||
);
|
const media = await getUserLibraryApi(api).getLatestMedia({
|
||||||
|
userId: user.Id,
|
||||||
|
parentId: library.Id,
|
||||||
|
limit: 16,
|
||||||
|
fields: ["PrimaryImageAspectRatio", "ParentId"],
|
||||||
|
});
|
||||||
|
return media.data;
|
||||||
|
};
|
||||||
|
const data = useQuery({
|
||||||
|
queryKey: ["home", "latestMedia", latestMediaLib.Id],
|
||||||
|
queryFn: () => fetchLatestMedia(latestMediaLib),
|
||||||
|
enabled: !!user?.Id,
|
||||||
|
refetchOnMount: true,
|
||||||
|
});
|
||||||
if (data.isPending) {
|
if (data.isPending) {
|
||||||
return <CardsSkeleton />;
|
return <CardsSkeleton />;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
import type { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { ItemSortBy, SortOrder } from "@jellyfin/sdk/lib/generated-client";
|
import { ItemSortBy, SortOrder } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import {
|
import {
|
||||||
AppBar,
|
AppBar,
|
||||||
Chip,
|
Chip,
|
||||||
@@ -182,7 +182,7 @@ export const LibraryHeader = () => {
|
|||||||
await queryClient.prefetchQuery({
|
await queryClient.prefetchQuery({
|
||||||
queryKey: key,
|
queryKey: key,
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user.Id!,
|
userId: user.Id!,
|
||||||
parentId: currentLibraryId,
|
parentId: currentLibraryId,
|
||||||
recursive: true,
|
recursive: true,
|
||||||
@@ -304,10 +304,10 @@ export const LibraryHeader = () => {
|
|||||||
size="small"
|
size="small"
|
||||||
value={String(normalizedViewType)}
|
value={String(normalizedViewType)}
|
||||||
onChange={handleChangeViewType}
|
onChange={handleChangeViewType}
|
||||||
slotProps={{
|
SelectProps={{
|
||||||
select: {
|
MenuProps: {
|
||||||
MenuProps: {
|
PaperProps: {
|
||||||
slotProps: { paper: { className: "glass-menu-paper" } },
|
className: "glass-menu-paper",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
@@ -342,10 +342,10 @@ export const LibraryHeader = () => {
|
|||||||
value={normalizedSortBy}
|
value={normalizedSortBy}
|
||||||
onChange={handleChangeSortBy}
|
onChange={handleChangeSortBy}
|
||||||
disabled={disableSortOption}
|
disabled={disableSortOption}
|
||||||
slotProps={{
|
SelectProps={{
|
||||||
select: {
|
MenuProps: {
|
||||||
MenuProps: {
|
PaperProps: {
|
||||||
slotProps: { paper: { className: "glass-menu-paper" } },
|
className: "glass-menu-paper",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -20,6 +20,7 @@ import { useApiInContext } from "@/utils/store/api";
|
|||||||
import { useBackdropStore } from "@/utils/store/backdrop";
|
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
import { useLibraryStateStore } from "@/utils/store/libraryState";
|
import { useLibraryStateStore } from "@/utils/store/libraryState";
|
||||||
|
// @ts-expect-error: Vite worker import
|
||||||
import BackdropWorker from "@/utils/workers/backdrop.worker?worker";
|
import BackdropWorker from "@/utils/workers/backdrop.worker?worker";
|
||||||
import { Card } from "../card/card";
|
import { Card } from "../card/card";
|
||||||
|
|
||||||
|
|||||||
@@ -116,16 +116,14 @@ const MusicTrack = ({
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
|
fontWeight="400"
|
||||||
style={{
|
style={{
|
||||||
textDecoration: "none",
|
textDecoration: "none",
|
||||||
}}
|
}}
|
||||||
sx={{
|
|
||||||
fontWeight: "400",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Link
|
<Link
|
||||||
style={{ textDecoration: "none", color: "white" }}
|
style={{ textDecoration: "none", color: "white" }}
|
||||||
to="/music/artist/$id"
|
to="/artist/$id"
|
||||||
params={{ id: artist.Id ?? "" }}
|
params={{ id: artist.Id ?? "" }}
|
||||||
>
|
>
|
||||||
{artist.Name}
|
{artist.Name}
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import { yellow } from "@mui/material/colors";
|
import { yellow } from "@mui/material/colors";
|
||||||
@@ -28,21 +29,10 @@ export const EmptyNotice = ({ extraMsg }: { extraMsg?: string }) => {
|
|||||||
>
|
>
|
||||||
sentiment_dissatisfied
|
sentiment_dissatisfied
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography variant="h4" fontWeight={300}>
|
||||||
variant="h4"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
No results found
|
No results found
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight={300} style={{ opacity: 0.5 }}>
|
||||||
variant="subtitle1"
|
|
||||||
style={{ opacity: 0.5 }}
|
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{extraMsg}
|
{extraMsg}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
|
|||||||
@@ -29,16 +29,12 @@ export const ErrorNotice = ({ error }: { error?: Error }) => {
|
|||||||
>
|
>
|
||||||
error
|
error
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography variant="h3" color="white" fontWeight={300}>
|
||||||
variant="h3"
|
|
||||||
color="white"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Something went wrong.
|
Something went wrong.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
|
fontFamily="JetBrains Mono Variable"
|
||||||
|
fontWeight={100}
|
||||||
variant="h5"
|
variant="h5"
|
||||||
style={{
|
style={{
|
||||||
padding: "0.5em",
|
padding: "0.5em",
|
||||||
@@ -52,10 +48,6 @@ export const ErrorNotice = ({ error }: { error?: Error }) => {
|
|||||||
// opacity: 0.6,
|
// opacity: 0.6,
|
||||||
}}
|
}}
|
||||||
color="gray"
|
color="gray"
|
||||||
sx={{
|
|
||||||
fontFamily: "JetBrains Mono Variable",
|
|
||||||
fontWeight: 100,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{JSON.stringify(error?.stack)}
|
{JSON.stringify(error?.stack)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ const OutroCard = (props: { handleShowCredits: () => void }) => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<div className="outro-card-content-buttons">
|
<div className="outro-card-content-buttons">
|
||||||
<Button
|
<Button
|
||||||
onClick={() => handlePlayNext.mutate()}
|
onClick={handlePlayNext.mutate}
|
||||||
//@ts-ignore
|
//@ts-ignore
|
||||||
color="white"
|
color="white"
|
||||||
variant="contained"
|
variant="contained"
|
||||||
@@ -89,4 +89,4 @@ const OutroCard = (props: { handleShowCredits: () => void }) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default OutroCard;
|
export default OutroCard;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Api } from "@jellyfin/sdk";
|
import type { Api } from "@jellyfin/sdk";
|
||||||
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
|
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLyricApi } from "@jellyfin/sdk/lib/utils/api/lyric-api";
|
import { getLyricsApi } from "@jellyfin/sdk/lib/utils/api/lyrics-api";
|
||||||
import { Typography } from "@mui/material";
|
import { Typography } from "@mui/material";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import React, { useEffect, useRef, useState } from "react";
|
import React, { useEffect, useRef, useState } from "react";
|
||||||
@@ -22,7 +22,7 @@ const LyricsPanel = ({ item, api, currentTime }: LyricsPanelProps) => {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const response = await getLyricApi(api).getLyrics({
|
const response = await getLyricsApi(api).getLyrics({
|
||||||
itemId: item?.Id,
|
itemId: item?.Id,
|
||||||
});
|
});
|
||||||
return response.data;
|
return response.data;
|
||||||
|
|||||||
@@ -50,15 +50,13 @@ const PlayerProgress = ({
|
|||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
|
fontWeight={300}
|
||||||
style={{
|
style={{
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
minWidth: "3.5em",
|
minWidth: "3.5em",
|
||||||
textAlign: "right",
|
textAlign: "right",
|
||||||
fontVariantNumeric: "tabular-nums",
|
fontVariantNumeric: "tabular-nums",
|
||||||
}}
|
}}
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{getRuntimeMusic(sliderValue)}
|
{getRuntimeMusic(sliderValue)}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -72,15 +70,13 @@ const PlayerProgress = ({
|
|||||||
/>
|
/>
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
|
fontWeight={300}
|
||||||
style={{
|
style={{
|
||||||
opacity: 0.8,
|
opacity: 0.8,
|
||||||
minWidth: "3.5em",
|
minWidth: "3.5em",
|
||||||
textAlign: "left",
|
textAlign: "left",
|
||||||
fontVariantNumeric: "tabular-nums",
|
fontVariantNumeric: "tabular-nums",
|
||||||
}}
|
}}
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{getRuntimeMusic(duration)}
|
{getRuntimeMusic(duration)}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -206,12 +206,7 @@ const QueuePanel = ({ queue, currentTrackIndex }: QueuePanelProps) => {
|
|||||||
px: 1,
|
px: 1,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography variant="h6" fontWeight={700}>
|
||||||
variant="h6"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 700,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Queue
|
Queue
|
||||||
</Typography>
|
</Typography>
|
||||||
<Box sx={{ display: "flex", gap: 1 }}>
|
<Box sx={{ display: "flex", gap: 1 }}>
|
||||||
|
|||||||
@@ -109,12 +109,7 @@ const StatsForNerds = ({ playerRef }: StatsForNerdsProps) => {
|
|||||||
marginBottom: "0.5em",
|
marginBottom: "0.5em",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography variant="subtitle2" fontWeight="bold">
|
||||||
variant="subtitle2"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Stats for Nerds
|
Stats for Nerds
|
||||||
</Typography>
|
</Typography>
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -141,7 +136,8 @@ const StatsForNerds = ({ playerRef }: StatsForNerdsProps) => {
|
|||||||
<span>Video ID:</span> <span>{itemId}</span>
|
<span>Video ID:</span> <span>{itemId}</span>
|
||||||
<span>Media Source ID:</span> <span>{mediaSourceId}</span>
|
<span>Media Source ID:</span> <span>{mediaSourceId}</span>
|
||||||
<span>Play Session ID:</span> <span>{playsessionId}</span>
|
<span>Play Session ID:</span> <span>{playsessionId}</span>
|
||||||
<span>Playback Method:</span> <span>{mediaSource.playMethod}</span>
|
<span>Playback Method:</span>{" "}
|
||||||
|
<span>{mediaSource.playMethod}</span>
|
||||||
<span>Container:</span> <span>{mediaSource.container}</span>
|
<span>Container:</span> <span>{mediaSource.container}</span>
|
||||||
<span>Video Codec:</span> <span>{mediaSource.videoCodec}</span>
|
<span>Video Codec:</span> <span>{mediaSource.videoCodec}</span>
|
||||||
<span>Audio Codec:</span> <span>{mediaSource.audioCodec}</span>
|
<span>Audio Codec:</span> <span>{mediaSource.audioCodec}</span>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import type { TrickplayInfoDto } from "@jellyfin/sdk/lib/generated-client";
|
import type { TrickplayInfo } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { Slider, Tooltip, Typography } from "@mui/material";
|
import { Slider, Tooltip, Typography } from "@mui/material";
|
||||||
import type { Instance } from "@popperjs/core";
|
import type { Instance } from "@popperjs/core";
|
||||||
import React, {
|
import React, {
|
||||||
@@ -143,7 +143,7 @@ const BubbleSlider = () => {
|
|||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
let trickplayResolution: TrickplayInfoDto | undefined;
|
let trickplayResolution: TrickplayInfo | undefined;
|
||||||
const trickplayResolutions = mediaSource.id
|
const trickplayResolutions = mediaSource.id
|
||||||
? itemTrickplay?.[mediaSource.id]
|
? itemTrickplay?.[mediaSource.id]
|
||||||
: null;
|
: null;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api";
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
import { IconButton, Slider, Typography } from "@mui/material";
|
import { IconButton, Slider, Typography } from "@mui/material";
|
||||||
import { WebviewWindow as appWindow } from "@tauri-apps/api/webviewWindow";
|
import { WebviewWindow as appWindow } from "@tauri-apps/api/webviewWindow";
|
||||||
import { AnimatePresence, motion } from "motion/react";
|
import { AnimatePresence, motion } from "motion/react";
|
||||||
@@ -156,7 +156,7 @@ const VideoPlayerControls = ({
|
|||||||
throw Error("API is not available, cannot report playback stopped.");
|
throw Error("API is not available, cannot report playback stopped.");
|
||||||
}
|
}
|
||||||
// Report Jellyfin server: Playback has ended/stopped
|
// Report Jellyfin server: Playback has ended/stopped
|
||||||
getSessionApi(api).reportPlaybackStopped({
|
getPlaystateApi(api).reportPlaybackStopped({
|
||||||
playbackStopInfo: {
|
playbackStopInfo: {
|
||||||
Failed: false,
|
Failed: false,
|
||||||
ItemId: itemId,
|
ItemId: itemId,
|
||||||
@@ -219,23 +219,11 @@ const VideoPlayerControls = ({
|
|||||||
</div>
|
</div>
|
||||||
<div className="video-player-osd-info">
|
<div className="video-player-osd-info">
|
||||||
<div>
|
<div>
|
||||||
<Typography
|
<Typography variant="h4" fontWeight={500} mb={2}>
|
||||||
variant="h4"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 500,
|
|
||||||
mb: 2,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{String(itemName)}
|
{String(itemName)}
|
||||||
</Typography>
|
</Typography>
|
||||||
{episodeTitle && (
|
{episodeTitle && (
|
||||||
<Typography
|
<Typography variant="h6" fontWeight={300} mt={1}>
|
||||||
variant="h6"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
mt: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{String(episodeTitle)}
|
{String(episodeTitle)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -145,13 +145,7 @@ const VideoPlayerSettingsMenu = ({
|
|||||||
))}
|
))}
|
||||||
</TextField>
|
</TextField>
|
||||||
<MenuItem onClick={toggleShowStatsForNerds}>
|
<MenuItem onClick={toggleShowStatsForNerds}>
|
||||||
<Typography
|
<Typography flexGrow={1}>Stats for Nerds</Typography>
|
||||||
sx={{
|
|
||||||
flexGrow: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Stats for Nerds
|
|
||||||
</Typography>
|
|
||||||
<Switch checked={showStatsForNerds} />
|
<Switch checked={showStatsForNerds} />
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Popover>
|
</Popover>
|
||||||
|
|||||||
@@ -158,8 +158,8 @@ const UpNextFlyout = () => {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
variant="body2"
|
variant="body2"
|
||||||
|
color="text.secondary"
|
||||||
sx={{
|
sx={{
|
||||||
color: "text.secondary",
|
|
||||||
mb: 2,
|
mb: 2,
|
||||||
display: "-webkit-box",
|
display: "-webkit-box",
|
||||||
WebkitLineClamp: 1,
|
WebkitLineClamp: 1,
|
||||||
|
|||||||
@@ -220,7 +220,8 @@ const QueueListItem = ({
|
|||||||
primary: {
|
primary: {
|
||||||
noWrap: true,
|
noWrap: true,
|
||||||
variant: "body2",
|
variant: "body2",
|
||||||
sx: { mb: 0.5, fontWeight: active ? 700 : 500 },
|
fontWeight: active ? 700 : 500,
|
||||||
|
sx: { mb: 0.5 },
|
||||||
},
|
},
|
||||||
secondary: {
|
secondary: {
|
||||||
noWrap: true,
|
noWrap: true,
|
||||||
|
|||||||
@@ -43,13 +43,7 @@ const QueueTrack = (props: Props) => {
|
|||||||
<Typography className="audio-queue-track-info-name">
|
<Typography className="audio-queue-track-info-name">
|
||||||
{track.Name}
|
{track.Name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography fontWeight={300} className="opacity-07" variant="subtitle2">
|
||||||
className="opacity-07"
|
|
||||||
variant="subtitle2"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{track.Artists?.join(", ")}
|
{track.Artists?.join(", ")}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
@@ -72,4 +66,4 @@ const QueueTrack = (props: Props) => {
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default QueueTrack;
|
export default QueueTrack;
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import { ItemSortBy } from "@jellyfin/sdk/lib/generated-client";
|
import { ItemSortBy } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { getSearchApi } from "@jellyfin/sdk/lib/utils/api/search-api";
|
import { getSearchApi } from "@jellyfin/sdk/lib/utils/api/search-api";
|
||||||
import {
|
import {
|
||||||
Box,
|
Box,
|
||||||
@@ -58,7 +58,7 @@ const Search = () => {
|
|||||||
queryFn: async () =>
|
queryFn: async () =>
|
||||||
api &&
|
api &&
|
||||||
(
|
(
|
||||||
await getLibraryApi(api).getItems({
|
await getItemsApi(api).getItems({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
limit: 5,
|
limit: 5,
|
||||||
sortBy: [ItemSortBy.IsFavoriteOrLiked, ItemSortBy.Random],
|
sortBy: [ItemSortBy.IsFavoriteOrLiked, ItemSortBy.Random],
|
||||||
@@ -166,9 +166,9 @@ const Search = () => {
|
|||||||
<Box sx={{ position: "relative" }}>
|
<Box sx={{ position: "relative" }}>
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
|
alignItems="center"
|
||||||
spacing={1.5}
|
spacing={1.5}
|
||||||
sx={{
|
sx={{
|
||||||
alignItems: "center",
|
|
||||||
p: "16px 24px",
|
p: "16px 24px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -272,8 +272,8 @@ const Search = () => {
|
|||||||
<Box>
|
<Box>
|
||||||
<Typography
|
<Typography
|
||||||
variant="caption"
|
variant="caption"
|
||||||
|
fontWeight={600}
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: 600,
|
|
||||||
px: 2,
|
px: 2,
|
||||||
py: 1.5,
|
py: 1.5,
|
||||||
color: "text.secondary",
|
color: "text.secondary",
|
||||||
@@ -315,8 +315,8 @@ const Search = () => {
|
|||||||
<Box>
|
<Box>
|
||||||
<Typography
|
<Typography
|
||||||
variant="caption"
|
variant="caption"
|
||||||
|
fontWeight={600}
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: 600,
|
|
||||||
px: 2,
|
px: 2,
|
||||||
py: 1.5,
|
py: 1.5,
|
||||||
color: "text.secondary",
|
color: "text.secondary",
|
||||||
@@ -356,9 +356,9 @@ const Search = () => {
|
|||||||
{searchResults.isSuccess &&
|
{searchResults.isSuccess &&
|
||||||
searchResults.data?.SearchHints?.length === 0 && (
|
searchResults.data?.SearchHints?.length === 0 && (
|
||||||
<Stack
|
<Stack
|
||||||
|
alignItems="center"
|
||||||
|
justifyContent="center"
|
||||||
sx={{
|
sx={{
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
height: "100%",
|
height: "100%",
|
||||||
minHeight: "200px",
|
minHeight: "200px",
|
||||||
color: "text.secondary",
|
color: "text.secondary",
|
||||||
@@ -380,11 +380,10 @@ const Search = () => {
|
|||||||
|
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
|
justifyContent="flex-end"
|
||||||
sx={{
|
sx={{
|
||||||
justifyContent: "flex-end",
|
|
||||||
p: 1.5,
|
p: 1.5,
|
||||||
mt: 1,
|
mt: 1,
|
||||||
|
|
||||||
backgroundImage:
|
backgroundImage:
|
||||||
"linear-gradient(to top, rgba(0,0,0,0.2), transparent)",
|
"linear-gradient(to top, rgba(0,0,0,0.2), transparent)",
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ import React from "react";
|
|||||||
import { useShallow } from "zustand/react/shallow";
|
import { useShallow } from "zustand/react/shallow";
|
||||||
import useSearchStore from "@/utils/store/search";
|
import useSearchStore from "@/utils/store/search";
|
||||||
import { getTypeIcon } from "../utils/iconsCollection";
|
import { getTypeIcon } from "../utils/iconsCollection";
|
||||||
import { getItemLinkOptions } from "@/utils/navigation/itemLink";
|
|
||||||
|
|
||||||
type SearchItemProps = {
|
type SearchItemProps = {
|
||||||
itemName: string;
|
itemName: string;
|
||||||
@@ -23,7 +22,32 @@ const SearchItem = (props: SearchItemProps) => {
|
|||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const handleOnClick = () => {
|
const handleOnClick = () => {
|
||||||
toggleSearchDialog();
|
toggleSearchDialog();
|
||||||
navigate(getItemLinkOptions(itemId, itemType));
|
switch (itemType) {
|
||||||
|
case BaseItemKind.BoxSet:
|
||||||
|
navigate({ to: "/boxset/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Episode:
|
||||||
|
navigate({ to: "/episode/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.MusicAlbum:
|
||||||
|
navigate({ to: "/album/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.MusicArtist:
|
||||||
|
navigate({ to: "/artist/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Person:
|
||||||
|
navigate({ to: "/person/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Series:
|
||||||
|
navigate({ to: "/series/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
case BaseItemKind.Playlist:
|
||||||
|
navigate({ to: "/playlist/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
navigate({ to: "/item/$id", params: { id: itemId } });
|
||||||
|
break;
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -80,49 +104,22 @@ const SearchItem = (props: SearchItemProps) => {
|
|||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
<Stack sx={{ minWidth: 0, flex: 1 }}>
|
<Stack sx={{ minWidth: 0, flex: 1 }}>
|
||||||
<Typography
|
<Typography variant="body1" noWrap fontWeight={500}>
|
||||||
variant="body1"
|
|
||||||
noWrap
|
|
||||||
sx={{
|
|
||||||
fontWeight: 500,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{itemName}
|
{itemName}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Stack
|
<Stack direction="row" spacing={1} alignItems="center">
|
||||||
direction="row"
|
|
||||||
spacing={1}
|
|
||||||
sx={{
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{itemYear && (
|
{itemYear && (
|
||||||
<Typography
|
<Typography variant="caption" color="text.secondary">
|
||||||
variant="caption"
|
|
||||||
sx={{
|
|
||||||
color: "text.secondary",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{itemYear}
|
{itemYear}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{itemYear && itemType && (
|
{itemYear && itemType && (
|
||||||
<Typography
|
<Typography variant="caption" color="text.secondary">
|
||||||
variant="caption"
|
|
||||||
sx={{
|
|
||||||
color: "text.secondary",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
•
|
•
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
{itemType && (
|
{itemType && (
|
||||||
<Typography
|
<Typography variant="caption" color="text.secondary">
|
||||||
variant="caption"
|
|
||||||
sx={{
|
|
||||||
color: "text.secondary",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{itemType}
|
{itemType}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
|
|||||||
@@ -5,9 +5,7 @@ import React, { useState } from "react";
|
|||||||
|
|
||||||
const SettingOption = ({
|
const SettingOption = ({
|
||||||
setting,
|
setting,
|
||||||
}: {
|
}: { setting: { key: string; name: string; description: string } }) => {
|
||||||
setting: { key: string; name: string; description: string };
|
|
||||||
}) => {
|
|
||||||
const initValue = useQuery({
|
const initValue = useQuery({
|
||||||
queryKey: ["setting", setting.key],
|
queryKey: ["setting", setting.key],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
@@ -32,12 +30,7 @@ const SettingOption = ({
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<div className="settings-option-info">
|
<div className="settings-option-info">
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight={400}>
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{setting.name}
|
{setting.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -54,4 +47,4 @@ const SettingOption = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default SettingOption;
|
export default SettingOption;
|
||||||
@@ -39,12 +39,7 @@ const SettingOptionSelect = ({
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<div className="settings-option-info">
|
<div className="settings-option-info">
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight={400}>
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{setting.name}
|
{setting.name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -48,9 +48,7 @@ const ShowMoreText = ({
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
variant="subtitle2"
|
variant="subtitle2"
|
||||||
sx={{
|
fontWeight={300}
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{content}
|
{content}
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { motion } from "motion/react";
|
|||||||
const ItemSkeleton = () => {
|
const ItemSkeleton = () => {
|
||||||
return (
|
return (
|
||||||
<motion.div
|
<motion.div
|
||||||
className="item item-detail-page item-default scrollY padded-top flex flex-column"
|
className="item item-default scrollY padded-top flex flex-column"
|
||||||
style={{
|
style={{
|
||||||
width: "100vw",
|
width: "100vw",
|
||||||
}}
|
}}
|
||||||
|
|||||||
@@ -7,22 +7,14 @@ import "./tagChip.scss";
|
|||||||
const TagChip = ({
|
const TagChip = ({
|
||||||
label,
|
label,
|
||||||
linkProps,
|
linkProps,
|
||||||
}: {
|
}: { label: string; linkProps?: LinkProps }) => {
|
||||||
label: string;
|
|
||||||
linkProps?: LinkProps;
|
|
||||||
}) => {
|
|
||||||
return (
|
return (
|
||||||
<Link className="tag" to="/search" search={{ query: label }} {...linkProps}>
|
<Link className="tag" to="/search" search={{ query: label }} {...linkProps}>
|
||||||
<Typography
|
<Typography variant="subtitle2" fontWeight={300}>
|
||||||
variant="subtitle2"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 300,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{label}
|
{label}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Link>
|
</Link>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
export default TagChip;
|
export default TagChip;
|
||||||
@@ -112,12 +112,7 @@ export default function Updater() {
|
|||||||
<DialogContent
|
<DialogContent
|
||||||
sx={{ position: "relative", zIndex: 1, pt: 5, pb: 3, px: 3 }}
|
sx={{ position: "relative", zIndex: 1, pt: 5, pb: 3, px: 3 }}
|
||||||
>
|
>
|
||||||
<Stack
|
<Stack alignItems="center" spacing={3}>
|
||||||
spacing={3}
|
|
||||||
sx={{
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
width: 72,
|
width: 72,
|
||||||
@@ -141,20 +136,13 @@ export default function Updater() {
|
|||||||
</span>
|
</span>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Stack
|
<Stack spacing={1} textAlign="center">
|
||||||
spacing={1}
|
|
||||||
sx={{
|
|
||||||
textAlign: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="h5"
|
variant="h5"
|
||||||
|
fontWeight="900"
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: "900",
|
|
||||||
|
|
||||||
background: (theme) =>
|
background: (theme) =>
|
||||||
`linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.secondary.light} 100%)`,
|
`linear-gradient(135deg, ${theme.palette.primary.light} 0%, ${theme.palette.secondary.light} 100%)`,
|
||||||
|
|
||||||
backgroundClip: "text",
|
backgroundClip: "text",
|
||||||
WebkitBackgroundClip: "text",
|
WebkitBackgroundClip: "text",
|
||||||
color: "transparent",
|
color: "transparent",
|
||||||
@@ -164,10 +152,8 @@ export default function Updater() {
|
|||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
variant="body2"
|
variant="body2"
|
||||||
sx={{
|
color="text.secondary"
|
||||||
color: "text.secondary",
|
sx={{ maxWidth: "25ch" }}
|
||||||
maxWidth: "25ch",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
A new version of Blink is ready for you.
|
A new version of Blink is ready for you.
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -175,9 +161,9 @@ export default function Updater() {
|
|||||||
|
|
||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
|
alignItems="center"
|
||||||
|
justifyContent="space-between"
|
||||||
sx={{
|
sx={{
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "space-between",
|
|
||||||
width: "100%",
|
width: "100%",
|
||||||
bgcolor: "rgba(255,255,255,0.03)",
|
bgcolor: "rgba(255,255,255,0.03)",
|
||||||
borderRadius: 4,
|
borderRadius: 4,
|
||||||
@@ -188,19 +174,12 @@ export default function Updater() {
|
|||||||
<Stack>
|
<Stack>
|
||||||
<Typography
|
<Typography
|
||||||
variant="caption"
|
variant="caption"
|
||||||
sx={{
|
color="text.secondary"
|
||||||
color: "text.secondary",
|
sx={{ mb: 0.5 }}
|
||||||
mb: 0.5,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
Current
|
Current
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight="bold">
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
v{updateInfo.currentVersion}
|
v{updateInfo.currentVersion}
|
||||||
</Typography>
|
</Typography>
|
||||||
</Stack>
|
</Stack>
|
||||||
@@ -227,26 +206,18 @@ export default function Updater() {
|
|||||||
</span>
|
</span>
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
<Stack
|
<Stack alignItems="flex-end">
|
||||||
sx={{
|
|
||||||
alignItems: "flex-end",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="caption"
|
variant="caption"
|
||||||
sx={{
|
color="primary.main"
|
||||||
color: "primary.main",
|
sx={{ mb: 0.5 }}
|
||||||
mb: 0.5,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
New Version
|
New Version
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
sx={{
|
fontWeight="bold"
|
||||||
fontWeight: "bold",
|
color="primary.main"
|
||||||
color: "primary.main",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
v{updateInfo.version}
|
v{updateInfo.version}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -345,4 +316,4 @@ export default function Updater() {
|
|||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -87,7 +87,7 @@ export const UserAvatarMenu = () => {
|
|||||||
onClose={handleMenuClose}
|
onClose={handleMenuClose}
|
||||||
sx={menuStyle}
|
sx={menuStyle}
|
||||||
disableScrollLock
|
disableScrollLock
|
||||||
slotProps={{ paper: { className: "glass" } }}
|
PaperProps={{ className: "glass" }}
|
||||||
>
|
>
|
||||||
<MenuItem
|
<MenuItem
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
|
|||||||
+330
-246
@@ -9,99 +9,58 @@
|
|||||||
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
// Additionally, you should also exclude this file from your linter and/or formatter to prevent it from being checked or modified.
|
||||||
|
|
||||||
import { Route as rootRouteImport } from './routes/__root'
|
import { Route as rootRouteImport } from './routes/__root'
|
||||||
import { Route as IndexRouteImport } from './routes/index'
|
|
||||||
import { Route as ApiRouteImport } from './routes/_api'
|
import { Route as ApiRouteImport } from './routes/_api'
|
||||||
import { Route as ApiLoginRouteImport } from './routes/_api/login'
|
import { Route as IndexRouteImport } from './routes/index'
|
||||||
import { Route as ApiSettingsRouteImport } from './routes/_api/settings'
|
|
||||||
import { Route as ErrorCodeRouteImport } from './routes/error/$code'
|
import { Route as ErrorCodeRouteImport } from './routes/error/$code'
|
||||||
import { Route as ApiFavoriteIndexRouteImport } from './routes/_api/favorite/index'
|
import { Route as ApiSettingsRouteImport } from './routes/_api/settings'
|
||||||
import { Route as ApiHomeIndexRouteImport } from './routes/_api/home/index'
|
import { Route as ApiLoginRouteImport } from './routes/_api/login'
|
||||||
import { Route as ApiItemIdRouteImport } from './routes/_api/item/$id'
|
|
||||||
import { Route as ApiLibraryIdRouteImport } from './routes/_api/library/$id'
|
|
||||||
import { Route as ApiLoginListRouteImport } from './routes/_api/login/list'
|
|
||||||
import { Route as ApiLoginManualRouteImport } from './routes/_api/login/manual'
|
|
||||||
import { Route as ApiPlayerIndexRouteImport } from './routes/_api/player/index'
|
|
||||||
import { Route as ApiPlayerAudioRouteImport } from './routes/_api/player/audio'
|
|
||||||
import { Route as ApiPlayerPhotosRouteImport } from './routes/_api/player/photos'
|
|
||||||
import { Route as ApiSearchIndexRouteImport } from './routes/_api/search/index'
|
import { Route as ApiSearchIndexRouteImport } from './routes/_api/search/index'
|
||||||
import { Route as ApiSettingsAboutRouteImport } from './routes/_api/settings/about'
|
import { Route as ApiPlayerIndexRouteImport } from './routes/_api/player/index'
|
||||||
import { Route as ApiSettingsPreferencesRouteImport } from './routes/_api/settings/preferences'
|
import { Route as ApiHomeIndexRouteImport } from './routes/_api/home/index'
|
||||||
import { Route as SetupServerAddRouteImport } from './routes/setup/server.add'
|
import { Route as ApiFavoriteIndexRouteImport } from './routes/_api/favorite/index'
|
||||||
import { Route as SetupServerErrorRouteImport } from './routes/setup/server.error'
|
|
||||||
import { Route as SetupServerListRouteImport } from './routes/setup/server.list'
|
import { Route as SetupServerListRouteImport } from './routes/setup/server.list'
|
||||||
import { Route as ApiLoginUserIdUserNameRouteImport } from './routes/_api/login/$userId.$userName'
|
import { Route as SetupServerErrorRouteImport } from './routes/setup/server.error'
|
||||||
import { Route as ApiMusicAlbumIdRouteImport } from './routes/_api/music/album/$id'
|
import { Route as SetupServerAddRouteImport } from './routes/setup/server.add'
|
||||||
import { Route as ApiMusicArtistIdRouteImport } from './routes/_api/music/artist/$id'
|
import { Route as ApiSettingsPreferencesRouteImport } from './routes/_api/settings/preferences'
|
||||||
import { Route as ApiMusicPlaylistIdRouteImport } from './routes/_api/music/playlist/$id'
|
import { Route as ApiSettingsAboutRouteImport } from './routes/_api/settings/about'
|
||||||
|
import { Route as ApiSeriesIdRouteImport } from './routes/_api/series/$id'
|
||||||
|
import { Route as ApiPlaylistIdRouteImport } from './routes/_api/playlist/$id'
|
||||||
|
import { Route as ApiPlayerPhotosRouteImport } from './routes/_api/player/photos'
|
||||||
|
import { Route as ApiPlayerAudioRouteImport } from './routes/_api/player/audio'
|
||||||
|
import { Route as ApiPersonIdRouteImport } from './routes/_api/person/$id'
|
||||||
|
import { Route as ApiLoginManualRouteImport } from './routes/_api/login/manual'
|
||||||
|
import { Route as ApiLoginListRouteImport } from './routes/_api/login/list'
|
||||||
|
import { Route as ApiLibraryIdRouteImport } from './routes/_api/library/$id'
|
||||||
|
import { Route as ApiItemIdRouteImport } from './routes/_api/item/$id'
|
||||||
|
import { Route as ApiEpisodeIdRouteImport } from './routes/_api/episode/$id'
|
||||||
|
import { Route as ApiBoxsetIdRouteImport } from './routes/_api/boxset/$id'
|
||||||
|
import { Route as ApiArtistIdRouteImport } from './routes/_api/artist/$id'
|
||||||
|
import { Route as ApiAlbumIdRouteImport } from './routes/_api/album/$id'
|
||||||
import { Route as ApiSettingsChangeServerIndexRouteImport } from './routes/_api/settings/changeServer/index'
|
import { Route as ApiSettingsChangeServerIndexRouteImport } from './routes/_api/settings/changeServer/index'
|
||||||
|
import { Route as ApiLoginUserIdUserNameRouteImport } from './routes/_api/login/$userId.$userName'
|
||||||
|
|
||||||
const IndexRoute = IndexRouteImport.update({
|
|
||||||
id: '/',
|
|
||||||
path: '/',
|
|
||||||
getParentRoute: () => rootRouteImport,
|
|
||||||
} as any)
|
|
||||||
const ApiRoute = ApiRouteImport.update({
|
const ApiRoute = ApiRouteImport.update({
|
||||||
id: '/_api',
|
id: '/_api',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiLoginRoute = ApiLoginRouteImport.update({
|
const IndexRoute = IndexRouteImport.update({
|
||||||
id: '/login',
|
id: '/',
|
||||||
path: '/login',
|
path: '/',
|
||||||
getParentRoute: () => ApiRoute,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
|
||||||
const ApiSettingsRoute = ApiSettingsRouteImport.update({
|
|
||||||
id: '/settings',
|
|
||||||
path: '/settings',
|
|
||||||
getParentRoute: () => ApiRoute,
|
|
||||||
} as any)
|
} as any)
|
||||||
const ErrorCodeRoute = ErrorCodeRouteImport.update({
|
const ErrorCodeRoute = ErrorCodeRouteImport.update({
|
||||||
id: '/error/$code',
|
id: '/error/$code',
|
||||||
path: '/error/$code',
|
path: '/error/$code',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiFavoriteIndexRoute = ApiFavoriteIndexRouteImport.update({
|
const ApiSettingsRoute = ApiSettingsRouteImport.update({
|
||||||
id: '/favorite/',
|
id: '/settings',
|
||||||
path: '/favorite/',
|
path: '/settings',
|
||||||
getParentRoute: () => ApiRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiHomeIndexRoute = ApiHomeIndexRouteImport.update({
|
const ApiLoginRoute = ApiLoginRouteImport.update({
|
||||||
id: '/home/',
|
id: '/login',
|
||||||
path: '/home/',
|
path: '/login',
|
||||||
getParentRoute: () => ApiRoute,
|
|
||||||
} as any)
|
|
||||||
const ApiItemIdRoute = ApiItemIdRouteImport.update({
|
|
||||||
id: '/item/$id',
|
|
||||||
path: '/item/$id',
|
|
||||||
getParentRoute: () => ApiRoute,
|
|
||||||
} as any)
|
|
||||||
const ApiLibraryIdRoute = ApiLibraryIdRouteImport.update({
|
|
||||||
id: '/library/$id',
|
|
||||||
path: '/library/$id',
|
|
||||||
getParentRoute: () => ApiRoute,
|
|
||||||
} as any)
|
|
||||||
const ApiLoginListRoute = ApiLoginListRouteImport.update({
|
|
||||||
id: '/list',
|
|
||||||
path: '/list',
|
|
||||||
getParentRoute: () => ApiLoginRoute,
|
|
||||||
} as any)
|
|
||||||
const ApiLoginManualRoute = ApiLoginManualRouteImport.update({
|
|
||||||
id: '/manual',
|
|
||||||
path: '/manual',
|
|
||||||
getParentRoute: () => ApiLoginRoute,
|
|
||||||
} as any)
|
|
||||||
const ApiPlayerIndexRoute = ApiPlayerIndexRouteImport.update({
|
|
||||||
id: '/player/',
|
|
||||||
path: '/player/',
|
|
||||||
getParentRoute: () => ApiRoute,
|
|
||||||
} as any)
|
|
||||||
const ApiPlayerAudioRoute = ApiPlayerAudioRouteImport.update({
|
|
||||||
id: '/player/audio',
|
|
||||||
path: '/player/audio',
|
|
||||||
getParentRoute: () => ApiRoute,
|
|
||||||
} as any)
|
|
||||||
const ApiPlayerPhotosRoute = ApiPlayerPhotosRouteImport.update({
|
|
||||||
id: '/player/photos',
|
|
||||||
path: '/player/photos',
|
|
||||||
getParentRoute: () => ApiRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiSearchIndexRoute = ApiSearchIndexRouteImport.update({
|
const ApiSearchIndexRoute = ApiSearchIndexRouteImport.update({
|
||||||
@@ -109,19 +68,24 @@ const ApiSearchIndexRoute = ApiSearchIndexRouteImport.update({
|
|||||||
path: '/search/',
|
path: '/search/',
|
||||||
getParentRoute: () => ApiRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiSettingsAboutRoute = ApiSettingsAboutRouteImport.update({
|
const ApiPlayerIndexRoute = ApiPlayerIndexRouteImport.update({
|
||||||
id: '/about',
|
id: '/player/',
|
||||||
path: '/about',
|
path: '/player/',
|
||||||
getParentRoute: () => ApiSettingsRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiSettingsPreferencesRoute = ApiSettingsPreferencesRouteImport.update({
|
const ApiHomeIndexRoute = ApiHomeIndexRouteImport.update({
|
||||||
id: '/preferences',
|
id: '/home/',
|
||||||
path: '/preferences',
|
path: '/home/',
|
||||||
getParentRoute: () => ApiSettingsRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const SetupServerAddRoute = SetupServerAddRouteImport.update({
|
const ApiFavoriteIndexRoute = ApiFavoriteIndexRouteImport.update({
|
||||||
id: '/setup/server/add',
|
id: '/favorite/',
|
||||||
path: '/setup/server/add',
|
path: '/favorite/',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const SetupServerListRoute = SetupServerListRouteImport.update({
|
||||||
|
id: '/setup/server/list',
|
||||||
|
path: '/setup/server/list',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
const SetupServerErrorRoute = SetupServerErrorRouteImport.update({
|
const SetupServerErrorRoute = SetupServerErrorRouteImport.update({
|
||||||
@@ -129,29 +93,84 @@ const SetupServerErrorRoute = SetupServerErrorRouteImport.update({
|
|||||||
path: '/setup/server/error',
|
path: '/setup/server/error',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
const SetupServerListRoute = SetupServerListRouteImport.update({
|
const SetupServerAddRoute = SetupServerAddRouteImport.update({
|
||||||
id: '/setup/server/list',
|
id: '/setup/server/add',
|
||||||
path: '/setup/server/list',
|
path: '/setup/server/add',
|
||||||
getParentRoute: () => rootRouteImport,
|
getParentRoute: () => rootRouteImport,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiLoginUserIdUserNameRoute = ApiLoginUserIdUserNameRouteImport.update({
|
const ApiSettingsPreferencesRoute = ApiSettingsPreferencesRouteImport.update({
|
||||||
id: '/$userId/$userName',
|
id: '/preferences',
|
||||||
path: '/$userId/$userName',
|
path: '/preferences',
|
||||||
|
getParentRoute: () => ApiSettingsRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiSettingsAboutRoute = ApiSettingsAboutRouteImport.update({
|
||||||
|
id: '/about',
|
||||||
|
path: '/about',
|
||||||
|
getParentRoute: () => ApiSettingsRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiSeriesIdRoute = ApiSeriesIdRouteImport.update({
|
||||||
|
id: '/series/$id',
|
||||||
|
path: '/series/$id',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiPlaylistIdRoute = ApiPlaylistIdRouteImport.update({
|
||||||
|
id: '/playlist/$id',
|
||||||
|
path: '/playlist/$id',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiPlayerPhotosRoute = ApiPlayerPhotosRouteImport.update({
|
||||||
|
id: '/player/photos',
|
||||||
|
path: '/player/photos',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiPlayerAudioRoute = ApiPlayerAudioRouteImport.update({
|
||||||
|
id: '/player/audio',
|
||||||
|
path: '/player/audio',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiPersonIdRoute = ApiPersonIdRouteImport.update({
|
||||||
|
id: '/person/$id',
|
||||||
|
path: '/person/$id',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiLoginManualRoute = ApiLoginManualRouteImport.update({
|
||||||
|
id: '/manual',
|
||||||
|
path: '/manual',
|
||||||
getParentRoute: () => ApiLoginRoute,
|
getParentRoute: () => ApiLoginRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiMusicAlbumIdRoute = ApiMusicAlbumIdRouteImport.update({
|
const ApiLoginListRoute = ApiLoginListRouteImport.update({
|
||||||
id: '/music/album/$id',
|
id: '/list',
|
||||||
path: '/music/album/$id',
|
path: '/list',
|
||||||
|
getParentRoute: () => ApiLoginRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiLibraryIdRoute = ApiLibraryIdRouteImport.update({
|
||||||
|
id: '/library/$id',
|
||||||
|
path: '/library/$id',
|
||||||
getParentRoute: () => ApiRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiMusicArtistIdRoute = ApiMusicArtistIdRouteImport.update({
|
const ApiItemIdRoute = ApiItemIdRouteImport.update({
|
||||||
id: '/music/artist/$id',
|
id: '/item/$id',
|
||||||
path: '/music/artist/$id',
|
path: '/item/$id',
|
||||||
getParentRoute: () => ApiRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiMusicPlaylistIdRoute = ApiMusicPlaylistIdRouteImport.update({
|
const ApiEpisodeIdRoute = ApiEpisodeIdRouteImport.update({
|
||||||
id: '/music/playlist/$id',
|
id: '/episode/$id',
|
||||||
path: '/music/playlist/$id',
|
path: '/episode/$id',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiBoxsetIdRoute = ApiBoxsetIdRouteImport.update({
|
||||||
|
id: '/boxset/$id',
|
||||||
|
path: '/boxset/$id',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiArtistIdRoute = ApiArtistIdRouteImport.update({
|
||||||
|
id: '/artist/$id',
|
||||||
|
path: '/artist/$id',
|
||||||
|
getParentRoute: () => ApiRoute,
|
||||||
|
} as any)
|
||||||
|
const ApiAlbumIdRoute = ApiAlbumIdRouteImport.update({
|
||||||
|
id: '/album/$id',
|
||||||
|
path: '/album/$id',
|
||||||
getParentRoute: () => ApiRoute,
|
getParentRoute: () => ApiRoute,
|
||||||
} as any)
|
} as any)
|
||||||
const ApiSettingsChangeServerIndexRoute =
|
const ApiSettingsChangeServerIndexRoute =
|
||||||
@@ -160,18 +179,30 @@ const ApiSettingsChangeServerIndexRoute =
|
|||||||
path: '/changeServer/',
|
path: '/changeServer/',
|
||||||
getParentRoute: () => ApiSettingsRoute,
|
getParentRoute: () => ApiSettingsRoute,
|
||||||
} as any)
|
} as any)
|
||||||
|
const ApiLoginUserIdUserNameRoute = ApiLoginUserIdUserNameRouteImport.update({
|
||||||
|
id: '/$userId/$userName',
|
||||||
|
path: '/$userId/$userName',
|
||||||
|
getParentRoute: () => ApiLoginRoute,
|
||||||
|
} as any)
|
||||||
|
|
||||||
export interface FileRoutesByFullPath {
|
export interface FileRoutesByFullPath {
|
||||||
'/': typeof IndexRoute
|
'/': typeof IndexRoute
|
||||||
'/login': typeof ApiLoginRouteWithChildren
|
'/login': typeof ApiLoginRouteWithChildren
|
||||||
'/settings': typeof ApiSettingsRouteWithChildren
|
'/settings': typeof ApiSettingsRouteWithChildren
|
||||||
'/error/$code': typeof ErrorCodeRoute
|
'/error/$code': typeof ErrorCodeRoute
|
||||||
|
'/album/$id': typeof ApiAlbumIdRoute
|
||||||
|
'/artist/$id': typeof ApiArtistIdRoute
|
||||||
|
'/boxset/$id': typeof ApiBoxsetIdRoute
|
||||||
|
'/episode/$id': typeof ApiEpisodeIdRoute
|
||||||
'/item/$id': typeof ApiItemIdRoute
|
'/item/$id': typeof ApiItemIdRoute
|
||||||
'/library/$id': typeof ApiLibraryIdRoute
|
'/library/$id': typeof ApiLibraryIdRoute
|
||||||
'/login/list': typeof ApiLoginListRoute
|
'/login/list': typeof ApiLoginListRoute
|
||||||
'/login/manual': typeof ApiLoginManualRoute
|
'/login/manual': typeof ApiLoginManualRoute
|
||||||
|
'/person/$id': typeof ApiPersonIdRoute
|
||||||
'/player/audio': typeof ApiPlayerAudioRoute
|
'/player/audio': typeof ApiPlayerAudioRoute
|
||||||
'/player/photos': typeof ApiPlayerPhotosRoute
|
'/player/photos': typeof ApiPlayerPhotosRoute
|
||||||
|
'/playlist/$id': typeof ApiPlaylistIdRoute
|
||||||
|
'/series/$id': typeof ApiSeriesIdRoute
|
||||||
'/settings/about': typeof ApiSettingsAboutRoute
|
'/settings/about': typeof ApiSettingsAboutRoute
|
||||||
'/settings/preferences': typeof ApiSettingsPreferencesRoute
|
'/settings/preferences': typeof ApiSettingsPreferencesRoute
|
||||||
'/setup/server/add': typeof SetupServerAddRoute
|
'/setup/server/add': typeof SetupServerAddRoute
|
||||||
@@ -182,9 +213,6 @@ export interface FileRoutesByFullPath {
|
|||||||
'/player/': typeof ApiPlayerIndexRoute
|
'/player/': typeof ApiPlayerIndexRoute
|
||||||
'/search/': typeof ApiSearchIndexRoute
|
'/search/': typeof ApiSearchIndexRoute
|
||||||
'/login/$userId/$userName': typeof ApiLoginUserIdUserNameRoute
|
'/login/$userId/$userName': typeof ApiLoginUserIdUserNameRoute
|
||||||
'/music/album/$id': typeof ApiMusicAlbumIdRoute
|
|
||||||
'/music/artist/$id': typeof ApiMusicArtistIdRoute
|
|
||||||
'/music/playlist/$id': typeof ApiMusicPlaylistIdRoute
|
|
||||||
'/settings/changeServer/': typeof ApiSettingsChangeServerIndexRoute
|
'/settings/changeServer/': typeof ApiSettingsChangeServerIndexRoute
|
||||||
}
|
}
|
||||||
export interface FileRoutesByTo {
|
export interface FileRoutesByTo {
|
||||||
@@ -192,12 +220,19 @@ export interface FileRoutesByTo {
|
|||||||
'/login': typeof ApiLoginRouteWithChildren
|
'/login': typeof ApiLoginRouteWithChildren
|
||||||
'/settings': typeof ApiSettingsRouteWithChildren
|
'/settings': typeof ApiSettingsRouteWithChildren
|
||||||
'/error/$code': typeof ErrorCodeRoute
|
'/error/$code': typeof ErrorCodeRoute
|
||||||
|
'/album/$id': typeof ApiAlbumIdRoute
|
||||||
|
'/artist/$id': typeof ApiArtistIdRoute
|
||||||
|
'/boxset/$id': typeof ApiBoxsetIdRoute
|
||||||
|
'/episode/$id': typeof ApiEpisodeIdRoute
|
||||||
'/item/$id': typeof ApiItemIdRoute
|
'/item/$id': typeof ApiItemIdRoute
|
||||||
'/library/$id': typeof ApiLibraryIdRoute
|
'/library/$id': typeof ApiLibraryIdRoute
|
||||||
'/login/list': typeof ApiLoginListRoute
|
'/login/list': typeof ApiLoginListRoute
|
||||||
'/login/manual': typeof ApiLoginManualRoute
|
'/login/manual': typeof ApiLoginManualRoute
|
||||||
|
'/person/$id': typeof ApiPersonIdRoute
|
||||||
'/player/audio': typeof ApiPlayerAudioRoute
|
'/player/audio': typeof ApiPlayerAudioRoute
|
||||||
'/player/photos': typeof ApiPlayerPhotosRoute
|
'/player/photos': typeof ApiPlayerPhotosRoute
|
||||||
|
'/playlist/$id': typeof ApiPlaylistIdRoute
|
||||||
|
'/series/$id': typeof ApiSeriesIdRoute
|
||||||
'/settings/about': typeof ApiSettingsAboutRoute
|
'/settings/about': typeof ApiSettingsAboutRoute
|
||||||
'/settings/preferences': typeof ApiSettingsPreferencesRoute
|
'/settings/preferences': typeof ApiSettingsPreferencesRoute
|
||||||
'/setup/server/add': typeof SetupServerAddRoute
|
'/setup/server/add': typeof SetupServerAddRoute
|
||||||
@@ -208,9 +243,6 @@ export interface FileRoutesByTo {
|
|||||||
'/player': typeof ApiPlayerIndexRoute
|
'/player': typeof ApiPlayerIndexRoute
|
||||||
'/search': typeof ApiSearchIndexRoute
|
'/search': typeof ApiSearchIndexRoute
|
||||||
'/login/$userId/$userName': typeof ApiLoginUserIdUserNameRoute
|
'/login/$userId/$userName': typeof ApiLoginUserIdUserNameRoute
|
||||||
'/music/album/$id': typeof ApiMusicAlbumIdRoute
|
|
||||||
'/music/artist/$id': typeof ApiMusicArtistIdRoute
|
|
||||||
'/music/playlist/$id': typeof ApiMusicPlaylistIdRoute
|
|
||||||
'/settings/changeServer': typeof ApiSettingsChangeServerIndexRoute
|
'/settings/changeServer': typeof ApiSettingsChangeServerIndexRoute
|
||||||
}
|
}
|
||||||
export interface FileRoutesById {
|
export interface FileRoutesById {
|
||||||
@@ -220,12 +252,19 @@ export interface FileRoutesById {
|
|||||||
'/_api/login': typeof ApiLoginRouteWithChildren
|
'/_api/login': typeof ApiLoginRouteWithChildren
|
||||||
'/_api/settings': typeof ApiSettingsRouteWithChildren
|
'/_api/settings': typeof ApiSettingsRouteWithChildren
|
||||||
'/error/$code': typeof ErrorCodeRoute
|
'/error/$code': typeof ErrorCodeRoute
|
||||||
|
'/_api/album/$id': typeof ApiAlbumIdRoute
|
||||||
|
'/_api/artist/$id': typeof ApiArtistIdRoute
|
||||||
|
'/_api/boxset/$id': typeof ApiBoxsetIdRoute
|
||||||
|
'/_api/episode/$id': typeof ApiEpisodeIdRoute
|
||||||
'/_api/item/$id': typeof ApiItemIdRoute
|
'/_api/item/$id': typeof ApiItemIdRoute
|
||||||
'/_api/library/$id': typeof ApiLibraryIdRoute
|
'/_api/library/$id': typeof ApiLibraryIdRoute
|
||||||
'/_api/login/list': typeof ApiLoginListRoute
|
'/_api/login/list': typeof ApiLoginListRoute
|
||||||
'/_api/login/manual': typeof ApiLoginManualRoute
|
'/_api/login/manual': typeof ApiLoginManualRoute
|
||||||
|
'/_api/person/$id': typeof ApiPersonIdRoute
|
||||||
'/_api/player/audio': typeof ApiPlayerAudioRoute
|
'/_api/player/audio': typeof ApiPlayerAudioRoute
|
||||||
'/_api/player/photos': typeof ApiPlayerPhotosRoute
|
'/_api/player/photos': typeof ApiPlayerPhotosRoute
|
||||||
|
'/_api/playlist/$id': typeof ApiPlaylistIdRoute
|
||||||
|
'/_api/series/$id': typeof ApiSeriesIdRoute
|
||||||
'/_api/settings/about': typeof ApiSettingsAboutRoute
|
'/_api/settings/about': typeof ApiSettingsAboutRoute
|
||||||
'/_api/settings/preferences': typeof ApiSettingsPreferencesRoute
|
'/_api/settings/preferences': typeof ApiSettingsPreferencesRoute
|
||||||
'/setup/server/add': typeof SetupServerAddRoute
|
'/setup/server/add': typeof SetupServerAddRoute
|
||||||
@@ -236,9 +275,6 @@ export interface FileRoutesById {
|
|||||||
'/_api/player/': typeof ApiPlayerIndexRoute
|
'/_api/player/': typeof ApiPlayerIndexRoute
|
||||||
'/_api/search/': typeof ApiSearchIndexRoute
|
'/_api/search/': typeof ApiSearchIndexRoute
|
||||||
'/_api/login/$userId/$userName': typeof ApiLoginUserIdUserNameRoute
|
'/_api/login/$userId/$userName': typeof ApiLoginUserIdUserNameRoute
|
||||||
'/_api/music/album/$id': typeof ApiMusicAlbumIdRoute
|
|
||||||
'/_api/music/artist/$id': typeof ApiMusicArtistIdRoute
|
|
||||||
'/_api/music/playlist/$id': typeof ApiMusicPlaylistIdRoute
|
|
||||||
'/_api/settings/changeServer/': typeof ApiSettingsChangeServerIndexRoute
|
'/_api/settings/changeServer/': typeof ApiSettingsChangeServerIndexRoute
|
||||||
}
|
}
|
||||||
export interface FileRouteTypes {
|
export interface FileRouteTypes {
|
||||||
@@ -248,12 +284,19 @@ export interface FileRouteTypes {
|
|||||||
| '/login'
|
| '/login'
|
||||||
| '/settings'
|
| '/settings'
|
||||||
| '/error/$code'
|
| '/error/$code'
|
||||||
|
| '/album/$id'
|
||||||
|
| '/artist/$id'
|
||||||
|
| '/boxset/$id'
|
||||||
|
| '/episode/$id'
|
||||||
| '/item/$id'
|
| '/item/$id'
|
||||||
| '/library/$id'
|
| '/library/$id'
|
||||||
| '/login/list'
|
| '/login/list'
|
||||||
| '/login/manual'
|
| '/login/manual'
|
||||||
|
| '/person/$id'
|
||||||
| '/player/audio'
|
| '/player/audio'
|
||||||
| '/player/photos'
|
| '/player/photos'
|
||||||
|
| '/playlist/$id'
|
||||||
|
| '/series/$id'
|
||||||
| '/settings/about'
|
| '/settings/about'
|
||||||
| '/settings/preferences'
|
| '/settings/preferences'
|
||||||
| '/setup/server/add'
|
| '/setup/server/add'
|
||||||
@@ -264,9 +307,6 @@ export interface FileRouteTypes {
|
|||||||
| '/player/'
|
| '/player/'
|
||||||
| '/search/'
|
| '/search/'
|
||||||
| '/login/$userId/$userName'
|
| '/login/$userId/$userName'
|
||||||
| '/music/album/$id'
|
|
||||||
| '/music/artist/$id'
|
|
||||||
| '/music/playlist/$id'
|
|
||||||
| '/settings/changeServer/'
|
| '/settings/changeServer/'
|
||||||
fileRoutesByTo: FileRoutesByTo
|
fileRoutesByTo: FileRoutesByTo
|
||||||
to:
|
to:
|
||||||
@@ -274,12 +314,19 @@ export interface FileRouteTypes {
|
|||||||
| '/login'
|
| '/login'
|
||||||
| '/settings'
|
| '/settings'
|
||||||
| '/error/$code'
|
| '/error/$code'
|
||||||
|
| '/album/$id'
|
||||||
|
| '/artist/$id'
|
||||||
|
| '/boxset/$id'
|
||||||
|
| '/episode/$id'
|
||||||
| '/item/$id'
|
| '/item/$id'
|
||||||
| '/library/$id'
|
| '/library/$id'
|
||||||
| '/login/list'
|
| '/login/list'
|
||||||
| '/login/manual'
|
| '/login/manual'
|
||||||
|
| '/person/$id'
|
||||||
| '/player/audio'
|
| '/player/audio'
|
||||||
| '/player/photos'
|
| '/player/photos'
|
||||||
|
| '/playlist/$id'
|
||||||
|
| '/series/$id'
|
||||||
| '/settings/about'
|
| '/settings/about'
|
||||||
| '/settings/preferences'
|
| '/settings/preferences'
|
||||||
| '/setup/server/add'
|
| '/setup/server/add'
|
||||||
@@ -290,9 +337,6 @@ export interface FileRouteTypes {
|
|||||||
| '/player'
|
| '/player'
|
||||||
| '/search'
|
| '/search'
|
||||||
| '/login/$userId/$userName'
|
| '/login/$userId/$userName'
|
||||||
| '/music/album/$id'
|
|
||||||
| '/music/artist/$id'
|
|
||||||
| '/music/playlist/$id'
|
|
||||||
| '/settings/changeServer'
|
| '/settings/changeServer'
|
||||||
id:
|
id:
|
||||||
| '__root__'
|
| '__root__'
|
||||||
@@ -301,12 +345,19 @@ export interface FileRouteTypes {
|
|||||||
| '/_api/login'
|
| '/_api/login'
|
||||||
| '/_api/settings'
|
| '/_api/settings'
|
||||||
| '/error/$code'
|
| '/error/$code'
|
||||||
|
| '/_api/album/$id'
|
||||||
|
| '/_api/artist/$id'
|
||||||
|
| '/_api/boxset/$id'
|
||||||
|
| '/_api/episode/$id'
|
||||||
| '/_api/item/$id'
|
| '/_api/item/$id'
|
||||||
| '/_api/library/$id'
|
| '/_api/library/$id'
|
||||||
| '/_api/login/list'
|
| '/_api/login/list'
|
||||||
| '/_api/login/manual'
|
| '/_api/login/manual'
|
||||||
|
| '/_api/person/$id'
|
||||||
| '/_api/player/audio'
|
| '/_api/player/audio'
|
||||||
| '/_api/player/photos'
|
| '/_api/player/photos'
|
||||||
|
| '/_api/playlist/$id'
|
||||||
|
| '/_api/series/$id'
|
||||||
| '/_api/settings/about'
|
| '/_api/settings/about'
|
||||||
| '/_api/settings/preferences'
|
| '/_api/settings/preferences'
|
||||||
| '/setup/server/add'
|
| '/setup/server/add'
|
||||||
@@ -317,9 +368,6 @@ export interface FileRouteTypes {
|
|||||||
| '/_api/player/'
|
| '/_api/player/'
|
||||||
| '/_api/search/'
|
| '/_api/search/'
|
||||||
| '/_api/login/$userId/$userName'
|
| '/_api/login/$userId/$userName'
|
||||||
| '/_api/music/album/$id'
|
|
||||||
| '/_api/music/artist/$id'
|
|
||||||
| '/_api/music/playlist/$id'
|
|
||||||
| '/_api/settings/changeServer/'
|
| '/_api/settings/changeServer/'
|
||||||
fileRoutesById: FileRoutesById
|
fileRoutesById: FileRoutesById
|
||||||
}
|
}
|
||||||
@@ -334,13 +382,6 @@ export interface RootRouteChildren {
|
|||||||
|
|
||||||
declare module '@tanstack/react-router' {
|
declare module '@tanstack/react-router' {
|
||||||
interface FileRoutesByPath {
|
interface FileRoutesByPath {
|
||||||
'/': {
|
|
||||||
id: '/'
|
|
||||||
path: '/'
|
|
||||||
fullPath: '/'
|
|
||||||
preLoaderRoute: typeof IndexRouteImport
|
|
||||||
parentRoute: typeof rootRouteImport
|
|
||||||
}
|
|
||||||
'/_api': {
|
'/_api': {
|
||||||
id: '/_api'
|
id: '/_api'
|
||||||
path: ''
|
path: ''
|
||||||
@@ -348,19 +389,12 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof ApiRouteImport
|
preLoaderRoute: typeof ApiRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/_api/login': {
|
'/': {
|
||||||
id: '/_api/login'
|
id: '/'
|
||||||
path: '/login'
|
path: '/'
|
||||||
fullPath: '/login'
|
fullPath: '/'
|
||||||
preLoaderRoute: typeof ApiLoginRouteImport
|
preLoaderRoute: typeof IndexRouteImport
|
||||||
parentRoute: typeof ApiRoute
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
|
||||||
'/_api/settings': {
|
|
||||||
id: '/_api/settings'
|
|
||||||
path: '/settings'
|
|
||||||
fullPath: '/settings'
|
|
||||||
preLoaderRoute: typeof ApiSettingsRouteImport
|
|
||||||
parentRoute: typeof ApiRoute
|
|
||||||
}
|
}
|
||||||
'/error/$code': {
|
'/error/$code': {
|
||||||
id: '/error/$code'
|
id: '/error/$code'
|
||||||
@@ -369,67 +403,18 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof ErrorCodeRouteImport
|
preLoaderRoute: typeof ErrorCodeRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/_api/favorite/': {
|
'/_api/settings': {
|
||||||
id: '/_api/favorite/'
|
id: '/_api/settings'
|
||||||
path: '/favorite'
|
path: '/settings'
|
||||||
fullPath: '/favorite/'
|
fullPath: '/settings'
|
||||||
preLoaderRoute: typeof ApiFavoriteIndexRouteImport
|
preLoaderRoute: typeof ApiSettingsRouteImport
|
||||||
parentRoute: typeof ApiRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/_api/home/': {
|
'/_api/login': {
|
||||||
id: '/_api/home/'
|
id: '/_api/login'
|
||||||
path: '/home'
|
path: '/login'
|
||||||
fullPath: '/home/'
|
fullPath: '/login'
|
||||||
preLoaderRoute: typeof ApiHomeIndexRouteImport
|
preLoaderRoute: typeof ApiLoginRouteImport
|
||||||
parentRoute: typeof ApiRoute
|
|
||||||
}
|
|
||||||
'/_api/item/$id': {
|
|
||||||
id: '/_api/item/$id'
|
|
||||||
path: '/item/$id'
|
|
||||||
fullPath: '/item/$id'
|
|
||||||
preLoaderRoute: typeof ApiItemIdRouteImport
|
|
||||||
parentRoute: typeof ApiRoute
|
|
||||||
}
|
|
||||||
'/_api/library/$id': {
|
|
||||||
id: '/_api/library/$id'
|
|
||||||
path: '/library/$id'
|
|
||||||
fullPath: '/library/$id'
|
|
||||||
preLoaderRoute: typeof ApiLibraryIdRouteImport
|
|
||||||
parentRoute: typeof ApiRoute
|
|
||||||
}
|
|
||||||
'/_api/login/list': {
|
|
||||||
id: '/_api/login/list'
|
|
||||||
path: '/list'
|
|
||||||
fullPath: '/login/list'
|
|
||||||
preLoaderRoute: typeof ApiLoginListRouteImport
|
|
||||||
parentRoute: typeof ApiLoginRoute
|
|
||||||
}
|
|
||||||
'/_api/login/manual': {
|
|
||||||
id: '/_api/login/manual'
|
|
||||||
path: '/manual'
|
|
||||||
fullPath: '/login/manual'
|
|
||||||
preLoaderRoute: typeof ApiLoginManualRouteImport
|
|
||||||
parentRoute: typeof ApiLoginRoute
|
|
||||||
}
|
|
||||||
'/_api/player/': {
|
|
||||||
id: '/_api/player/'
|
|
||||||
path: '/player'
|
|
||||||
fullPath: '/player/'
|
|
||||||
preLoaderRoute: typeof ApiPlayerIndexRouteImport
|
|
||||||
parentRoute: typeof ApiRoute
|
|
||||||
}
|
|
||||||
'/_api/player/audio': {
|
|
||||||
id: '/_api/player/audio'
|
|
||||||
path: '/player/audio'
|
|
||||||
fullPath: '/player/audio'
|
|
||||||
preLoaderRoute: typeof ApiPlayerAudioRouteImport
|
|
||||||
parentRoute: typeof ApiRoute
|
|
||||||
}
|
|
||||||
'/_api/player/photos': {
|
|
||||||
id: '/_api/player/photos'
|
|
||||||
path: '/player/photos'
|
|
||||||
fullPath: '/player/photos'
|
|
||||||
preLoaderRoute: typeof ApiPlayerPhotosRouteImport
|
|
||||||
parentRoute: typeof ApiRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/_api/search/': {
|
'/_api/search/': {
|
||||||
@@ -439,25 +424,32 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof ApiSearchIndexRouteImport
|
preLoaderRoute: typeof ApiSearchIndexRouteImport
|
||||||
parentRoute: typeof ApiRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/_api/settings/about': {
|
'/_api/player/': {
|
||||||
id: '/_api/settings/about'
|
id: '/_api/player/'
|
||||||
path: '/about'
|
path: '/player'
|
||||||
fullPath: '/settings/about'
|
fullPath: '/player/'
|
||||||
preLoaderRoute: typeof ApiSettingsAboutRouteImport
|
preLoaderRoute: typeof ApiPlayerIndexRouteImport
|
||||||
parentRoute: typeof ApiSettingsRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/_api/settings/preferences': {
|
'/_api/home/': {
|
||||||
id: '/_api/settings/preferences'
|
id: '/_api/home/'
|
||||||
path: '/preferences'
|
path: '/home'
|
||||||
fullPath: '/settings/preferences'
|
fullPath: '/home/'
|
||||||
preLoaderRoute: typeof ApiSettingsPreferencesRouteImport
|
preLoaderRoute: typeof ApiHomeIndexRouteImport
|
||||||
parentRoute: typeof ApiSettingsRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/setup/server/add': {
|
'/_api/favorite/': {
|
||||||
id: '/setup/server/add'
|
id: '/_api/favorite/'
|
||||||
path: '/setup/server/add'
|
path: '/favorite'
|
||||||
fullPath: '/setup/server/add'
|
fullPath: '/favorite/'
|
||||||
preLoaderRoute: typeof SetupServerAddRouteImport
|
preLoaderRoute: typeof ApiFavoriteIndexRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/setup/server/list': {
|
||||||
|
id: '/setup/server/list'
|
||||||
|
path: '/setup/server/list'
|
||||||
|
fullPath: '/setup/server/list'
|
||||||
|
preLoaderRoute: typeof SetupServerListRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/setup/server/error': {
|
'/setup/server/error': {
|
||||||
@@ -467,39 +459,116 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof SetupServerErrorRouteImport
|
preLoaderRoute: typeof SetupServerErrorRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/setup/server/list': {
|
'/setup/server/add': {
|
||||||
id: '/setup/server/list'
|
id: '/setup/server/add'
|
||||||
path: '/setup/server/list'
|
path: '/setup/server/add'
|
||||||
fullPath: '/setup/server/list'
|
fullPath: '/setup/server/add'
|
||||||
preLoaderRoute: typeof SetupServerListRouteImport
|
preLoaderRoute: typeof SetupServerAddRouteImport
|
||||||
parentRoute: typeof rootRouteImport
|
parentRoute: typeof rootRouteImport
|
||||||
}
|
}
|
||||||
'/_api/login/$userId/$userName': {
|
'/_api/settings/preferences': {
|
||||||
id: '/_api/login/$userId/$userName'
|
id: '/_api/settings/preferences'
|
||||||
path: '/$userId/$userName'
|
path: '/preferences'
|
||||||
fullPath: '/login/$userId/$userName'
|
fullPath: '/settings/preferences'
|
||||||
preLoaderRoute: typeof ApiLoginUserIdUserNameRouteImport
|
preLoaderRoute: typeof ApiSettingsPreferencesRouteImport
|
||||||
|
parentRoute: typeof ApiSettingsRoute
|
||||||
|
}
|
||||||
|
'/_api/settings/about': {
|
||||||
|
id: '/_api/settings/about'
|
||||||
|
path: '/about'
|
||||||
|
fullPath: '/settings/about'
|
||||||
|
preLoaderRoute: typeof ApiSettingsAboutRouteImport
|
||||||
|
parentRoute: typeof ApiSettingsRoute
|
||||||
|
}
|
||||||
|
'/_api/series/$id': {
|
||||||
|
id: '/_api/series/$id'
|
||||||
|
path: '/series/$id'
|
||||||
|
fullPath: '/series/$id'
|
||||||
|
preLoaderRoute: typeof ApiSeriesIdRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/playlist/$id': {
|
||||||
|
id: '/_api/playlist/$id'
|
||||||
|
path: '/playlist/$id'
|
||||||
|
fullPath: '/playlist/$id'
|
||||||
|
preLoaderRoute: typeof ApiPlaylistIdRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/player/photos': {
|
||||||
|
id: '/_api/player/photos'
|
||||||
|
path: '/player/photos'
|
||||||
|
fullPath: '/player/photos'
|
||||||
|
preLoaderRoute: typeof ApiPlayerPhotosRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/player/audio': {
|
||||||
|
id: '/_api/player/audio'
|
||||||
|
path: '/player/audio'
|
||||||
|
fullPath: '/player/audio'
|
||||||
|
preLoaderRoute: typeof ApiPlayerAudioRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/person/$id': {
|
||||||
|
id: '/_api/person/$id'
|
||||||
|
path: '/person/$id'
|
||||||
|
fullPath: '/person/$id'
|
||||||
|
preLoaderRoute: typeof ApiPersonIdRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/login/manual': {
|
||||||
|
id: '/_api/login/manual'
|
||||||
|
path: '/manual'
|
||||||
|
fullPath: '/login/manual'
|
||||||
|
preLoaderRoute: typeof ApiLoginManualRouteImport
|
||||||
parentRoute: typeof ApiLoginRoute
|
parentRoute: typeof ApiLoginRoute
|
||||||
}
|
}
|
||||||
'/_api/music/album/$id': {
|
'/_api/login/list': {
|
||||||
id: '/_api/music/album/$id'
|
id: '/_api/login/list'
|
||||||
path: '/music/album/$id'
|
path: '/list'
|
||||||
fullPath: '/music/album/$id'
|
fullPath: '/login/list'
|
||||||
preLoaderRoute: typeof ApiMusicAlbumIdRouteImport
|
preLoaderRoute: typeof ApiLoginListRouteImport
|
||||||
|
parentRoute: typeof ApiLoginRoute
|
||||||
|
}
|
||||||
|
'/_api/library/$id': {
|
||||||
|
id: '/_api/library/$id'
|
||||||
|
path: '/library/$id'
|
||||||
|
fullPath: '/library/$id'
|
||||||
|
preLoaderRoute: typeof ApiLibraryIdRouteImport
|
||||||
parentRoute: typeof ApiRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/_api/music/artist/$id': {
|
'/_api/item/$id': {
|
||||||
id: '/_api/music/artist/$id'
|
id: '/_api/item/$id'
|
||||||
path: '/music/artist/$id'
|
path: '/item/$id'
|
||||||
fullPath: '/music/artist/$id'
|
fullPath: '/item/$id'
|
||||||
preLoaderRoute: typeof ApiMusicArtistIdRouteImport
|
preLoaderRoute: typeof ApiItemIdRouteImport
|
||||||
parentRoute: typeof ApiRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/_api/music/playlist/$id': {
|
'/_api/episode/$id': {
|
||||||
id: '/_api/music/playlist/$id'
|
id: '/_api/episode/$id'
|
||||||
path: '/music/playlist/$id'
|
path: '/episode/$id'
|
||||||
fullPath: '/music/playlist/$id'
|
fullPath: '/episode/$id'
|
||||||
preLoaderRoute: typeof ApiMusicPlaylistIdRouteImport
|
preLoaderRoute: typeof ApiEpisodeIdRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/boxset/$id': {
|
||||||
|
id: '/_api/boxset/$id'
|
||||||
|
path: '/boxset/$id'
|
||||||
|
fullPath: '/boxset/$id'
|
||||||
|
preLoaderRoute: typeof ApiBoxsetIdRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/artist/$id': {
|
||||||
|
id: '/_api/artist/$id'
|
||||||
|
path: '/artist/$id'
|
||||||
|
fullPath: '/artist/$id'
|
||||||
|
preLoaderRoute: typeof ApiArtistIdRouteImport
|
||||||
|
parentRoute: typeof ApiRoute
|
||||||
|
}
|
||||||
|
'/_api/album/$id': {
|
||||||
|
id: '/_api/album/$id'
|
||||||
|
path: '/album/$id'
|
||||||
|
fullPath: '/album/$id'
|
||||||
|
preLoaderRoute: typeof ApiAlbumIdRouteImport
|
||||||
parentRoute: typeof ApiRoute
|
parentRoute: typeof ApiRoute
|
||||||
}
|
}
|
||||||
'/_api/settings/changeServer/': {
|
'/_api/settings/changeServer/': {
|
||||||
@@ -509,6 +578,13 @@ declare module '@tanstack/react-router' {
|
|||||||
preLoaderRoute: typeof ApiSettingsChangeServerIndexRouteImport
|
preLoaderRoute: typeof ApiSettingsChangeServerIndexRouteImport
|
||||||
parentRoute: typeof ApiSettingsRoute
|
parentRoute: typeof ApiSettingsRoute
|
||||||
}
|
}
|
||||||
|
'/_api/login/$userId/$userName': {
|
||||||
|
id: '/_api/login/$userId/$userName'
|
||||||
|
path: '/$userId/$userName'
|
||||||
|
fullPath: '/login/$userId/$userName'
|
||||||
|
preLoaderRoute: typeof ApiLoginUserIdUserNameRouteImport
|
||||||
|
parentRoute: typeof ApiLoginRoute
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -547,33 +623,41 @@ const ApiSettingsRouteWithChildren = ApiSettingsRoute._addFileChildren(
|
|||||||
interface ApiRouteChildren {
|
interface ApiRouteChildren {
|
||||||
ApiLoginRoute: typeof ApiLoginRouteWithChildren
|
ApiLoginRoute: typeof ApiLoginRouteWithChildren
|
||||||
ApiSettingsRoute: typeof ApiSettingsRouteWithChildren
|
ApiSettingsRoute: typeof ApiSettingsRouteWithChildren
|
||||||
|
ApiAlbumIdRoute: typeof ApiAlbumIdRoute
|
||||||
|
ApiArtistIdRoute: typeof ApiArtistIdRoute
|
||||||
|
ApiBoxsetIdRoute: typeof ApiBoxsetIdRoute
|
||||||
|
ApiEpisodeIdRoute: typeof ApiEpisodeIdRoute
|
||||||
ApiItemIdRoute: typeof ApiItemIdRoute
|
ApiItemIdRoute: typeof ApiItemIdRoute
|
||||||
ApiLibraryIdRoute: typeof ApiLibraryIdRoute
|
ApiLibraryIdRoute: typeof ApiLibraryIdRoute
|
||||||
|
ApiPersonIdRoute: typeof ApiPersonIdRoute
|
||||||
ApiPlayerAudioRoute: typeof ApiPlayerAudioRoute
|
ApiPlayerAudioRoute: typeof ApiPlayerAudioRoute
|
||||||
ApiPlayerPhotosRoute: typeof ApiPlayerPhotosRoute
|
ApiPlayerPhotosRoute: typeof ApiPlayerPhotosRoute
|
||||||
|
ApiPlaylistIdRoute: typeof ApiPlaylistIdRoute
|
||||||
|
ApiSeriesIdRoute: typeof ApiSeriesIdRoute
|
||||||
ApiFavoriteIndexRoute: typeof ApiFavoriteIndexRoute
|
ApiFavoriteIndexRoute: typeof ApiFavoriteIndexRoute
|
||||||
ApiHomeIndexRoute: typeof ApiHomeIndexRoute
|
ApiHomeIndexRoute: typeof ApiHomeIndexRoute
|
||||||
ApiPlayerIndexRoute: typeof ApiPlayerIndexRoute
|
ApiPlayerIndexRoute: typeof ApiPlayerIndexRoute
|
||||||
ApiSearchIndexRoute: typeof ApiSearchIndexRoute
|
ApiSearchIndexRoute: typeof ApiSearchIndexRoute
|
||||||
ApiMusicAlbumIdRoute: typeof ApiMusicAlbumIdRoute
|
|
||||||
ApiMusicArtistIdRoute: typeof ApiMusicArtistIdRoute
|
|
||||||
ApiMusicPlaylistIdRoute: typeof ApiMusicPlaylistIdRoute
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const ApiRouteChildren: ApiRouteChildren = {
|
const ApiRouteChildren: ApiRouteChildren = {
|
||||||
ApiLoginRoute: ApiLoginRouteWithChildren,
|
ApiLoginRoute: ApiLoginRouteWithChildren,
|
||||||
ApiSettingsRoute: ApiSettingsRouteWithChildren,
|
ApiSettingsRoute: ApiSettingsRouteWithChildren,
|
||||||
|
ApiAlbumIdRoute: ApiAlbumIdRoute,
|
||||||
|
ApiArtistIdRoute: ApiArtistIdRoute,
|
||||||
|
ApiBoxsetIdRoute: ApiBoxsetIdRoute,
|
||||||
|
ApiEpisodeIdRoute: ApiEpisodeIdRoute,
|
||||||
ApiItemIdRoute: ApiItemIdRoute,
|
ApiItemIdRoute: ApiItemIdRoute,
|
||||||
ApiLibraryIdRoute: ApiLibraryIdRoute,
|
ApiLibraryIdRoute: ApiLibraryIdRoute,
|
||||||
|
ApiPersonIdRoute: ApiPersonIdRoute,
|
||||||
ApiPlayerAudioRoute: ApiPlayerAudioRoute,
|
ApiPlayerAudioRoute: ApiPlayerAudioRoute,
|
||||||
ApiPlayerPhotosRoute: ApiPlayerPhotosRoute,
|
ApiPlayerPhotosRoute: ApiPlayerPhotosRoute,
|
||||||
|
ApiPlaylistIdRoute: ApiPlaylistIdRoute,
|
||||||
|
ApiSeriesIdRoute: ApiSeriesIdRoute,
|
||||||
ApiFavoriteIndexRoute: ApiFavoriteIndexRoute,
|
ApiFavoriteIndexRoute: ApiFavoriteIndexRoute,
|
||||||
ApiHomeIndexRoute: ApiHomeIndexRoute,
|
ApiHomeIndexRoute: ApiHomeIndexRoute,
|
||||||
ApiPlayerIndexRoute: ApiPlayerIndexRoute,
|
ApiPlayerIndexRoute: ApiPlayerIndexRoute,
|
||||||
ApiSearchIndexRoute: ApiSearchIndexRoute,
|
ApiSearchIndexRoute: ApiSearchIndexRoute,
|
||||||
ApiMusicAlbumIdRoute: ApiMusicAlbumIdRoute,
|
|
||||||
ApiMusicArtistIdRoute: ApiMusicArtistIdRoute,
|
|
||||||
ApiMusicPlaylistIdRoute: ApiMusicPlaylistIdRoute,
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const ApiRouteWithChildren = ApiRoute._addFileChildren(ApiRouteChildren)
|
const ApiRouteWithChildren = ApiRoute._addFileChildren(ApiRouteChildren)
|
||||||
|
|||||||
+6
-13
@@ -20,9 +20,9 @@ import "material-symbols/rounded.scss";
|
|||||||
import type { Api, Jellyfin } from "@jellyfin/sdk";
|
import type { Api, Jellyfin } from "@jellyfin/sdk";
|
||||||
import type { UserDto } from "@jellyfin/sdk/lib/generated-client";
|
import type { UserDto } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import type { QueryClient } from "@tanstack/react-query";
|
import type { QueryClient } from "@tanstack/react-query";
|
||||||
import { TanStackDevtools } from "@tanstack/react-devtools";
|
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";
|
||||||
import { ReactQueryDevtoolsPanel } from "@tanstack/react-query-devtools";
|
import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
||||||
import { TanStackRouterDevtoolsPanel } from "@tanstack/react-router-devtools";
|
// import { TanStackRouterDevtools } from "@tanstack/react-router-devtools";
|
||||||
import { DndProvider } from "react-dnd";
|
import { DndProvider } from "react-dnd";
|
||||||
import { HTML5Backend } from "react-dnd-html5-backend";
|
import { HTML5Backend } from "react-dnd-html5-backend";
|
||||||
import Backdrop from "@/components/backdrop";
|
import Backdrop from "@/components/backdrop";
|
||||||
@@ -59,19 +59,12 @@ export const Route = createRootRouteWithContext<ApiContext>()({
|
|||||||
<AppBar />
|
<AppBar />
|
||||||
<AudioPlayer />
|
<AudioPlayer />
|
||||||
<Outlet />
|
<Outlet />
|
||||||
<TanStackDevtools
|
<ReactQueryDevtools />
|
||||||
plugins={[
|
<TanStackRouterDevtools />
|
||||||
{ name: "TanStack Query", render: <ReactQueryDevtoolsPanel /> },
|
|
||||||
{
|
|
||||||
name: "TanStack Router",
|
|
||||||
render: <TanStackRouterDevtoolsPanel />,
|
|
||||||
},
|
|
||||||
]}
|
|
||||||
/>
|
|
||||||
</SnackbarProvider>
|
</SnackbarProvider>
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</DndProvider>
|
</DndProvider>
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
errorComponent: ErrorNotice,
|
errorComponent: ErrorNotice,
|
||||||
});
|
});
|
||||||
@@ -1,5 +1,7 @@
|
|||||||
import { BaseItemKind, SortOrder } from "@jellyfin/sdk/lib/generated-client";
|
import { BaseItemKind, SortOrder } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
@@ -25,7 +27,7 @@ import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
|||||||
import { useApiInContext } from "@/utils/store/api";
|
import { useApiInContext } from "@/utils/store/api";
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
|
||||||
export const Route = createFileRoute("/_api/music/album/$id")({
|
export const Route = createFileRoute("/_api/album/$id")({
|
||||||
component: MusicAlbumTitlePage,
|
component: MusicAlbumTitlePage,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -39,7 +41,7 @@ function MusicAlbumTitlePage() {
|
|||||||
queryKey: ["item", id],
|
queryKey: ["item", id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItem({
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
itemId: id,
|
itemId: id,
|
||||||
});
|
});
|
||||||
@@ -72,7 +74,7 @@ function MusicAlbumTitlePage() {
|
|||||||
queryKey: ["item", "musicTracks", id],
|
queryKey: ["item", "musicTracks", id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
parentId: item.data?.Id,
|
parentId: item.data?.Id,
|
||||||
sortOrder: [SortOrder.Ascending],
|
sortOrder: [SortOrder.Ascending],
|
||||||
@@ -144,7 +146,7 @@ function MusicAlbumTitlePage() {
|
|||||||
<div className="flex flex-align-center item-info-album-info">
|
<div className="flex flex-align-center item-info-album-info">
|
||||||
{/* @ts-ignore - Using Link as component */}
|
{/* @ts-ignore - Using Link as component */}
|
||||||
<Link
|
<Link
|
||||||
to="/music/artist/$id"
|
to="/artist/$id"
|
||||||
params={{ id: item.data.AlbumArtists?.[0].Id ?? "" }}
|
params={{ id: item.data.AlbumArtists?.[0].Id ?? "" }}
|
||||||
>
|
>
|
||||||
<Chip
|
<Chip
|
||||||
File renamed without changes.
@@ -3,7 +3,8 @@ import {
|
|||||||
ItemFields,
|
ItemFields,
|
||||||
SortOrder,
|
SortOrder,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
import Box from "@mui/material/Box";
|
import Box from "@mui/material/Box";
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import Divider from "@mui/material/Divider";
|
import Divider from "@mui/material/Divider";
|
||||||
@@ -35,6 +36,7 @@ import { createFileRoute } from "@tanstack/react-router";
|
|||||||
import IconLink from "@/components/iconLink";
|
import IconLink from "@/components/iconLink";
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
|
||||||
|
|
||||||
type TabPanelProp = {
|
type TabPanelProp = {
|
||||||
children: ReactNode;
|
children: ReactNode;
|
||||||
index: number;
|
index: number;
|
||||||
@@ -58,7 +60,7 @@ function TabPanel(props: TabPanelProp) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
export const Route = createFileRoute("/_api/music/artist/$id")({
|
export const Route = createFileRoute("/_api/artist/$id")({
|
||||||
component: ArtistTitlePage,
|
component: ArtistTitlePage,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -72,7 +74,7 @@ function ArtistTitlePage() {
|
|||||||
queryKey: ["item", id],
|
queryKey: ["item", id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItem({
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
itemId: id,
|
itemId: id,
|
||||||
});
|
});
|
||||||
@@ -87,7 +89,7 @@ function ArtistTitlePage() {
|
|||||||
queryKey: ["item", id, "artist", "discography"],
|
queryKey: ["item", id, "artist", "discography"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
albumArtistIds: [id],
|
albumArtistIds: [id],
|
||||||
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
sortOrder: [SortOrder.Descending],
|
sortOrder: [SortOrder.Descending],
|
||||||
@@ -105,7 +107,7 @@ function ArtistTitlePage() {
|
|||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
|
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
artistIds: [id],
|
artistIds: [id],
|
||||||
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
sortOrder: [SortOrder.Ascending],
|
sortOrder: [SortOrder.Ascending],
|
||||||
@@ -122,7 +124,7 @@ function ArtistTitlePage() {
|
|||||||
queryKey: ["item", id, "artist", "appearences"],
|
queryKey: ["item", id, "artist", "appearences"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
contributingArtistIds: [id],
|
contributingArtistIds: [id],
|
||||||
excludeItemIds: [id],
|
excludeItemIds: [id],
|
||||||
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
@@ -261,12 +263,7 @@ function ArtistTitlePage() {
|
|||||||
)}
|
)}
|
||||||
{item.data.EndDate && (
|
{item.data.EndDate && (
|
||||||
<div>
|
<div>
|
||||||
<Typography
|
<Typography variant="h5" mt={2}>
|
||||||
variant="h5"
|
|
||||||
sx={{
|
|
||||||
mt: 2,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Death
|
Death
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography sx={{ opacity: 0.8 }}>
|
<Typography sx={{ opacity: 0.8 }}>
|
||||||
File renamed without changes.
@@ -0,0 +1,279 @@
|
|||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
LocationType,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import { motion } from "motion/react";
|
||||||
|
import React, { useLayoutEffect, useRef } from "react";
|
||||||
|
import LikeButton from "@/components/buttons/likeButton";
|
||||||
|
import MarkPlayedButton from "@/components/buttons/markPlayedButton";
|
||||||
|
import PlayButton from "@/components/buttons/playButton";
|
||||||
|
import { Card } from "@/components/card/card";
|
||||||
|
import CardScroller from "@/components/cardScroller/cardScroller";
|
||||||
|
import ItemHeader from "@/components/itemHeader";
|
||||||
|
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
||||||
|
import ShowMoreText from "@/components/showMoreText";
|
||||||
|
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||||
|
import "./boxset.scss";
|
||||||
|
|
||||||
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
import IconLink from "@/components/iconLink";
|
||||||
|
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
||||||
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
|
||||||
|
export const Route = createFileRoute("/_api/boxset/$id")({
|
||||||
|
component: BoxSetTitlePage,
|
||||||
|
});
|
||||||
|
|
||||||
|
function BoxSetTitlePage() {
|
||||||
|
const { id } = Route.useParams();
|
||||||
|
const api = Route.useRouteContext().api;
|
||||||
|
|
||||||
|
const user = useCentralStore((s) => s.currentUser);
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user?.Id,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const collectionItems = useQuery({
|
||||||
|
queryKey: ["item", id, "collection"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getItemsApi(api).getItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
parentId: id,
|
||||||
|
fields: [ItemFields.SeasonUserData, ItemFields.Overview],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const similarItems = useQuery({
|
||||||
|
queryKey: ["item", "similarItem", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getLibraryApi(api).getSimilarItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: id,
|
||||||
|
limit: 16,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const setBackdrop = useBackdropStore((s) => s.setBackdrop);
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
if (api && item.isSuccess) {
|
||||||
|
if (item.data?.BackdropImageTags?.length) {
|
||||||
|
setBackdrop(
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
item.data.Id ?? "",
|
||||||
|
"Backdrop",
|
||||||
|
{
|
||||||
|
tag: item.data.BackdropImageTags[0],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
setBackdrop("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
const scrollTargetRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
|
if (item.isPending || similarItems.isPending) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess && item.data && similarItems.isSuccess) {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
key={id}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
className="scrollY item item-boxset padded-top"
|
||||||
|
>
|
||||||
|
<div ref={scrollTargetRef} />
|
||||||
|
<ItemHeader
|
||||||
|
item={item.data}
|
||||||
|
api={api}
|
||||||
|
scrollTargetRef={scrollTargetRef}
|
||||||
|
>
|
||||||
|
<div className="item-hero-buttons-container flex flex-row">
|
||||||
|
<div className="flex flex-row fullWidth">
|
||||||
|
<PlayButton
|
||||||
|
item={item.data}
|
||||||
|
itemType={item.data.Type ?? "BoxSet"}
|
||||||
|
userId={user?.Id}
|
||||||
|
buttonProps={{
|
||||||
|
fullWidth: true,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
<LikeButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isFavorite={item.data.UserData?.IsFavorite}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isPlayed={item.data.UserData?.Played}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ItemHeader>
|
||||||
|
<div
|
||||||
|
className="item-detail"
|
||||||
|
style={{
|
||||||
|
marginBottom: "2em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ShowMoreText content={item.data.Overview ?? ""} collapsedLines={4} />
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.6em",
|
||||||
|
alignSelf: "end",
|
||||||
|
marginTop: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.ExternalUrls?.map((url) => (
|
||||||
|
<IconLink
|
||||||
|
url={url.Url ?? ""}
|
||||||
|
name={url.Name ?? ""}
|
||||||
|
key={url.Url}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(collectionItems.data?.TotalRecordCount ?? 0) > 0 && (
|
||||||
|
<CardScroller title="" displayCards={7} disableDecoration>
|
||||||
|
{collectionItems.data?.Items?.map((similar) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={similar.Id}
|
||||||
|
item={similar}
|
||||||
|
seriesId={similar.SeriesId}
|
||||||
|
cardTitle={
|
||||||
|
similar.Type === BaseItemKind.Episode
|
||||||
|
? similar.SeriesName
|
||||||
|
: similar.Name
|
||||||
|
}
|
||||||
|
imageType={"Primary"}
|
||||||
|
cardCaption={similar.ProductionYear}
|
||||||
|
cardType={"portrait"}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
{similarItems.data?.TotalRecordCount && (
|
||||||
|
<CardScroller
|
||||||
|
title="You might also like"
|
||||||
|
displayCards={7}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{similarItems.data?.Items?.map((similar) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={similar.Id}
|
||||||
|
item={similar}
|
||||||
|
seriesId={similar.SeriesId}
|
||||||
|
cardTitle={
|
||||||
|
similar.Type === BaseItemKind.Episode
|
||||||
|
? similar.SeriesName
|
||||||
|
: similar.Name
|
||||||
|
}
|
||||||
|
imageType={"Primary"}
|
||||||
|
cardCaption={
|
||||||
|
similar.Type === BaseItemKind.Episode
|
||||||
|
? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}`
|
||||||
|
: similar.Type === BaseItemKind.Series
|
||||||
|
? `${similar.ProductionYear} - ${
|
||||||
|
similar.EndDate
|
||||||
|
? new Date(similar.EndDate).toLocaleString([], {
|
||||||
|
year: "numeric",
|
||||||
|
})
|
||||||
|
: "Present"
|
||||||
|
}`
|
||||||
|
: similar.ProductionYear
|
||||||
|
}
|
||||||
|
cardType={
|
||||||
|
similar.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
similar.Type === BaseItemKind.Audio
|
||||||
|
? "square"
|
||||||
|
: "portrait"
|
||||||
|
}
|
||||||
|
queryKey={["item", id, "similarItem"]}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError || similarItems.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default BoxSetTitlePage;
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
$cardWidth: 18%;
|
||||||
|
.item-boxset.item {
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
.item-detail {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 35%;
|
||||||
|
justify-items: center;
|
||||||
|
align-items: start;
|
||||||
|
gap: 3em;
|
||||||
|
|
||||||
|
&-cast {
|
||||||
|
&-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1em;
|
||||||
|
}
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
&-card {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 6em 1fr;
|
||||||
|
gap: 0.5em;
|
||||||
|
align-items: center;
|
||||||
|
color: white !important;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: rgb(255 255 255 / 0);
|
||||||
|
transition: background $transition-time-default;
|
||||||
|
border-radius: $border-radius-default;
|
||||||
|
&:hover {
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
}
|
||||||
|
&-image,
|
||||||
|
&-icon {
|
||||||
|
width: 6em;
|
||||||
|
height: 6em;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 100%;
|
||||||
|
box-shadow: $shadow-card-image;
|
||||||
|
}
|
||||||
|
&-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1em;
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
.material-symbols-rounded {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-link {
|
||||||
|
color: white;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 0.5);
|
||||||
|
&:hover {
|
||||||
|
text-decoration-color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,653 @@
|
|||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
MediaStreamType,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import { motion } from "motion/react";
|
||||||
|
import React, { useEffect, useMemo, useRef, useState } from "react";
|
||||||
|
import LikeButton from "@/components/buttons/likeButton";
|
||||||
|
import MarkPlayedButton from "@/components/buttons/markPlayedButton";
|
||||||
|
import PlayButton from "@/components/buttons/playButton";
|
||||||
|
import TrailerButton from "@/components/buttons/trailerButton";
|
||||||
|
// import useParallax from "@/utils/hooks/useParallax";
|
||||||
|
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
||||||
|
import ShowMoreText from "@/components/showMoreText";
|
||||||
|
import { getTypeIcon } from "@/components/utils/iconsCollection";
|
||||||
|
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||||
|
import "./episode.scss";
|
||||||
|
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import { createFileRoute, Link } from "@tanstack/react-router";
|
||||||
|
import { Card } from "@/components/card/card";
|
||||||
|
import CardScroller from "@/components/cardScroller/cardScroller";
|
||||||
|
import IconLink from "@/components/iconLink";
|
||||||
|
import ItemHeader from "@/components/itemHeader";
|
||||||
|
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
||||||
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
import type MediaQualityInfo from "@/utils/types/mediaQualityInfo";
|
||||||
|
|
||||||
|
export const Route = createFileRoute("/_api/episode/$id")({
|
||||||
|
component: EpisodeTitlePage,
|
||||||
|
});
|
||||||
|
|
||||||
|
function EpisodeTitlePage() {
|
||||||
|
const { id } = Route.useParams();
|
||||||
|
const api = Route.useRouteContext().api;
|
||||||
|
|
||||||
|
const user = useCentralStore((s) => s.currentUser);
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user?.Id,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const upcomingEpisodes = useQuery({
|
||||||
|
queryKey: ["item", id, "episode", "upcomingEpisodes"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getItemsApi(api).getItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
parentId: item.data?.ParentId ?? "",
|
||||||
|
startIndex: item.data?.IndexNumber ?? 0,
|
||||||
|
excludeLocationTypes: ["Virtual"],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data?.Type === BaseItemKind.Episode,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const setBackdrop = useBackdropStore((state) => state.setBackdrop);
|
||||||
|
|
||||||
|
const [selectedVideoTrack, setSelectedVideoTrack] = useState(0);
|
||||||
|
const [selectedAudioTrack, setSelectedAudioTrack] = useState(0);
|
||||||
|
const [selectedSubtitleTrack, setSelectedSubtitleTrack] = useState(0);
|
||||||
|
|
||||||
|
const videoTracks = useMemo(() => {
|
||||||
|
const result = item.data?.MediaStreams?.filter((source) => {
|
||||||
|
if (source.Type === MediaStreamType.Video) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
setSelectedVideoTrack(result?.find((track) => track.IsDefault)?.Index ?? 0);
|
||||||
|
return result ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const audioTracks = useMemo(() => {
|
||||||
|
const result = item.data?.MediaStreams?.filter((source) => {
|
||||||
|
if (source.Type === MediaStreamType.Audio) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
setSelectedAudioTrack(
|
||||||
|
item.data?.MediaSources?.[0].DefaultAudioStreamIndex ?? 0,
|
||||||
|
);
|
||||||
|
return result ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const subtitleTracks = useMemo(() => {
|
||||||
|
const result = item.data?.MediaStreams?.filter((source) => {
|
||||||
|
if (source.Type === MediaStreamType.Subtitle) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
setSelectedSubtitleTrack(
|
||||||
|
result?.find((track) => track.IsDefault)?.Index ?? -1,
|
||||||
|
);
|
||||||
|
return result ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
|
||||||
|
const directors = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Director") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const writers = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Writer") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const actors = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Actor") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const producers = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Producer") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
|
||||||
|
const mediaQualityInfo = useMemo<MediaQualityInfo>(() => {
|
||||||
|
const checkAtmos = audioTracks.filter((audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("atmos"),
|
||||||
|
);
|
||||||
|
const checkDolbyVision = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("dv") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("dolby vision") ||
|
||||||
|
!!video.VideoDoViTitle ||
|
||||||
|
video.VideoRangeType === "DOVI",
|
||||||
|
);
|
||||||
|
const checkDD = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
(audio.DisplayTitle?.toLocaleLowerCase().includes("dd") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("ddp")) ||
|
||||||
|
(audio.DisplayTitle?.toLocaleLowerCase().includes("dolby digital") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("dolby digital+")),
|
||||||
|
);
|
||||||
|
const checkDDP = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("ddp") ||
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dolby digital+"),
|
||||||
|
);
|
||||||
|
const checkDts = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dts") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd ma") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd.ma"),
|
||||||
|
);
|
||||||
|
const checkDtsHDMA = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd ma") ||
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd.ma"),
|
||||||
|
);
|
||||||
|
const checkUHD = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("4k") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("2160p") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("uhd"),
|
||||||
|
);
|
||||||
|
const checkHD = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
(video.DisplayTitle?.toLocaleLowerCase().includes("hd") &&
|
||||||
|
!video.DisplayTitle?.toLocaleLowerCase().includes("hdr")) ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("1080p") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("fhd"),
|
||||||
|
);
|
||||||
|
const checkSD = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
(video.DisplayTitle?.toLocaleLowerCase().includes("sd") &&
|
||||||
|
!video.DisplayTitle?.toLocaleLowerCase().includes("sdr")) ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("720p"),
|
||||||
|
);
|
||||||
|
const checkSDR = videoTracks.filter(
|
||||||
|
(video) => video.VideoRangeType === "SDR",
|
||||||
|
);
|
||||||
|
const checkHDR = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.VideoRange === "HDR" ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("dv"),
|
||||||
|
);
|
||||||
|
const checkHDR10 = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.VideoRangeType === "HDR10" &&
|
||||||
|
!video.DisplayTitle?.toLocaleLowerCase().includes("hdr10+"),
|
||||||
|
);
|
||||||
|
const checkHDR10Plus = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.VideoRangeType === "HDR10Plus" ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("hdr10+"),
|
||||||
|
);
|
||||||
|
const checkTrueHD = audioTracks.filter((audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("truehd"),
|
||||||
|
);
|
||||||
|
const checkIMAX = videoTracks.filter((video) =>
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("imax"),
|
||||||
|
);
|
||||||
|
return {
|
||||||
|
isAtmos: checkAtmos.length > 0,
|
||||||
|
isDolbyVision: checkDolbyVision.length > 0,
|
||||||
|
isDts: checkDts.length > 0,
|
||||||
|
isDtsHDMA: checkDtsHDMA.length > 0,
|
||||||
|
isDD: checkDD.length > 0,
|
||||||
|
isDDP: checkDDP.length > 0,
|
||||||
|
isUHD: checkUHD.length > 0,
|
||||||
|
isHD: checkHD.length > 0,
|
||||||
|
isSD: checkSD.length > 0,
|
||||||
|
isSDR: checkSDR.length > 0,
|
||||||
|
isHDR: checkHDR.length > 0,
|
||||||
|
isHDR10: checkHDR10.length > 0,
|
||||||
|
isHDR10Plus: checkHDR10Plus.length > 0,
|
||||||
|
isTrueHD: checkTrueHD.length > 0,
|
||||||
|
isIMAX: checkIMAX.length > 0,
|
||||||
|
};
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
|
||||||
|
const lastBackdropRef = useRef<string | undefined>(undefined);
|
||||||
|
useEffect(() => {
|
||||||
|
if (!api || !item.isSuccess || !item.data) return;
|
||||||
|
const tag = item.data.ParentBackdropImageTags?.[0];
|
||||||
|
// Prefer blurhash if available; fallback to URL
|
||||||
|
const hash = item.data.ImageBlurHashes?.Backdrop?.[tag ?? ""];
|
||||||
|
|
||||||
|
if (hash && lastBackdropRef.current !== hash) {
|
||||||
|
lastBackdropRef.current = hash;
|
||||||
|
setBackdrop(hash);
|
||||||
|
}
|
||||||
|
}, [api, item.isSuccess, item.data, setBackdrop]);
|
||||||
|
|
||||||
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
|
if (item.isPending) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess && item.data) {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
key={id}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
className="scrollY padded-top flex flex-column item item-episode"
|
||||||
|
ref={containerRef}
|
||||||
|
>
|
||||||
|
<ItemHeader
|
||||||
|
item={item.data}
|
||||||
|
api={api}
|
||||||
|
mediaQualityInfo={mediaQualityInfo}
|
||||||
|
scrollTargetRef={containerRef}
|
||||||
|
>
|
||||||
|
<div className="item-hero-buttons-container">
|
||||||
|
<div className="flex flex-row">
|
||||||
|
<PlayButton
|
||||||
|
item={item.data}
|
||||||
|
itemType="Episode"
|
||||||
|
currentVideoTrack={selectedVideoTrack ?? 0}
|
||||||
|
currentAudioTrack={selectedAudioTrack ?? 0}
|
||||||
|
currentSubTrack={selectedSubtitleTrack ?? "nosub"}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
{item.data.RemoteTrailers && (
|
||||||
|
<TrailerButton
|
||||||
|
trailerItem={item.data.RemoteTrailers}
|
||||||
|
disabled={item.data.RemoteTrailers?.length === 0}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<LikeButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isFavorite={item.data.UserData?.IsFavorite}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isPlayed={item.data.UserData?.Played}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ItemHeader>
|
||||||
|
<div className="item-detail">
|
||||||
|
<div className="fullWidth">
|
||||||
|
<ShowMoreText
|
||||||
|
content={item.data.Overview ?? ""}
|
||||||
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="fullWidth">
|
||||||
|
{videoTracks.length > 0 && (
|
||||||
|
<TextField
|
||||||
|
label="Video"
|
||||||
|
select
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
marginBottom: "1em",
|
||||||
|
}}
|
||||||
|
value={selectedVideoTrack}
|
||||||
|
variant="filled"
|
||||||
|
onChange={(e) => setSelectedVideoTrack(Number(e.target.value))}
|
||||||
|
>
|
||||||
|
{videoTracks.map((track) => (
|
||||||
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
))}
|
||||||
|
</TextField>
|
||||||
|
)}
|
||||||
|
{audioTracks.length > 0 && (
|
||||||
|
<TextField
|
||||||
|
label="Audio"
|
||||||
|
select
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
marginBottom: "1em",
|
||||||
|
}}
|
||||||
|
value={selectedAudioTrack}
|
||||||
|
variant="filled"
|
||||||
|
onChange={(e) => setSelectedAudioTrack(Number(e.target.value))}
|
||||||
|
>
|
||||||
|
{audioTracks.map((track) => (
|
||||||
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
))}
|
||||||
|
</TextField>
|
||||||
|
)}
|
||||||
|
{subtitleTracks.length > 0 && (
|
||||||
|
<TextField
|
||||||
|
label="Subtitle"
|
||||||
|
select
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
value={selectedSubtitleTrack}
|
||||||
|
variant="filled"
|
||||||
|
onChange={(e) =>
|
||||||
|
setSelectedSubtitleTrack(Number(e.target.value))
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<MenuItem key={-1} value={-1}>
|
||||||
|
No Subtitle
|
||||||
|
</MenuItem>
|
||||||
|
{subtitleTracks.map((track) => (
|
||||||
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
))}
|
||||||
|
</TextField>
|
||||||
|
)}
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.6em",
|
||||||
|
alignSelf: "end",
|
||||||
|
marginTop: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.ExternalUrls?.map((url) => (
|
||||||
|
<IconLink
|
||||||
|
key={url.Url}
|
||||||
|
url={url.Url ?? ""}
|
||||||
|
name={url.Name ?? ""}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{(item.data.People?.length ?? 0) > 0 && (
|
||||||
|
<div className="item-detail-cast">
|
||||||
|
<Typography variant="h5" mb={2}>
|
||||||
|
Cast & Crew
|
||||||
|
</Typography>
|
||||||
|
{actors.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Actors</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{actors.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{writers.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Writers</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{writers.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{directors.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Directors</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{directors.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{producers.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Producers</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{producers.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{upcomingEpisodes.isSuccess &&
|
||||||
|
(upcomingEpisodes.data?.Items?.length ?? 0) > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Upcoming Episodes"
|
||||||
|
displayCards={4}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{upcomingEpisodes.data?.Items?.map((episode) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={episode.Id}
|
||||||
|
item={episode}
|
||||||
|
cardTitle={episode.SeriesName}
|
||||||
|
imageType="Primary"
|
||||||
|
cardCaption={`S${episode.ParentIndexNumber}:E${episode.IndexNumber} - ${episode.Name}`}
|
||||||
|
cardType="thumb"
|
||||||
|
queryKey={["item", id, "episode", "upcomingEpisodes"]}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default EpisodeTitlePage;
|
||||||
@@ -0,0 +1,66 @@
|
|||||||
|
$cardWidth: 30%;
|
||||||
|
.item-episode.item {
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
.item-detail {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 35%;
|
||||||
|
justify-items: center;
|
||||||
|
align-items: start;
|
||||||
|
gap: 3em;
|
||||||
|
|
||||||
|
&-cast {
|
||||||
|
&-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1em;
|
||||||
|
}
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
&-card {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 6em 1fr;
|
||||||
|
gap: 0.5em;
|
||||||
|
align-items: center;
|
||||||
|
color: white !important;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: rgb(255 255 255 / 0);
|
||||||
|
transition: background $transition-time-default;
|
||||||
|
border-radius: $border-radius-default;
|
||||||
|
&:hover {
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
}
|
||||||
|
&-image,
|
||||||
|
&-icon {
|
||||||
|
width: 6em;
|
||||||
|
height: 6em;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 100%;
|
||||||
|
box-shadow: $shadow-card-image;
|
||||||
|
}
|
||||||
|
&-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1em;
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
.material-symbols-rounded {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-link {
|
||||||
|
color: white;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 0.5);
|
||||||
|
&:hover {
|
||||||
|
text-decoration-color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -7,7 +7,7 @@ import {
|
|||||||
type BaseItemDto,
|
type BaseItemDto,
|
||||||
BaseItemKind,
|
BaseItemKind,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { Fade, Tab, Tabs, Typography } from "@mui/material";
|
import { Fade, Tab, Tabs, Typography } from "@mui/material";
|
||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
import { useShallow } from "zustand/react/shallow";
|
import { useShallow } from "zustand/react/shallow";
|
||||||
@@ -32,7 +32,7 @@ function FavoritePage() {
|
|||||||
queryKey: ["favorite", "movies"],
|
queryKey: ["favorite", "movies"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
isFavorite: true,
|
isFavorite: true,
|
||||||
includeItemTypes: [BaseItemKind.Movie],
|
includeItemTypes: [BaseItemKind.Movie],
|
||||||
@@ -47,7 +47,7 @@ function FavoritePage() {
|
|||||||
queryKey: ["favorite", "series"],
|
queryKey: ["favorite", "series"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
isFavorite: true,
|
isFavorite: true,
|
||||||
includeItemTypes: [BaseItemKind.Series],
|
includeItemTypes: [BaseItemKind.Series],
|
||||||
@@ -61,7 +61,7 @@ function FavoritePage() {
|
|||||||
queryKey: ["favorite", "musicAlbum"],
|
queryKey: ["favorite", "musicAlbum"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
isFavorite: true,
|
isFavorite: true,
|
||||||
includeItemTypes: [BaseItemKind.MusicAlbum],
|
includeItemTypes: [BaseItemKind.MusicAlbum],
|
||||||
@@ -75,7 +75,7 @@ function FavoritePage() {
|
|||||||
queryKey: ["favorite", "audio"],
|
queryKey: ["favorite", "audio"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
isFavorite: true,
|
isFavorite: true,
|
||||||
includeItemTypes: [BaseItemKind.Audio],
|
includeItemTypes: [BaseItemKind.Audio],
|
||||||
@@ -89,7 +89,7 @@ function FavoritePage() {
|
|||||||
queryKey: ["favorite", "book"],
|
queryKey: ["favorite", "book"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
isFavorite: true,
|
isFavorite: true,
|
||||||
includeItemTypes: [BaseItemKind.Book],
|
includeItemTypes: [BaseItemKind.Book],
|
||||||
@@ -103,7 +103,7 @@ function FavoritePage() {
|
|||||||
queryKey: ["favorite", "musicArtist"],
|
queryKey: ["favorite", "musicArtist"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
isFavorite: true,
|
isFavorite: true,
|
||||||
includeItemTypes: [BaseItemKind.MusicArtist],
|
includeItemTypes: [BaseItemKind.MusicArtist],
|
||||||
@@ -117,7 +117,7 @@ function FavoritePage() {
|
|||||||
queryKey: ["favorite", "person"],
|
queryKey: ["favorite", "person"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItems({
|
const result = await getItemsApi(api).getItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
isFavorite: true,
|
isFavorite: true,
|
||||||
includeItemTypes: [BaseItemKind.Person],
|
includeItemTypes: [BaseItemKind.Person],
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
import { useQueries, useSuspenseQuery } from "@tanstack/react-query";
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
||||||
import React, { useCallback, useMemo } from "react";
|
import React, { useCallback, useMemo } from "react";
|
||||||
|
|
||||||
import "./home.scss";
|
import "./home.scss";
|
||||||
@@ -10,9 +10,9 @@ import {
|
|||||||
ItemFields,
|
ItemFields,
|
||||||
type UserDto,
|
type UserDto,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { getShowApi } from "@jellyfin/sdk/lib/utils/api/show-api";
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
import { getUserViewApi } from "@jellyfin/sdk/lib/utils/api/user-view-api";
|
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
import { createFileRoute, useNavigate } from "@tanstack/react-router";
|
||||||
import { ErrorBoundary } from "react-error-boundary";
|
import { ErrorBoundary } from "react-error-boundary";
|
||||||
@@ -24,25 +24,11 @@ import Carousel from "@/components/carousel";
|
|||||||
import CircularPageLoadingAnimation from "@/components/circularPageLoadingAnimation";
|
import CircularPageLoadingAnimation from "@/components/circularPageLoadingAnimation";
|
||||||
import { LatestMediaSection } from "@/components/layouts/homeSection/latestMediaSection";
|
import { LatestMediaSection } from "@/components/layouts/homeSection/latestMediaSection";
|
||||||
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
||||||
import {
|
import { getLatestItemsQueryOptions } from "@/utils/queries/items";
|
||||||
getLatestItemsQueryOptions,
|
|
||||||
getLibraryLatestQueryOptions,
|
|
||||||
} from "@/utils/queries/items";
|
|
||||||
import { useApiInContext } from "@/utils/store/api";
|
import { useApiInContext } from "@/utils/store/api";
|
||||||
import { useBackdropStore } from "@/utils/store/backdrop";
|
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
|
||||||
const heroItemTypes = new Set<string>([
|
|
||||||
BaseItemKind.Movie,
|
|
||||||
BaseItemKind.Series,
|
|
||||||
BaseItemKind.Episode,
|
|
||||||
BaseItemKind.MusicAlbum,
|
|
||||||
]);
|
|
||||||
|
|
||||||
const combineLibraryLatest = (
|
|
||||||
results: { data?: BaseItemDto[] | null }[],
|
|
||||||
): BaseItemDto[][] => results.map((result) => result.data ?? []);
|
|
||||||
|
|
||||||
export const Route = createFileRoute("/_api/home/")({
|
export const Route = createFileRoute("/_api/home/")({
|
||||||
component: Home,
|
component: Home,
|
||||||
pendingComponent: () => <CircularPageLoadingAnimation />,
|
pendingComponent: () => <CircularPageLoadingAnimation />,
|
||||||
@@ -67,7 +53,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
const libraries = useSuspenseQuery({
|
const libraries = useSuspenseQuery({
|
||||||
queryKey: ["libraries"],
|
queryKey: ["libraries"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const libs = await getUserViewApi(api).getUserViews({
|
const libs = await getUserViewsApi(api).getUserViews({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
});
|
});
|
||||||
return libs.data;
|
return libs.data;
|
||||||
@@ -82,7 +68,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
const resumeItemsVideo = useSuspenseQuery({
|
const resumeItemsVideo = useSuspenseQuery({
|
||||||
queryKey: ["home", "resume", "video"],
|
queryKey: ["home", "resume", "video"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const resumeItems = await getLibraryApi(api).getResumeItems({
|
const resumeItems = await getItemsApi(api).getResumeItems({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
mediaTypes: ["Video"],
|
mediaTypes: ["Video"],
|
||||||
@@ -96,7 +82,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
const resumeItemsAudio = useSuspenseQuery({
|
const resumeItemsAudio = useSuspenseQuery({
|
||||||
queryKey: ["home", "resume", "audio"],
|
queryKey: ["home", "resume", "audio"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const resumeItems = await getLibraryApi(api).getResumeItems({
|
const resumeItems = await getItemsApi(api).getResumeItems({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
mediaTypes: ["Audio"],
|
mediaTypes: ["Audio"],
|
||||||
@@ -110,7 +96,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
const upNextItems = useSuspenseQuery({
|
const upNextItems = useSuspenseQuery({
|
||||||
queryKey: ["home", "upNext"],
|
queryKey: ["home", "upNext"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
const upNext = await getShowApi(api).getNextUp({
|
const upNext = await getTvShowsApi(api).getNextUp({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
fields: [
|
fields: [
|
||||||
ItemFields.PrimaryImageAspectRatio,
|
ItemFields.PrimaryImageAspectRatio,
|
||||||
@@ -120,6 +106,7 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
],
|
],
|
||||||
enableResumable: false,
|
enableResumable: false,
|
||||||
enableRewatching: false,
|
enableRewatching: false,
|
||||||
|
disableFirstEpisode: false,
|
||||||
limit: 10,
|
limit: 10,
|
||||||
});
|
});
|
||||||
return upNext.data;
|
return upNext.data;
|
||||||
@@ -141,29 +128,6 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
}
|
}
|
||||||
}, [libraries.data?.Items?.length]);
|
}, [libraries.data?.Items?.length]);
|
||||||
|
|
||||||
// The per-library "latest" rows; shares cache entries with LatestMediaSection.
|
|
||||||
const libraryLatest = useQueries({
|
|
||||||
queries: (latestMediaLibs ?? []).map((lib) =>
|
|
||||||
getLibraryLatestQueryOptions(api, user.Id, lib.Id),
|
|
||||||
),
|
|
||||||
combine: combineLibraryLatest,
|
|
||||||
});
|
|
||||||
|
|
||||||
// Some servers return nothing for the global /Items/Latest query, so fall back to
|
|
||||||
// interleaving the per-library results (each already newest-first).
|
|
||||||
const heroItems = useMemo(() => {
|
|
||||||
if (latestMedia.data?.length) return latestMedia.data;
|
|
||||||
const items: BaseItemDto[] = [];
|
|
||||||
const longest = Math.max(0, ...libraryLatest.map((list) => list.length));
|
|
||||||
for (let index = 0; index < longest; index++) {
|
|
||||||
for (const list of libraryLatest) {
|
|
||||||
const item = list[index];
|
|
||||||
if (item?.Type && heroItemTypes.has(item.Type)) items.push(item);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return items.slice(0, 16);
|
|
||||||
}, [latestMedia.data, libraryLatest]);
|
|
||||||
|
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
const setBackdrop = useBackdropStore(useShallow((s) => s.setBackdrop));
|
const setBackdrop = useBackdropStore(useShallow((s) => s.setBackdrop));
|
||||||
@@ -189,10 +153,16 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
|
|
||||||
const handleOnChangeCarousel = useCallback(
|
const handleOnChangeCarousel = useCallback(
|
||||||
(now: number) => {
|
(now: number) => {
|
||||||
const currentItem = heroItems[now];
|
if (api && latestMedia.isSuccess && (latestMedia.data?.length ?? 0) > 0) {
|
||||||
if (currentItem) setBackdropForItem(currentItem);
|
const currentItem = latestMedia.data?.[now];
|
||||||
|
if (!currentItem) return;
|
||||||
|
|
||||||
|
// Extract this logic to a separate function
|
||||||
|
setBackdropForItem(currentItem);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
[heroItems, setBackdropForItem],
|
// Only depend on what you need
|
||||||
|
[latestMedia.isSuccess, api, setBackdrop],
|
||||||
);
|
);
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@@ -204,8 +174,11 @@ function HomeContent({ api, user }: { api: Api; user: UserDto }) {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<ErrorBoundary FallbackComponent={ErrorNotice}>
|
<ErrorBoundary FallbackComponent={ErrorNotice}>
|
||||||
{heroItems.length > 0 && (
|
{latestMedia.data?.length && (
|
||||||
<Carousel content={heroItems} onChange={handleOnChangeCarousel} />
|
<Carousel
|
||||||
|
content={latestMedia.data}
|
||||||
|
onChange={handleOnChangeCarousel}
|
||||||
|
/>
|
||||||
)}
|
)}
|
||||||
</ErrorBoundary>
|
</ErrorBoundary>
|
||||||
|
|
||||||
|
|||||||
+675
-68
@@ -1,79 +1,686 @@
|
|||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { useSuspenseQuery } from "@tanstack/react-query";
|
|
||||||
import { createFileRoute } from "@tanstack/react-router";
|
|
||||||
import React from "react";
|
|
||||||
import BoxSetView from "@/components/itemDetail/views/boxSetView";
|
|
||||||
import DefaultView from "@/components/itemDetail/views/defaultView";
|
|
||||||
import PersonView from "@/components/itemDetail/views/personView";
|
|
||||||
import SeriesView from "@/components/itemDetail/views/seriesView";
|
|
||||||
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
|
||||||
import ItemSkeleton from "@/components/skeleton/item";
|
|
||||||
import {
|
import {
|
||||||
getUpcomingEpisodesQueryOptions,
|
BaseItemKind,
|
||||||
prefetchItemDetail,
|
MediaStreamType,
|
||||||
} from "@/utils/queries/itemDetail";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
|
||||||
|
import { motion } from "motion/react";
|
||||||
|
import React, { useLayoutEffect, useMemo, useRef, useState } from "react";
|
||||||
|
import { Card } from "@/components/card/card";
|
||||||
|
import CardScroller from "@/components/cardScroller/cardScroller";
|
||||||
|
import ItemHeader from "@/components/itemHeader";
|
||||||
|
|
||||||
|
import "./item.scss";
|
||||||
|
|
||||||
|
import { createFileRoute, Link } from "@tanstack/react-router";
|
||||||
|
import { useShallow } from "zustand/shallow";
|
||||||
|
import LikeButton from "@/components/buttons/likeButton";
|
||||||
|
import MarkPlayedButton from "@/components/buttons/markPlayedButton";
|
||||||
|
import PlayButton from "@/components/buttons/playButton";
|
||||||
|
import TrailerButton from "@/components/buttons/trailerButton";
|
||||||
|
import IconLink from "@/components/iconLink";
|
||||||
|
import ShowMoreText from "@/components/showMoreText";
|
||||||
|
import ItemSkeleton from "@/components/skeleton/item";
|
||||||
|
import { getTypeIcon } from "@/components/utils/iconsCollection";
|
||||||
|
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
||||||
import { getItemQueryOptions } from "@/utils/queries/items";
|
import { getItemQueryOptions } from "@/utils/queries/items";
|
||||||
|
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||||
import { useCentralStore } from "@/utils/store/central";
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
import type MediaQualityInfo from "@/utils/types/mediaQualityInfo";
|
||||||
type ItemSearch = {
|
|
||||||
/** Item type hint from the link, used to prefetch type-specific data in parallel. */
|
|
||||||
type?: BaseItemKind;
|
|
||||||
};
|
|
||||||
|
|
||||||
const itemKinds = new Set<string>(Object.values(BaseItemKind));
|
|
||||||
|
|
||||||
export const Route = createFileRoute("/_api/item/$id")({
|
export const Route = createFileRoute("/_api/item/$id")({
|
||||||
validateSearch: (search: Record<string, unknown>): ItemSearch => ({
|
component: ItemDetail,
|
||||||
type:
|
|
||||||
typeof search.type === "string" && itemKinds.has(search.type)
|
|
||||||
? (search.type as BaseItemKind)
|
|
||||||
: undefined,
|
|
||||||
}),
|
|
||||||
loaderDeps: ({ search }) => ({ type: search.type }),
|
|
||||||
loader: async ({
|
|
||||||
context: { queryClient, api, user },
|
|
||||||
params,
|
|
||||||
deps: { type },
|
|
||||||
}) => {
|
|
||||||
if (!api || !user?.Id) return;
|
|
||||||
const itemPromise = queryClient.ensureQueryData(
|
|
||||||
getItemQueryOptions(params.id, api, user.Id),
|
|
||||||
);
|
|
||||||
if (type) {
|
|
||||||
prefetchItemDetail(queryClient, api, user.Id, params.id, type);
|
|
||||||
}
|
|
||||||
const item = await itemPromise;
|
|
||||||
if (item.Type !== type) {
|
|
||||||
// No (or wrong) hint, e.g. a deep link: prefetch now that the type is known.
|
|
||||||
prefetchItemDetail(queryClient, api, user.Id, params.id, item.Type);
|
|
||||||
}
|
|
||||||
if (item.Type === BaseItemKind.Episode) {
|
|
||||||
queryClient.prefetchQuery(
|
|
||||||
getUpcomingEpisodesQueryOptions(api, user.Id, item),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
component: ItemPage,
|
|
||||||
pendingComponent: () => <ItemSkeleton />,
|
pendingComponent: () => <ItemSkeleton />,
|
||||||
errorComponent: () => <ErrorNotice />,
|
// pendingMs: 5000,
|
||||||
|
loader: async ({ context: { queryClient, api, user }, params }) => {
|
||||||
|
if (!api || !user?.Id) return null;
|
||||||
|
const itemPromise = queryClient.ensureQueryData(
|
||||||
|
getItemQueryOptions(params.id, api, user?.Id),
|
||||||
|
);
|
||||||
|
queryClient.prefetchQuery({
|
||||||
|
queryKey: ["item", params.id, "similarItem"],
|
||||||
|
queryFn: async () =>
|
||||||
|
(
|
||||||
|
await getLibraryApi(api).getSimilarItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: params.id,
|
||||||
|
limit: 16,
|
||||||
|
})
|
||||||
|
).data,
|
||||||
|
});
|
||||||
|
await itemPromise;
|
||||||
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
function ItemPage() {
|
function ItemDetail() {
|
||||||
const { id } = Route.useParams();
|
const { id } = Route.useParams();
|
||||||
const api = Route.useRouteContext().api;
|
|
||||||
const user = useCentralStore((s) => s.currentUser);
|
|
||||||
const { data: item } = useSuspenseQuery(
|
|
||||||
getItemQueryOptions(id, api, user?.Id),
|
|
||||||
);
|
|
||||||
|
|
||||||
switch (item.Type) {
|
const api = Route.useRouteContext().api;
|
||||||
case BaseItemKind.Series:
|
|
||||||
return <SeriesView key={id} item={item} />;
|
const user = useCentralStore((s) => s.currentUser);
|
||||||
case BaseItemKind.BoxSet:
|
|
||||||
return <BoxSetView key={id} item={item} />;
|
const item = useSuspenseQuery(getItemQueryOptions(id, api, user?.Id));
|
||||||
case BaseItemKind.Person:
|
|
||||||
return <PersonView key={id} item={item} />;
|
const similarItems = useQuery({
|
||||||
default:
|
queryKey: ["item", id, "similarItem"],
|
||||||
return <DefaultView key={id} item={item} />;
|
queryFn: async () => {
|
||||||
}
|
if (!api || !user?.Id) return null;
|
||||||
|
return (
|
||||||
|
await getLibraryApi(api).getSimilarItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: id,
|
||||||
|
limit: 16,
|
||||||
|
})
|
||||||
|
).data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [selectedVideoTrack, setSelectedVideoTrack] = useState(0);
|
||||||
|
const [selectedAudioTrack, setSelectedAudioTrack] = useState(0);
|
||||||
|
const [selectedSubtitleTrack, setSelectedSubtitleTrack] = useState(0);
|
||||||
|
|
||||||
|
const videoTracks = useMemo(() => {
|
||||||
|
const result = item.data?.MediaStreams?.filter((source) => {
|
||||||
|
if (source.Type === MediaStreamType.Video) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
setSelectedVideoTrack(
|
||||||
|
result?.find((track) => track.IsDefault)?.Index ??
|
||||||
|
result?.[0]?.Index ??
|
||||||
|
0,
|
||||||
|
);
|
||||||
|
return result ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const audioTracks = useMemo(() => {
|
||||||
|
const result = item.data?.MediaStreams?.filter((source) => {
|
||||||
|
if (source.Type === MediaStreamType.Audio) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
setSelectedAudioTrack(item.data.MediaSources?.[0].DefaultAudioStreamIndex ?? 0);
|
||||||
|
return result ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const subtitleTracks = useMemo(() => {
|
||||||
|
const result = item.data.MediaStreams?.filter((source) => {
|
||||||
|
if (source.Type === MediaStreamType.Subtitle) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
setSelectedSubtitleTrack(
|
||||||
|
item.data.MediaSources?.[0].DefaultSubtitleStreamIndex ?? -1,
|
||||||
|
);
|
||||||
|
return result ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
|
||||||
|
const directors = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Director") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const writers = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Writer") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const actors = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Actor") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const producers = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Producer") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
|
||||||
|
const mediaQualityInfo = useMemo<MediaQualityInfo>(() => {
|
||||||
|
const checkAtmos = audioTracks.filter((audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("atmos"),
|
||||||
|
);
|
||||||
|
const checkDolbyVision = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("dv") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("dolby vision") ||
|
||||||
|
!!video.VideoDoViTitle ||
|
||||||
|
video.VideoRangeType === "DOVI",
|
||||||
|
);
|
||||||
|
const checkDD = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
(audio.DisplayTitle?.toLocaleLowerCase().includes("dd") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("ddp")) ||
|
||||||
|
(audio.DisplayTitle?.toLocaleLowerCase().includes("dolby digital") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("dolby digital+")),
|
||||||
|
);
|
||||||
|
const checkDDP = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("ddp") ||
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dolby digital+"),
|
||||||
|
);
|
||||||
|
const checkDts = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dts") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd ma") &&
|
||||||
|
!audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd.ma"),
|
||||||
|
);
|
||||||
|
const checkDtsHDMA = audioTracks.filter(
|
||||||
|
(audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd ma") ||
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("dts-hd.ma"),
|
||||||
|
);
|
||||||
|
const checkUHD = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("4k") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("2160p") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("uhd"),
|
||||||
|
);
|
||||||
|
const checkHD = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
(video.DisplayTitle?.toLocaleLowerCase().includes("hd") &&
|
||||||
|
!video.DisplayTitle?.toLocaleLowerCase().includes("hdr")) ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("1080p") ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("fhd"),
|
||||||
|
);
|
||||||
|
const checkSD = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
(video.DisplayTitle?.toLocaleLowerCase().includes("sd") &&
|
||||||
|
!video.DisplayTitle?.toLocaleLowerCase().includes("sdr")) ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("720p"),
|
||||||
|
);
|
||||||
|
const checkSDR = videoTracks.filter(
|
||||||
|
(video) => video.VideoRangeType === "SDR",
|
||||||
|
);
|
||||||
|
const checkHDR = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.VideoRange === "HDR" ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("dv"),
|
||||||
|
);
|
||||||
|
const checkHDR10 = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.VideoRangeType === "HDR10" &&
|
||||||
|
!video.DisplayTitle?.toLocaleLowerCase().includes("hdr10+"),
|
||||||
|
);
|
||||||
|
const checkHDR10Plus = videoTracks.filter(
|
||||||
|
(video) =>
|
||||||
|
video.VideoRangeType === "HDR10Plus" ||
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("hdr10+"),
|
||||||
|
);
|
||||||
|
const checkTrueHD = audioTracks.filter((audio) =>
|
||||||
|
audio.DisplayTitle?.toLocaleLowerCase().includes("truehd"),
|
||||||
|
);
|
||||||
|
const checkIMAX = videoTracks.filter((video) =>
|
||||||
|
video.DisplayTitle?.toLocaleLowerCase().includes("imax"),
|
||||||
|
);
|
||||||
|
return {
|
||||||
|
isAtmos: checkAtmos.length > 0,
|
||||||
|
isDolbyVision: checkDolbyVision.length > 0,
|
||||||
|
isDts: checkDts.length > 0,
|
||||||
|
isDtsHDMA: checkDtsHDMA.length > 0,
|
||||||
|
isDD: checkDD.length > 0,
|
||||||
|
isDDP: checkDDP.length > 0,
|
||||||
|
isUHD: checkUHD.length > 0,
|
||||||
|
isHD: checkHD.length > 0,
|
||||||
|
isSD: checkSD.length > 0,
|
||||||
|
isSDR: checkSDR.length > 0,
|
||||||
|
isHDR: checkHDR.length > 0,
|
||||||
|
isHDR10: checkHDR10.length > 0,
|
||||||
|
isHDR10Plus: checkHDR10Plus.length > 0,
|
||||||
|
isTrueHD: checkTrueHD.length > 0,
|
||||||
|
isIMAX: checkIMAX.length > 0,
|
||||||
|
};
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
|
||||||
|
const setBackdrop = useBackdropStore(useShallow((state) => state.setBackdrop));
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
if (api && item.data) {
|
||||||
|
if (item.data?.BackdropImageTags?.length) {
|
||||||
|
setBackdrop(
|
||||||
|
item.data.ImageBlurHashes?.Backdrop?.[
|
||||||
|
item.data.BackdropImageTags?.[0]
|
||||||
|
],
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
setBackdrop("");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [item.data.Id]);
|
||||||
|
|
||||||
|
// Provide a scroll target ref to the backdrop component.
|
||||||
|
const scrollTargetRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
key={id}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.35,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
className="scrollY padded-top flex flex-column item item-default"
|
||||||
|
ref={scrollTargetRef}
|
||||||
|
>
|
||||||
|
<ItemHeader
|
||||||
|
item={item.data}
|
||||||
|
api={api}
|
||||||
|
mediaQualityInfo={mediaQualityInfo}
|
||||||
|
scrollTargetRef={scrollTargetRef}
|
||||||
|
>
|
||||||
|
<div className="item-hero-buttons-container">
|
||||||
|
<div
|
||||||
|
className="flex flex-row"
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<PlayButton
|
||||||
|
item={item.data}
|
||||||
|
itemType={item.data.Type ?? "Movie"}
|
||||||
|
audio={item.data.Type === "Audio"}
|
||||||
|
currentVideoTrack={selectedVideoTrack}
|
||||||
|
currentAudioTrack={selectedAudioTrack}
|
||||||
|
currentSubTrack={selectedSubtitleTrack}
|
||||||
|
userId={user?.Id}
|
||||||
|
buttonProps={{
|
||||||
|
fullWidth: true,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
{item.data.RemoteTrailers && (
|
||||||
|
<TrailerButton
|
||||||
|
trailerItem={item.data.RemoteTrailers}
|
||||||
|
disabled={item.data.RemoteTrailers?.length === 0}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<LikeButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isFavorite={item.data.UserData?.IsFavorite}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isPlayed={item.data.UserData?.Played}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ItemHeader>
|
||||||
|
<div className="item-detail">
|
||||||
|
<div style={{ width: "100%" }}>
|
||||||
|
{(item.data.Taglines?.length ?? 0) > 0 && (
|
||||||
|
<Typography variant="h5" mb={2} fontWeight={300}>
|
||||||
|
{item.data.Taglines?.[0]}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
<ShowMoreText
|
||||||
|
content={item.data.Overview ?? ""}
|
||||||
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{videoTracks.length > 0 && (
|
||||||
|
<TextField
|
||||||
|
label="Video"
|
||||||
|
select
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
marginBottom: "1em",
|
||||||
|
}}
|
||||||
|
value={selectedVideoTrack}
|
||||||
|
variant="filled"
|
||||||
|
onChange={(e) => setSelectedVideoTrack(Number(e.target.value))}
|
||||||
|
>
|
||||||
|
{videoTracks.map((track) => (
|
||||||
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
))}
|
||||||
|
</TextField>
|
||||||
|
)}
|
||||||
|
{audioTracks.length > 0 && (
|
||||||
|
<TextField
|
||||||
|
label="Audio"
|
||||||
|
select
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
marginBottom: "1em",
|
||||||
|
}}
|
||||||
|
value={selectedAudioTrack}
|
||||||
|
variant="filled"
|
||||||
|
onChange={(e) => setSelectedAudioTrack(Number(e.target.value))}
|
||||||
|
>
|
||||||
|
{audioTracks.map((track) => (
|
||||||
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
))}
|
||||||
|
</TextField>
|
||||||
|
)}
|
||||||
|
{subtitleTracks.length > 0 && (
|
||||||
|
<TextField
|
||||||
|
label="Subtitle"
|
||||||
|
select
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
value={selectedSubtitleTrack}
|
||||||
|
variant="filled"
|
||||||
|
SelectProps={{
|
||||||
|
MenuProps: {
|
||||||
|
disablePortal: true,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
onChange={(e) =>
|
||||||
|
setSelectedSubtitleTrack(Number(e.target.value))
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<MenuItem key={-1} value={-1}>
|
||||||
|
No Subtitle
|
||||||
|
</MenuItem>
|
||||||
|
{subtitleTracks.map((track) => (
|
||||||
|
<MenuItem key={track.Index} value={track.Index}>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
))}
|
||||||
|
</TextField>
|
||||||
|
)}
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.6em",
|
||||||
|
alignSelf: "end",
|
||||||
|
marginTop: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.ExternalUrls?.map(
|
||||||
|
(url) =>
|
||||||
|
url.Url &&
|
||||||
|
url.Name && (
|
||||||
|
<IconLink key={url.Name} url={url.Url} name={url.Name} />
|
||||||
|
),
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
{(item.data.People?.length ?? 0) > 0 && (
|
||||||
|
<div className="item-detail-cast">
|
||||||
|
<Typography variant="h5" mb={2}>
|
||||||
|
Cast & Crew
|
||||||
|
</Typography>
|
||||||
|
{actors.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Actors</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{actors.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{writers.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Writers</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{writers.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{directors.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Directors</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{directors.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
to="/person/$id"
|
||||||
|
key={actor.Id}
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{producers.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6">Producers</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{producers.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{(similarItems.data?.TotalRecordCount ?? 0) > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="You might also like"
|
||||||
|
displayCards={7}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{similarItems.data?.Items?.map((similar) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={similar.Id}
|
||||||
|
item={similar}
|
||||||
|
seriesId={similar.SeriesId}
|
||||||
|
cardTitle={
|
||||||
|
similar.Type === BaseItemKind.Episode
|
||||||
|
? similar.SeriesName
|
||||||
|
: similar.Name
|
||||||
|
}
|
||||||
|
imageType={"Primary"}
|
||||||
|
cardCaption={
|
||||||
|
similar.Type === BaseItemKind.Episode
|
||||||
|
? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}`
|
||||||
|
: similar.Type === BaseItemKind.Series
|
||||||
|
? `${similar.ProductionYear} - ${
|
||||||
|
similar.EndDate
|
||||||
|
? new Date(similar.EndDate).toLocaleString([], {
|
||||||
|
year: "numeric",
|
||||||
|
})
|
||||||
|
: "Present"
|
||||||
|
}`
|
||||||
|
: similar.ProductionYear
|
||||||
|
}
|
||||||
|
cardType={
|
||||||
|
similar.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
similar.Type === BaseItemKind.Audio
|
||||||
|
? "square"
|
||||||
|
: "portrait"
|
||||||
|
}
|
||||||
|
queryKey={["item", id, "similarItem"]}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export default ItemDetail;
|
||||||
@@ -0,0 +1,103 @@
|
|||||||
|
$cardWidth: 18%;
|
||||||
|
|
||||||
|
.item-default.item {
|
||||||
|
|
||||||
|
.item-detail {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 35%;
|
||||||
|
justify-items: center;
|
||||||
|
align-items: start;
|
||||||
|
gap: 3em;
|
||||||
|
|
||||||
|
&-cast {
|
||||||
|
&-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1em;
|
||||||
|
}
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
&-card {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 6em 1fr;
|
||||||
|
gap: 0.5em;
|
||||||
|
align-items: center;
|
||||||
|
color: white !important;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: rgb(255 255 255 / 0);
|
||||||
|
transition: background $transition-time-default;
|
||||||
|
border-radius: $border-radius-default;
|
||||||
|
&:hover {
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
}
|
||||||
|
&-image,
|
||||||
|
&-icon {
|
||||||
|
width: 6em;
|
||||||
|
height: 6em;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 100%;
|
||||||
|
box-shadow: $shadow-card-image;
|
||||||
|
}
|
||||||
|
&-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1em;
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
.material-symbols-rounded {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-link {
|
||||||
|
color: white;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 0.5);
|
||||||
|
&:hover {
|
||||||
|
text-decoration-color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Global item-detail
|
||||||
|
.item-detail-link{
|
||||||
|
margin-top: 0.85em !important;
|
||||||
|
&:hover > img{
|
||||||
|
filter: brightness(1);
|
||||||
|
}
|
||||||
|
& > img {
|
||||||
|
width: 2em;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
filter: brightness(0.5);
|
||||||
|
transition: filter $transition-time-default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.item {
|
||||||
|
gap: 1.5em;
|
||||||
|
&-hero{
|
||||||
|
// margin-bottom: 1em;
|
||||||
|
&-image{
|
||||||
|
box-sizing: border-box;
|
||||||
|
&-container{
|
||||||
|
box-sizing: content-box;
|
||||||
|
box-shadow: 0px 10px 20px -10px rgb(0 0 0 / 0.5) !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-mediaInfo{
|
||||||
|
margin-top: 1em;
|
||||||
|
height: 1.1em;
|
||||||
|
opacity: 0.8;
|
||||||
|
&.badge{
|
||||||
|
margin: 0;
|
||||||
|
height: 1.2em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -170,13 +170,7 @@ function LoginUser() {
|
|||||||
<Typography variant="body1" sx={{ opacity: 0.7 }}>
|
<Typography variant="body1" sx={{ opacity: 0.7 }}>
|
||||||
Login as
|
Login as
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography variant="h5" fontWeight={700} className="gradient-text">
|
||||||
variant="h5"
|
|
||||||
className="gradient-text"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 700,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{userName}
|
{userName}
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
@@ -198,34 +192,32 @@ function LoginUser() {
|
|||||||
label="Password"
|
label="Password"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
autoFocus
|
autoFocus
|
||||||
slotProps={{
|
InputProps={{
|
||||||
input: {
|
startAdornment: (
|
||||||
startAdornment: (
|
<InputAdornment position="start">
|
||||||
<InputAdornment position="start">
|
<span
|
||||||
<span
|
className="material-symbols-rounded"
|
||||||
className="material-symbols-rounded"
|
style={{ opacity: 0.5 }}
|
||||||
style={{ opacity: 0.5 }}
|
>
|
||||||
>
|
key
|
||||||
key
|
</span>
|
||||||
</span>
|
</InputAdornment>
|
||||||
</InputAdornment>
|
),
|
||||||
),
|
endAdornment: (
|
||||||
endAdornment: (
|
<InputAdornment position="end">
|
||||||
<InputAdornment position="end">
|
<IconButton onClick={handleShowPassword} edge="end">
|
||||||
<IconButton onClick={handleShowPassword} edge="end">
|
{password.showpass ? (
|
||||||
{password.showpass ? (
|
<span className="material-symbols-rounded">
|
||||||
<span className="material-symbols-rounded">
|
visibility
|
||||||
visibility
|
</span>
|
||||||
</span>
|
) : (
|
||||||
) : (
|
<span className="material-symbols-rounded">
|
||||||
<span className="material-symbols-rounded">
|
visibility_off
|
||||||
visibility_off
|
</span>
|
||||||
</span>
|
)}
|
||||||
)}
|
</IconButton>
|
||||||
</IconButton>
|
</InputAdornment>
|
||||||
</InputAdornment>
|
),
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
|||||||
@@ -74,15 +74,12 @@ const UserCard = ({ user }: { user: UserDto }) => {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography
|
||||||
|
mt={2}
|
||||||
align="center"
|
align="center"
|
||||||
variant="subtitle1"
|
variant="subtitle1"
|
||||||
|
fontWeight="bold"
|
||||||
noWrap
|
noWrap
|
||||||
sx={{
|
sx={{ width: "100%", color: "text.primary" }}
|
||||||
mt: 2,
|
|
||||||
fontWeight: "bold",
|
|
||||||
width: "100%",
|
|
||||||
color: "text.primary",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{user.Name}
|
{user.Name}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -130,13 +127,7 @@ function LoginPublicUsersList() {
|
|||||||
gap: 3,
|
gap: 3,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography variant="h4" align="center" fontWeight="bold">
|
||||||
variant="h4"
|
|
||||||
align="center"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Select User
|
Select User
|
||||||
</Typography>
|
</Typography>
|
||||||
|
|
||||||
|
|||||||
@@ -149,13 +149,7 @@ function UserLoginManual() {
|
|||||||
mb: 3,
|
mb: 3,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography variant="h4" fontWeight="bold" align="center">
|
||||||
variant="h4"
|
|
||||||
align="center"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Login
|
Login
|
||||||
</Typography>
|
</Typography>
|
||||||
<form
|
<form
|
||||||
@@ -168,19 +162,17 @@ function UserLoginManual() {
|
|||||||
label="Username" // Label helps accessibility, theme handles style
|
label="Username" // Label helps accessibility, theme handles style
|
||||||
fullWidth
|
fullWidth
|
||||||
onChange={(e) => setUsername(e.currentTarget.value)}
|
onChange={(e) => setUsername(e.currentTarget.value)}
|
||||||
slotProps={{
|
InputProps={{
|
||||||
input: {
|
startAdornment: (
|
||||||
startAdornment: (
|
<InputAdornment position="start">
|
||||||
<InputAdornment position="start">
|
<span
|
||||||
<span
|
className="material-symbols-rounded"
|
||||||
className="material-symbols-rounded"
|
style={{ opacity: 0.5 }}
|
||||||
style={{ opacity: 0.5 }}
|
>
|
||||||
>
|
person
|
||||||
person
|
</span>
|
||||||
</span>
|
</InputAdornment>
|
||||||
</InputAdornment>
|
),
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<TextField
|
<TextField
|
||||||
@@ -189,41 +181,39 @@ function UserLoginManual() {
|
|||||||
onChange={handlePassword("password")}
|
onChange={handlePassword("password")}
|
||||||
label="Password"
|
label="Password"
|
||||||
variant="outlined"
|
variant="outlined"
|
||||||
slotProps={{
|
InputProps={{
|
||||||
input: {
|
startAdornment: (
|
||||||
startAdornment: (
|
<InputAdornment position="start">
|
||||||
<InputAdornment position="start">
|
<span
|
||||||
<span
|
className="material-symbols-rounded"
|
||||||
className="material-symbols-rounded"
|
style={{ opacity: 0.5 }}
|
||||||
style={{ opacity: 0.5 }}
|
>
|
||||||
>
|
key
|
||||||
key
|
</span>
|
||||||
</span>
|
</InputAdornment>
|
||||||
</InputAdornment>
|
),
|
||||||
),
|
endAdornment: (
|
||||||
endAdornment: (
|
<InputAdornment position="end">
|
||||||
<InputAdornment position="end">
|
<IconButton
|
||||||
<IconButton
|
onClick={handleShowPassword}
|
||||||
onClick={handleShowPassword}
|
edge="end"
|
||||||
edge="end"
|
sx={{
|
||||||
sx={{
|
color: "rgba(255,255,255,0.7)",
|
||||||
color: "rgba(255,255,255,0.7)",
|
"&:hover": { color: "#fff" },
|
||||||
"&:hover": { color: "#fff" },
|
}}
|
||||||
}}
|
>
|
||||||
>
|
{password.showpass ? (
|
||||||
{password.showpass ? (
|
<span className="material-symbols-rounded">
|
||||||
<span className="material-symbols-rounded">
|
visibility
|
||||||
visibility
|
</span>
|
||||||
</span>
|
) : (
|
||||||
) : (
|
<span className="material-symbols-rounded">
|
||||||
<span className="material-symbols-rounded">
|
visibility_off
|
||||||
visibility_off
|
</span>
|
||||||
</span>
|
)}
|
||||||
)}
|
</IconButton>
|
||||||
</IconButton>
|
</InputAdornment>
|
||||||
</InputAdornment>
|
),
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
|
||||||
@@ -299,12 +289,7 @@ function UserLoginManual() {
|
|||||||
>
|
>
|
||||||
info
|
info
|
||||||
</span>
|
</span>
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight="bold">
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Notice
|
Notice
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -0,0 +1,429 @@
|
|||||||
|
import { BaseItemKind, LocationType } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
import Tab from "@mui/material/Tab";
|
||||||
|
import Tabs from "@mui/material/Tabs";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import { AnimatePresence, motion } from "motion/react";
|
||||||
|
import React, {
|
||||||
|
type ReactNode,
|
||||||
|
useLayoutEffect,
|
||||||
|
useRef,
|
||||||
|
useState,
|
||||||
|
} from "react";
|
||||||
|
import LikeButton from "@/components/buttons/likeButton";
|
||||||
|
import { Card } from "@/components/card/card";
|
||||||
|
import ItemHeader from "@/components/itemHeader";
|
||||||
|
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
||||||
|
import ShowMoreText from "@/components/showMoreText";
|
||||||
|
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||||
|
import "./person.scss";
|
||||||
|
|
||||||
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
|
import IconLink from "@/components/iconLink";
|
||||||
|
import { useApiInContext } from "@/utils/store/api";
|
||||||
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
|
||||||
|
type TabPanelProps = {
|
||||||
|
children: ReactNode;
|
||||||
|
index: number;
|
||||||
|
value: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
function TabPanel(props: TabPanelProps) {
|
||||||
|
const { children, value, index, ...other } = props;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
role="tabpanel"
|
||||||
|
hidden={value !== index}
|
||||||
|
id={`full-width-tabpanel-${index}`}
|
||||||
|
aria-labelledby={`full-width-tab-${index}`}
|
||||||
|
{...other}
|
||||||
|
style={{ marginTop: "1em" }}
|
||||||
|
>
|
||||||
|
{value === index && <div>{children}</div>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export const Route = createFileRoute("/_api/person/$id")({
|
||||||
|
component: PersonTitlePage,
|
||||||
|
});
|
||||||
|
|
||||||
|
function PersonTitlePage() {
|
||||||
|
const { id } = Route.useParams();
|
||||||
|
const api = useApiInContext((s) => s.api);
|
||||||
|
|
||||||
|
const user = useCentralStore((s) => s.currentUser);
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user?.Id,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const personMovies = useQuery({
|
||||||
|
queryKey: ["item", id, "personMovies"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getItemsApi(api).getItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Movie],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: ["Descending"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
const personShows = useQuery({
|
||||||
|
queryKey: ["item", id, "personShows"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getItemsApi(api).getItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Series],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: ["Descending"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
const personBooks = useQuery({
|
||||||
|
queryKey: ["item", id, "personBooks"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getItemsApi(api).getItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Book],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: ["Descending"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
const personPhotos = useQuery({
|
||||||
|
queryKey: ["item", id, "personPhotos"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getItemsApi(api).getItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Photo],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
const personEpisodes = useQuery({
|
||||||
|
queryKey: ["item", id, "personEpisodes"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getItemsApi(api).getItems({
|
||||||
|
userId: user?.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Episode],
|
||||||
|
recursive: true,
|
||||||
|
fields: ["SeasonUserData", "Overview"],
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const [activePersonTab, setActivePersonTab] = useState(0);
|
||||||
|
|
||||||
|
const personTabs = [
|
||||||
|
{
|
||||||
|
title: "Movies",
|
||||||
|
data: personMovies,
|
||||||
|
queryKey: ["item", id, "personMovies"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "TV Shows",
|
||||||
|
data: personShows,
|
||||||
|
queryKey: ["item", id, "personShows"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Books",
|
||||||
|
data: personBooks,
|
||||||
|
queryKey: ["item", id, "personBooks"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Photos",
|
||||||
|
data: personPhotos,
|
||||||
|
queryKey: ["item", id, "personPhotos"],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "Episodes",
|
||||||
|
data: personEpisodes,
|
||||||
|
queryKey: ["item", id, "personEpisodes"],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
const setBackdrop = useBackdropStore((s) => s.setBackdrop);
|
||||||
|
|
||||||
|
useLayoutEffect(() => {
|
||||||
|
if (
|
||||||
|
personMovies.isSuccess &&
|
||||||
|
personShows.isSuccess &&
|
||||||
|
personBooks.isSuccess &&
|
||||||
|
personPhotos.isSuccess &&
|
||||||
|
personEpisodes.isSuccess
|
||||||
|
) {
|
||||||
|
if (personMovies.data?.TotalRecordCount !== 0) {
|
||||||
|
setActivePersonTab(0);
|
||||||
|
} else if (personShows.data?.TotalRecordCount !== 0) {
|
||||||
|
setActivePersonTab(1);
|
||||||
|
} else if (personBooks.data?.TotalRecordCount !== 0) {
|
||||||
|
setActivePersonTab(2);
|
||||||
|
} else if (personPhotos.data?.TotalRecordCount !== 0) {
|
||||||
|
setActivePersonTab(3);
|
||||||
|
} else if (personEpisodes.data?.TotalRecordCount !== 0) {
|
||||||
|
setActivePersonTab(4);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
setBackdrop("", "");
|
||||||
|
}, [
|
||||||
|
personMovies.isSuccess,
|
||||||
|
personShows.isSuccess,
|
||||||
|
personBooks.isSuccess,
|
||||||
|
personPhotos.isSuccess,
|
||||||
|
personEpisodes.isSuccess,
|
||||||
|
]);
|
||||||
|
|
||||||
|
const [animationDirection, setAnimationDirection] = useState("forward");
|
||||||
|
|
||||||
|
const pageRef = useRef(null);
|
||||||
|
|
||||||
|
if (item.isPending) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.isSuccess && item.data) {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
key={id}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
className="scrollY padded-top item item-person flex flex-column"
|
||||||
|
ref={pageRef}
|
||||||
|
>
|
||||||
|
<ItemHeader item={item.data} api={api}>
|
||||||
|
<div className="item-hero-buttons-container flex flex-row">
|
||||||
|
<div className="flex flex-row fullWidth" />
|
||||||
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
<LikeButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isFavorite={item.data.UserData?.IsFavorite}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ItemHeader>
|
||||||
|
<div className="item-detail">
|
||||||
|
<div style={{ width: "100%" }}>
|
||||||
|
<ShowMoreText
|
||||||
|
content={item.data.Overview ?? ""}
|
||||||
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.6em",
|
||||||
|
alignSelf: "end",
|
||||||
|
marginTop: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.ExternalUrls?.map(
|
||||||
|
(url) =>
|
||||||
|
url.Name &&
|
||||||
|
url.Url && <IconLink url={url.Url} name={url.Name} />,
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.PremiereDate && (
|
||||||
|
<div>
|
||||||
|
<Typography variant="h6">Birth</Typography>
|
||||||
|
<Typography variant="subtitle1" sx={{ opacity: 0.8 }}>
|
||||||
|
{new Date(item.data.PremiereDate).toDateString()}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{item.data.EndDate && (
|
||||||
|
<div>
|
||||||
|
<Typography variant="h6" mt={2}>
|
||||||
|
Death
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subtitle2" sx={{ opacity: 0.8 }}>
|
||||||
|
{new Date(item.data.EndDate).toDateString()}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div className="item-detail-person-container">
|
||||||
|
<div className="item-detail-person-header">
|
||||||
|
<Tabs
|
||||||
|
variant="scrollable"
|
||||||
|
value={activePersonTab}
|
||||||
|
onChange={(_, newVal) => {
|
||||||
|
if (newVal > activePersonTab) {
|
||||||
|
setAnimationDirection("forward");
|
||||||
|
} else if (newVal < activePersonTab) {
|
||||||
|
setAnimationDirection("backwards");
|
||||||
|
}
|
||||||
|
setActivePersonTab(newVal);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{personTabs.map((tab) => {
|
||||||
|
return (
|
||||||
|
<Tab
|
||||||
|
key={tab.title}
|
||||||
|
label={tab.title}
|
||||||
|
disabled={tab.data.data?.TotalRecordCount === 0}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Tabs>
|
||||||
|
<Divider />
|
||||||
|
</div>
|
||||||
|
<AnimatePresence>
|
||||||
|
{personTabs.map((tab, index) => {
|
||||||
|
return (
|
||||||
|
<TabPanel value={activePersonTab} index={index} key={tab.title}>
|
||||||
|
<motion.div
|
||||||
|
className={`item-detail-person-cards ${
|
||||||
|
tab.title === "Movies" ||
|
||||||
|
tab.title === "TV Shows" ||
|
||||||
|
tab.title === "Books"
|
||||||
|
? "col-7"
|
||||||
|
: "col-4"
|
||||||
|
}`}
|
||||||
|
key={tab.queryKey.join("")}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
transform:
|
||||||
|
animationDirection === "forward"
|
||||||
|
? "translate(30px)"
|
||||||
|
: "translate(-30px)",
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
transform: "translate(0px)",
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.2,
|
||||||
|
ease: "anticipate",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{tab.data.isSuccess &&
|
||||||
|
tab.data.data?.Items?.map((tabitem) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={tabitem.Id}
|
||||||
|
item={tabitem}
|
||||||
|
cardTitle={
|
||||||
|
tabitem.Type === BaseItemKind.Episode
|
||||||
|
? tabitem.SeriesName
|
||||||
|
: tabitem.Name
|
||||||
|
}
|
||||||
|
imageType={"Primary"}
|
||||||
|
cardCaption={
|
||||||
|
tabitem.Type === BaseItemKind.Episode
|
||||||
|
? `S${tabitem.ParentIndexNumber}:E${tabitem.IndexNumber} - ${tabitem.Name}`
|
||||||
|
: tabitem.Type === BaseItemKind.Series
|
||||||
|
? `${tabitem.ProductionYear} - ${
|
||||||
|
tabitem.EndDate
|
||||||
|
? new Date(
|
||||||
|
tabitem.EndDate,
|
||||||
|
).toLocaleString([], {
|
||||||
|
year: "numeric",
|
||||||
|
})
|
||||||
|
: "Present"
|
||||||
|
}`
|
||||||
|
: tabitem.ProductionYear
|
||||||
|
}
|
||||||
|
cardType={
|
||||||
|
tabitem.Type === BaseItemKind.Episode
|
||||||
|
? "thumb"
|
||||||
|
: "portrait"
|
||||||
|
}
|
||||||
|
queryKey={tab.queryKey}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</motion.div>
|
||||||
|
</TabPanel>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</AnimatePresence>
|
||||||
|
</div>
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default PersonTitlePage;
|
||||||
@@ -0,0 +1,89 @@
|
|||||||
|
$cardWidth: 18%;
|
||||||
|
.item-detail-person {
|
||||||
|
&-container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&-header {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&-cards {
|
||||||
|
display: grid;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-7 {
|
||||||
|
grid-template-columns: repeat(7, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
.col-4 {
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
|
||||||
|
.item-person.item {
|
||||||
|
gap: 1em;
|
||||||
|
|
||||||
|
|
||||||
|
.item-detail {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 1fr 35%;
|
||||||
|
justify-items: center;
|
||||||
|
align-items: start;
|
||||||
|
gap: 3em;
|
||||||
|
|
||||||
|
&-cast {
|
||||||
|
&-container {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
gap: 1em;
|
||||||
|
}
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(5, minmax(0, 1fr));
|
||||||
|
gap: 1em;
|
||||||
|
margin-bottom: 1em;
|
||||||
|
}
|
||||||
|
&-card {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 6em 1fr;
|
||||||
|
gap: 0.5em;
|
||||||
|
align-items: center;
|
||||||
|
color: white !important;
|
||||||
|
text-decoration: none;
|
||||||
|
padding: 0.5em;
|
||||||
|
background: rgb(255 255 255 / 0);
|
||||||
|
transition: background $transition-time-default;
|
||||||
|
border-radius: $border-radius-default;
|
||||||
|
&:hover {
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
}
|
||||||
|
&-image,
|
||||||
|
&-icon {
|
||||||
|
width: 6em;
|
||||||
|
height: 6em;
|
||||||
|
object-fit: cover;
|
||||||
|
border-radius: 100%;
|
||||||
|
box-shadow: $shadow-card-image;
|
||||||
|
}
|
||||||
|
&-icon {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
font-size: 1em;
|
||||||
|
background: rgb(255 255 255 / 0.1);
|
||||||
|
.material-symbols-rounded {
|
||||||
|
font-size: 3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-link {
|
||||||
|
color: white;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 0.5);
|
||||||
|
&:hover {
|
||||||
|
text-decoration-color: white;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@@ -58,22 +58,18 @@ const AudioInfo = React.memo(
|
|||||||
<div className="audio-info">
|
<div className="audio-info">
|
||||||
<Typography
|
<Typography
|
||||||
variant="h4"
|
variant="h4"
|
||||||
|
fontWeight={700}
|
||||||
noWrap
|
noWrap
|
||||||
style={{ width: "100%", marginBottom: "0.2em" }}
|
style={{ width: "100%", marginBottom: "0.2em" }}
|
||||||
sx={{
|
|
||||||
fontWeight: 700,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{item?.Name}
|
{item?.Name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h6"
|
variant="h6"
|
||||||
|
fontWeight={400}
|
||||||
className="opacity-07"
|
className="opacity-07"
|
||||||
noWrap
|
noWrap
|
||||||
style={{ width: "100%" }}
|
style={{ width: "100%" }}
|
||||||
sx={{
|
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{item?.Artists?.join(", ")}
|
{item?.Artists?.join(", ")}
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -255,3 +251,4 @@ function AudioPlayerRoute() {
|
|||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api";
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import { WebviewWindow as appWindow } from "@tauri-apps/api/webviewWindow";
|
import { WebviewWindow as appWindow } from "@tauri-apps/api/webviewWindow";
|
||||||
import React, { useCallback, useEffect, useRef } from "react";
|
import React, { useCallback, useEffect, useRef } from "react";
|
||||||
@@ -12,10 +12,14 @@ import { RepeatMode } from "@jellyfin/sdk/lib/generated-client";
|
|||||||
import { useMutation } from "@tanstack/react-query";
|
import { useMutation } from "@tanstack/react-query";
|
||||||
import { createFileRoute, useRouter } from "@tanstack/react-router";
|
import { createFileRoute, useRouter } from "@tanstack/react-router";
|
||||||
import JASSUB from "jassub";
|
import JASSUB from "jassub";
|
||||||
|
// @ts-expect-error
|
||||||
import wasmUrl from "jassub/dist/wasm/jassub-worker.wasm?url"; // non-SIMD fallback
|
import wasmUrl from "jassub/dist/wasm/jassub-worker.wasm?url"; // non-SIMD fallback
|
||||||
|
// @ts-expect-error
|
||||||
import modernWasmUrl from "jassub/dist/wasm/jassub-worker-modern.wasm?url"; // SIMD
|
import modernWasmUrl from "jassub/dist/wasm/jassub-worker-modern.wasm?url"; // SIMD
|
||||||
|
// @ts-expect-error
|
||||||
import workerUrl from "jassub/dist/worker/worker.js?url"; // Web Worker
|
import workerUrl from "jassub/dist/worker/worker.js?url"; // Web Worker
|
||||||
import { PgsRenderer } from "libpgs";
|
import { PgsRenderer } from "libpgs";
|
||||||
|
//@ts-expect-error
|
||||||
import pgsWorkerUrl from "libpgs/dist/libpgs.worker.js?url";
|
import pgsWorkerUrl from "libpgs/dist/libpgs.worker.js?url";
|
||||||
// import type { OnProgressProps } from "react-player";
|
// import type { OnProgressProps } from "react-player";
|
||||||
import { useShallow } from "zustand/shallow";
|
import { useShallow } from "zustand/shallow";
|
||||||
@@ -32,6 +36,7 @@ import { useBackdropStore } from "@/utils/store/backdrop";
|
|||||||
import { useCentralStore } from "@/utils/store/central";
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
import useQueue, { clearQueue } from "@/utils/store/queue";
|
import useQueue, { clearQueue } from "@/utils/store/queue";
|
||||||
import type subtitlePlaybackInfo from "@/utils/types/subtitlePlaybackInfo";
|
import type subtitlePlaybackInfo from "@/utils/types/subtitlePlaybackInfo";
|
||||||
|
//@ts-expect-error
|
||||||
import font from "./Noto-Sans-Indosphere.ttf?url";
|
import font from "./Noto-Sans-Indosphere.ttf?url";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -249,7 +254,7 @@ export function VideoPlayer() {
|
|||||||
setPlayerReady(true);
|
setPlayerReady(true);
|
||||||
|
|
||||||
// Report Jellyfin server: Playback has begin
|
// Report Jellyfin server: Playback has begin
|
||||||
getSessionApi(api).reportPlaybackStart({
|
getPlaystateApi(api).reportPlaybackStart({
|
||||||
playbackStartInfo: {
|
playbackStartInfo: {
|
||||||
AudioStreamIndex: mediaSource.audioTrack,
|
AudioStreamIndex: mediaSource.audioTrack,
|
||||||
CanSeek: true,
|
CanSeek: true,
|
||||||
@@ -292,7 +297,7 @@ export function VideoPlayer() {
|
|||||||
lastReportTimeRef.current = now;
|
lastReportTimeRef.current = now;
|
||||||
|
|
||||||
// Report Jellyfin server: Playback progress
|
// Report Jellyfin server: Playback progress
|
||||||
getSessionApi(api).reportPlaybackProgress({
|
getPlaystateApi(api).reportPlaybackProgress({
|
||||||
playbackProgressInfo: {
|
playbackProgressInfo: {
|
||||||
AudioStreamIndex: mediaSource.audioTrack,
|
AudioStreamIndex: mediaSource.audioTrack,
|
||||||
CanSeek: true,
|
CanSeek: true,
|
||||||
@@ -331,7 +336,7 @@ export function VideoPlayer() {
|
|||||||
}
|
}
|
||||||
// Report Jellyfin server: Playback has been paused
|
// Report Jellyfin server: Playback has been paused
|
||||||
|
|
||||||
getSessionApi(api).reportPlaybackProgress({
|
getPlaystateApi(api).reportPlaybackProgress({
|
||||||
playbackProgressInfo: {
|
playbackProgressInfo: {
|
||||||
AudioStreamIndex: mediaSource.audioTrack,
|
AudioStreamIndex: mediaSource.audioTrack,
|
||||||
CanSeek: true,
|
CanSeek: true,
|
||||||
@@ -345,10 +350,10 @@ export function VideoPlayer() {
|
|||||||
PositionTicks: secToTicks(currentTime),
|
PositionTicks: secToTicks(currentTime),
|
||||||
RepeatMode: RepeatMode.RepeatNone,
|
RepeatMode: RepeatMode.RepeatNone,
|
||||||
VolumeLevel: Math.floor(volume * 100),
|
VolumeLevel: Math.floor(volume * 100),
|
||||||
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}, [
|
}, [setCurrentTime,
|
||||||
setCurrentTime,
|
|
||||||
api,
|
api,
|
||||||
mediaSource,
|
mediaSource,
|
||||||
isPlayerMuted,
|
isPlayerMuted,
|
||||||
@@ -356,8 +361,8 @@ export function VideoPlayer() {
|
|||||||
itemId,
|
itemId,
|
||||||
playsessionId,
|
playsessionId,
|
||||||
userDataLastPlayedPositionTicks,
|
userDataLastPlayedPositionTicks,
|
||||||
volume,
|
volume,]);
|
||||||
]);
|
|
||||||
|
|
||||||
const handleExitPlayer = useCallback(async () => {
|
const handleExitPlayer = useCallback(async () => {
|
||||||
appWindow.getCurrent().setFullscreen(false);
|
appWindow.getCurrent().setFullscreen(false);
|
||||||
@@ -372,7 +377,7 @@ export function VideoPlayer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Report Jellyfin server: Playback has ended/stopped
|
// Report Jellyfin server: Playback has ended/stopped
|
||||||
getSessionApi(api).reportPlaybackStopped({
|
getPlaystateApi(api).reportPlaybackStopped({
|
||||||
playbackStopInfo: {
|
playbackStopInfo: {
|
||||||
Failed: false,
|
Failed: false,
|
||||||
ItemId: itemId,
|
ItemId: itemId,
|
||||||
|
|||||||
@@ -5,7 +5,8 @@ import CircularProgress from "@mui/material/CircularProgress";
|
|||||||
|
|
||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
import { getPlaylistApi } from "@jellyfin/sdk/lib/utils/api/playlist-api";
|
import { getPlaylistsApi } from "@jellyfin/sdk/lib/utils/api/playlists-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
@@ -27,7 +28,7 @@ import { Typography } from "@mui/material";
|
|||||||
import { createFileRoute } from "@tanstack/react-router";
|
import { createFileRoute } from "@tanstack/react-router";
|
||||||
import { createPortal } from "react-dom";
|
import { createPortal } from "react-dom";
|
||||||
|
|
||||||
export const Route = createFileRoute("/_api/music/playlist/$id")({
|
export const Route = createFileRoute("/_api/playlist/$id")({
|
||||||
component: PlaylistTitlePage,
|
component: PlaylistTitlePage,
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -41,7 +42,7 @@ function PlaylistTitlePage() {
|
|||||||
queryKey: ["item", id],
|
queryKey: ["item", id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
const result = await getLibraryApi(api).getItem({
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
itemId: id,
|
itemId: id,
|
||||||
});
|
});
|
||||||
@@ -74,7 +75,7 @@ function PlaylistTitlePage() {
|
|||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api) return null;
|
if (!api) return null;
|
||||||
if (!item.data?.Id) return null;
|
if (!item.data?.Id) return null;
|
||||||
const result = await getPlaylistApi(api).getPlaylistItems({
|
const result = await getPlaylistsApi(api).getPlaylistItems({
|
||||||
userId: user?.Id,
|
userId: user?.Id,
|
||||||
playlistId: item.data.Id,
|
playlistId: item.data.Id,
|
||||||
});
|
});
|
||||||
File renamed without changes.
@@ -1,6 +1,6 @@
|
|||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { getPersonApi } from "@jellyfin/sdk/lib/utils/api/person-api";
|
import { getPersonsApi } from "@jellyfin/sdk/lib/utils/api/persons-api";
|
||||||
import { getSearchApi } from "@jellyfin/sdk/lib/utils/api/search-api";
|
import { getSearchApi } from "@jellyfin/sdk/lib/utils/api/search-api";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
import React, { useCallback, useEffect, useMemo, useState } from "react";
|
||||||
@@ -129,13 +129,7 @@ function SearchPage() {
|
|||||||
</span>
|
</span>
|
||||||
<span className="material-symbols-rounded icon-md">tv</span>
|
<span className="material-symbols-rounded icon-md">tv</span>
|
||||||
</Box>
|
</Box>
|
||||||
<Typography
|
<Typography variant="h4" fontWeight={600} gutterBottom>
|
||||||
variant="h4"
|
|
||||||
gutterBottom
|
|
||||||
sx={{
|
|
||||||
fontWeight: 600,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Explore your library
|
Explore your library
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body1" sx={{ opacity: 0.6, maxWidth: 400 }}>
|
<Typography variant="body1" sx={{ opacity: 0.6, maxWidth: 400 }}>
|
||||||
@@ -325,7 +319,9 @@ function SearchAppBar({
|
|||||||
);
|
);
|
||||||
}}
|
}}
|
||||||
MenuProps={{
|
MenuProps={{
|
||||||
slotProps: { paper: { className: "glass-menu-paper" } },
|
PaperProps: {
|
||||||
|
className: "glass-menu-paper",
|
||||||
|
},
|
||||||
disableScrollLock: true,
|
disableScrollLock: true,
|
||||||
}}
|
}}
|
||||||
size="small"
|
size="small"
|
||||||
@@ -444,7 +440,7 @@ function CategorySection({ category, query, api, user, onResult }: any) {
|
|||||||
if (!api || !user?.Id) return { items: [], total: 0 };
|
if (!api || !user?.Id) return { items: [], total: 0 };
|
||||||
|
|
||||||
if (category.value === "Person") {
|
if (category.value === "Person") {
|
||||||
const res = await getPersonApi(api).getPersons({
|
const res = await getPersonsApi(api).getPersons({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
searchTerm: query,
|
searchTerm: query,
|
||||||
limit,
|
limit,
|
||||||
@@ -465,7 +461,7 @@ function CategorySection({ category, query, api, user, onResult }: any) {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const res = await getLibraryApi(api).getItems({
|
const res = await getItemsApi(api).getItems({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
searchTerm: query,
|
searchTerm: query,
|
||||||
includeItemTypes: [category.kind],
|
includeItemTypes: [category.kind],
|
||||||
|
|||||||
@@ -0,0 +1,940 @@
|
|||||||
|
import { BaseItemKind, ItemFields } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import Chip from "@mui/material/Chip";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import { motion } from "motion/react";
|
||||||
|
import React, { useEffect, useMemo, useRef, useState } from "react";
|
||||||
|
import { Card } from "@/components/card/card";
|
||||||
|
import CardScroller from "@/components/cardScroller/cardScroller";
|
||||||
|
import ItemHeader from "@/components/itemHeader";
|
||||||
|
import { ErrorNotice } from "@/components/notices/errorNotice/errorNotice";
|
||||||
|
import { getRuntimeCompact, getRuntimeMusic } from "@/utils/date/time";
|
||||||
|
import useDefaultSeason from "@/utils/hooks/useDefaultSeason";
|
||||||
|
import "./series.scss";
|
||||||
|
|
||||||
|
import { createFileRoute, Link, useNavigate } from "@tanstack/react-router";
|
||||||
|
import LikeButton from "@/components/buttons/likeButton";
|
||||||
|
import MarkPlayedButton from "@/components/buttons/markPlayedButton";
|
||||||
|
import PlayButton from "@/components/buttons/playButton";
|
||||||
|
import TrailerButton from "@/components/buttons/trailerButton";
|
||||||
|
import IconLink from "@/components/iconLink";
|
||||||
|
import ShowMoreText from "@/components/showMoreText";
|
||||||
|
import EpisodeSkeleton from "@/components/skeleton/episode";
|
||||||
|
import { SeasonSelectorSkeleton } from "@/components/skeleton/seasonSelector";
|
||||||
|
import { getTypeIcon } from "@/components/utils/iconsCollection";
|
||||||
|
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
|
||||||
|
import { useBackdropStore } from "@/utils/store/backdrop";
|
||||||
|
import { useCentralStore } from "@/utils/store/central";
|
||||||
|
|
||||||
|
const getEpisodeDateString = (date: Date) => {
|
||||||
|
const formatter = new Intl.DateTimeFormat(navigator.language ?? "en-US", {
|
||||||
|
dateStyle: "full",
|
||||||
|
});
|
||||||
|
return formatter.format(date).toString();
|
||||||
|
};
|
||||||
|
|
||||||
|
export const Route = createFileRoute("/_api/series/$id")({
|
||||||
|
component: SeriesTitlePage,
|
||||||
|
});
|
||||||
|
|
||||||
|
function SeriesTitlePage() {
|
||||||
|
const { id } = Route.useParams();
|
||||||
|
|
||||||
|
const api = Route.useRouteContext().api;
|
||||||
|
|
||||||
|
const setBackdrop = useBackdropStore((s) => s.setBackdrop);
|
||||||
|
|
||||||
|
const user = useCentralStore((s) => s.currentUser);
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user?.Id,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const similarItems = useQuery({
|
||||||
|
queryKey: ["item", id, "similarItem"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getLibraryApi(api).getSimilarShows({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: id,
|
||||||
|
limit: 16,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const seasons = useQuery({
|
||||||
|
queryKey: ["item", id, "seasons"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getTvShowsApi(api).getSeasons({
|
||||||
|
userId: user?.Id,
|
||||||
|
seriesId: id,
|
||||||
|
isMissing: false,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const [backdropImage, setBackdropImage] = useState<SeriesBackdropImage>(
|
||||||
|
() => {
|
||||||
|
const url = sessionStorage.getItem(`backdrop-${item.data?.Id}`);
|
||||||
|
const key = sessionStorage.getItem(`backdrop-${item.data?.Id}-key`);
|
||||||
|
return { url, key };
|
||||||
|
},
|
||||||
|
);
|
||||||
|
const [_backdropImageLoaded, setBackdropImageLoaded] = useState(false);
|
||||||
|
|
||||||
|
const [currentSeason, setCurrentSeason] = useDefaultSeason(
|
||||||
|
seasons,
|
||||||
|
item.data?.Id,
|
||||||
|
);
|
||||||
|
|
||||||
|
const currentSeasonNumber = Number(currentSeason);
|
||||||
|
|
||||||
|
const currentSeasonItem = useQuery({
|
||||||
|
queryKey: ["item", id, "season", currentSeason],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
|
userId: user?.Id,
|
||||||
|
itemId: seasons.data?.Items?.[Number(currentSeason)].Id ?? "",
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: seasons.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const episodes = useQuery({
|
||||||
|
queryKey: ["item", id, "season", currentSeason, "episodes"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getTvShowsApi(api).getEpisodes({
|
||||||
|
userId: user?.Id,
|
||||||
|
seriesId: item.data?.Id ?? "",
|
||||||
|
seasonId: seasons.data?.Items?.[Number(currentSeason)].Id,
|
||||||
|
fields: [ItemFields.Overview],
|
||||||
|
isMissing: false,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: seasons.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const specialFeatures = useQuery({
|
||||||
|
queryKey: ["item", id, "specialFeatures"],
|
||||||
|
queryFn: async () => {
|
||||||
|
if (!api) return null;
|
||||||
|
const result = await getUserLibraryApi(api).getSpecialFeatures({
|
||||||
|
itemId: item.data?.Id ?? "",
|
||||||
|
userId: user?.Id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
});
|
||||||
|
|
||||||
|
const directors = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Director") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const writers = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Writer") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const actors = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Actor") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
const producers = useMemo(() => {
|
||||||
|
return item.data?.People?.filter((itm) => itm.Type === "Producer") ?? [];
|
||||||
|
}, [item.data?.Id]);
|
||||||
|
|
||||||
|
const lastBackdropHashRef = useRef<string | undefined>(undefined);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (api && currentSeasonItem.isSuccess && item.isSuccess) {
|
||||||
|
if (
|
||||||
|
currentSeasonItem.isSuccess &&
|
||||||
|
(currentSeasonItem.data?.BackdropImageTags?.length ?? 0) > 0
|
||||||
|
) {
|
||||||
|
sessionStorage.setItem(
|
||||||
|
`backdrop-${item.data?.Id}`,
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
currentSeasonItem.data?.Id ?? "",
|
||||||
|
"Backdrop",
|
||||||
|
{
|
||||||
|
tag: currentSeasonItem.data?.BackdropImageTags?.[0],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
sessionStorage.setItem(
|
||||||
|
`backdrop-${item.data?.Id}-key`,
|
||||||
|
currentSeasonItem.data?.BackdropImageTags?.[0] ?? "",
|
||||||
|
);
|
||||||
|
setBackdropImage({
|
||||||
|
url: getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
currentSeasonItem.data?.Id ?? "",
|
||||||
|
"Backdrop",
|
||||||
|
{
|
||||||
|
tag: currentSeasonItem.data?.BackdropImageTags?.[0],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
key: currentSeasonItem.data?.BackdropImageTags?.[0],
|
||||||
|
});
|
||||||
|
const seasonBackdropTag =
|
||||||
|
currentSeasonItem.data?.BackdropImageTags?.[0];
|
||||||
|
const seasonBackdropHash =
|
||||||
|
currentSeasonItem.data?.ImageBlurHashes?.Backdrop?.[
|
||||||
|
seasonBackdropTag ?? ""
|
||||||
|
] ?? "";
|
||||||
|
|
||||||
|
if (lastBackdropHashRef.current !== seasonBackdropHash) {
|
||||||
|
setBackdrop(seasonBackdropHash);
|
||||||
|
lastBackdropHashRef.current = seasonBackdropHash;
|
||||||
|
}
|
||||||
|
setBackdropImageLoaded(false);
|
||||||
|
} else if (
|
||||||
|
item.isSuccess &&
|
||||||
|
(item.data?.BackdropImageTags?.length ?? 0) > 0
|
||||||
|
) {
|
||||||
|
sessionStorage.setItem(
|
||||||
|
`backdrop-${item.data?.Id}`,
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
item.data?.Id ?? "",
|
||||||
|
"Backdrop",
|
||||||
|
{
|
||||||
|
tag: item.data?.BackdropImageTags?.[0],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
);
|
||||||
|
sessionStorage.setItem(
|
||||||
|
`backdrop-${item.data?.Id}-key`,
|
||||||
|
item.data?.BackdropImageTags?.[0] ?? "",
|
||||||
|
);
|
||||||
|
if (backdropImage.key !== item.data?.BackdropImageTags?.[0]) {
|
||||||
|
setBackdropImageLoaded(false); // Reset Backdrop image load status if previous image is diff then new image
|
||||||
|
}
|
||||||
|
setBackdropImage({
|
||||||
|
url: getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
item.data?.Id ?? "",
|
||||||
|
"Backdrop",
|
||||||
|
{
|
||||||
|
tag: item.data?.BackdropImageTags?.[0],
|
||||||
|
},
|
||||||
|
),
|
||||||
|
key: item.data?.BackdropImageTags?.[0],
|
||||||
|
});
|
||||||
|
const seriesBackdropTag = item.data?.BackdropImageTags?.[0];
|
||||||
|
const seriesBackdropHash =
|
||||||
|
item.data?.ImageBlurHashes?.Backdrop?.[seriesBackdropTag ?? ""] ?? "";
|
||||||
|
|
||||||
|
if (lastBackdropHashRef.current !== seriesBackdropHash) {
|
||||||
|
setBackdrop(seriesBackdropHash);
|
||||||
|
lastBackdropHashRef.current = seriesBackdropHash;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [
|
||||||
|
api,
|
||||||
|
currentSeasonItem.data,
|
||||||
|
currentSeasonItem.isSuccess,
|
||||||
|
item.data,
|
||||||
|
item.isSuccess,
|
||||||
|
setBackdrop,
|
||||||
|
backdropImage.key,
|
||||||
|
]);
|
||||||
|
|
||||||
|
const containerRef = useRef<HTMLDivElement | null>(null);
|
||||||
|
// Parallax handled within ItemBackdrop to avoid hydration issues.
|
||||||
|
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
if (item.isPending || similarItems.isPending) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (item.isSuccess && item.data) {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
key={id}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
className="scrollY padded-top flex flex-column item item-series"
|
||||||
|
ref={containerRef}
|
||||||
|
>
|
||||||
|
<ItemHeader
|
||||||
|
item={item.data}
|
||||||
|
api={api}
|
||||||
|
scrollTargetRef={containerRef}
|
||||||
|
backdropSrc={backdropImage.url}
|
||||||
|
>
|
||||||
|
<div className="item-hero-buttons-container">
|
||||||
|
<div
|
||||||
|
className="flex flex-row"
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<PlayButton
|
||||||
|
item={item.data}
|
||||||
|
itemType={BaseItemKind.Series}
|
||||||
|
userId={user?.Id}
|
||||||
|
buttonProps={{
|
||||||
|
fullWidth: true,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="flex flex-row" style={{ gap: "1em" }}>
|
||||||
|
{item.data.RemoteTrailers && (
|
||||||
|
<TrailerButton
|
||||||
|
trailerItem={item.data.RemoteTrailers}
|
||||||
|
disabled={item.data.RemoteTrailers?.length === 0}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<LikeButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isFavorite={item.data.UserData?.IsFavorite}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemName={item.data.Name}
|
||||||
|
itemId={item.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
isPlayed={item.data.UserData?.Played}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ItemHeader>
|
||||||
|
<div className="item-detail">
|
||||||
|
<div style={{ width: "100%" }}>
|
||||||
|
{(item.data.Taglines?.length ?? 0) > 0 && (
|
||||||
|
<Typography variant="h5" mb={2}>
|
||||||
|
{item.data.Taglines?.[0]}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
<ShowMoreText
|
||||||
|
content={item.data.Overview ?? ""}
|
||||||
|
collapsedLines={4}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.6em",
|
||||||
|
alignSelf: "end",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.data.ExternalUrls?.map(
|
||||||
|
(url) =>
|
||||||
|
url.Url &&
|
||||||
|
url.Name && (
|
||||||
|
<IconLink key={url.Url} url={url.Url} name={url.Name} />
|
||||||
|
),
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="item-detail-cast">
|
||||||
|
{actors?.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6" className="item-detail-cast-title">
|
||||||
|
Actors
|
||||||
|
</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{actors.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{writers.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6" className="item-detail-cast-title">
|
||||||
|
Writers
|
||||||
|
</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{writers.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{directors.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6" className="item-detail-cast-title">
|
||||||
|
Directors
|
||||||
|
</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{directors.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{producers.length > 0 && (
|
||||||
|
<div className="item-detail-cast-container">
|
||||||
|
<Typography variant="h6" className="item-detail-cast-title">
|
||||||
|
Producers
|
||||||
|
</Typography>
|
||||||
|
<div className="item-detail-cast-grid">
|
||||||
|
{producers.map((actor) => (
|
||||||
|
<Link
|
||||||
|
className="item-detail-cast-card"
|
||||||
|
key={actor.Id}
|
||||||
|
to="/person/$id"
|
||||||
|
params={{
|
||||||
|
id: actor.Id ?? "",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.PrimaryImageTag ? (
|
||||||
|
<img
|
||||||
|
alt={actor.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
actor.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillWidth: 200,
|
||||||
|
fillHeight: 200,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-cast-card-image"
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<div className="item-detail-cast-card-icon">
|
||||||
|
{getTypeIcon("Person")}
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div className="item-detail-cast-card-text">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{actor.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{actor.Role}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</Link>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{seasons.isPending ? (
|
||||||
|
<SeasonSelectorSkeleton />
|
||||||
|
) : (
|
||||||
|
<div className="item-series-seasons-container">
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
width: "100%",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
paddingBottom: " 0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography variant="h5">
|
||||||
|
{seasons.data?.Items?.[Number(currentSeason)]?.Name}
|
||||||
|
</Typography>
|
||||||
|
<Chip
|
||||||
|
label={
|
||||||
|
episodes.isPending ? (
|
||||||
|
<CircularProgress
|
||||||
|
size={20}
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
episodes.data?.TotalRecordCount
|
||||||
|
)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.75em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{currentSeasonItem.isSuccess && (
|
||||||
|
<LikeButton
|
||||||
|
itemId={currentSeasonItem.data?.Id}
|
||||||
|
isFavorite={currentSeasonItem.data?.UserData?.IsFavorite}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
userId={user?.Id}
|
||||||
|
itemName={currentSeasonItem.data?.Name}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{currentSeasonItem.isSuccess && (
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemId={currentSeasonItem.data?.Id}
|
||||||
|
isPlayed={currentSeasonItem.data?.UserData?.Played}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
userId={user?.Id}
|
||||||
|
itemName={currentSeasonItem.data?.Name}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<TextField
|
||||||
|
value={currentSeasonNumber}
|
||||||
|
onChange={(e) => {
|
||||||
|
const seasonIndex = Number(e.target.value);
|
||||||
|
if (
|
||||||
|
!Number.isNaN(seasonIndex) &&
|
||||||
|
Number.isFinite(seasonIndex)
|
||||||
|
) {
|
||||||
|
setCurrentSeason(seasonIndex);
|
||||||
|
sessionStorage.setItem(
|
||||||
|
`season-${item.data?.Id}`,
|
||||||
|
seasonIndex.toString(),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
select
|
||||||
|
SelectProps={{
|
||||||
|
MenuProps: {
|
||||||
|
disableScrollLock: true,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
size="small"
|
||||||
|
>
|
||||||
|
{seasons.data?.Items?.map((season, index) => {
|
||||||
|
return (
|
||||||
|
<MenuItem key={season.Id} value={index}>
|
||||||
|
{season.Name}
|
||||||
|
</MenuItem>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</TextField>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<Divider />
|
||||||
|
<div className="item-detail-episode-container">
|
||||||
|
{episodes.isPending ? (
|
||||||
|
<EpisodeSkeleton />
|
||||||
|
) : (
|
||||||
|
episodes.data?.Items?.map((episode) => {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
key={episode.Id}
|
||||||
|
onClick={() =>
|
||||||
|
navigate({
|
||||||
|
to: "/episode/$id",
|
||||||
|
params: { id: episode.Id ?? "" },
|
||||||
|
})
|
||||||
|
}
|
||||||
|
initial={{
|
||||||
|
transform: "translateY(10px)",
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
whileInView={{
|
||||||
|
opacity: 1,
|
||||||
|
transform: "translateY(0px)",
|
||||||
|
}}
|
||||||
|
viewport={{
|
||||||
|
once: true,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.2,
|
||||||
|
ease: "backInOut",
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
className="item-detail-episode"
|
||||||
|
>
|
||||||
|
<Typography variant="subtitle1" textAlign="center">
|
||||||
|
{episode.IndexNumberEnd
|
||||||
|
? `${episode.IndexNumber} / ${episode.IndexNumberEnd}`
|
||||||
|
: (episode.IndexNumber ?? 0)}
|
||||||
|
</Typography>
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
episode.UserData?.Played
|
||||||
|
? "item-detail-episode-image-container watched"
|
||||||
|
: "item-detail-episode-image-container"
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<div className="item-detail-episode-image-overlay">
|
||||||
|
<PlayButton
|
||||||
|
item={episode}
|
||||||
|
itemType={BaseItemKind.Episode}
|
||||||
|
userId={user?.Id}
|
||||||
|
size="medium"
|
||||||
|
buttonProps={{
|
||||||
|
//@ts-expect-error
|
||||||
|
color: "white",
|
||||||
|
style: {
|
||||||
|
color: "black ",
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
iconOnly
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div className="item-detail-episode-image-icon-container">
|
||||||
|
<span className="material-symbols-rounded item-detail-episode-image-icon">
|
||||||
|
tv_gen
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<img
|
||||||
|
alt={episode.Name ?? ""}
|
||||||
|
src={
|
||||||
|
api &&
|
||||||
|
getImageUrlsApi(api).getItemImageUrlById(
|
||||||
|
episode.Id ?? "",
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
tag: episode.ImageTags?.Primary,
|
||||||
|
fillHeight: 300,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
className="item-detail-episode-image"
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.currentTarget.style.opacity = "1";
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{(episode.UserData?.PlaybackPositionTicks ?? 0) > 0 && (
|
||||||
|
<div className="card-progress-container">
|
||||||
|
<div
|
||||||
|
className="card-progress"
|
||||||
|
style={{
|
||||||
|
width: `${episode.UserData?.PlayedPercentage}%`,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div className="item-detail-episode-info">
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{episode.Name}
|
||||||
|
</Typography>
|
||||||
|
<div
|
||||||
|
className="flex flex-row flex-align-center"
|
||||||
|
style={{
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{episode.PremiereDate && (
|
||||||
|
<Chip
|
||||||
|
variant="filled"
|
||||||
|
label={getEpisodeDateString(
|
||||||
|
new Date(episode.PremiereDate),
|
||||||
|
)}
|
||||||
|
size="small"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<Typography variant="caption">
|
||||||
|
{getRuntimeCompact(episode.RunTimeTicks ?? 0)}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
<Typography
|
||||||
|
variant="caption"
|
||||||
|
style={{
|
||||||
|
display: "-webkit-box",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
overflow: "hidden",
|
||||||
|
WebkitLineClamp: 2,
|
||||||
|
WebkitBoxOrient: "vertical",
|
||||||
|
width: "100%",
|
||||||
|
opacity: 0.7,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{episode.Overview}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
<div className="item-detail-episode-buttons">
|
||||||
|
<LikeButton
|
||||||
|
itemId={episode.Id}
|
||||||
|
itemName={episode.Name}
|
||||||
|
isFavorite={episode.UserData?.IsFavorite}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemId={episode.Id}
|
||||||
|
itemName={episode.Name}
|
||||||
|
isPlayed={episode.UserData?.Played}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{specialFeatures.isSuccess &&
|
||||||
|
(specialFeatures.data?.length ?? 0) > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Special Features"
|
||||||
|
displayCards={7}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{specialFeatures.data?.map((special) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={special.Id}
|
||||||
|
item={special}
|
||||||
|
seriesId={special.SeriesId}
|
||||||
|
cardTitle={special.Name}
|
||||||
|
imageType="Primary"
|
||||||
|
cardCaption={getRuntimeMusic(special.RunTimeTicks ?? 0)}
|
||||||
|
cardType="portrait"
|
||||||
|
queryKey={["item", id, "similarItem"]}
|
||||||
|
userId={user?.Id}
|
||||||
|
onClick={() => {}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
{(similarItems.data?.TotalRecordCount ?? 0) > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="You might also like"
|
||||||
|
displayCards={7}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{similarItems.data?.Items?.map((similar) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={similar.Id}
|
||||||
|
item={similar}
|
||||||
|
seriesId={similar.SeriesId}
|
||||||
|
cardTitle={
|
||||||
|
similar.Type === BaseItemKind.Episode
|
||||||
|
? similar.SeriesName
|
||||||
|
: similar.Name
|
||||||
|
}
|
||||||
|
imageType={"Primary"}
|
||||||
|
cardCaption={
|
||||||
|
similar.Type === BaseItemKind.Episode
|
||||||
|
? `S${similar.ParentIndexNumber}:E${similar.IndexNumber} - ${similar.Name}`
|
||||||
|
: similar.Type === BaseItemKind.Series
|
||||||
|
? `${similar.ProductionYear} - ${
|
||||||
|
similar.EndDate
|
||||||
|
? new Date(similar.EndDate).toLocaleString([], {
|
||||||
|
year: "numeric",
|
||||||
|
})
|
||||||
|
: "Present"
|
||||||
|
}`
|
||||||
|
: similar.ProductionYear
|
||||||
|
}
|
||||||
|
cardType={
|
||||||
|
similar.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
similar.Type === BaseItemKind.Audio
|
||||||
|
? "square"
|
||||||
|
: "portrait"
|
||||||
|
}
|
||||||
|
queryKey={["item", id, "similarItem"]}
|
||||||
|
userId={user?.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError || similarItems.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
export default SeriesTitlePage;
|
||||||
@@ -1,22 +1,34 @@
|
|||||||
.item-detail-page.item {
|
$cardWidth: 18%;
|
||||||
|
|
||||||
|
.item-series.item {
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
|
|
||||||
&.item-default {
|
|
||||||
gap: 1.5em;
|
|
||||||
}
|
|
||||||
|
|
||||||
.item-detail {
|
.item-detail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr 35%;
|
grid-template-columns: 1fr 35%;
|
||||||
justify-items: center;
|
justify-items: center;
|
||||||
align-items: start;
|
align-items: start;
|
||||||
gap: 3em;
|
gap: 3em;
|
||||||
|
|
||||||
&.single {
|
&-nextUp {
|
||||||
grid-template-columns: 1fr;
|
max-width: 23em;
|
||||||
}
|
}
|
||||||
|
|
||||||
&-cast {
|
&-cast {
|
||||||
|
max-height: 50vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
mask-image: linear-gradient(to top, transparent, black 1.2em);
|
||||||
|
-webkit-mask-image: linear-gradient(to top, transparent, black 1.2em);
|
||||||
|
&-title {
|
||||||
|
position: sticky;
|
||||||
|
top: 0;
|
||||||
|
background: black;
|
||||||
|
border:1px solid rgb(255 255 255 / 0.2) ;
|
||||||
|
padding: 0.35em;
|
||||||
|
border-radius: 10px;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
&-container {
|
&-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -24,9 +36,9 @@
|
|||||||
}
|
}
|
||||||
&-grid {
|
&-grid {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: repeat(5, minmax(0, 1fr));
|
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
margin-bottom: 1em;
|
margin-bottom: 1em;
|
||||||
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
}
|
}
|
||||||
&-card {
|
&-card {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -69,24 +81,17 @@
|
|||||||
text-decoration-color: white;
|
text-decoration-color: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-external-links {
|
&-episode{
|
||||||
display: flex;
|
display:grid;
|
||||||
gap: 0.6em;
|
|
||||||
align-self: end;
|
|
||||||
margin-top: 1em;
|
|
||||||
}
|
|
||||||
|
|
||||||
&-episode {
|
|
||||||
display: grid;
|
|
||||||
grid-template-columns: 3.2em 12em 1fr 6em;
|
grid-template-columns: 3.2em 12em 1fr 6em;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
gap: 1.8em;
|
gap:1.8em;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 1em 0;
|
padding: 1em 0;
|
||||||
|
|
||||||
&-container {
|
&-container {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@@ -97,7 +102,7 @@
|
|||||||
margin-top: 0.5em;
|
margin-top: 0.5em;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
&-image {
|
&-image{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
@@ -107,14 +112,14 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
&-container {
|
&-container{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
aspect-ratio: 1.66666;
|
aspect-ratio: 1.66666;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-radius: $border-radius-default;
|
border-radius: $border-radius-default;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
&::after {
|
&::after{
|
||||||
content: "";
|
content: "";
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
@@ -129,7 +134,7 @@
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-overlay {
|
&-overlay{
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
@@ -154,7 +159,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-info {
|
&-info{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
@@ -163,71 +168,43 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
padding-right: 2em;
|
padding-right: 2em;
|
||||||
}
|
}
|
||||||
&-buttons {
|
&-buttons{
|
||||||
display: flex;
|
display: flex;
|
||||||
gap: 1em;
|
gap: 1em;
|
||||||
}
|
}
|
||||||
|
|
||||||
&:hover .item-detail-episode-image-overlay,
|
&:hover .item-detail-episode-image-overlay, &:focus-within .item-detail-episode-image-overlay{
|
||||||
&:focus-within .item-detail-episode-image-overlay {
|
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&-person {
|
@media (max-width: 1320px) {
|
||||||
&-container {
|
.item-series .item-detail {
|
||||||
position: relative;
|
&-cast {
|
||||||
width: 100%;
|
&-grid {
|
||||||
}
|
grid-template-columns: 1fr;
|
||||||
&-header {
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
&-cards {
|
|
||||||
display: grid;
|
|
||||||
align-items: start;
|
|
||||||
&.col-7 {
|
|
||||||
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
||||||
}
|
|
||||||
&.col-4 {
|
|
||||||
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&-episodes-container {
|
||||||
|
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Global item-detail
|
@media (max-width: 830px) {
|
||||||
.item-detail-link {
|
.item-series .item-detail {
|
||||||
margin-top: 0.85em !important;
|
&-episodes-container {
|
||||||
&:hover > img {
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||||
filter: brightness(1);
|
}
|
||||||
}
|
|
||||||
& > img {
|
|
||||||
width: 2em;
|
|
||||||
aspect-ratio: 1;
|
|
||||||
filter: brightness(0.5);
|
|
||||||
transition: filter $transition-time-default;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.item {
|
@media (max-width: 564px) {
|
||||||
gap: 1.5em;
|
.item-series .item-detail {
|
||||||
&-hero {
|
&-episodes-container {
|
||||||
&-image {
|
grid-template-columns: repeat(1, minmax(0, 1fr));
|
||||||
box-sizing: border-box;
|
|
||||||
&-container {
|
|
||||||
box-sizing: content-box;
|
|
||||||
box-shadow: 0px 10px 20px -10px rgb(0 0 0 / 0.5) !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&-mediaInfo {
|
|
||||||
margin-top: 1em;
|
|
||||||
height: 1.1em;
|
|
||||||
opacity: 0.8;
|
|
||||||
&.badge {
|
|
||||||
margin: 0;
|
|
||||||
height: 1.2em;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -48,12 +48,7 @@ function SettingsRoute() {
|
|||||||
alt="user"
|
alt="user"
|
||||||
/>
|
/>
|
||||||
<div className="flex flex-column">
|
<div className="flex flex-column">
|
||||||
<Typography
|
<Typography variant="h6" fontWeight="bold">
|
||||||
variant="h6"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{user?.Name}
|
{user?.Name}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="body2" sx={{ opacity: 0.5 }}>
|
<Typography variant="body2" sx={{ opacity: 0.5 }}>
|
||||||
|
|||||||
@@ -217,22 +217,19 @@ function ChangeServerRoute() {
|
|||||||
<Typography
|
<Typography
|
||||||
variant="h5"
|
variant="h5"
|
||||||
component="div"
|
component="div"
|
||||||
|
fontWeight="bold"
|
||||||
noWrap
|
noWrap
|
||||||
title={server.systemInfo?.ServerName || "Unknown Server"}
|
title={server.systemInfo?.ServerName || "Unknown Server"}
|
||||||
sx={{
|
sx={{ mb: 0.5, letterSpacing: "-0.02em" }}
|
||||||
fontWeight: "bold",
|
|
||||||
mb: 0.5,
|
|
||||||
letterSpacing: "-0.02em",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
{server.systemInfo?.ServerName || "Unknown Server"}
|
{server.systemInfo?.ServerName || "Unknown Server"}
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
variant="body2"
|
variant="body2"
|
||||||
|
color="text.secondary"
|
||||||
noWrap
|
noWrap
|
||||||
title={server.address}
|
title={server.address}
|
||||||
sx={{
|
sx={{
|
||||||
color: "text.secondary",
|
|
||||||
opacity: 0.6,
|
opacity: 0.6,
|
||||||
fontFamily: "monospace",
|
fontFamily: "monospace",
|
||||||
fontSize: "0.85rem",
|
fontSize: "0.85rem",
|
||||||
@@ -361,21 +358,10 @@ function ChangeServerRoute() {
|
|||||||
add
|
add
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<Typography
|
<Typography variant="h6" fontWeight="bold">
|
||||||
variant="h6"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Add Server
|
Add Server
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography variant="body2" color="text.secondary" sx={{ mt: 1 }}>
|
||||||
variant="body2"
|
|
||||||
sx={{
|
|
||||||
color: "text.secondary",
|
|
||||||
mt: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Connect to a new Jellyfin server
|
Connect to a new Jellyfin server
|
||||||
</Typography>
|
</Typography>
|
||||||
</Card>
|
</Card>
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ import React from "react";
|
|||||||
|
|
||||||
import "../settings.scss";
|
import "../settings.scss";
|
||||||
import { getLocalizationApi } from "@jellyfin/sdk/lib/utils/api/localization-api";
|
import { getLocalizationApi } from "@jellyfin/sdk/lib/utils/api/localization-api";
|
||||||
|
// import { getDisplayPreferencesApi } from "@jellyfin/sdk/lib/utils/api/display-preferences-api";
|
||||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
// import { getDisplayPreferenceApi } from "@jellyfin/sdk/lib/utils/api/display-preference-api";
|
|
||||||
import { useForm } from "@tanstack/react-form";
|
import { useForm } from "@tanstack/react-form";
|
||||||
import { useSuspenseQuery } from "@tanstack/react-query";
|
import { useSuspenseQuery } from "@tanstack/react-query";
|
||||||
import { useSnackbar } from "notistack";
|
import { useSnackbar } from "notistack";
|
||||||
@@ -61,7 +61,7 @@ function RouteComponent() {
|
|||||||
RememberSubtitleSelections: values.value.rememberSubtitleSelections,
|
RememberSubtitleSelections: values.value.rememberSubtitleSelections,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
// await getDisplayPreferenceApi(api).updateDisplayPreferences({
|
// await getDisplayPreferencesApi(api).updateDisplayPreferences({
|
||||||
// userId: user?.Id,
|
// userId: user?.Id,
|
||||||
// displayPreferencesId: api.deviceInfo.id,
|
// displayPreferencesId: api.deviceInfo.id,
|
||||||
// client: "blink",
|
// client: "blink",
|
||||||
@@ -127,12 +127,7 @@ function RouteComponent() {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<div className="settings-option-info">
|
<div className="settings-option-info">
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight={400}>
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Preferred Audio Language
|
Preferred Audio Language
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -165,12 +160,7 @@ function RouteComponent() {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<div className="settings-option-info">
|
<div className="settings-option-info">
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight={400}>
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Play default audio track regardless of language
|
Play default audio track regardless of language
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -222,12 +212,7 @@ function RouteComponent() {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<div className="settings-option-info">
|
<div className="settings-option-info">
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight={400}>
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Preferred Subtitle Language
|
Preferred Subtitle Language
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
@@ -260,12 +245,7 @@ function RouteComponent() {
|
|||||||
}
|
}
|
||||||
label={
|
label={
|
||||||
<div className="settings-option-info">
|
<div className="settings-option-info">
|
||||||
<Typography
|
<Typography variant="subtitle1" fontWeight={400}>
|
||||||
variant="subtitle1"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 400,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Set subtitle track based on previous item
|
Set subtitle track based on previous item
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography
|
<Typography
|
||||||
|
|||||||
@@ -22,12 +22,7 @@ function ErrorRoute() {
|
|||||||
>
|
>
|
||||||
report
|
report
|
||||||
</span>
|
</span>
|
||||||
<Typography
|
<Typography variant="h5" fontWeight={500}>
|
||||||
variant="h5"
|
|
||||||
sx={{
|
|
||||||
fontWeight: 500,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Error connecting server.
|
Error connecting server.
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle2" style={{ opacity: 0.6 }}>
|
<Typography variant="subtitle2" style={{ opacity: 0.6 }}>
|
||||||
@@ -54,4 +49,4 @@ function ErrorRoute() {
|
|||||||
default:
|
default:
|
||||||
return <div>Error</div>;
|
return <div>Error</div>;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -81,13 +81,7 @@ function ServerSetup() {
|
|||||||
overflow: "hidden",
|
overflow: "hidden",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Stack
|
<Stack spacing={2} width="30em" alignItems="center">
|
||||||
spacing={2}
|
|
||||||
sx={{
|
|
||||||
width: "30em",
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<img
|
<img
|
||||||
src={logo}
|
src={logo}
|
||||||
alt="Blink"
|
alt="Blink"
|
||||||
@@ -100,12 +94,10 @@ function ServerSetup() {
|
|||||||
|
|
||||||
<Typography
|
<Typography
|
||||||
variant="body1"
|
variant="body1"
|
||||||
sx={{
|
color="text.secondary"
|
||||||
color: "text.secondary",
|
textAlign="center"
|
||||||
textAlign: "center",
|
maxWidth="80%"
|
||||||
maxWidth: "80%",
|
sx={{ lineHeight: 1.5 }}
|
||||||
lineHeight: 1.5,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
Enter your Jellyfin server address to get started
|
Enter your Jellyfin server address to get started
|
||||||
</Typography>
|
</Typography>
|
||||||
@@ -124,17 +116,15 @@ function ServerSetup() {
|
|||||||
onChange={(event) => {
|
onChange={(event) => {
|
||||||
setServerIp(event.target.value);
|
setServerIp(event.target.value);
|
||||||
}}
|
}}
|
||||||
slotProps={{
|
InputProps={{
|
||||||
input: {
|
startAdornment: (
|
||||||
startAdornment: (
|
<span
|
||||||
<span
|
className="material-symbols-rounded"
|
||||||
className="material-symbols-rounded"
|
style={{ opacity: 0.5, marginRight: "12px" }}
|
||||||
style={{ opacity: 0.5, marginRight: "12px" }}
|
>
|
||||||
>
|
dns
|
||||||
dns
|
</span>
|
||||||
</span>
|
),
|
||||||
),
|
|
||||||
},
|
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
<LoadingButton
|
<LoadingButton
|
||||||
@@ -152,11 +142,8 @@ function ServerSetup() {
|
|||||||
<Stack
|
<Stack
|
||||||
direction="row"
|
direction="row"
|
||||||
spacing={1}
|
spacing={1}
|
||||||
sx={{
|
alignItems="center"
|
||||||
alignItems: "center",
|
sx={{ mt: 3, opacity: 0.6 }}
|
||||||
mt: 3,
|
|
||||||
opacity: 0.6,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<span
|
<span
|
||||||
className="material-symbols-rounded"
|
className="material-symbols-rounded"
|
||||||
|
|||||||
@@ -131,12 +131,7 @@ function ServerList() {
|
|||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography variant="h4" fontWeight="bold">
|
||||||
variant="h4"
|
|
||||||
sx={{
|
|
||||||
fontWeight: "bold",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
Servers
|
Servers
|
||||||
</Typography>
|
</Typography>
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -175,8 +170,8 @@ function ServerList() {
|
|||||||
<div style={{ flex: 1 }}>
|
<div style={{ flex: 1 }}>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h6"
|
variant="h6"
|
||||||
|
fontWeight={600}
|
||||||
sx={{
|
sx={{
|
||||||
fontWeight: 600,
|
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: 1,
|
gap: 1,
|
||||||
|
|||||||
+5
-9
@@ -1,12 +1,10 @@
|
|||||||
import { createTheme } from "@mui/material/styles";
|
import { createTheme } from "@mui/material/styles";
|
||||||
import paletteVariables from "./palette.module.scss";
|
import {
|
||||||
|
|
||||||
const {
|
|
||||||
clrAccentDefault,
|
clrAccentDefault,
|
||||||
clrBackgroundDark,
|
clrBackgroundDark,
|
||||||
clrBackgroundDefault,
|
clrBackgroundDefault,
|
||||||
clrSecondaryDefault,
|
clrSecondaryDefault, //@ts-ignore
|
||||||
} = paletteVariables;
|
} from "./palette.module.scss";
|
||||||
|
|
||||||
const { palette } = createTheme({});
|
const { palette } = createTheme({});
|
||||||
const { augmentColor } = palette;
|
const { augmentColor } = palette;
|
||||||
@@ -88,10 +86,8 @@ export const theme = createTheme({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
defaultProps: {
|
defaultProps: {
|
||||||
slotProps: {
|
PaperProps: {
|
||||||
paper: {
|
className: "glass",
|
||||||
className: "glass",
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -7,11 +7,12 @@ import {
|
|||||||
LocationType,
|
LocationType,
|
||||||
SortOrder,
|
SortOrder,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { getMediaInfoApi } from "@jellyfin/sdk/lib/utils/api/media-info-api";
|
import { getMediaInfoApi } from "@jellyfin/sdk/lib/utils/api/media-info-api";
|
||||||
import { getMediaSegmentApi } from "@jellyfin/sdk/lib/utils/api/media-segment-api";
|
import { getMediaSegmentsApi } from "@jellyfin/sdk/lib/utils/api/media-segments-api";
|
||||||
import { getPlaylistApi } from "@jellyfin/sdk/lib/utils/api/playlist-api";
|
import { getPlaylistsApi } from "@jellyfin/sdk/lib/utils/api/playlists-api";
|
||||||
import { getShowApi } from "@jellyfin/sdk/lib/utils/api/show-api";
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
import playbackProfile from "@/utils/playback-profiles";
|
import playbackProfile from "@/utils/playback-profiles";
|
||||||
|
|
||||||
export async function getNextEpisode(
|
export async function getNextEpisode(
|
||||||
@@ -21,7 +22,7 @@ export async function getNextEpisode(
|
|||||||
season: number,
|
season: number,
|
||||||
) {
|
) {
|
||||||
const episode = (
|
const episode = (
|
||||||
await getShowApi(api).getEpisodes({
|
await getTvShowsApi(api).getEpisodes({
|
||||||
seriesId: seriesId,
|
seriesId: seriesId,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
@@ -35,7 +36,7 @@ export async function getNextEpisode(
|
|||||||
}
|
}
|
||||||
|
|
||||||
const allEpisodes = (
|
const allEpisodes = (
|
||||||
await getShowApi(api).getEpisodes({
|
await getTvShowsApi(api).getEpisodes({
|
||||||
seriesId: seriesId,
|
seriesId: seriesId,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
enableUserData: true,
|
enableUserData: true,
|
||||||
@@ -78,7 +79,7 @@ export async function getPlaybackInfo(
|
|||||||
let index = 0;
|
let index = 0;
|
||||||
|
|
||||||
if (playlistItem && playlistItemId) {
|
if (playlistItem && playlistItemId) {
|
||||||
result = await getPlaylistApi(api).getPlaylistItems({
|
result = await getPlaylistsApi(api).getPlaylistItems({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
playlistId: playlistItemId,
|
playlistId: playlistItemId,
|
||||||
});
|
});
|
||||||
@@ -86,7 +87,7 @@ export async function getPlaybackInfo(
|
|||||||
switch (item.Type) {
|
switch (item.Type) {
|
||||||
case BaseItemKind.Episode:
|
case BaseItemKind.Episode:
|
||||||
if (item.SeriesId && item.SeasonId) {
|
if (item.SeriesId && item.SeasonId) {
|
||||||
result = await getShowApi(api).getEpisodes({
|
result = await getTvShowsApi(api).getEpisodes({
|
||||||
seriesId: item.SeriesId,
|
seriesId: item.SeriesId,
|
||||||
fields: [
|
fields: [
|
||||||
ItemFields.MediaSources,
|
ItemFields.MediaSources,
|
||||||
@@ -115,7 +116,7 @@ export async function getPlaybackInfo(
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case BaseItemKind.Series:
|
case BaseItemKind.Series:
|
||||||
result = await getShowApi(api).getEpisodes({
|
result = await getTvShowsApi(api).getEpisodes({
|
||||||
seriesId: item.Id || "",
|
seriesId: item.Id || "",
|
||||||
fields: [
|
fields: [
|
||||||
ItemFields.MediaSources,
|
ItemFields.MediaSources,
|
||||||
@@ -139,7 +140,7 @@ export async function getPlaybackInfo(
|
|||||||
break;
|
break;
|
||||||
case BaseItemKind.Playlist:
|
case BaseItemKind.Playlist:
|
||||||
case BaseItemKind.MusicAlbum:
|
case BaseItemKind.MusicAlbum:
|
||||||
result = await getLibraryApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
parentId: item.Id,
|
parentId: item.Id,
|
||||||
userId: userId,
|
userId: userId,
|
||||||
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
fields: [ItemFields.MediaSources, ItemFields.MediaStreams],
|
||||||
@@ -148,7 +149,7 @@ export async function getPlaybackInfo(
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case BaseItemKind.MusicArtist:
|
case BaseItemKind.MusicArtist:
|
||||||
result = await getLibraryApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
artistIds: [item.Id ?? ""],
|
artistIds: [item.Id ?? ""],
|
||||||
recursive: true,
|
recursive: true,
|
||||||
includeItemTypes: [BaseItemKind.Audio],
|
includeItemTypes: [BaseItemKind.Audio],
|
||||||
@@ -159,7 +160,7 @@ export async function getPlaybackInfo(
|
|||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case BaseItemKind.BoxSet:
|
case BaseItemKind.BoxSet:
|
||||||
result = await getLibraryApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
parentId: item.Id,
|
parentId: item.Id,
|
||||||
userId,
|
userId,
|
||||||
fields: [
|
fields: [
|
||||||
@@ -174,11 +175,11 @@ export async function getPlaybackInfo(
|
|||||||
break;
|
break;
|
||||||
case BaseItemKind.Photo: {
|
case BaseItemKind.Photo: {
|
||||||
const photo = (
|
const photo = (
|
||||||
await getLibraryApi(api).getItem({
|
await getUserLibraryApi(api).getItem({
|
||||||
itemId: item.Id || "",
|
itemId: item.Id || "",
|
||||||
})
|
})
|
||||||
).data;
|
).data;
|
||||||
result = await getLibraryApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
parentId: photo.ParentId ?? "",
|
parentId: photo.ParentId ?? "",
|
||||||
filters: [ItemFilter.IsNotFolder],
|
filters: [ItemFilter.IsNotFolder],
|
||||||
recursive: false,
|
recursive: false,
|
||||||
@@ -190,7 +191,7 @@ export async function getPlaybackInfo(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
result = await getLibraryApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
ids: [item.Id ?? ""],
|
ids: [item.Id ?? ""],
|
||||||
userId: userId,
|
userId: userId,
|
||||||
fields: [
|
fields: [
|
||||||
@@ -231,7 +232,7 @@ export async function getPlaybackInfo(
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const segmentsPromise = await getMediaSegmentApi(api).getItemSegments({
|
const segmentsPromise = await getMediaSegmentsApi(api).getItemSegments({
|
||||||
itemId: targetItem.Id,
|
itemId: targetItem.Id,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -1,27 +0,0 @@
|
|||||||
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { linkOptions } from "@tanstack/react-router";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns navigation options for an item's detail page.
|
|
||||||
* Music items get their dedicated music pages, everything else goes to the unified
|
|
||||||
* `/item/$id` page with the item type as a hint so the loader can prefetch in parallel.
|
|
||||||
*/
|
|
||||||
export const getItemLinkOptions = (
|
|
||||||
id: string,
|
|
||||||
type: BaseItemKind | null | undefined,
|
|
||||||
) => {
|
|
||||||
switch (type) {
|
|
||||||
case BaseItemKind.MusicAlbum:
|
|
||||||
return linkOptions({ to: "/music/album/$id", params: { id } });
|
|
||||||
case BaseItemKind.MusicArtist:
|
|
||||||
return linkOptions({ to: "/music/artist/$id", params: { id } });
|
|
||||||
case BaseItemKind.Playlist:
|
|
||||||
return linkOptions({ to: "/music/playlist/$id", params: { id } });
|
|
||||||
default:
|
|
||||||
return linkOptions({
|
|
||||||
to: "/item/$id",
|
|
||||||
params: { id },
|
|
||||||
search: { type: type ?? undefined },
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
||||||
@@ -2,13 +2,10 @@
|
|||||||
* @deprecated - Check @/utils/playback-profiles/index
|
* @deprecated - Check @/utils/playback-profiles/index
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { DlnaProfileType } from "@jellyfin/sdk/lib/generated-client";
|
import {
|
||||||
|
DlnaProfileType,
|
||||||
type ResponseProfile = {
|
type ResponseProfile
|
||||||
Type: DlnaProfileType;
|
} from '@jellyfin/sdk/lib/generated-client';
|
||||||
Container: string;
|
|
||||||
MimeType: string;
|
|
||||||
};
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a valid ResponseProfile for the current platform.
|
* Returns a valid ResponseProfile for the current platform.
|
||||||
@@ -16,13 +13,13 @@ type ResponseProfile = {
|
|||||||
* @returns An array of subtitle profiles for the current platform.
|
* @returns An array of subtitle profiles for the current platform.
|
||||||
*/
|
*/
|
||||||
export function getResponseProfiles(): ResponseProfile[] {
|
export function getResponseProfiles(): ResponseProfile[] {
|
||||||
const ResponseProfiles = [];
|
const ResponseProfiles = [];
|
||||||
|
|
||||||
ResponseProfiles.push({
|
ResponseProfiles.push({
|
||||||
Type: DlnaProfileType.Video,
|
Type: DlnaProfileType.Video,
|
||||||
Container: "m4v",
|
Container: 'm4v',
|
||||||
MimeType: "video/mp4",
|
MimeType: 'video/mp4'
|
||||||
});
|
});
|
||||||
|
|
||||||
return ResponseProfiles;
|
return ResponseProfiles;
|
||||||
}
|
}
|
||||||
@@ -1,188 +0,0 @@
|
|||||||
import type { Api } from "@jellyfin/sdk";
|
|
||||||
import {
|
|
||||||
type BaseItemDto,
|
|
||||||
BaseItemKind,
|
|
||||||
ItemFields,
|
|
||||||
LocationType,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
|
||||||
import { getShowApi } from "@jellyfin/sdk/lib/utils/api/show-api";
|
|
||||||
import { type QueryClient, queryOptions } from "@tanstack/react-query";
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Query options shared by the unified `/item/$id` route loader and its sections,
|
|
||||||
* so data prefetched in the loader is picked up by the components.
|
|
||||||
*/
|
|
||||||
|
|
||||||
export const getSimilarItemsQueryOptions = (
|
|
||||||
api: Api | undefined,
|
|
||||||
userId: string | undefined,
|
|
||||||
id: string,
|
|
||||||
type: BaseItemKind | undefined,
|
|
||||||
) =>
|
|
||||||
queryOptions({
|
|
||||||
queryKey: ["item", id, "similarItem"],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api) return null;
|
|
||||||
const request = { userId, itemId: id, limit: 16 };
|
|
||||||
const result =
|
|
||||||
type === BaseItemKind.Series
|
|
||||||
? await getLibraryApi(api).getSimilarShows(request)
|
|
||||||
: await getLibraryApi(api).getSimilarItems(request);
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
networkMode: "always",
|
|
||||||
});
|
|
||||||
|
|
||||||
export const getSeasonsQueryOptions = (
|
|
||||||
api: Api | undefined,
|
|
||||||
userId: string | undefined,
|
|
||||||
seriesId: string,
|
|
||||||
) =>
|
|
||||||
queryOptions({
|
|
||||||
queryKey: ["item", seriesId, "seasons"],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api) return null;
|
|
||||||
const result = await getShowApi(api).getSeasons({
|
|
||||||
userId,
|
|
||||||
seriesId,
|
|
||||||
isMissing: false,
|
|
||||||
});
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const getSpecialFeaturesQueryOptions = (
|
|
||||||
api: Api | undefined,
|
|
||||||
userId: string | undefined,
|
|
||||||
id: string,
|
|
||||||
) =>
|
|
||||||
queryOptions({
|
|
||||||
queryKey: ["item", id, "specialFeatures"],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api) return null;
|
|
||||||
const result = await getLibraryApi(api).getSpecialFeatures({
|
|
||||||
itemId: id,
|
|
||||||
userId,
|
|
||||||
});
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
});
|
|
||||||
|
|
||||||
export const getCollectionItemsQueryOptions = (
|
|
||||||
api: Api | undefined,
|
|
||||||
userId: string | undefined,
|
|
||||||
id: string,
|
|
||||||
) =>
|
|
||||||
queryOptions({
|
|
||||||
queryKey: ["item", id, "collection"],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api) return null;
|
|
||||||
const result = await getLibraryApi(api).getItems({
|
|
||||||
userId,
|
|
||||||
parentId: id,
|
|
||||||
fields: [ItemFields.SeasonUserData, ItemFields.Overview],
|
|
||||||
excludeLocationTypes: [LocationType.Virtual],
|
|
||||||
});
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
networkMode: "always",
|
|
||||||
});
|
|
||||||
|
|
||||||
export const getUpcomingEpisodesQueryOptions = (
|
|
||||||
api: Api | undefined,
|
|
||||||
userId: string | undefined,
|
|
||||||
episode: BaseItemDto,
|
|
||||||
) =>
|
|
||||||
queryOptions({
|
|
||||||
queryKey: ["item", episode.Id ?? "", "episode", "upcomingEpisodes"],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api) return null;
|
|
||||||
const result = await getLibraryApi(api).getItems({
|
|
||||||
userId,
|
|
||||||
parentId: episode.ParentId ?? "",
|
|
||||||
startIndex: episode.IndexNumber ?? 0,
|
|
||||||
excludeLocationTypes: [LocationType.Virtual],
|
|
||||||
});
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
networkMode: "always",
|
|
||||||
});
|
|
||||||
|
|
||||||
export const personTabs = [
|
|
||||||
{ title: "Movies", key: "personMovies", kind: BaseItemKind.Movie },
|
|
||||||
{ title: "TV Shows", key: "personShows", kind: BaseItemKind.Series },
|
|
||||||
{ title: "Books", key: "personBooks", kind: BaseItemKind.Book },
|
|
||||||
{ title: "Photos", key: "personPhotos", kind: BaseItemKind.Photo },
|
|
||||||
{ title: "Episodes", key: "personEpisodes", kind: BaseItemKind.Episode },
|
|
||||||
] as const;
|
|
||||||
|
|
||||||
export type PersonTab = (typeof personTabs)[number];
|
|
||||||
|
|
||||||
export const getPersonItemsQueryOptions = (
|
|
||||||
api: Api | undefined,
|
|
||||||
userId: string | undefined,
|
|
||||||
personId: string,
|
|
||||||
tab: PersonTab,
|
|
||||||
) =>
|
|
||||||
queryOptions({
|
|
||||||
queryKey: ["item", personId, tab.key],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api) return null;
|
|
||||||
const result = await getLibraryApi(api).getItems({
|
|
||||||
userId,
|
|
||||||
personIds: [personId],
|
|
||||||
includeItemTypes: [tab.kind],
|
|
||||||
recursive: true,
|
|
||||||
fields:
|
|
||||||
tab.kind === BaseItemKind.Episode
|
|
||||||
? [ItemFields.SeasonUserData, ItemFields.Overview]
|
|
||||||
: undefined,
|
|
||||||
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
|
||||||
sortOrder:
|
|
||||||
tab.kind === BaseItemKind.Photo || tab.kind === BaseItemKind.Episode
|
|
||||||
? undefined
|
|
||||||
: ["Descending"],
|
|
||||||
excludeLocationTypes: [LocationType.Virtual],
|
|
||||||
});
|
|
||||||
return result.data;
|
|
||||||
},
|
|
||||||
networkMode: "always",
|
|
||||||
});
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Starts fetching the data a given item type's page needs. Safe to call before the
|
|
||||||
* item itself has loaded (when the type is known from a link hint).
|
|
||||||
*/
|
|
||||||
export const prefetchItemDetail = (
|
|
||||||
queryClient: QueryClient,
|
|
||||||
api: Api,
|
|
||||||
userId: string,
|
|
||||||
id: string,
|
|
||||||
type: BaseItemKind | undefined,
|
|
||||||
) => {
|
|
||||||
switch (type) {
|
|
||||||
case BaseItemKind.Person:
|
|
||||||
for (const tab of personTabs) {
|
|
||||||
queryClient.prefetchQuery(
|
|
||||||
getPersonItemsQueryOptions(api, userId, id, tab),
|
|
||||||
);
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
case BaseItemKind.Episode:
|
|
||||||
// Upcoming episodes depend on the episode's parent, so they are prefetched once it loads.
|
|
||||||
return;
|
|
||||||
case BaseItemKind.Series:
|
|
||||||
queryClient.prefetchQuery(getSeasonsQueryOptions(api, userId, id));
|
|
||||||
queryClient.prefetchQuery(
|
|
||||||
getSpecialFeaturesQueryOptions(api, userId, id),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
case BaseItemKind.BoxSet:
|
|
||||||
queryClient.prefetchQuery(
|
|
||||||
getCollectionItemsQueryOptions(api, userId, id),
|
|
||||||
);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
queryClient.prefetchQuery(getSimilarItemsQueryOptions(api, userId, id, type));
|
|
||||||
};
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Api } from "@jellyfin/sdk";
|
import type { Api } from "@jellyfin/sdk";
|
||||||
import { BaseItemKind, ItemFields } from "@jellyfin/sdk/lib/generated-client";
|
import { BaseItemKind, ItemFields } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
import { queryOptions } from "@tanstack/react-query";
|
import { queryOptions } from "@tanstack/react-query";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -24,7 +24,7 @@ export const getItemQueryOptions = (
|
|||||||
if (!userId) {
|
if (!userId) {
|
||||||
throw Error("User ID is not defined");
|
throw Error("User ID is not defined");
|
||||||
}
|
}
|
||||||
const result = await getLibraryApi(api).getItem({
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
itemId: id,
|
itemId: id,
|
||||||
});
|
});
|
||||||
@@ -51,7 +51,7 @@ export const getLatestItemsQueryOptions = (
|
|||||||
if (!userId) {
|
if (!userId) {
|
||||||
throw Error("User ID is not defined");
|
throw Error("User ID is not defined");
|
||||||
}
|
}
|
||||||
const media = await getLibraryApi(api).getLatestMedia({
|
const media = await getUserLibraryApi(api).getLatestMedia({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
fields: [
|
fields: [
|
||||||
ItemFields.Overview,
|
ItemFields.Overview,
|
||||||
@@ -72,29 +72,3 @@ export const getLatestItemsQueryOptions = (
|
|||||||
return media.data;
|
return media.data;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
|
||||||
* @param api api instance
|
|
||||||
* @param userId user's id
|
|
||||||
* @param libraryId the library (user view) id
|
|
||||||
* @returns query options for the latest items of a single library
|
|
||||||
*/
|
|
||||||
export const getLibraryLatestQueryOptions = (
|
|
||||||
api: Api | null | undefined,
|
|
||||||
userId: string | null | undefined,
|
|
||||||
libraryId: string | null | undefined,
|
|
||||||
) =>
|
|
||||||
queryOptions({
|
|
||||||
queryKey: ["home", "latestMedia", libraryId],
|
|
||||||
queryFn: async () => {
|
|
||||||
if (!api || !userId) return null;
|
|
||||||
const media = await getLibraryApi(api).getLatestMedia({
|
|
||||||
userId,
|
|
||||||
parentId: libraryId ?? undefined,
|
|
||||||
limit: 16,
|
|
||||||
fields: [ItemFields.PrimaryImageAspectRatio, ItemFields.ParentId],
|
|
||||||
});
|
|
||||||
return media.data;
|
|
||||||
},
|
|
||||||
enabled: !!userId,
|
|
||||||
});
|
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
import type { Api } from "@jellyfin/sdk";
|
import type { Api } from "@jellyfin/sdk";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
import { queryOptions } from "@tanstack/react-query";
|
import { queryOptions } from "@tanstack/react-query";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -17,7 +17,7 @@ export const getLibraryQueryOptions = (
|
|||||||
queryKey: ["library", "currentLib", id],
|
queryKey: ["library", "currentLib", id],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
if (!api || !userId) throw Error("API or User ID is not defined");
|
if (!api || !userId) throw Error("API or User ID is not defined");
|
||||||
const result = await getLibraryApi(api).getItem({
|
const result = await getUserLibraryApi(api).getItem({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
itemId: id,
|
itemId: id,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -9,10 +9,10 @@ import {
|
|||||||
SortOrder,
|
SortOrder,
|
||||||
VideoType,
|
VideoType,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getArtistApi } from "@jellyfin/sdk/lib/utils/api/artist-api";
|
import { getArtistsApi } from "@jellyfin/sdk/lib/utils/api/artists-api";
|
||||||
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
import { getPersonApi } from "@jellyfin/sdk/lib/utils/api/person-api";
|
import { getPersonsApi } from "@jellyfin/sdk/lib/utils/api/persons-api";
|
||||||
import { getStudioApi } from "@jellyfin/sdk/lib/utils/api/studio-api";
|
import { getStudiosApi } from "@jellyfin/sdk/lib/utils/api/studios-api";
|
||||||
import { queryOptions } from "@tanstack/react-query";
|
import { queryOptions } from "@tanstack/react-query";
|
||||||
|
|
||||||
export interface LibraryItemsParams {
|
export interface LibraryItemsParams {
|
||||||
@@ -91,31 +91,31 @@ export const getLibraryItemsQueryOptions = (
|
|||||||
};
|
};
|
||||||
let result: { data: BaseItemDtoQueryResult };
|
let result: { data: BaseItemDtoQueryResult };
|
||||||
if (currentViewType === "MusicArtist") {
|
if (currentViewType === "MusicArtist") {
|
||||||
result = await getArtistApi(api).getAlbumArtists({
|
result = await getArtistsApi(api).getAlbumArtists({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
parentId: libraryId,
|
parentId: libraryId,
|
||||||
limit: params.limit,
|
limit: params.limit,
|
||||||
});
|
});
|
||||||
} else if (currentViewType === "Artist") {
|
} else if (currentViewType === "Artist") {
|
||||||
result = await getArtistApi(api).getArtists({
|
result = await getArtistsApi(api).getArtists({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
parentId: libraryId,
|
parentId: libraryId,
|
||||||
limit: params.limit,
|
limit: params.limit,
|
||||||
});
|
});
|
||||||
} else if (currentViewType === "Person") {
|
} else if (currentViewType === "Person") {
|
||||||
result = await getPersonApi(api).getPersons({
|
result = await getPersonsApi(api).getPersons({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
personTypes: ["Actor"],
|
personTypes: ["Actor"],
|
||||||
limit: params.limit,
|
limit: params.limit,
|
||||||
});
|
});
|
||||||
} else if (currentViewType === "Studio") {
|
} else if (currentViewType === "Studio") {
|
||||||
result = await getStudioApi(api).getStudios({
|
result = await getStudiosApi(api).getStudios({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
parentId: libraryId,
|
parentId: libraryId,
|
||||||
limit: params.limit,
|
limit: params.limit,
|
||||||
});
|
});
|
||||||
} else if (currentViewType === "BoxSet") {
|
} else if (currentViewType === "BoxSet") {
|
||||||
result = await getLibraryApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
parentId: libraryId,
|
parentId: libraryId,
|
||||||
recursive: params.collectionType === "boxsets" ? undefined : true,
|
recursive: params.collectionType === "boxsets" ? undefined : true,
|
||||||
@@ -142,7 +142,7 @@ export const getLibraryItemsQueryOptions = (
|
|||||||
limit: params.limit,
|
limit: params.limit,
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
result = await getLibraryApi(api).getItems({
|
result = await getItemsApi(api).getItems({
|
||||||
userId: userId,
|
userId: userId,
|
||||||
parentId: libraryId,
|
parentId: libraryId,
|
||||||
recursive: true,
|
recursive: true,
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ import {
|
|||||||
PlayMethod,
|
PlayMethod,
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { getMediaInfoApi } from "@jellyfin/sdk/lib/utils/api/media-info-api";
|
import { getMediaInfoApi } from "@jellyfin/sdk/lib/utils/api/media-info-api";
|
||||||
import { getMediaSegmentApi } from "@jellyfin/sdk/lib/utils/api/media-segment-api";
|
import { getMediaSegmentsApi } from "@jellyfin/sdk/lib/utils/api/media-segments-api";
|
||||||
import { getSessionApi } from "@jellyfin/sdk/lib/utils/api/session-api";
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
import { WebviewWindow as appWindow } from "@tauri-apps/api/webviewWindow";
|
import { WebviewWindow as appWindow } from "@tauri-apps/api/webviewWindow";
|
||||||
import { create } from "zustand";
|
import { create } from "zustand";
|
||||||
@@ -927,11 +927,11 @@ export const playItemFromQueue = async (
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
const segmentsPromise = getMediaSegmentApi(api).getItemSegments({
|
const segmentsPromise = getMediaSegmentsApi(api).getItemSegments({
|
||||||
itemId: item.Id,
|
itemId: item.Id,
|
||||||
});
|
});
|
||||||
|
|
||||||
const stopReportPromise = getSessionApi(api).reportPlaybackStopped({
|
const stopReportPromise = getPlaystateApi(api).reportPlaybackStopped({
|
||||||
playbackStopInfo: {
|
playbackStopInfo: {
|
||||||
Failed: false,
|
Failed: false,
|
||||||
ItemId: prevItem?.Id,
|
ItemId: prevItem?.Id,
|
||||||
@@ -1065,4 +1065,4 @@ export const changeAudioTrack = async (trackIndex: number, api: Api) => {
|
|||||||
});
|
});
|
||||||
// const currentItemIndex = useQueue.getState().currentItemIndex;
|
// const currentItemIndex = useQueue.getState().currentItemIndex;
|
||||||
// playItemFromQueue(currentItemIndex, prevState.userId, api);
|
// playItemFromQueue(currentItemIndex, prevState.userId, api);
|
||||||
};
|
};
|
||||||
Vendored
-1
@@ -1 +0,0 @@
|
|||||||
/// <reference types="vite/client" />
|
|
||||||
+2
-1
@@ -11,6 +11,7 @@
|
|||||||
"dom.iterable",
|
"dom.iterable",
|
||||||
"esnext"
|
"esnext"
|
||||||
],
|
],
|
||||||
|
"baseUrl": ".",
|
||||||
"checkJs": true,
|
"checkJs": true,
|
||||||
"allowJs": true, // Allow JavaScript files to be compiled
|
"allowJs": true, // Allow JavaScript files to be compiled
|
||||||
"skipLibCheck": true, // Skip type checking of all declaration files
|
"skipLibCheck": true, // Skip type checking of all declaration files
|
||||||
@@ -19,7 +20,7 @@
|
|||||||
"strict": true, // Enable all strict type checking options
|
"strict": true, // Enable all strict type checking options
|
||||||
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file.
|
"forceConsistentCasingInFileNames": true, // Disallow inconsistently-cased references to the same file.
|
||||||
"module": "esnext", // Specify module code generation
|
"module": "esnext", // Specify module code generation
|
||||||
"moduleResolution": "bundler", // Resolve modules the way Vite does
|
"moduleResolution": "node", // Resolve modules using Node.js style
|
||||||
"isolatedModules": true, // Unconditionally emit imports for unresolved files
|
"isolatedModules": true, // Unconditionally emit imports for unresolved files
|
||||||
"resolveJsonModule": true, // Include modules imported with .json extension
|
"resolveJsonModule": true, // Include modules imported with .json extension
|
||||||
"noEmit": true, // Do not emit output (meaning do not compile code, only perform type checking)
|
"noEmit": true, // Do not emit output (meaning do not compile code, only perform type checking)
|
||||||
|
|||||||
Loaded 100 of 101 files, more files were not shown because too many files have changed in this diff.
Show more
Reference in new issue
Block a user