Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
332fd9b0be | ||
|
|
f0ac132332 | ||
|
|
a0a5c5ed81 | ||
|
|
8443dc4d73 | ||
|
|
80d76d4428 | ||
|
|
cc7799a9ec | ||
|
|
e3b3cb3ab6 | ||
|
|
edf9831a79 | ||
|
|
f7529a38da | ||
|
|
d4a923863d | ||
|
|
1e38aebb83 | ||
|
|
8ba8e6b94a | ||
|
|
fc3694adf4 | ||
|
|
69660b1d10 | ||
|
|
db9a0411d0 | ||
|
|
f31b3f8a30 | ||
|
|
de165270a8 | ||
|
|
10f63ac58d | ||
|
|
0c50c60129 | ||
|
|
7650b49a6b | ||
|
|
3d87404bbf | ||
|
|
8df48c5722 | ||
|
|
e552178b72 | ||
|
|
59e8ceb99c | ||
|
|
f549d6430f | ||
|
|
2c85f67467 | ||
|
|
efa8b958ee | ||
|
|
0233962797 | ||
|
|
34166f9d59 | ||
|
|
c3f18282c4 | ||
|
|
d7a573e8db | ||
|
|
4c783ff8d0 | ||
|
|
15c0437060 | ||
|
|
be3fe48b74 | ||
|
|
46119c1f1d | ||
|
|
a56e2775f3 | ||
|
|
0c94f2994a | ||
|
|
28f6050a97 | ||
|
|
cc73c531fa | ||
|
|
47895ec48e | ||
|
|
5ed543526f | ||
|
|
64d596fb01 | ||
|
|
aae48aced9 | ||
|
|
19fc23a571 | ||
|
|
60bb53a5de | ||
|
|
d7a6fc2dd0 | ||
|
|
fb27c3071f | ||
|
|
7f91fd083c | ||
|
|
d5193044e2 | ||
|
|
6cc2231f55 | ||
|
|
7a74d48738 | ||
|
|
ad1ec9138b | ||
|
|
ee6b976e84 | ||
|
|
316dfae793 | ||
|
|
c05178a901 | ||
|
|
83bc0790a6 | ||
|
|
d6af11b3a4 | ||
|
|
dc26d79ce0 | ||
|
|
1ff5594840 | ||
|
|
04077f197b | ||
|
|
a72c16e7bc | ||
|
|
2876e785ae | ||
|
|
7f99f76130 | ||
|
|
5caa9b084f | ||
|
|
5c425b65c6 | ||
|
|
f711440de3 | ||
|
|
2c08105a50 | ||
|
|
b6962b9ab2 | ||
|
|
2527d429bc | ||
|
|
8bd42c0f2f | ||
|
|
73794711dc | ||
|
|
61adf341eb | ||
|
|
22ee720795 | ||
|
|
56ba3287dc | ||
|
|
d9d0a3b534 | ||
|
|
f1394b7172 | ||
|
|
e36f92e135 | ||
|
|
7dd5fd89f8 | ||
|
|
821090612e | ||
|
|
b8e220cba1 | ||
|
|
0b60962f5d | ||
|
|
c6b7be9fc6 | ||
|
|
f3a4edc03a | ||
|
|
f65e32cd49 | ||
|
|
7df0f3f9d3 | ||
|
|
38a7369650 | ||
|
|
002d92d8ad | ||
|
|
e11056c2ce | ||
|
|
7f8ec6fc98 | ||
|
|
eb44fe1d15 | ||
|
|
2ea1db67d6 | ||
|
|
9ffbd8f627 | ||
|
|
0ceb661705 | ||
|
|
f83d7ba29f | ||
|
|
464a4508e3 | ||
|
|
8bd719ece9 | ||
|
|
1252d8f084 | ||
|
|
710f2228c2 | ||
|
|
ba73569c31 | ||
|
|
b2e0ed01a3 | ||
|
|
94e7ea95c1 | ||
|
|
73085f736f | ||
|
|
c568cf2be4 | ||
|
|
2d78d95ca9 | ||
|
|
e2ebbd4471 | ||
|
|
7a7e5b3751 | ||
|
|
8f8d3f2ec3 | ||
|
|
0bcb7a6cff | ||
|
|
d5daa6d9dc | ||
|
|
791f277ca5 | ||
|
|
08f6993132 | ||
|
|
ed26c7a762 | ||
|
|
2710d472ba | ||
|
|
c0a9d0e088 | ||
|
|
0d0580e60e |
No files matched your search
@@ -1,19 +0,0 @@
|
|||||||
# To get started with Dependabot version updates, you'll need to specify which
|
|
||||||
# package ecosystems to update and where the package manifests are located.
|
|
||||||
# Please see the documentation for all configuration options:
|
|
||||||
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
|
||||||
|
|
||||||
version: 2
|
|
||||||
updates:
|
|
||||||
- package-ecosystem: "npm" # See documentation for possible values
|
|
||||||
directory: "/" # Location of package manifests
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
commit-message:
|
|
||||||
prefix: "chore(package-update) NPM"
|
|
||||||
- package-ecosystem: "cargo"
|
|
||||||
directory: "/src-tauri"
|
|
||||||
schedule:
|
|
||||||
interval: "weekly"
|
|
||||||
commit-message:
|
|
||||||
prefix: "chore(package-update) CARGO"
|
|
||||||
@@ -12,14 +12,14 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
platform: [macos-latest, ubuntu-20.04, windows-latest]
|
platform: [macos-latest, ubuntu-18.04, windows-latest]
|
||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Install dependencies (ubuntu only)
|
- name: Install dependencies (ubuntu only)
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
if: matrix.platform == 'ubuntu-18.04'
|
||||||
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
|
# You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
@@ -33,15 +33,34 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
workspaces: "./src-tauri -> target"
|
workspaces: "./src-tauri -> target"
|
||||||
|
|
||||||
|
- uses: pnpm/action-setup@v2
|
||||||
|
name: Install pnpm
|
||||||
|
with:
|
||||||
|
version: 7
|
||||||
|
run_install: false
|
||||||
|
|
||||||
|
- name: Get pnpm store directory
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
|
||||||
|
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
name: Setup pnpm cache
|
||||||
|
with:
|
||||||
|
path: ${{ env.STORE_PATH }}
|
||||||
|
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-pnpm-store-
|
||||||
|
|
||||||
- name: Sync node version and setup cache
|
- name: Sync node version and setup cache
|
||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "lts/*"
|
node-version: "lts/*"
|
||||||
cache: "npm" # Set this to npm, yarn or pnpm.
|
cache: "pnpm" # Set this to npm, yarn or pnpm.
|
||||||
|
|
||||||
- name: Install app dependencies and build web
|
- name: Install app dependencies and build web
|
||||||
# Remove `&& yarn build` if you build your frontend in `beforeBuildCommand`
|
# Remove `&& yarn build` if you build your frontend in `beforeBuildCommand`
|
||||||
run: npm install && npm run build # Change this to npm, yarn or pnpm.
|
run: pnpm install --no-frozen-lockfile && pnpm run build # Change this to npm, yarn or pnpm.
|
||||||
|
|
||||||
- name: Build the app
|
- name: Build the app
|
||||||
uses: tauri-apps/tauri-action@v0
|
uses: tauri-apps/tauri-action@v0
|
||||||
|
|||||||
@@ -1,39 +1,51 @@
|
|||||||

|

|
||||||
|
|
||||||
|
# 📝 Prerequisites
|
||||||
|
|
||||||
# 📝 Prerequisites:
|
|
||||||
- Nodejs (≥19.1.0)
|
- Nodejs (≥19.1.0)
|
||||||
- Rust (≥1.66.1)
|
- Rust (≥1.66.1)
|
||||||
- Visual Studio C++ Build tools
|
- Visual Studio C++ Build tools
|
||||||
|
- [pnpm](https://pnpm.io/)
|
||||||
|
|
||||||
|
# ℹ️ Getting started
|
||||||
|
|
||||||
|
- Install Nodejs, pnpm and Rust.
|
||||||
|
> **Note** : Install Rust from <https://www.rust-lang.org/learn/get-started>
|
||||||
|
- install depencies using pnpm:
|
||||||
|
|
||||||
# ℹ️ Getting started:
|
|
||||||
- Install Nodejs and Rust.
|
|
||||||
> **Note** : Install Rust from https://www.rust-lang.org/learn/get-started
|
|
||||||
- install depencies using npm:
|
|
||||||
```shell
|
```shell
|
||||||
npm install
|
pnpm install
|
||||||
```
|
```
|
||||||
|
|
||||||
# 🛠️ Development:
|
# 🛠️ Development
|
||||||
|
|
||||||
- Running the app:
|
- Running the app:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run tauri dev
|
pnpm run tauri dev
|
||||||
```
|
```
|
||||||
|
|
||||||
- Building the app:
|
- Building the app:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
npm run tauri build
|
pnpm run tauri build
|
||||||
```
|
```
|
||||||
|
|
||||||
- other commands can be found inside the `"scripts"` inside [package.json](https://github.com/prayag17/JellyPlayer/blob/main/package.json)
|
- other commands can be found inside the `"scripts"` inside [package.json](https://github.com/prayag17/JellyPlayer/blob/main/package.json)
|
||||||
|
|
||||||
# 💻 Contribution:
|
# 💻 Contribution
|
||||||
|
|
||||||
- Checkout `issues` to see currently worked on features and bugs
|
- Checkout `issues` to see currently worked on features and bugs
|
||||||
- Add features or fix bugs
|
- Add features or fix bugs
|
||||||
- Create a pull request
|
- Create a pull request
|
||||||
|
|
||||||
# 📃 Roadmap:
|
# 📃 Roadmap
|
||||||
|
|
||||||
- Checkout [GitHub Project](https://github.com/users/prayag17/projects/3)
|
- Checkout [GitHub Project](https://github.com/users/prayag17/projects/3)
|
||||||
> **Note** : There is no current due date for alpha 1 release
|
> **Note** : There is no current due date for alpha 1 release
|
||||||
|
|
||||||
# 🎊 Special thanks to:
|
# 🎊 Special thanks to
|
||||||
|
|
||||||
- [@ferferga](https://github.com/ferferga) for helping in development behind the scenes.
|
- [@ferferga](https://github.com/ferferga) for helping in development behind the scenes.
|
||||||
- All contributors of [jellyfin/jellyfin-vue](https://github.com/jellyfin/jellyfin-vue).
|
- All contributors of [jellyfin/jellyfin-vue](https://github.com/jellyfin/jellyfin-vue).
|
||||||
- And also [@jellyfin](https://github.com/jellyfin/) for creating the main service
|
- And also [@jellyfin](https://github.com/jellyfin/) for creating the main service
|
||||||
@@ -1,9 +1,10 @@
|
|||||||
{
|
{
|
||||||
"name": "jellyplayer",
|
"name": "jellyplayer",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "1.0.0-alpha0",
|
"version": "1.0.0",
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
"preinstall": "npx only-allow pnpm",
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
@@ -11,40 +12,43 @@
|
|||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@emotion/react": "^11.11.1",
|
"@emotion/react": "^11.11.1",
|
||||||
"@emotion/styled": "^11.10.5",
|
"@emotion/styled": "^11.11.0",
|
||||||
"@fontsource/open-sans": "^5.0.3",
|
"@fontsource-variable/open-sans": "^5.0.13",
|
||||||
"@jellyfin/sdk": "^0.8.2",
|
"@jellyfin/sdk": "^0.8.2",
|
||||||
"@mdi/js": "^7.2.96",
|
"@mdi/js": "^7.2.96",
|
||||||
"@mui/lab": "^5.0.0-alpha.134",
|
"@mui/lab": "5.0.0-alpha.145",
|
||||||
"@mui/material": "^5.13.0",
|
"@mui/material": "^5.14.10",
|
||||||
"@tanstack/react-query": "^4.26.1",
|
"@tanstack/react-query": "^4.35.3",
|
||||||
"@tanstack/react-query-devtools": "^4.29.19",
|
"@tanstack/react-query-devtools": "^4.35.3",
|
||||||
"@tauri-apps/api": "^1.4.0",
|
"@tauri-apps/api": "^1.4.0",
|
||||||
"axios": "^1.4.0",
|
"axios": "^1.5.0",
|
||||||
|
"axios-tauri-api-adapter": "^0.2.0",
|
||||||
"blurhash": "^2.0.5",
|
"blurhash": "^2.0.5",
|
||||||
"events": "^3.3.0",
|
"events": "^3.3.0",
|
||||||
"framer-motion": "^10.12.10",
|
"framer-motion": "^10.16.4",
|
||||||
"notistack": "^3.0.1",
|
"notistack": "^3.0.1",
|
||||||
"react": "^18.2.0",
|
"react": "^18.2.0",
|
||||||
"react-blurhash": "^0.3.0",
|
"react-blurhash": "^0.3.0",
|
||||||
"react-dom": "^18.2.0",
|
"react-dom": "^18.2.0",
|
||||||
"react-konami-code": "^2.3.0",
|
"react-error-boundary": "^4.0.11",
|
||||||
"react-material-ui-carousel": "^3.4.2",
|
"react-multi-carousel": "^2.8.4",
|
||||||
"react-multi-carousel": "^2.8.3",
|
"react-player": "^2.13.0",
|
||||||
"react-player": "^2.12.0",
|
"react-router-dom": "^6.16.0",
|
||||||
"react-router-dom": "^6.14.0",
|
"react-use-konami": "^1.1.0",
|
||||||
|
"tauri-plugin-log-api": "github:tauri-apps/tauri-plugin-log#v1",
|
||||||
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
"tauri-plugin-store-api": "github:tauri-apps/tauri-plugin-store",
|
||||||
"uuid": "^9.0.0",
|
"uuid": "^9.0.1",
|
||||||
"vite-plugin-svgr": "^3.2.0",
|
"vite-plugin-svgr": "^4.0.0",
|
||||||
"zustand": "^4.3.8"
|
"wavesurfer.js": "^7.3.2",
|
||||||
|
"zustand": "^4.4.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@tauri-apps/cli": "^1.3.1",
|
"@tauri-apps/cli": "^1.4.0",
|
||||||
"@types/react": "^18.2.11",
|
"@vitejs/plugin-react": "^4.0.4",
|
||||||
"@types/react-dom": "^18.2.6",
|
"prop-types": "^15.8.1",
|
||||||
"@vitejs/plugin-react": "^4.0.0",
|
"sass": "^1.67.0",
|
||||||
"sass": "^1.63.3",
|
"vite": "^4.4.9",
|
||||||
"vite": "^4.3.1"
|
"vite-plugin-compression": "^0.5.1"
|
||||||
},
|
},
|
||||||
"license": "GPL-3.0-only"
|
"license": "GPL-3.0-only"
|
||||||
}
|
}
|
||||||
|
Before Width: | Height: | Size: 289 KiB After Width: | Height: | Size: 1.1 MiB |
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 29 KiB |
@@ -1,57 +1,20 @@
|
|||||||
<svg width="1197" height="247" viewBox="0 0 1197 247" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
<svg width="1197" height="247" viewBox="0 0 1197 247" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<rect x="50" y="50" width="146.79" height="146.79" fill="url(#pattern0)"/>
|
||||||
<g clip-path="url(#clip0_504_8)">
|
<g clip-path="url(#clip0_504_8)">
|
||||||
<path d="M169.982 114.384C171.569 115.293 172.888 116.605 173.805 118.187C174.722 119.769 175.205 121.566 175.205 123.395C175.205 125.224 174.722 127.021 173.805 128.603C172.888 130.185 171.569 131.497 169.982 132.406L87.6225 180.207C80.8918 184.117 71.6631 179.65 71.6631 171.196V123.395V75.5942C71.6631 67.1397 80.8918 62.673 87.6225 66.583L128.802 90.4834L169.982 114.384Z" fill="url(#pattern0)"/>
|
<rect x="236.79" y="50.6626" width="860" height="81.4648" fill="url(#pattern1)"/>
|
||||||
<g filter="url(#filter0_d_504_8)">
|
<path d="M236.97 187.127L248.562 161.927H250.398L261.99 187.127H260.01L249.066 163.079H249.858L238.95 187.127H236.97ZM241.218 180.035L241.83 178.487H256.914L257.526 180.035H241.218ZM279.411 187.127V161.927H280.959L292.659 182.123H291.831L303.495 161.927H305.007L305.043 187.127H303.243L303.207 164.699H303.711L292.659 183.779H291.759L280.671 164.699H281.211V187.127H279.411ZM326.321 187.307C324.449 187.307 322.709 186.995 321.101 186.371C319.517 185.723 318.125 184.823 316.925 183.671C315.749 182.495 314.837 181.139 314.189 179.603C313.541 178.043 313.217 176.351 313.217 174.527C313.217 172.703 313.541 171.023 314.189 169.487C314.837 167.927 315.749 166.571 316.925 165.419C318.125 164.243 319.517 163.343 321.101 162.719C322.709 162.071 324.449 161.747 326.321 161.747C328.193 161.747 329.921 162.071 331.505 162.719C333.113 163.343 334.505 164.231 335.681 165.383C336.857 166.535 337.769 167.891 338.417 169.451C339.089 170.987 339.425 172.679 339.425 174.527C339.425 176.375 339.089 178.079 338.417 179.639C337.769 181.175 336.857 182.519 335.681 183.671C334.505 184.823 333.113 185.723 331.505 186.371C329.921 186.995 328.193 187.307 326.321 187.307ZM326.321 185.615C327.929 185.615 329.417 185.339 330.785 184.787C332.153 184.235 333.341 183.455 334.349 182.447C335.357 181.439 336.137 180.263 336.689 178.919C337.265 177.575 337.553 176.111 337.553 174.527C337.553 172.919 337.265 171.455 336.689 170.135C336.137 168.791 335.357 167.615 334.349 166.607C333.341 165.599 332.153 164.819 330.785 164.267C329.417 163.715 327.929 163.439 326.321 163.439C324.713 163.439 323.225 163.715 321.857 164.267C320.489 164.819 319.289 165.599 318.257 166.607C317.249 167.615 316.457 168.791 315.881 170.135C315.329 171.455 315.053 172.919 315.053 174.527C315.053 176.111 315.329 177.575 315.881 178.919C316.457 180.263 317.249 181.439 318.257 182.447C319.289 183.455 320.489 184.235 321.857 184.787C323.225 185.339 324.713 185.615 326.321 185.615ZM347.593 187.127V161.927H357.565C360.229 161.927 362.569 162.467 364.585 163.547C366.601 164.627 368.161 166.115 369.265 168.011C370.393 169.907 370.957 172.079 370.957 174.527C370.957 176.975 370.393 179.147 369.265 181.043C368.161 182.939 366.601 184.427 364.585 185.507C362.569 186.587 360.229 187.127 357.565 187.127H347.593ZM349.429 185.471H357.421C359.797 185.471 361.861 185.003 363.613 184.067C365.365 183.131 366.721 181.847 367.681 180.215C368.641 178.559 369.121 176.663 369.121 174.527C369.121 172.391 368.641 170.507 367.681 168.875C366.721 167.219 365.365 165.923 363.613 164.987C361.861 164.051 359.797 163.583 357.421 163.583H349.429V185.471ZM380.755 173.519H394.399V175.139H380.755V173.519ZM380.971 185.471H396.523V187.127H379.135V161.927H395.983V163.583H380.971V185.471ZM405.017 187.127V161.927H414.053C416.165 161.927 417.977 162.263 419.489 162.935C421.001 163.607 422.165 164.579 422.981 165.851C423.797 167.099 424.205 168.623 424.205 170.423C424.205 172.175 423.797 173.687 422.981 174.959C422.165 176.207 421.001 177.179 419.489 177.875C417.977 178.547 416.165 178.883 414.053 178.883H406.025L406.853 178.019V187.127H405.017ZM422.513 187.127L415.961 177.983H418.049L424.601 187.127H422.513ZM406.853 178.127L406.025 177.263H414.053C416.765 177.263 418.817 176.663 420.209 175.463C421.625 174.263 422.333 172.583 422.333 170.423C422.333 168.239 421.625 166.559 420.209 165.383C418.817 164.183 416.765 163.583 414.053 163.583H406.025L406.853 162.683V178.127ZM432.727 187.127V161.927H434.275L452.239 184.859H451.411V161.927H453.247V187.127H451.735L433.735 164.195H434.563V187.127H432.727ZM477.162 187.307C475.794 187.307 474.51 186.995 473.31 186.371C472.134 185.723 471.186 184.835 470.466 183.707L471.582 182.483C472.278 183.515 473.094 184.307 474.03 184.859C474.99 185.387 476.034 185.651 477.162 185.651C480.498 185.651 482.166 183.671 482.166 179.711V163.583H472.878V161.927H484.002V179.711C484.002 182.231 483.426 184.127 482.274 185.399C481.122 186.671 479.418 187.307 477.162 187.307ZM495.997 173.519H509.641V175.139H495.997V173.519ZM496.213 185.471H511.765V187.127H494.377V161.927H511.225V163.583H496.213V185.471ZM520.259 187.127V161.927H522.095V185.471H536.603V187.127H520.259ZM543.118 187.127V161.927H544.954V185.471H559.462V187.127H543.118ZM569.245 187.127V177.983L569.677 179.171L559.093 161.927H561.109L570.721 177.587H569.713L579.325 161.927H581.233L570.649 179.171L571.081 177.983V187.127H569.245ZM588.627 174.347H602.271V176.003H588.627V174.347ZM588.843 187.127H587.007V161.927H603.855V163.583H588.843V187.127ZM611.518 187.127V161.927H613.354V187.127H611.518ZM623.935 187.127V161.927H625.483L643.447 184.859H642.619V161.927H644.455V187.127H642.943L624.943 164.195H625.771V187.127H623.935ZM676.758 187.307C674.886 187.307 673.146 186.995 671.538 186.371C669.954 185.723 668.574 184.823 667.398 183.671C666.222 182.519 665.31 181.175 664.662 179.639C664.014 178.079 663.69 176.375 663.69 174.527C663.69 172.679 664.014 170.987 664.662 169.451C665.31 167.891 666.222 166.535 667.398 165.383C668.598 164.231 669.99 163.34Line truncated
|
||||||
<path d="M71.6631 123.395V171.196C71.6631 179.65 80.8918 184.117 87.6225 180.207L169.982 132.406C171.569 131.497 172.888 130.185 173.805 128.603C174.722 127.021 175.205 125.224 175.205 123.395C175.205 121.566 174.722 119.769 173.805 118.187C172.888 116.605 171.569 115.293 169.982 114.384L128.802 90.4834M71.6631 123.395V75.5942C71.6631 67.1397 80.8918 62.673 87.6225 66.583L128.802 90.4834M71.6631 123.395L128.802 90.4834" stroke="white" stroke-width="10" shape-rendering="crispEdges"/>
|
|
||||||
</g>
|
|
||||||
<g clip-path="url(#clip1_504_8)">
|
|
||||||
<path d="M268.49 132.788C263.093 132.788 258.076 131.572 253.438 129.139C248.801 126.63 245 123.209 242.035 118.876C239.071 114.543 237.322 109.754 236.79 104.509H241.009C241.541 108.994 243.1 113.099 245.684 116.824C248.269 120.473 251.538 123.362 255.491 125.49C259.52 127.543 263.853 128.569 268.49 128.569C273.584 128.569 278.259 127.315 282.516 124.806C286.773 122.297 290.156 118.838 292.665 114.429C295.173 110.02 296.428 105.079 296.428 99.6052V55.9316H260.85V51.7125H300.533V99.6052C300.533 105.839 299.089 111.502 296.2 116.596C293.387 121.613 289.51 125.566 284.569 128.455C279.703 131.344 274.344 132.788 268.49 132.788Z" fill="white"/>
|
|
||||||
<path d="M326.901 51.7125H382.775V55.9316H331.12V88.0881H376.048V92.3073H331.12V126.858H382.775V131.078H326.901V51.7125Z" fill="white"/>
|
|
||||||
<path d="M414.16 131.078V51.7125H418.38V126.858H473.684V131.078H414.16Z" fill="white"/>
|
|
||||||
<path d="M498.569 131.078V51.7125H502.789V126.858H558.093V131.078H498.569Z" fill="white"/>
|
|
||||||
<path d="M579.444 51.7125L607.609 94.1318L635.546 51.7125H640.564L609.662 98.5789V131.078H605.442V98.5789L574.426 51.7125H579.444Z" fill="white"/>
|
|
||||||
<path d="M669.782 131.078H665.563V51.7125H697.492C702.813 51.7125 707.716 52.8528 712.201 55.1334C716.763 57.414 720.374 60.6448 723.034 64.826C725.695 69.0071 727.025 73.8344 727.025 79.3078C727.025 84.5532 725.657 89.3805 722.92 93.7897C720.26 98.1988 716.611 101.582 711.973 103.938C707.944 105.991 703.117 107.017 697.492 107.017H669.782V131.078ZM669.782 102.798H697.492C702.357 102.798 706.348 102.038 709.465 100.517C713.494 98.6169 716.725 95.7662 719.157 91.9652C721.59 88.1642 722.806 83.945 722.806 79.3078C722.806 74.7466 721.59 70.5655 719.157 66.7645C716.725 62.9635 713.456 60.1127 709.351 58.2122C706.234 56.6918 702.281 55.9316 697.492 55.9316H669.782V102.798Z" fill="white"/>
|
|
||||||
<path d="M751.797 131.078V51.7125H756.016V126.858H811.32V131.078H751.797Z" fill="white"/>
|
|
||||||
<path d="M898.124 131.078H823.32L860.722 50.002L898.124 131.078Z" fill="url(#paint0_linear_504_8)"/>
|
|
||||||
<path d="M917.08 51.7125L945.245 94.1318L973.183 51.7125H978.2L947.298 98.5789V131.078H943.079V98.5789L912.062 51.7125H917.08Z" fill="white"/>
|
|
||||||
<path d="M1002.17 51.7125H1058.05V55.9316H1006.39V88.0881H1051.32V92.3073H1006.39V126.858H1058.05V131.078H1002.17V51.7125Z" fill="white"/>
|
|
||||||
<path d="M1131.17 54.3352C1135.73 56.4637 1139.3 59.6186 1141.89 63.7997C1144.55 67.9808 1145.88 72.618 1145.88 77.7114C1145.88 83.641 1144.05 88.9624 1140.4 93.6756C1136.83 98.3129 1131.24 102.013 1125.62 103.534L1085.78 51.7125H1116C1119.35 51.7125 1122.2 51.9405 1124.55 52.3966C1126.99 52.7767 1129.19 53.4229 1131.17 54.3352Z" fill="url(#paint1_linear_504_8)"/>
|
|
||||||
<path d="M1146.79 131.078L1125.62 103.534H1085.78V131.078H1146.79Z" fill="url(#paint2_linear_504_8)"/>
|
|
||||||
<path d="M256.77 180.696H242.154L238.95 187.788H236.97L248.562 162.588H250.398L261.99 187.788H260.01L256.77 180.696ZM256.086 179.148L249.462 164.604L242.874 179.148H256.086ZM303.243 187.788L303.207 166.224L292.659 184.44H291.759L281.211 166.296V187.788H279.411V162.588H280.959L292.227 182.064L303.495 162.588H305.007L305.043 187.788H303.243ZM326.321 187.968C323.849 187.968 321.617 187.416 319.625 186.312C317.633 185.184 316.061 183.648 314.909 181.704C313.781 179.76 313.217 177.588 313.217 175.188C313.217 172.788 313.781 170.616 314.909 168.672C316.061 166.728 317.633 165.204 319.625 164.1C321.617 162.972 323.849 162.408 326.321 162.408C328.793 162.408 331.025 162.96 333.017 164.064C335.009 165.168 336.569 166.692 337.697 168.636C338.849 170.58 339.425 172.764 339.425 175.188C339.425 177.612 338.849 179.796 337.697 181.74C336.569 183.684 335.009 185.208 333.017 186.312C331.025 187.416 328.793 187.968 326.321 187.968ZM326.321 186.276C328.433 186.276 330.341 185.796 332.045 184.836C333.749 183.876 335.093 182.556 336.077 180.876C337.061 179.172 337.553 177.276 337.553 175.188C337.553 173.1 337.061 171.216 336.077 169.536C335.093 167.832 333.749 166.5 332.045 165.54C330.341 164.58 328.433 164.1 326.321 164.1C324.209 164.1 322.289 164.58 320.561 165.54C318.857 166.5 317.513 167.832 316.529 169.536C315.545 171.216 315.053 173.1 315.053 175.188C315.053 177.276 315.545 179.172 316.529 180.876C317.513 182.556 318.857 183.876 320.561 184.836C322.289 185.796 324.209 186.276 326.321 186.276ZM347.593 162.588H357.565C360.181 162.588 362.497 163.128 364.513 164.208C366.553 165.288 368.137 166.788 369.265 168.708C370.393 170.604 370.957 172.764 370.957 175.188C370.957 177.612 370.393 179.784 369.265 181.704C368.137 183.6 366.553 185.088 364.513 186.168C362.497 187.248 360.181 187.788 357.565 187.788H347.593V162.588ZM357.421 186.132C359.749 186.132 361.801 185.676 363.577 184.764C365.353 183.828 366.721 182.532 367.681 180.876C368.641 179.22 369.121 177.324 369.121 175.188C369.121 173.052 368.641 171.156 367.681 169.5C366.721 167.844 365.353 166.56 363.577 165.648C361.801 164.712 359.749 164.244 357.421 164.244H349.429V186.132H357.421ZM396.523 186.132V187.788H379.135V162.588H395.983V164.244H380.971V174.18H394.399V175.8H380.971V186.132H396.523ZM422.513 187.788L416.501 179.364C415.613 179.484 414.797 179.544 414.053 179.544H406.853V187.788H405.017V162.588H414.053C417.221 162.588 419.705 163.344 421.505 164.856C423.305 166.344 424.205 168.42 424.205 171.084C424.205 173.076 423.689 174.756 422.657 176.124C421.649 177.468 420.197 178.416 418.301 178.968L424.601 187.788H422.513ZM414.053 177.924C416.741 177.924 418.793 177.336 420.209 176.16C421.625 174.96 422.333 173.268 422.333 171.084C422.333 168.9 421.625 167.22 420.209 166.044C418.793 164.844 416.741 164.244 414.053 164.244H406.853V177.924H414.053ZM453.247 162.588V187.788H451.735L434.563 165.9V187.788H432.727V162.588H434.275L451.411 184.476V162.588H453.247ZM477.162 187.968C475.794 187.968 474.51 187.656 473.31 187.032C472.134 186.384 471.186 185.496 470.466 184.368L471.582 183.144C472.278 184.176 473.094 184.968 474.03 185.52C474.99 186.048 476.034 186.312 477.162 186.312C478.842 186.312 480.09 185.832 480.906 184.872C481.746 183.888 482.166 182.388 482.166 180.372V164.244H472.878V162.588H484.002V180.372C484.002 182.892 483.426 184.788 482.274 186.06C481.122 187.332 479.418 187.968 477.162 187.968ZM511.765 186.132V187.788H494.377V162.588H511.225V164.244H496.213V174.18H509.641V175.8H496.213V186.132H511.765ZM520.259 162.588H522.095V186.132H536.603V187.788H520.259V162.588ZM543.118 162.588H544.954V186.132H559.462V187.788H543.118V162.588ZM571.081 179.112V187.788H569.245V179.112L559.093 162.588H561.109L570.217 177.42L579.325 162.588H581.233L571.081 179.112ZM588.843 164.244V175.008H602.271V176.664H588.843V187.788H587.007V162.588H603.855V164.244H588.843ZM611.518 162.588H613.354V187.788H611.518V162.588ZM644.455 162.588V187.788H642.943L625.771 165.9V187.788H623.935V162.588H625.483L642.619 184.476V162.588H644.455ZM676.758 187.968C674.286 187.968 672.054 187.416 670.062 186.312C668.094 185.208 666.534 183.684 665.382 181.74C664.254 179.796 663.69 177.612 663.69 175.188C663.69 172.764 664.254 170.58 665.382 168.636C666.534 166.692 668.094 165.168 670.062 164.064C672.054 162.96 674.286 162.408 676.758 162.408C678.582 162.408 680.262 162.708 681.798 163.308C683.334 163.884 684.642 164.748 685.722 165.9L684.57 167.088C682.554 165.096 679.974 164.1 676.83 164.1C674.718 164.1 672.798 164.58 671.07 165.54C669.342 166.5 667.986 167.832 667.002 169.536C666.018 171.216 665.526 173.1 665.526 175.188C665.526 177.276 666.018 179.172 667.002 180.876C667.986 182.556 669.342 183.876 671.07 184.836C672.798 185.796 674.718 186.276 676.83 186.276C679.95 186.276 682.53 185.268 684.57 183.252L685.722 184.44C684.642 185.592 683.322 186.468 681.762 187.068C680.226 187.668 678.558 187.968 676.758 187.968ZM693.671 162.588H695.507V186.132H710.015V187.788H693.671V162.588ZM716.53 162.588H718.366V187.788H716.53V162.Line truncated
|
|
||||||
</g>
|
|
||||||
</g>
|
</g>
|
||||||
<defs>
|
<defs>
|
||||||
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||||
<use xlink:href="#image0_504_8" transform="matrix(0 -0.000244141 0.000274658 0 -0.0625001 1)"/>
|
<use xlink:href="#image0_504_8" transform="scale(0.000806452)"/>
|
||||||
|
</pattern>
|
||||||
|
<pattern id="pattern1" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||||
|
<use xlink:href="#image1_504_8" transform="scale(0.000244141 0.00257732)"/>
|
||||||
</pattern>
|
</pattern>
|
||||||
<filter id="filter0_d_504_8" x="-21.3369" y="-25.8237" width="293.542" height="306.437" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
|
|
||||||
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
|
|
||||||
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
|
|
||||||
<feOffset dx="2" dy="4"/>
|
|
||||||
<feGaussianBlur stdDeviation="45"/>
|
|
||||||
<feComposite in2="hardAlpha" operator="out"/>
|
|
||||||
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.5 0"/>
|
|
||||||
<feBlend mode="normal" in2="BackgroundImageFix" result="effect1_dropShadow_504_8"/>
|
|
||||||
<feBlend mode="normal" in="SourceGraphic" in2="effect1_dropShadow_504_8" result="shape"/>
|
|
||||||
</filter>
|
|
||||||
<linearGradient id="paint0_linear_504_8" x1="879.722" y1="91.7373" x2="824.111" y2="130.497" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#FB2576"/>
|
|
||||||
<stop offset="1" stop-color="#150050"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint1_linear_504_8" x1="1138.4" y1="59.7188" x2="1086.16" y2="130.497" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#FB2576"/>
|
|
||||||
<stop offset="1" stop-color="#150050"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint2_linear_504_8" x1="1138.4" y1="59.7188" x2="1086.16" y2="130.497" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#FB2576"/>
|
|
||||||
<stop offset="1" stop-color="#150050"/>
|
|
||||||
</linearGradient>
|
|
||||||
<clipPath id="clip0_504_8">
|
<clipPath id="clip0_504_8">
|
||||||
<rect width="1196.79" height="246.79" fill="white"/>
|
<rect width="910" height="145.465" fill="white" transform="translate(236.79 50.6626)"/>
|
||||||
</clipPath>
|
</clipPath>
|
||||||
<clipPath id="clip1_504_8">
|
<image id="image0_504_8" width="1240" height="1240" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABNgAAATYCAYAAADNtnp8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAB1GVSURBVHgB7P1tsGXndd8Hrv1yzr3dDVCQZb1RfLmw9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7n6enxzP0ZwMAAAAAgK8WEmzwNTPJteuCXAOAu4cnRPuzXRcAAAAAAICvAhJs8DUz/SP0eaFEFADuTs6mx6NN07wgAAAAAAAAXwESbPA1Yf2KHhYAgLuTk+nxOfqzAQAAAADAawHBBl8rpwIAcPdzfXp8fpJsNwQAAAAAAOBVoEQUviYYbgAA9yBn0+OppmluCgAAAAAAQIAEG3zVTHLtg4JcA4B7j5PpkUpGn6dsFAAAAAAAIgg2+Fq4LgAA9y4Pi5aN0p8NAAAAAAAylIjCV4X9Y/LzAgAAiTOhbBQAAAAA4J6HBBt8tTwsAADgnIiWjX7eyucBAAAAAOAeBMEGXy2PCQAALDmZHp+hbBQAAAAA4N6EElF4zVAeCgDwmjmdHs80TfOiAAAAAADAXQ8JNvhqeFgAAOC1cDo9Pjf9HxPXBQAAAAAA7noQbPDVQH8hAIDXzonU/mwnAgAAAAAAdy2UiMJrYvrH4QPTl38mAADwtXJTdOLomQAAAAAAwF0FCTZ4rTwsALine truncated
|
||||||
<rect width="910" height="146.786" fill="white" transform="translate(236.79 50.002)"/>
|
<image id="image1_504_8" width="4096" height="388" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAEAAAAAGECAYAAAC2K+WjAAAAAXNSR0IArs4c6QAAIABJREFUeF7svQmcJVdZ9/97emayh+wgAQImYdFX4VUU1D8I+soivqgvEGRfBBISkkBCNiDIyE7YAtkTkrAFkoxECCKIiOAGCqIEBaJhM2HLnsns032f/+fcqrp1qm7d7tvTVfdW3f7W55PMdNU5z/Oc77l9p/vc8/sdExcEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACUydgU6+AAiAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhAQ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3a9m/9dr2c32rqFb2pht+3bdmzZtm4v37b5p0dsX6/1HBozsXeM5SeqewFi+RXQozYCGADUhpJA0yWAAcB0+TeWHQOAxtLine truncated
|
||||||
</clipPath>
|
|
||||||
<image id="image0_504_8" width="4096" height="4096" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAEAAAABAACAYAAADyoyQXAAAAAXNSR0IArs4c6QAAIABJREFUeF7s/QmS5DquNIxm3V7I/63jvv0v6556poEiAGJwJ6nIrNPV1nYqU8LgcAxSKETmr//39f/7/fX19fXr+I/5nz2WySD6nh9ED5GRthF5RIbF69scjzK8ormJ5CpeGPuI7AyvqM6af+1F/ub5n/XVWmjWvvUbYUPyjcqgcihPsZx/BuFqhRfUPtrvckwivRzJZ7lFsDD61RSq4mB8Ididyw10Dcpqtbp+IT3t4fJ6esex3RxUOcowV7zOzKHKJst1hb/y90YMKOdIbVb4URtoXc3yv2qf5ext+YyHFc4Zu4wsywdjm5X9SVhY7JH8+YFow/9W7WD6WirT6edmdDQhkR//+O8ve1z+np37MpqjbBSV1dS/X1oR2jxW6THGPtrmOIgzWduJObkiG6NvGmNe4loZdXy/nu0YA+qvlutZ1PXn47mZ+R8RQxtu/zce+/0/okZuOcnqbzsY//n6ksceWSH34HKG6hnB9f/rf8pny6rh5JS5PZmiUb/+6vx4Vff7PPhb4W8wxlo0tXX8arDaaeD6PHR+j3PjxGFm85DPX52oWHb06svmNd15QOwZbkQctppdTm55a+VOj2Kl1wniU9eWz7o3E+Me9KdMr1+L+feRsyCvIceyHwJu4jrNMuddGTxWbjm3t3JuIn6iq5KXxYExxcdYt15N3Z1dcs/JtbHj987gzF6JTS14cUZ5lZmL4o049q5JJVbTdZBPR8ivrjbXPRT92Kwunh0MR8rV4yxjaIOfnCrnbI2HMbnXGuMZkV3/tLZu4TM4ES9rMp0JnhNeQ2P95T4r5eLhMFTPj9/wHSPksF/YtE5uAbV/yWHSqBQm58VkczBXob7/tfyjSLjYcelakslkxT1Tabav4xzK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WNTLT0CgrTDq763EyWR1nCdp7KM699YCiw/K3VuNSm+nOeH7jFYXXFJenCNtaTTWrPhYcIS5ZXZvnLM1p9ejX9JGcYzWZ54O943pffpU3ZBrsiGIvzh2IfqIN/BMnLvkT4/xvxvQ3czr7a88MJypJOPyuXNR+awkm8r3WYs+cH066eZ3TqmruOO9bTv2Zk8x3EzNx4Drc817crvw711gFurYDhw9qcbsQYRu+sxB/iV4i6/reT10ymkOef3lswNEqyVGcw+LjlkcVnucXs5j+DjX6a+9eZvuGAoEtswFA76Kx/iRPDWL/95a3GwCcH5HbuY7w0JO6snuvcyNn46LwMSa5OULDK31dfvoZrw40Nr0Y/ZlhdhMAZwOAU/PsA7GI/l7w/+tOjNqA4Obp2Vyg8XYu+L82BThZ+8+9QcA/PSMeZ7a+vJzJfLeftZz10ae4lOucSXndWV6+rS9bTxaz4vKuIRm7rVGNUdeLxJzWor8BwEWEN6ZlUdmLXnYuu0BaPcSOd0kcCz4boP4ldQZL5tfHOUaY+fX4iG4JKu522vIuZJV/VIeJzw5Y79Lv45JjZNSqYom4tNgZzr0+YfWRGkYxonJVD4yjVfON6+c9Xc2FqK68umRld8uv1B/Cg52AMzMomutoDdquQ/Wy3otymeVn1h4zp2Z9MP2P+GDsZdft1XPenF61ic7kqu6yGkLPvRHfim+kNhD+0evrbPxMbnZgyXCuYmFsM7JMLLine truncated
|
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 4.9 MiB After Width: | Height: | Size: 863 KiB |
|
After Width: | Height: | Size: 18 KiB |
@@ -0,0 +1,20 @@
|
|||||||
|
<svg width="1197" height="247" viewBox="0 0 1197 247" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
|
<rect x="50" y="50" width="146.79" height="146.79" fill="url(#pattern0)"/>
|
||||||
|
<g clip-path="url(#clip0_949_2)">
|
||||||
|
<rect x="236.79" y="50.6626" width="860" height="81.4648" fill="url(#pattern1)"/>
|
||||||
|
<path d="M236.97 187.127L248.562 161.927H250.398L261.99 187.127H260.01L249.066 163.079H249.858L238.95 187.127H236.97ZM241.218 180.035L241.83 178.487H256.914L257.526 180.035H241.218ZM279.411 187.127V161.927H280.959L292.659 182.123H291.831L303.495 161.927H305.007L305.043 187.127H303.243L303.207 164.699H303.711L292.659 183.779H291.759L280.671 164.699H281.211V187.127H279.411ZM326.321 187.307C324.449 187.307 322.709 186.995 321.101 186.371C319.517 185.723 318.125 184.823 316.925 183.671C315.749 182.495 314.837 181.139 314.189 179.603C313.541 178.043 313.217 176.351 313.217 174.527C313.217 172.703 313.541 171.023 314.189 169.487C314.837 167.927 315.749 166.571 316.925 165.419C318.125 164.243 319.517 163.343 321.101 162.719C322.709 162.071 324.449 161.747 326.321 161.747C328.193 161.747 329.921 162.071 331.505 162.719C333.113 163.343 334.505 164.231 335.681 165.383C336.857 166.535 337.769 167.891 338.417 169.451C339.089 170.987 339.425 172.679 339.425 174.527C339.425 176.375 339.089 178.079 338.417 179.639C337.769 181.175 336.857 182.519 335.681 183.671C334.505 184.823 333.113 185.723 331.505 186.371C329.921 186.995 328.193 187.307 326.321 187.307ZM326.321 185.615C327.929 185.615 329.417 185.339 330.785 184.787C332.153 184.235 333.341 183.455 334.349 182.447C335.357 181.439 336.137 180.263 336.689 178.919C337.265 177.575 337.553 176.111 337.553 174.527C337.553 172.919 337.265 171.455 336.689 170.135C336.137 168.791 335.357 167.615 334.349 166.607C333.341 165.599 332.153 164.819 330.785 164.267C329.417 163.715 327.929 163.439 326.321 163.439C324.713 163.439 323.225 163.715 321.857 164.267C320.489 164.819 319.289 165.599 318.257 166.607C317.249 167.615 316.457 168.791 315.881 170.135C315.329 171.455 315.053 172.919 315.053 174.527C315.053 176.111 315.329 177.575 315.881 178.919C316.457 180.263 317.249 181.439 318.257 182.447C319.289 183.455 320.489 184.235 321.857 184.787C323.225 185.339 324.713 185.615 326.321 185.615ZM347.593 187.127V161.927H357.565C360.229 161.927 362.569 162.467 364.585 163.547C366.601 164.627 368.161 166.115 369.265 168.011C370.393 169.907 370.957 172.079 370.957 174.527C370.957 176.975 370.393 179.147 369.265 181.043C368.161 182.939 366.601 184.427 364.585 185.507C362.569 186.587 360.229 187.127 357.565 187.127H347.593ZM349.429 185.471H357.421C359.797 185.471 361.861 185.003 363.613 184.067C365.365 183.131 366.721 181.847 367.681 180.215C368.641 178.559 369.121 176.663 369.121 174.527C369.121 172.391 368.641 170.507 367.681 168.875C366.721 167.219 365.365 165.923 363.613 164.987C361.861 164.051 359.797 163.583 357.421 163.583H349.429V185.471ZM380.755 173.519H394.399V175.139H380.755V173.519ZM380.971 185.471H396.523V187.127H379.135V161.927H395.983V163.583H380.971V185.471ZM405.017 187.127V161.927H414.053C416.165 161.927 417.977 162.263 419.489 162.935C421.001 163.607 422.165 164.579 422.981 165.851C423.797 167.099 424.205 168.623 424.205 170.423C424.205 172.175 423.797 173.687 422.981 174.959C422.165 176.207 421.001 177.179 419.489 177.875C417.977 178.547 416.165 178.883 414.053 178.883H406.025L406.853 178.019V187.127H405.017ZM422.513 187.127L415.961 177.983H418.049L424.601 187.127H422.513ZM406.853 178.127L406.025 177.263H414.053C416.765 177.263 418.817 176.663 420.209 175.463C421.625 174.263 422.333 172.583 422.333 170.423C422.333 168.239 421.625 166.559 420.209 165.383C418.817 164.183 416.765 163.583 414.053 163.583H406.025L406.853 162.683V178.127ZM432.727 187.127V161.927H434.275L452.239 184.859H451.411V161.927H453.247V187.127H451.735L433.735 164.195H434.563V187.127H432.727ZM477.162 187.307C475.794 187.307 474.51 186.995 473.31 186.371C472.134 185.723 471.186 184.835 470.466 183.707L471.582 182.483C472.278 183.515 473.094 184.307 474.03 184.859C474.99 185.387 476.034 185.651 477.162 185.651C480.498 185.651 482.166 183.671 482.166 179.711V163.583H472.878V161.927H484.002V179.711C484.002 182.231 483.426 184.127 482.274 185.399C481.122 186.671 479.418 187.307 477.162 187.307ZM495.997 173.519H509.641V175.139H495.997V173.519ZM496.213 185.471H511.765V187.127H494.377V161.927H511.225V163.583H496.213V185.471ZM520.259 187.127V161.927H522.095V185.471H536.603V187.127H520.259ZM543.118 187.127V161.927H544.954V185.471H559.462V187.127H543.118ZM569.245 187.127V177.983L569.677 179.171L559.093 161.927H561.109L570.721 177.587H569.713L579.325 161.927H581.233L570.649 179.171L571.081 177.983V187.127H569.245ZM588.627 174.347H602.271V176.003H588.627V174.347ZM588.843 187.127H587.007V161.927H603.855V163.583H588.843V187.127ZM611.518 187.127V161.927H613.354V187.127H611.518ZM623.935 187.127V161.927H625.483L643.447 184.859H642.619V161.927H644.455V187.127H642.943L624.943 164.195H625.771V187.127H623.935ZM676.758 187.307C674.886 187.307 673.146 186.995 671.538 186.371C669.954 185.723 668.574 184.823 667.398 183.671C666.222 182.519 665.31 181.175 664.662 179.639C664.014 178.079 663.69 176.375 663.69 174.527C663.69 172.679 664.014 170.987 664.662 169.451C665.31 167.891 666.222 166.535 667.398 165.383C668.598 164.231 669.99 163.34Line truncated
|
||||||
|
</g>
|
||||||
|
<defs>
|
||||||
|
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||||
|
<use xlink:href="#image0_949_2" transform="scale(0.000806452)"/>
|
||||||
|
</pattern>
|
||||||
|
<pattern id="pattern1" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||||
|
<use xlink:href="#image1_949_2" transform="scale(0.000244141 0.00257732)"/>
|
||||||
|
</pattern>
|
||||||
|
<clipPath id="clip0_949_2">
|
||||||
|
<rect width="910" height="145.465" fill="white" transform="translate(236.79 50.6626)"/>
|
||||||
|
</clipPath>
|
||||||
|
<image id="image0_949_2" width="1240" height="1240" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABNgAAATYCAYAAADNtnp8AAAACXBIWXMAAAsTAAALEwEAmpwYAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAB1GVSURBVHgB7P1tsGXndd8Hrv1yzr3dDVCQZb1RfL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AIA7n6enxzP0ZwMAAAAAgK8WEmzwNTPJteuCXAOAu4cnRPuzXRcAAAAAAICvAhJs8DUz/SP0eaFEFADuTs6mx6NN07wgAAAAAAAAXwESbPA1Yf2KHhYAgLuTk+nxOfqzAQAAAADAawHBBl8rpwIAcPdzfXp8fpJsNwQAAAAAAOBVoEQUviYYbgAA9yBn0+OppmluCgAAAAAAQIAEG3zVTHLtg4JcA4B7j5PpkUpGn6dsFAAAAAAAIgg2+Fq4LgAA9y4Pi5aN0p8NAAAAAAAylIjCV4X9Y/LzAgAAiTOhbBQAAAAA4J6HBBt8tTwsAADgnIiWjX7eyucBAAAAAOAeBMEGXy2PCQAALDmZHp+hbBQAAAAA4N6EElF4zVAeCgDwmjmdHs80TfOiAAAAAADAXQ8JNvhqeFgAAOC1cDo9Pjf9HxPXBQAAAAAA7noQbPDVQH8hAIDXzonU/mwnAgAAAAAAdy2UiMJrYvrH4QPTl38mAADwtXJTdOLomQAAAAAAwF0FCTZ4rTwsALine truncated
|
||||||
|
<image id="image1_949_2" width="4096" height="388" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAEAAAAAGECAYAAAC2K+WjAAAAAXNSR0IArs4c6QAAIABJREFUeF7snQmcJGV5/381swvIIbcol8rhlQRjjBrz12iMIppojAreCiogt9weGCdeICjIzS4CiqLACioeGKMGNUYTjAloUBIUDSjIsewue+9Mv//P21Vv1ftWV890z1R1V3V/6yPuTtX7Ps/zft/u2Zm339/vjcQFAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAwNAJREOvgAIgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCAAAQgAAEIQAACEIAABCAAAQhAAAIQEAYAvAggAAEIQAACEIAABCAAAQhAAAIQgAAEIAABCEAAAhCA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xBgCNnDaKhgAEINAXAQwA+sJFYwhAAAJzEtg5OcXbngRU9nLine truncated
|
||||||
|
</defs>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 858 KiB |
|
Before Width: | Height: | Size: 632 KiB After Width: | Height: | Size: 116 KiB |
|
Before Width: | Height: | Size: 1.2 MiB |
|
After Width: | Height: | Size: 89 KiB |
|
Before Width: | Height: | Size: 471 KiB After Width: | Height: | Size: 469 KiB |
|
After Width: | Height: | Size: 84 KiB |
|
After Width: | Height: | Size: 3.5 KiB |
|
After Width: | Height: | Size: 451 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 25 KiB |
|
After Width: | Height: | Size: 2.1 KiB |
|
After Width: | Height: | Size: 150 KiB |
|
After Width: | Height: | Size: 23 KiB |
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
<body>
|
<body>
|
||||||
<main>
|
<main>
|
||||||
<img src="./assetsStatic/LogoBig.png" alt="" srcset="">
|
<img src="./assetsStatic/LogoBigBlack.png" alt="" srcset="">
|
||||||
</main>
|
</main>
|
||||||
<div class="loading">
|
<div class="loading">
|
||||||
<div class="indicator"></div>
|
<div class="indicator"></div>
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
background: black;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.background {
|
.background {
|
||||||
@@ -35,11 +35,12 @@
|
|||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
transform: translate(-50%, -50%);
|
transform: translate(-50%, -50%);
|
||||||
width: calc(100vw + 5em);
|
width: 100vw;
|
||||||
height: calc(100vh + 5em);
|
height: 100vh;
|
||||||
background-image: url("./assetsStatic/meshbackground.png");
|
background-image: url("./assetsStatic/splashBg.png");
|
||||||
background-size: cover;
|
background-size: cover;
|
||||||
filter: brightness(0.3);
|
background-position: center;
|
||||||
|
border-radius: 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
img {
|
img {
|
||||||
width: 100%;
|
width: 75%;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -67,17 +68,18 @@
|
|||||||
width: 100vw;
|
width: 100vw;
|
||||||
background: hsla(255, 100%, 4%, 0.5);
|
background: hsla(255, 100%, 4%, 0.5);
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
height: 14px;
|
height: 8px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
backdrop-filter: blur(5px);
|
||||||
|
border-radius: 0 0 7px 7px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.indicator {
|
.indicator {
|
||||||
background: hsl(337, 96%, 56%);
|
background: hsl(337, 96%, 56%);
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
/* transform: scaleX(0.5); */
|
|
||||||
transform-origin: left;
|
transform-origin: left;
|
||||||
animation: loading 1s infinite;
|
animation: loading 0.8s infinite ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
@keyframes loading {
|
@keyframes loading {
|
||||||
|
|||||||
@@ -0,0 +1,8 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"extends": [
|
||||||
|
"config:base",
|
||||||
|
":disableDependencyDashboard"
|
||||||
|
],
|
||||||
|
"labels": ["dependencies"],
|
||||||
|
}
|
||||||
@@ -12,14 +12,16 @@ rust-version = "1.59"
|
|||||||
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
|
||||||
|
|
||||||
[build-dependencies]
|
[build-dependencies]
|
||||||
tauri-build = { version = "1.2.1", features = [] }
|
tauri-build = { version = "1.4.0", features = [] }
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
log = "^0.4.20"
|
||||||
serde_json = "1.0"
|
serde_json = "1.0"
|
||||||
serde = { version = "1.0", features = ["derive"] }
|
serde = { version = "1.0", features = ["derive"] }
|
||||||
tauri = { version = "1.2.2", features = ["devtools", "http-all", "process-exit", "process-relaunch", "shell-all", "window-set-fullscreen"] }
|
tauri = { version = "1.4.1", features = [ "http-all", "devtools", "process-exit", "process-relaunch", "shell-all", "window-set-fullscreen", "http-all"] }
|
||||||
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
tauri-plugin-store = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev" }
|
||||||
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
tauri-plugin-localhost = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "v1" }
|
||||||
|
tauri-plugin-log = { git = "https://github.com/tauri-apps/plugins-workspace", branch = "dev", features = ["colored"] }
|
||||||
portpicker = "0.1" # used in the example to pick a random free port
|
portpicker = "0.1" # used in the example to pick a random free port
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
#![cfg_attr(not(debug_assertions), windows_subsystem = "windows")]
|
||||||
|
|
||||||
use tauri::Manager;
|
use tauri::Manager;
|
||||||
|
|
||||||
use tauri::{utils::config::AppUrl, WindowUrl};
|
use tauri::{utils::config::AppUrl, WindowUrl};
|
||||||
|
use tauri_plugin_log::{fern::colors::ColoredLevelConfig, LogTarget};
|
||||||
// Create the command:
|
// Create the command:
|
||||||
// This command must be async so that it doesn't run on the main thread.
|
// This command must be async so that it doesn't run on the main thread.
|
||||||
#[tauri::command]
|
#[tauri::command]
|
||||||
@@ -19,8 +18,10 @@ async fn close_splashscreen(window: tauri::Window) {
|
|||||||
// Tauri by default uses HTTPS, so use the localhost plugin to downgrade back to
|
// Tauri by default uses HTTPS, so use the localhost plugin to downgrade back to
|
||||||
// HTTP. However, when running tauri dev, we already have a localhost server
|
// HTTP. However, when running tauri dev, we already have a localhost server
|
||||||
// provided by vite, so don't enable it
|
// provided by vite, so don't enable it
|
||||||
|
|
||||||
#[cfg(debug_assertions)]
|
#[cfg(debug_assertions)]
|
||||||
const USE_LOCALHOST_SERVER: bool = false;
|
const USE_LOCALHOST_SERVER: bool = false;
|
||||||
|
|
||||||
#[cfg(not(debug_assertions))]
|
#[cfg(not(debug_assertions))]
|
||||||
const USE_LOCALHOST_SERVER: bool = true;
|
const USE_LOCALHOST_SERVER: bool = true;
|
||||||
|
|
||||||
@@ -43,12 +44,17 @@ fn main() {
|
|||||||
builder = builder.plugin(tauri_plugin_localhost::Builder::new(port).build());
|
builder = builder.plugin(tauri_plugin_localhost::Builder::new(port).build());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
builder
|
builder
|
||||||
.invoke_handler(tauri::generate_handler![close_splashscreen])
|
.plugin(
|
||||||
|
tauri_plugin_log::Builder::default()
|
||||||
|
.targets([LogTarget::LogDir, LogTarget::Stdout, LogTarget::Webview])
|
||||||
|
.with_colors(ColoredLevelConfig::default())
|
||||||
|
.build(),
|
||||||
|
)
|
||||||
.plugin(tauri_plugin_store::Builder::default().build())
|
.plugin(tauri_plugin_store::Builder::default().build())
|
||||||
|
.invoke_handler(tauri::generate_handler![close_splashscreen])
|
||||||
.run(context)
|
.run(context)
|
||||||
.expect("error while running tauri application");
|
.expect("error while running JellyPlayer");
|
||||||
// tauri::Builder::default()
|
// tauri::Builder::default()
|
||||||
// .run(tauri::generate_context!())
|
// .run(tauri::generate_context!())
|
||||||
// .expect("error while running tauri application");
|
// .expect("error while running tauri application");
|
||||||
|
|||||||
@@ -25,7 +25,14 @@
|
|||||||
"all": true
|
"all": true
|
||||||
},
|
},
|
||||||
"http": {
|
"http": {
|
||||||
"all": true
|
"all": true,
|
||||||
|
"request": true,
|
||||||
|
"scope": [
|
||||||
|
"http://**",
|
||||||
|
"http://*",
|
||||||
|
"https://**",
|
||||||
|
"https://*"
|
||||||
|
]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"bundle": {
|
"bundle": {
|
||||||
@@ -58,7 +65,16 @@
|
|||||||
"windows": {
|
"windows": {
|
||||||
"certificateThumbprint": null,
|
"certificateThumbprint": null,
|
||||||
"digestAlgorithm": "sha256",
|
"digestAlgorithm": "sha256",
|
||||||
"timestampUrl": ""
|
"timestampUrl": "",
|
||||||
|
"wix": {
|
||||||
|
"bannerPath": "../public/installerBanner.bmp",
|
||||||
|
"dialogImagePath": "../public/installerDialog.bmp"
|
||||||
|
},
|
||||||
|
"nsis": {
|
||||||
|
"sidebarImage": "../public/installerSideBarImage.bmp",
|
||||||
|
"headerImage": "../public/installerHeaderImage.bmp",
|
||||||
|
"installerIcon": "icons/icon.ico"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"security": {
|
"security": {
|
||||||
@@ -68,6 +84,19 @@
|
|||||||
"active": false
|
"active": false
|
||||||
},
|
},
|
||||||
"windows": [
|
"windows": [
|
||||||
|
{
|
||||||
|
"width": 800,
|
||||||
|
"height": 300,
|
||||||
|
"center": true,
|
||||||
|
"decorations": false,
|
||||||
|
"resizable": false,
|
||||||
|
"url": "splash.html",
|
||||||
|
"label": "splashscreen",
|
||||||
|
"title": "JellyPlayer",
|
||||||
|
"visible": true,
|
||||||
|
"transparent": true
|
||||||
|
},
|
||||||
|
|
||||||
{
|
{
|
||||||
"fullscreen": false,
|
"fullscreen": false,
|
||||||
"height": 600,
|
"height": 600,
|
||||||
@@ -76,15 +105,6 @@
|
|||||||
"title": "JellyPlayer",
|
"title": "JellyPlayer",
|
||||||
"visible": false,
|
"visible": false,
|
||||||
"center": true
|
"center": true
|
||||||
},
|
|
||||||
{
|
|
||||||
"width": 800,
|
|
||||||
"height": 300,
|
|
||||||
"center": true,
|
|
||||||
"decorations": false,
|
|
||||||
"resizable": false,
|
|
||||||
"url": "splash.html",
|
|
||||||
"label": "splashscreen"
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,7 @@
|
|||||||
|
|
||||||
import React, { useState, useEffect } from "react";
|
import React, { useState, useEffect } from "react";
|
||||||
|
|
||||||
import { appWindow } from "@tauri-apps/api/window";
|
import useKonami from "react-use-konami";
|
||||||
|
|
||||||
import Konami from "react-konami-code";
|
|
||||||
// @ts-ignore
|
|
||||||
const Kon = Konami.default ? Konami.default : Konami;
|
|
||||||
|
|
||||||
import { ThemeProvider } from "@mui/material/styles";
|
import { ThemeProvider } from "@mui/material/styles";
|
||||||
import { SnackbarProvider, useSnackbar } from "notistack";
|
import { SnackbarProvider, useSnackbar } from "notistack";
|
||||||
@@ -39,8 +35,8 @@ import DialogContent from "@mui/material/DialogContent";
|
|||||||
import DialogContentText from "@mui/material/DialogContentText";
|
import DialogContentText from "@mui/material/DialogContentText";
|
||||||
import DialogTitle from "@mui/material/DialogTitle";
|
import DialogTitle from "@mui/material/DialogTitle";
|
||||||
import Button from "@mui/material/Button";
|
import Button from "@mui/material/Button";
|
||||||
import Box from "@mui/material/Box";
|
import Slide from "@mui/material/Slide";
|
||||||
import CircularProgress from "@mui/material/CircularProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
|
||||||
// Routes
|
// Routes
|
||||||
import { ServerSetup, ServerList } from "./routes/setup/server";
|
import { ServerSetup, ServerList } from "./routes/setup/server";
|
||||||
@@ -48,6 +44,7 @@ import Home from "./routes/home";
|
|||||||
import { UserLogin, LoginWithImage, UserLoginManual } from "./routes/login";
|
import { UserLogin, LoginWithImage, UserLoginManual } from "./routes/login";
|
||||||
import LibraryView from "./routes/library";
|
import LibraryView from "./routes/library";
|
||||||
import ItemDetail from "./routes/item";
|
import ItemDetail from "./routes/item";
|
||||||
|
import SeriesTitlePage from "./routes/series/index.jsx";
|
||||||
import FavouritePage from "./routes/favourite/index.jsx";
|
import FavouritePage from "./routes/favourite/index.jsx";
|
||||||
import Settings from "./routes/settings";
|
import Settings from "./routes/settings";
|
||||||
import About from "./routes/about";
|
import About from "./routes/about";
|
||||||
@@ -58,7 +55,9 @@ import { SideMenu } from "./components/menu/sidemenu.jsx";
|
|||||||
import { AppBar } from "./components/appBar/appBar.jsx";
|
import { AppBar } from "./components/appBar/appBar.jsx";
|
||||||
|
|
||||||
// Fonts
|
// Fonts
|
||||||
import "@fontsource/open-sans";
|
import "@fontsource-variable/open-sans"; // Defaults to wght axis
|
||||||
|
import "@fontsource-variable/open-sans/wght.css"; // Specify axis
|
||||||
|
import "@fontsource-variable/open-sans/wght-italic.css"; // Specify axis and style
|
||||||
|
|
||||||
// Jellyfin SDK TypeScript
|
// Jellyfin SDK TypeScript
|
||||||
import {
|
import {
|
||||||
@@ -71,7 +70,34 @@ import { v4 as uuidv4 } from "uuid";
|
|||||||
import { delServer, getServer } from "./utils/storage/servers.js";
|
import { delServer, getServer } from "./utils/storage/servers.js";
|
||||||
import { delUser, getUser } from "./utils/storage/user.js";
|
import { delUser, getUser } from "./utils/storage/user.js";
|
||||||
|
|
||||||
|
import { useBackdropStore } from "./utils/store/backdrop.js";
|
||||||
|
import {
|
||||||
|
usePlaybackDataLoadStore,
|
||||||
|
usePlaybackStore,
|
||||||
|
} from "./utils/store/playback.js";
|
||||||
|
import BoxSetTitlePage from "./routes/boxset/index.jsx";
|
||||||
|
import PersonTitlePage from "./routes/person/index.jsx";
|
||||||
|
import MusicAlbumTitlePage from "./routes/album/index.jsx";
|
||||||
|
import AudioPlayer from "./components/playback/audioPlayer/index.jsx";
|
||||||
|
import { useAudioPlayback } from "./utils/store/audioPlayback.js";
|
||||||
|
import ArtistTitlePage from "./routes/artist/index.jsx";
|
||||||
|
import EpisodeTitlePage from "./routes/episode/index.jsx";
|
||||||
|
import PlaylistTitlePage from "./routes/playlist/index.jsx";
|
||||||
|
|
||||||
|
// Initial custom axios client to use tauri's http module
|
||||||
import axios from "axios";
|
import axios from "axios";
|
||||||
|
import axiosTauriApiAdapter from "axios-tauri-api-adapter";
|
||||||
|
const axiosClient = axios.create({
|
||||||
|
adapter: axiosTauriApiAdapter,
|
||||||
|
headers: { "Access-Control-Allow-Origin": "*" },
|
||||||
|
timeout: 4000,
|
||||||
|
});
|
||||||
|
|
||||||
|
const deviceId = localStorage.getItem("deviceId");
|
||||||
|
|
||||||
|
if (!deviceId) {
|
||||||
|
localStorage.setItem("deviceId", uuidv4());
|
||||||
|
}
|
||||||
|
|
||||||
const jellyfin = new Jellyfin({
|
const jellyfin = new Jellyfin({
|
||||||
clientInfo: {
|
clientInfo: {
|
||||||
@@ -80,24 +106,25 @@ const jellyfin = new Jellyfin({
|
|||||||
},
|
},
|
||||||
deviceInfo: {
|
deviceInfo: {
|
||||||
name: "JellyPlayer",
|
name: "JellyPlayer",
|
||||||
id: uuidv4(),
|
id: deviceId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
event.on("create-jellyfin-api", (serverAddress) => {
|
event.on("create-jellyfin-api", (serverAddress) => {
|
||||||
window.api = jellyfin.createApi(serverAddress);
|
window.api = jellyfin.createApi(serverAddress, null, axiosClient);
|
||||||
// window.api = jellyfin.createApi(serverAddress);
|
// window.api = jellyfin.createApi(serverAddress);
|
||||||
});
|
});
|
||||||
event.on("set-api-accessToken", (serverAddress) => {
|
event.on("set-api-accessToken", (serverAddress) => {
|
||||||
window.api = jellyfin.createApi(
|
window.api = jellyfin.createApi(
|
||||||
serverAddress,
|
serverAddress,
|
||||||
sessionStorage.getItem("accessToken"),
|
sessionStorage.getItem("accessToken"),
|
||||||
|
axiosClient,
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
const anim = {
|
const anim = {
|
||||||
initial: {
|
initial: {
|
||||||
transform: "scale(0.99)",
|
transform: "scale(0.98)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
},
|
},
|
||||||
animate: {
|
animate: {
|
||||||
@@ -105,7 +132,7 @@ const anim = {
|
|||||||
opacity: 1,
|
opacity: 1,
|
||||||
},
|
},
|
||||||
exit: {
|
exit: {
|
||||||
transform: "scale(0.99)",
|
transform: "sscale(1.02)",
|
||||||
opacity: 0,
|
opacity: 0,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@@ -119,7 +146,8 @@ const AnimationWrapper = () => {
|
|||||||
animate="animate"
|
animate="animate"
|
||||||
exit="exit"
|
exit="exit"
|
||||||
transition={{
|
transition={{
|
||||||
duration: 0.35,
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Outlet />
|
<Outlet />
|
||||||
@@ -132,6 +160,10 @@ function App() {
|
|||||||
|
|
||||||
const [serverReachable, setServerReachable] = useState(true);
|
const [serverReachable, setServerReachable] = useState(true);
|
||||||
|
|
||||||
|
const [playbackDataLoading] = usePlaybackDataLoadStore((state) => [
|
||||||
|
state.isLoading,
|
||||||
|
]);
|
||||||
|
|
||||||
const { enqueueSnackbar } = useSnackbar();
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
|
|
||||||
const createApi = async () => {
|
const createApi = async () => {
|
||||||
@@ -151,7 +183,7 @@ function App() {
|
|||||||
|
|
||||||
const usersAvailable = async () => {
|
const usersAvailable = async () => {
|
||||||
const users = await getUserApi(window.api).getPublicUsers();
|
const users = await getUserApi(window.api).getPublicUsers();
|
||||||
if (users.data.length >= 1) {
|
if (users.status == 200 || users.data.length >= 1) {
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -173,6 +205,7 @@ function App() {
|
|||||||
const result = await axios.get(
|
const result = await axios.get(
|
||||||
new URL(`${server.Ip}/System/Ping`).href,
|
new URL(`${server.Ip}/System/Ping`).href,
|
||||||
);
|
);
|
||||||
|
|
||||||
if (result.data == "Jellyfin Server") {
|
if (result.data == "Jellyfin Server") {
|
||||||
event.emit("create-jellyfin-api", server.Ip);
|
event.emit("create-jellyfin-api", server.Ip);
|
||||||
setServerReachable(true);
|
setServerReachable(true);
|
||||||
@@ -254,8 +287,13 @@ function App() {
|
|||||||
await delUser();
|
await delUser();
|
||||||
await relaunch();
|
await relaunch();
|
||||||
};
|
};
|
||||||
|
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
window.scrollTo(0, 0);
|
||||||
|
}, [location.key]);
|
||||||
|
|
||||||
if (!window.api) {
|
if (!window.api) {
|
||||||
serverAvailable().then((available) => {
|
serverAvailable().then((available) => {
|
||||||
if (available) {
|
if (available) {
|
||||||
@@ -269,32 +307,89 @@ function App() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const [audioPlayerVisible, currentAudioIndex] = useAudioPlayback(
|
||||||
|
(state) => [state.display, state.currentTrack],
|
||||||
|
);
|
||||||
|
|
||||||
|
const [backdropUrl, backdropId] = useBackdropStore((state) => [
|
||||||
|
state.backdropUrl,
|
||||||
|
state.backdropId,
|
||||||
|
]);
|
||||||
|
|
||||||
|
const [backdropLoading, setBackdropLoading] = useState(true);
|
||||||
|
|
||||||
const [easterEgg, setEasterEgg] = useState(false);
|
const [easterEgg, setEasterEgg] = useState(false);
|
||||||
const sixtyNine = () => {
|
const sixtyNine = () => {
|
||||||
setEasterEgg(true);
|
setEasterEgg(true);
|
||||||
};
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useKonami(sixtyNine, {
|
||||||
appWindow.setFullscreen(false);
|
code: [
|
||||||
}, [location]);
|
"ArrowUp",
|
||||||
|
"ArrowUp",
|
||||||
|
"ArrowDown",
|
||||||
|
"ArrowDown",
|
||||||
|
"ArrowLeft",
|
||||||
|
"ArrowRight",
|
||||||
|
"ArrowLeft",
|
||||||
|
"ArrowRight",
|
||||||
|
"b",
|
||||||
|
"a",
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<SnackbarProvider maxSnack={5}>
|
<SnackbarProvider maxSnack={5}>
|
||||||
<ThemeProvider theme={theme}>
|
<ThemeProvider theme={theme}>
|
||||||
<Kon resetDelay={1000} action={sixtyNine}></Kon>
|
{playbackDataLoading && (
|
||||||
|
<LinearProgress
|
||||||
|
sx={{
|
||||||
|
position: "fixed",
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
width: "100vw",
|
||||||
|
zIndex: 100000,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
<Dialog
|
<Dialog
|
||||||
open={easterEgg}
|
open={easterEgg}
|
||||||
onClose={() => setEasterEgg(false)}
|
onClose={() => setEasterEgg(false)}
|
||||||
|
sx={{
|
||||||
|
background: "black",
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<iframe
|
<iframe
|
||||||
width="560"
|
width="560"
|
||||||
height="315"
|
height="315"
|
||||||
src="https://www.youtube.com/embed/dQw4w9WgXcQ?controls=0&autoplay=1"
|
src="https://www.youtube.com/embed/dQw4w9WgXcQ?autoplay=1&disablekb=1"
|
||||||
title="EasterEgg"
|
title="EasterEgg"
|
||||||
frameborder="0"
|
frameborder="0"
|
||||||
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share"
|
||||||
></iframe>
|
></iframe>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
|
<Slide
|
||||||
|
direction="up"
|
||||||
|
in={easterEgg}
|
||||||
|
mountOnEnter
|
||||||
|
unmountOnExit
|
||||||
|
>
|
||||||
|
<img
|
||||||
|
src="https://i.gifer.com/PYh.gif"
|
||||||
|
width={320}
|
||||||
|
height={320}
|
||||||
|
style={{
|
||||||
|
zIndex: "99999999",
|
||||||
|
position: "fixed",
|
||||||
|
bottom: 0,
|
||||||
|
left: 0,
|
||||||
|
objectFit: "cover",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</Slide>
|
||||||
|
|
||||||
{/* Show Dialog if server not reachable */}
|
{/* Show Dialog if server not reachable */}
|
||||||
<Dialog
|
<Dialog
|
||||||
open={!serverReachable}
|
open={!serverReachable}
|
||||||
@@ -323,80 +418,140 @@ function App() {
|
|||||||
</Button>
|
</Button>
|
||||||
</DialogActions>
|
</DialogActions>
|
||||||
</Dialog>
|
</Dialog>
|
||||||
<AnimatePresence>
|
<div className="app-backdrop-container">
|
||||||
<div style={{ display: "flex" }}>
|
<AnimatePresence>
|
||||||
<CssBaseline />
|
<motion.img
|
||||||
<SideMenu />
|
key={backdropId}
|
||||||
<AppBar />
|
src={backdropUrl}
|
||||||
<Routes
|
alt=""
|
||||||
key={location.pathname}
|
className="app-backdrop"
|
||||||
location={location}
|
initial={{
|
||||||
>
|
opacity: 0,
|
||||||
<Route element={<AnimationWrapper />}>
|
}}
|
||||||
<Route
|
animate={{
|
||||||
path="/"
|
opacity: backdropLoading ? 0 : 0.5,
|
||||||
element={<LogicalRoutes />}
|
}}
|
||||||
/>
|
exit={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.5,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
onLoad={() => setBackdropLoading(false)}
|
||||||
|
loading="eager"
|
||||||
|
style={{
|
||||||
|
transition: "opacity 1s",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</AnimatePresence>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
width: "100vw",
|
||||||
|
paddingBottom: audioPlayerVisible ? "8em" : "0",
|
||||||
|
transition: "padding 250ms",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CssBaseline />
|
||||||
|
<SideMenu />
|
||||||
|
<AppBar />
|
||||||
|
<AudioPlayer key={audioPlayerVisible} />
|
||||||
|
<Routes key={location.key} location={location}>
|
||||||
|
<Route element={<AnimationWrapper />}>
|
||||||
|
<Route
|
||||||
|
path="/"
|
||||||
|
element={<LogicalRoutes />}
|
||||||
|
/>
|
||||||
|
|
||||||
<Route
|
<Route path="/home" element={<Home />} />
|
||||||
path="/home"
|
<Route
|
||||||
element={<Home />}
|
path="/setup/server"
|
||||||
/>
|
element={<ServerSetup />}
|
||||||
<Route
|
/>
|
||||||
path="/setup/server"
|
<Route
|
||||||
element={<ServerSetup />}
|
path="/servers/list"
|
||||||
/>
|
element={<ServerList />}
|
||||||
<Route
|
/>
|
||||||
path="/servers/list"
|
<Route
|
||||||
element={<ServerList />}
|
path="/login/withImg/:userName/:userId/"
|
||||||
/>
|
element={<LoginWithImage />}
|
||||||
<Route
|
/>
|
||||||
path="/login/withImg/:userName/:userId/"
|
<Route
|
||||||
element={<LoginWithImage />}
|
path="/login/users"
|
||||||
/>
|
element={<UserLogin />}
|
||||||
<Route
|
/>
|
||||||
path="/login/users"
|
<Route
|
||||||
element={<UserLogin />}
|
path="/login/manual"
|
||||||
/>
|
element={<UserLoginManual />}
|
||||||
<Route
|
/>
|
||||||
path="/login/manual"
|
<Route
|
||||||
element={<UserLoginManual />}
|
exact
|
||||||
/>
|
path="/library/:id"
|
||||||
<Route
|
element={<LibraryView />}
|
||||||
exact
|
/>
|
||||||
path="/library/:id"
|
<Route
|
||||||
element={<LibraryView />}
|
exact
|
||||||
/>
|
path="/item/:id"
|
||||||
<Route
|
element={<ItemDetail />}
|
||||||
exact
|
/>
|
||||||
path="/item/:id"
|
<Route
|
||||||
element={<ItemDetail />}
|
exact
|
||||||
/>
|
path="/musicalbum/:id"
|
||||||
<Route
|
element={<MusicAlbumTitlePage />}
|
||||||
path="/favourite"
|
/>
|
||||||
element={<FavouritePage />}
|
<Route
|
||||||
/>
|
exact
|
||||||
<Route
|
path="/artist/:id"
|
||||||
path="/settings"
|
element={<ArtistTitlePage />}
|
||||||
element={<Settings />}
|
/>
|
||||||
/>
|
<Route
|
||||||
<Route
|
exact
|
||||||
path="/about"
|
path="/boxset/:id"
|
||||||
element={<About />}
|
element={<BoxSetTitlePage />}
|
||||||
/>
|
/>
|
||||||
<Route
|
<Route
|
||||||
path="/player"
|
exact
|
||||||
element={<VideoPlayer />}
|
path="/episode/:id"
|
||||||
/>
|
element={<EpisodeTitlePage />}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
path="/person/:id"
|
||||||
|
element={<PersonTitlePage />}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
exact
|
||||||
|
path="/playlist/:id"
|
||||||
|
element={<PlaylistTitlePage />}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
path="/series/:id"
|
||||||
|
element={<SeriesTitlePage />}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
path="/favourite"
|
||||||
|
element={<FavouritePage />}
|
||||||
|
/>
|
||||||
|
<Route
|
||||||
|
path="/settings"
|
||||||
|
element={<Settings />}
|
||||||
|
/>
|
||||||
|
<Route path="/about" element={<About />} />
|
||||||
|
<Route
|
||||||
|
path="/player"
|
||||||
|
element={<VideoPlayer />}
|
||||||
|
/>
|
||||||
|
|
||||||
<Route
|
<Route
|
||||||
path="/login"
|
path="/login"
|
||||||
element={<LoginLogicalRoutes />}
|
element={<LoginLogicalRoutes />}
|
||||||
/>
|
/>
|
||||||
</Route>
|
</Route>
|
||||||
</Routes>
|
</Routes>
|
||||||
</div>
|
</div>
|
||||||
</AnimatePresence>
|
<ReactQueryDevtools />
|
||||||
</ThemeProvider>
|
</ThemeProvider>
|
||||||
</SnackbarProvider>
|
</SnackbarProvider>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1 +0,0 @@
|
|||||||
/** @format */
|
|
||||||
|
After Width: | Height: | Size: 834 KiB |
|
After Width: | Height: | Size: 1.4 MiB |
|
After Width: | Height: | Size: 113 KiB |
@@ -1,28 +1,25 @@
|
|||||||
<svg width="5000" height="455" viewBox="0 0 5000 455" fill="none" xmlns="http://www.w3.org/2000/svg">
|
<svg width="5020" height="475" viewBox="0 0 5020 475" fill="none" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||||
<path d="M174.178 454.868C144.522 454.868 116.954 448.185 91.4748 434.818C65.9955 421.035 45.1108 402.238 28.8208 378.43C12.5308 354.621 2.92385 328.307 0 299.486H23.182C26.1058 324.13 34.6685 346.685 48.8701 367.152C63.0716 387.201 81.0324 403.074 102.752 414.769C124.89 426.047 148.699 431.686 174.178 431.686C202.163 431.686 227.852 424.794 251.242 411.01C274.633 397.226 293.22 378.221 307.004 353.995C320.788 329.769 327.68 302.619 327.68 272.545V32.58H132.2V9.39808H350.236V272.545C350.236 306.796 342.299 337.914 326.427 365.899C310.972 393.467 289.67 415.187 262.52 431.059C235.788 446.931 206.34 454.868 174.178 454.868Z" fill="white"/>
|
<path d="M184.178 464.934C154.522 464.934 126.954 458.251 101.475 444.885C75.9955 431.101 55.1108 412.305 38.8208 388.496C22.5308 364.688 12.9239 338.373 10 309.552H33.182C36.1058 334.196 44.6685 356.751 58.8701 377.218C73.0716 397.268 91.0324 413.14 112.752 424.835C134.89 436.113 158.699 441.752 184.178 441.752C212.163 441.752 237.852 434.86 261.242 421.076C284.633 407.292 303.22 388.287 317.004 364.061C330.788 339.835 337.68 312.685 337.68 282.611V42.6462H142.2V19.4642H360.236V282.611C360.236 316.862 352.299 347.98 336.427 375.965C320.972 403.533 299.67 425.253 272.52 441.125C245.788 456.998 216.34 464.934 184.178 464.934Z" fill="white"/>
|
||||||
<path d="M495.113 9.39808H802.117V32.58H518.295V209.264H765.152V232.446H518.295V422.288H802.117V445.47H495.113V9.39808Z" fill="white"/>
|
<path d="M984.562 455.536V19.4642H1007.74V432.354H1311.62V455.536H984.562Z" fill="white"/>
|
||||||
<path d="M974.562 445.47V9.39808H997.744V422.288H1301.62V445.47H974.562Z" fill="white"/>
|
<path d="M1448.35 455.536V19.4642H1471.53V432.354H1775.4V455.536H1448.35Z" fill="white"/>
|
||||||
<path d="M1438.35 445.47V9.39808H1461.53V422.288H1765.4V445.47H1438.35Z" fill="white"/>
|
<path d="M2389.08 455.536H2365.9V19.4642H2541.33C2570.57 19.4642 2597.51 25.7296 2622.15 38.2604C2647.21 50.7912 2667.05 68.5432 2681.67 91.5163C2696.29 114.489 2703.6 141.013 2703.6 171.087C2703.6 199.908 2696.08 226.431 2681.05 250.657C2666.43 274.883 2646.38 293.471 2620.9 306.419C2598.76 317.697 2572.24 323.336 2541.33 323.336H2389.08V455.536ZM2389.08 300.154H2541.33C2568.06 300.154 2589.99 295.977 2607.11 287.623C2629.25 277.181 2647 261.517 2660.37 240.633C2673.74 219.748 2680.42 196.566 2680.42 171.087C2680.42 146.025 2673.74 123.052 2660.37 102.167C2647 81.2828 2629.04 65.6193 2606.49 55.177C2589.36 46.8231 2567.64 42.6462 2541.33 42.6462H2389.08V300.154Z" fill="white"/>
|
||||||
<path d="M1882.71 9.39808L2037.47 242.471L2190.97 9.39808H2218.54L2048.74 266.906V445.47H2025.56V266.906L1855.14 9.39808H1882.71Z" fill="white"/>
|
<path d="M2839.71 455.536V19.4642H2862.89V432.354H3166.76V455.536H2839.71Z" fill="white"/>
|
||||||
<path d="M2379.08 445.47H2355.9V9.39808H2531.33C2560.57 9.39808 2587.51 15.6635 2612.15 28.1943C2637.21 40.7251 2657.05 58.477 2671.67 81.4501C2686.29 104.423 2693.6 130.947 2693.6 161.021C2693.6 189.841 2686.08 216.365 2671.05 240.591C2656.43 264.817 2636.38 283.405 2610.9 296.353C2588.76 307.631 2562.24 313.27 2531.33 313.27H2379.08V445.47ZM2379.08 290.088H2531.33C2558.06 290.088 2579.99 285.911 2597.11 277.557C2619.25 267.115 2637 251.451 2650.37 230.566C2663.74 209.682 2670.42 186.5 2670.42 161.021C2670.42 135.959 2663.74 112.986 2650.37 92.1013C2637 71.2167 2619.04 55.5532 2596.49 45.1108C2579.36 36.757 2557.64 32.58 2531.33 32.58H2379.08V290.088Z" fill="white"/>
|
<path d="M3747.86 19.4642L3902.61 252.537L4056.11 19.4642H4083.68L3913.89 276.972V455.536H3890.71V276.972L3720.29 19.4642H3747.86Z" fill="white"/>
|
||||||
<path d="M2829.71 445.47V9.39808H2852.89V422.288H3156.76V445.47H2829.71Z" fill="white"/>
|
<path d="M4215.4 19.4642H4522.41V42.6462H4238.58V219.33H4485.44V242.512H4238.58V432.354H4522.41V455.536H4215.4V19.4642Z" fill="white"/>
|
||||||
<path d="M3633.7 445.47H3222.69L3428.2 0L3633.7 445.47Z" fill="url(#paint0_linear_303_3)"/>
|
<path d="M2200.97 19.4642H2228.54L2058.74 276.972V455.536H2035.56V276.972L1865.14 19.4642H1892.71L2047.47 252.537L2200.97 19.4642Z" fill="white"/>
|
||||||
<path d="M3737.86 9.39808L3892.61 242.471L4046.11 9.39808H4073.68L3903.89 266.906V445.47H3880.71V266.906L3710.29 9.39808H3737.86Z" fill="white"/>
|
<path d="M505.113 19.4642H812.117V42.6462H528.295V219.33H775.152V242.512H528.295V432.354H812.117V455.536H505.113V19.4642Z" fill="white"/>
|
||||||
<path d="M4205.4 9.39808H4512.41V32.58H4228.58V209.264H4475.44V232.446H4228.58V422.288H4512.41V445.47H4205.4V9.39808Z" fill="white"/>
|
<mask id="mask0_501_2" style="mask-type:alpha" maskUnits="userSpaceOnUse" x="3232" y="10" width="1778" height="446">
|
||||||
<path d="M4914.16 23.8085C4939.23 35.5039 4958.86 52.8382 4973.06 75.8113C4987.68 98.7844 4994.99 124.264 4994.99 152.249C4994.99 184.829 4984.96 214.068 4964.91 239.965C4945.28 265.444 4914.58 285.776 4883.67 294.13L4664.8 9.39808H4830.83C4849.21 9.39808 4864.88 10.6512 4877.83 13.1573C4891.19 15.2458 4903.3 18.7962 4914.16 23.8085Z" fill="url(#paint1_linear_303_3)"/>
|
<path d="M4924.16 33.8748C4949.23 45.5702 4968.86 62.9044 4983.06 85.8775C4997.68 108.851 5004.99 134.33 5004.99 162.315C5004.99 194.895 4994.96 224.134 4974.91 250.031C4955.28 275.51 4924.58 295.842 4893.67 304.196L4674.8 19.4644H4840.83C4859.21 19.4644 4874.88 20.7174 4887.83 23.2236C4901.19 25.312 4913.3 28.8624 4924.16 33.8748Z" fill="black"/>
|
||||||
<path d="M5000 445.47L4883.67 294.13H4664.8V445.47H5000Z" fill="url(#paint2_linear_303_3)"/>
|
<path d="M5010 455.536L4893.67 304.196H4674.8V455.536H5010Z" fill="black"/>
|
||||||
|
<path d="M3643.7 455.536H3232.69L3438.2 10.0662L3643.7 455.536Z" fill="black"/>
|
||||||
|
</mask>
|
||||||
|
<g mask="url(#mask0_501_2)">
|
||||||
|
<rect x="3232" y="10" width="1778" height="446" fill="url(#pattern0)"/>
|
||||||
|
</g>
|
||||||
<defs>
|
<defs>
|
||||||
<linearGradient id="paint0_linear_303_3" x1="3532.59" y1="229.314" x2="3227.04" y2="442.278" gradientUnits="userSpaceOnUse">
|
<pattern id="pattern0" patternContentUnits="objectBoundingBox" width="1" height="1">
|
||||||
<stop stop-color="#FB2576"/>
|
<use xlink:href="#image0_501_2" transform="matrix(0 -0.000973278 0.000244141 0 0 2.49327)"/>
|
||||||
<stop offset="1" stop-color="#150050"/>
|
</pattern>
|
||||||
</linearGradient>
|
<image id="image0_501_2" width="4096" height="4096" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAEAAAABAACAYAAADyoyQXAAAAAXNSR0IArs4c6QAAIABJREFUeF7sfY2S4zjO5My+1933St+9f8TOhS2RxE8mEpTkquqe3oidLksEkEiAIC0b9N//89f/++evv/766+/Xf87/jb/hv+dFNsbqeo/5u6f7PfSC7mSv8sVgqfydOsF4Kkf9XBKOswtYkK/qmuUfYaexN4NbXIVYK1vuPrCl5FG+1Hl8aIw5xmRQHnfGxjlkc6krD30Pc2NbF8lPijfUAjaPIw6Kq7DPYu10Jfk8r5AvCY81Fn0MtUP5FjmR40ltmrgDtgh1+zWZw7s4Yw5flh+OWh4KjMjOpWu3bPA8i/nJ8u8SZsSVUQTS2K3hu1ggRsFbZePxez8Ji4jDHd9RXE0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EKWO1Yb92FvT3dPTwfpHh42eg9nb3RvVBe/nU+faOM5cPTftX1iZJeLulGsr8WP7HukLOj4cFv+yRmzVL3bV3HsPINQXCiUtfwdfg7vevgse/XTEKYRcYVsd8et2OgoMMRdW91x+5g0dhYjlLf6KZiKHc54HCc1c+r82sPfsYWZYpJ3cq+XT2Md6GHvxZlXC5ZJ3M9O7nU47eSUz6suJlZ/uLine truncated
|
||||||
<linearGradient id="paint1_linear_303_3" x1="4953.89" y1="53.3888" x2="4666.85" y2="442.278" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#FB2576"/>
|
|
||||||
<stop offset="1" stop-color="#150050"/>
|
|
||||||
</linearGradient>
|
|
||||||
<linearGradient id="paint2_linear_303_3" x1="4953.89" y1="53.3888" x2="4666.85" y2="442.278" gradientUnits="userSpaceOnUse">
|
|
||||||
<stop stop-color="#FB2576"/>
|
|
||||||
<stop offset="1" stop-color="#150050"/>
|
|
||||||
</linearGradient>
|
|
||||||
</defs>
|
</defs>
|
||||||
</svg>
|
</svg>
|
||||||
|
Before Width: | Height: | Size: 3.4 KiB After Width: | Height: | Size: 6.1 MiB |
|
After Width: | Height: | Size: 110 KiB |
@@ -1,6 +1,8 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
|
|
||||||
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
import { relaunch } from "@tauri-apps/api/process";
|
import { relaunch } from "@tauri-apps/api/process";
|
||||||
|
|
||||||
import MuiAppBar from "@mui/material/AppBar";
|
import MuiAppBar from "@mui/material/AppBar";
|
||||||
@@ -12,15 +14,15 @@ import Box from "@mui/material/Box";
|
|||||||
import ListItemIcon from "@mui/material/ListItemIcon";
|
import ListItemIcon from "@mui/material/ListItemIcon";
|
||||||
import Menu from "@mui/material/Menu";
|
import Menu from "@mui/material/Menu";
|
||||||
import MenuItem from "@mui/material/MenuItem";
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
import useScrollTrigger from "@mui/material/useScrollTrigger";
|
import useScrollTrigger from "@mui/material/useScrollTrigger";
|
||||||
|
|
||||||
import { MdiMagnify } from "../icons/mdiMagnify";
|
import { MdiMagnify } from "../icons/mdiMagnify";
|
||||||
import { theme } from "../../theme";
|
|
||||||
|
|
||||||
import { useLocation, useNavigate } from "react-router-dom";
|
import { useLocation, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useIsMutating, useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
import "./appBar.module.scss";
|
import "./appBar.module.scss";
|
||||||
import { MdiAccount } from "../icons/mdiAccount";
|
import { MdiAccount } from "../icons/mdiAccount";
|
||||||
@@ -34,6 +36,8 @@ import { delServer } from "../../utils/storage/servers";
|
|||||||
import { delUser } from "../../utils/storage/user";
|
import { delUser } from "../../utils/storage/user";
|
||||||
import { MdiDelete } from "../icons/mdiDelete";
|
import { MdiDelete } from "../icons/mdiDelete";
|
||||||
|
|
||||||
|
import logo from "../../assets/logo.png";
|
||||||
|
|
||||||
export const AppBar = () => {
|
export const AppBar = () => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
|
|
||||||
@@ -54,7 +58,7 @@ export const AppBar = () => {
|
|||||||
|
|
||||||
const trigger = useScrollTrigger({
|
const trigger = useScrollTrigger({
|
||||||
disableHysteresis: true,
|
disableHysteresis: true,
|
||||||
threshold: 0,
|
threshold: 20,
|
||||||
});
|
});
|
||||||
|
|
||||||
const [anchorEl, setAnchorEl] = useState(null);
|
const [anchorEl, setAnchorEl] = useState(null);
|
||||||
@@ -99,7 +103,7 @@ export const AppBar = () => {
|
|||||||
if (display) {
|
if (display) {
|
||||||
return (
|
return (
|
||||||
<MuiAppBar
|
<MuiAppBar
|
||||||
sx={{
|
style={{
|
||||||
backgroundColor: "transparent",
|
backgroundColor: "transparent",
|
||||||
paddingRight: "0 !important",
|
paddingRight: "0 !important",
|
||||||
}}
|
}}
|
||||||
@@ -112,10 +116,10 @@ export const AppBar = () => {
|
|||||||
paddingLeft: "12px !important",
|
paddingLeft: "12px !important",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<div
|
||||||
sx={{
|
style={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
gap: 1,
|
gap: "1em",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
@@ -139,18 +143,12 @@ export const AppBar = () => {
|
|||||||
>
|
>
|
||||||
<MdiArrowLeft />
|
<MdiArrowLeft />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
|
</div>
|
||||||
<TextField
|
<div style={{ display: "flex", gap: "1.2em" }}>
|
||||||
variant="outlined"
|
<IconButton disabled>
|
||||||
placeholder="Search..."
|
|
||||||
size="small"
|
|
||||||
/>
|
|
||||||
<IconButton>
|
|
||||||
<MdiMagnify />
|
<MdiMagnify />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Box>
|
<IconButton disabled>
|
||||||
<Box sx={{ display: "flex", gap: 2 }}>
|
|
||||||
<IconButton>
|
|
||||||
<MdiHeartOutline />
|
<MdiHeartOutline />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<IconButton
|
<IconButton
|
||||||
@@ -214,7 +212,7 @@ export const AppBar = () => {
|
|||||||
Remove Server
|
Remove Server
|
||||||
</MenuItem>
|
</MenuItem>
|
||||||
</Menu>
|
</Menu>
|
||||||
</Box>
|
</div>
|
||||||
</Toolbar>
|
</Toolbar>
|
||||||
</MuiAppBar>
|
</MuiAppBar>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
backdrop-filter $transition-time-fast,
|
backdrop-filter $transition-time-fast,
|
||||||
box-shadow $transition-time-default !important;
|
box-shadow $transition-time-default !important;
|
||||||
&.backdropVisible {
|
&.backdropVisible {
|
||||||
background-color: $clr-background-dark-opacity-0_8;
|
background-color: $clr-background-dark-opacity-0_8 !important;
|
||||||
backdrop-filter: blur(30px);
|
backdrop-filter: blur(30px);
|
||||||
}
|
}
|
||||||
&-avatar {
|
&-avatar {
|
||||||
@@ -14,4 +14,11 @@
|
|||||||
fill: url(#clr-gradient-default) !important;
|
fill: url(#clr-gradient-default) !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
&-logo {
|
||||||
|
height: 1.8em !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.appLoading {
|
||||||
|
opacity: 0;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
/** @format */
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
|
import { pink } from "@mui/material/colors";
|
||||||
|
import { MdiHeart } from "../icons/mdiHeart";
|
||||||
|
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
||||||
|
import { useSnackbar } from "notistack";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
|
||||||
|
const LikeButton = ({
|
||||||
|
itemId,
|
||||||
|
isFavorite,
|
||||||
|
queryKey,
|
||||||
|
userId,
|
||||||
|
itemName,
|
||||||
|
color = "white",
|
||||||
|
}) => {
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
|
|
||||||
|
const handleLiking = async () => {
|
||||||
|
let result;
|
||||||
|
if (isFavorite) {
|
||||||
|
result = await getUserLibraryApi(window.api).unmarkFavoriteItem({
|
||||||
|
userId: userId,
|
||||||
|
itemId: itemId,
|
||||||
|
});
|
||||||
|
} else if (!isFavorite) {
|
||||||
|
result = await getUserLibraryApi(window.api).markFavoriteItem({
|
||||||
|
userId: userId,
|
||||||
|
itemId: itemId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const mutation = useMutation({
|
||||||
|
mutationFn: handleLiking,
|
||||||
|
onError: (error, a, context) => {
|
||||||
|
enqueueSnackbar(`${error}`, {
|
||||||
|
variant: "error",
|
||||||
|
});
|
||||||
|
enqueueSnackbar(
|
||||||
|
`An error occured while updating "${itemName}"`,
|
||||||
|
{
|
||||||
|
variant: "error",
|
||||||
|
},
|
||||||
|
);
|
||||||
|
console.error(error);
|
||||||
|
},
|
||||||
|
onSettled: async () => {
|
||||||
|
return await queryClient.invalidateQueries({
|
||||||
|
queryKey: queryKey,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mutationKey: ["likeButton", itemId],
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
transition: "opacity 250ms",
|
||||||
|
position: "relative",
|
||||||
|
display: "inline-flex",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress
|
||||||
|
style={{
|
||||||
|
opacity: mutation.isLoading ? 1 : 0,
|
||||||
|
transition: "opacity 200ms",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
if (!mutation.isLoading) {
|
||||||
|
e.stopPropagation();
|
||||||
|
mutation.mutate();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
opacity: mutation.isLoading ? 0.5 : 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{isFavorite ? (
|
||||||
|
<MdiHeart sx={{ color: pink[700] }} />
|
||||||
|
) : (
|
||||||
|
<MdiHeartOutline sx={{ color: color }} />
|
||||||
|
)}
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
LikeButton.propTypes = {
|
||||||
|
itemId: PropTypes.string.isRequired,
|
||||||
|
isFavorite: PropTypes.bool.isRequired,
|
||||||
|
queryKey: PropTypes.any.isRequired,
|
||||||
|
userId: PropTypes.string.isRequired,
|
||||||
|
itemName: PropTypes.string,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default LikeButton;
|
||||||
@@ -0,0 +1,104 @@
|
|||||||
|
/** @format */
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import { useEffect } from "react";
|
||||||
|
|
||||||
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
|
||||||
|
import { useMutation, useQueryClient } from "@tanstack/react-query";
|
||||||
|
import { green } from "@mui/material/colors";
|
||||||
|
|
||||||
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
|
import { MdiCheck } from "../icons/mdiCheck";
|
||||||
|
import { useSnackbar } from "notistack";
|
||||||
|
|
||||||
|
const MarkPlayedButton = ({ itemId, isPlayed, queryKey, userId, itemName }) => {
|
||||||
|
const queryClient = useQueryClient();
|
||||||
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
|
|
||||||
|
const handleMarking = async () => {
|
||||||
|
if (!isPlayed) {
|
||||||
|
await getPlaystateApi(window.api).markPlayedItem({
|
||||||
|
userId: userId,
|
||||||
|
itemId: itemId,
|
||||||
|
});
|
||||||
|
} else if (isPlayed) {
|
||||||
|
await getPlaystateApi(window.api).markUnplayedItem({
|
||||||
|
userId: userId,
|
||||||
|
itemId: itemId,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
};
|
||||||
|
const mutation = useMutation({
|
||||||
|
mutationFn: handleMarking,
|
||||||
|
onError: (error, a, context) => {
|
||||||
|
enqueueSnackbar(`${error}`, {
|
||||||
|
variant: "error",
|
||||||
|
});
|
||||||
|
enqueueSnackbar(
|
||||||
|
`An error occured while updating "${itemName}"`,
|
||||||
|
{
|
||||||
|
variant: "error",
|
||||||
|
},
|
||||||
|
);
|
||||||
|
console.error(error);
|
||||||
|
},
|
||||||
|
onSettled: async () => {
|
||||||
|
return await queryClient.invalidateQueries({
|
||||||
|
queryKey: queryKey,
|
||||||
|
});
|
||||||
|
},
|
||||||
|
mutationKey: ["markPlayedButton", itemId],
|
||||||
|
});
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
transition: "opacity 250ms",
|
||||||
|
position: "relative",
|
||||||
|
display: "inline-flex",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress
|
||||||
|
style={{
|
||||||
|
opacity: mutation.isLoading ? 1 : 0,
|
||||||
|
transition: "opacity 200ms",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
if (!mutation.isLoading) {
|
||||||
|
e.stopPropagation();
|
||||||
|
mutation.mutate();
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
opacity: mutation.isLoading ? 0.5 : 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdiCheck
|
||||||
|
sx={{
|
||||||
|
color: isPlayed ? green[400] : "white",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
MarkPlayedButton.propTypes = {
|
||||||
|
itemId: PropTypes.string.isRequired,
|
||||||
|
isPlayed: PropTypes.bool.isRequired,
|
||||||
|
queryKey: PropTypes.any.isRequired,
|
||||||
|
userId: PropTypes.string.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MarkPlayedButton;
|
||||||
@@ -0,0 +1,251 @@
|
|||||||
|
/** @format */
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Button from "@mui/material/Button";
|
||||||
|
import Fab from "@mui/material/Fab";
|
||||||
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
import { MdiPlayOutline } from "../icons/mdiPlayOutline";
|
||||||
|
import {
|
||||||
|
usePlaybackDataLoadStore,
|
||||||
|
usePlaybackStore,
|
||||||
|
} from "../../utils/store/playback";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
SortOrder,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { useSnackbar } from "notistack";
|
||||||
|
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||||
|
import { getPlaylistsApi } from "@jellyfin/sdk/lib/utils/api/playlists-api";
|
||||||
|
|
||||||
|
const PlayButton = ({
|
||||||
|
itemId,
|
||||||
|
itemUserData,
|
||||||
|
userId,
|
||||||
|
itemType,
|
||||||
|
currentAudioTrack,
|
||||||
|
currentSubTrack,
|
||||||
|
currentVideoTrack,
|
||||||
|
className,
|
||||||
|
sx,
|
||||||
|
iconProps,
|
||||||
|
buttonProps,
|
||||||
|
iconOnly,
|
||||||
|
audio = false,
|
||||||
|
size = "large",
|
||||||
|
playlistItem,
|
||||||
|
playlistItemId = "",
|
||||||
|
}) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const [
|
||||||
|
setUrl,
|
||||||
|
setPosition,
|
||||||
|
setDuration,
|
||||||
|
setItemId,
|
||||||
|
setItemName,
|
||||||
|
setSubtitleTracksStore,
|
||||||
|
setSelectedSubtitleTrack,
|
||||||
|
] = usePlaybackStore((state) => [
|
||||||
|
state.setUrl,
|
||||||
|
state.setPosition,
|
||||||
|
state.setDuration,
|
||||||
|
state.setItemId,
|
||||||
|
state.setItemName,
|
||||||
|
state.setSubtitleTracks,
|
||||||
|
state.setSelectedSubtitleTrack,
|
||||||
|
]);
|
||||||
|
const [
|
||||||
|
setAudioUrl,
|
||||||
|
setAudioDisplay,
|
||||||
|
setAudioItem,
|
||||||
|
setAudioTracks,
|
||||||
|
setPlaylistItemId,
|
||||||
|
] = useAudioPlayback((state) => [
|
||||||
|
state.setUrl,
|
||||||
|
state.setDisplay,
|
||||||
|
state.setItem,
|
||||||
|
state.setTracks,
|
||||||
|
state.setPlaylistItemId,
|
||||||
|
]);
|
||||||
|
const setPlaybackDataLoading = usePlaybackDataLoadStore(
|
||||||
|
(state) => state.setIsLoading,
|
||||||
|
);
|
||||||
|
|
||||||
|
const { enqueueSnackbar } = useSnackbar();
|
||||||
|
|
||||||
|
const item = useMutation({
|
||||||
|
mutationKey: ["playButton", itemId, userId],
|
||||||
|
mutationFn: async () => {
|
||||||
|
setPlaybackDataLoading(true);
|
||||||
|
let result;
|
||||||
|
if (itemType == "Series") {
|
||||||
|
result = await getTvShowsApi(window.api).getEpisodes({
|
||||||
|
seriesId: itemId,
|
||||||
|
limit: 1,
|
||||||
|
startIndex: 0,
|
||||||
|
fields: [
|
||||||
|
ItemFields.MediaSources,
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
],
|
||||||
|
});
|
||||||
|
} else if (itemType == BaseItemKind.Playlist || playlistItem) {
|
||||||
|
result = await getPlaylistsApi(window.api).getPlaylistItems(
|
||||||
|
{
|
||||||
|
userId: userId,
|
||||||
|
playlistId: playlistItemId,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else if (itemType == BaseItemKind.MusicAlbum) {
|
||||||
|
result = await getItemsApi(window.api).getItems({
|
||||||
|
parentId: itemId,
|
||||||
|
userId: userId,
|
||||||
|
fields: [
|
||||||
|
ItemFields.MediaSources,
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
],
|
||||||
|
sortOrder: SortOrder.Ascending,
|
||||||
|
sortBy: "IndexNumber",
|
||||||
|
});
|
||||||
|
} else if (itemType == BaseItemKind.MusicArtist) {
|
||||||
|
result = await getItemsApi(window.api).getItems({
|
||||||
|
artistIds: [itemId],
|
||||||
|
recursive: true,
|
||||||
|
includeItemTypes: [BaseItemKind.Audio],
|
||||||
|
userId: userId,
|
||||||
|
fields: [
|
||||||
|
ItemFields.MediaSources,
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
],
|
||||||
|
sortOrder: SortOrder.Ascending,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
result = await getItemsApi(window.api).getItems({
|
||||||
|
ids: [itemId],
|
||||||
|
userId: userId,
|
||||||
|
fields: [
|
||||||
|
ItemFields.MediaSources,
|
||||||
|
ItemFields.MediaStreams,
|
||||||
|
],
|
||||||
|
sortOrder: SortOrder.Ascending,
|
||||||
|
sortBy: "IndexNumber",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
onSuccess: (item) => {
|
||||||
|
if (audio) {
|
||||||
|
setAudioTracks(item.Items);
|
||||||
|
setAudioUrl(
|
||||||
|
`${window.api.basePath}/Audio/${item.Items[0].Id}/universal?deviceId=${window.api.deviceInfo.id}&userId=${userId}&api_key=${window.api.accessToken}`,
|
||||||
|
);
|
||||||
|
setAudioItem(item.Items[0]);
|
||||||
|
setPlaylistItemId(playlistItemId);
|
||||||
|
setAudioDisplay(true);
|
||||||
|
} else {
|
||||||
|
setUrl(
|
||||||
|
`${window.api.basePath}/Videos/${item.Items[0].Id}/stream.
|
||||||
|
${item.Items[0].MediaSources[0].Container}
|
||||||
|
?Static=true&mediaSourceId=${item.Items[0].Id}&deviceId=${window.api.deviceInfo.id}&api_key=${window.api.accessToken}&Tag=${item.Items[0].MediaSources[0].ETag}&videoStreamIndex=${currentVideoTrack}&audioStreamIndex=${currentAudioTrack}`,
|
||||||
|
);
|
||||||
|
setPosition(item.Items[0].UserData?.PlaybackPositionTicks);
|
||||||
|
setItemName(
|
||||||
|
item.Items[0].Type == "Episode"
|
||||||
|
? `${item.Items[0].SeriesName} S${item.Items[0].ParentIndexNumber}:E${item.Items[0].IndexNumber} ${item.Items[0].Name}`
|
||||||
|
: item.Items[0].Name,
|
||||||
|
);
|
||||||
|
setItemId(item.Items[0].Id);
|
||||||
|
setDuration(item.Items[0].RunTimeTicks);
|
||||||
|
// setSubtitleTracksStore(subtitleTracks);
|
||||||
|
setSelectedSubtitleTrack(currentSubTrack);
|
||||||
|
navigate(`/player`);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSettled: () => {
|
||||||
|
setPlaybackDataLoading(false);
|
||||||
|
},
|
||||||
|
onError: (error) => {
|
||||||
|
enqueueSnackbar(`${error}`, {
|
||||||
|
variant: "error",
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
const handleClick = (e) => {
|
||||||
|
e.stopPropagation();
|
||||||
|
item.mutate();
|
||||||
|
};
|
||||||
|
if (iconOnly) {
|
||||||
|
return (
|
||||||
|
<Fab
|
||||||
|
color="primary"
|
||||||
|
aria-label="Play"
|
||||||
|
className={className}
|
||||||
|
onClick={handleClick}
|
||||||
|
sx={sx}
|
||||||
|
size={size}
|
||||||
|
{...buttonProps}
|
||||||
|
>
|
||||||
|
<MdiPlayOutline {...iconProps} />
|
||||||
|
</Fab>
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
return (
|
||||||
|
<Button
|
||||||
|
className={className}
|
||||||
|
variant="contained"
|
||||||
|
onClick={handleClick}
|
||||||
|
startIcon={<MdiPlayOutline />}
|
||||||
|
{...buttonProps}
|
||||||
|
sx={{
|
||||||
|
position: "relative",
|
||||||
|
overflow: "hidden",
|
||||||
|
}}
|
||||||
|
size={size}
|
||||||
|
>
|
||||||
|
<LinearProgress
|
||||||
|
variant="determinate"
|
||||||
|
value={
|
||||||
|
100 > itemUserData.PlayedPercentage > 0
|
||||||
|
? itemUserData.PlayedPercentage
|
||||||
|
: 0
|
||||||
|
}
|
||||||
|
sx={{
|
||||||
|
position: "absolute",
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
bottom: 0,
|
||||||
|
height: "100%",
|
||||||
|
background: "transparent",
|
||||||
|
opacity: 0.2,
|
||||||
|
zIndex: 0,
|
||||||
|
}}
|
||||||
|
color="white"
|
||||||
|
/>
|
||||||
|
{itemUserData.PlaybackPositionTicks > 0 ? "Resume" : "Play"}
|
||||||
|
</Button>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PlayButton;
|
||||||
|
|
||||||
|
PlayButton.propTypes = {
|
||||||
|
itemId: PropTypes.string,
|
||||||
|
itemUserData: PropTypes.object,
|
||||||
|
userId: PropTypes.string,
|
||||||
|
itemType: PropTypes.string,
|
||||||
|
currentAudioTrack: PropTypes.number,
|
||||||
|
currentSubTrack: PropTypes.number,
|
||||||
|
currentVideoTrack: PropTypes.number,
|
||||||
|
className: PropTypes.string,
|
||||||
|
sx: PropTypes.any,
|
||||||
|
iconProps: PropTypes.any,
|
||||||
|
buttonProps: PropTypes.any,
|
||||||
|
iconOnly: PropTypes.bool,
|
||||||
|
};
|
||||||
@@ -0,0 +1,140 @@
|
|||||||
|
/** @format */
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
import MuiCard from "@mui/material/Card";
|
||||||
|
import CardActionArea from "@mui/material/CardActionArea";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
|
||||||
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
|
import { TypeIconCollectionCard } from "../utils/iconsCollection";
|
||||||
|
import "./card.module.scss";
|
||||||
|
import { MdiCheck } from "../icons/mdiCheck";
|
||||||
|
|
||||||
|
import LikeButton from "../buttons/likeButton";
|
||||||
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
|
import PlayButton from "../buttons/playButton";
|
||||||
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { MdiAccountTie } from "../icons/mdiAccountTie";
|
||||||
|
|
||||||
|
const cardImageAspectRatios = {
|
||||||
|
thumb: 1.777,
|
||||||
|
portrait: 0.666,
|
||||||
|
square: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
const availableSpecialRoutes = [BaseItemKind.Series];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Props
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
|
||||||
|
* @property {string} cardTitle
|
||||||
|
* @property {string | number} cardCaption
|
||||||
|
* @property {string} imageBlurhash
|
||||||
|
* @property {string} seriesId
|
||||||
|
* @property {boolean} hideText
|
||||||
|
* @property {() => {}} onClick
|
||||||
|
* @property {boolean} disablePadding
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Hero section for item pages
|
||||||
|
* @param {Props}
|
||||||
|
* @returns {React.Component}
|
||||||
|
*/
|
||||||
|
|
||||||
|
export const ActorCard = ({
|
||||||
|
item,
|
||||||
|
cardTitle,
|
||||||
|
cardCaption,
|
||||||
|
imageBlurhash,
|
||||||
|
seriesId,
|
||||||
|
hideText,
|
||||||
|
onClick,
|
||||||
|
disablePadding,
|
||||||
|
}) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const defaultOnClick = () => {
|
||||||
|
navigate(`/person/${item.Id}`);
|
||||||
|
};
|
||||||
|
return (
|
||||||
|
<CardActionArea
|
||||||
|
style={{
|
||||||
|
padding: disablePadding ? 0 : "0.6em",
|
||||||
|
borderRadius: "calc(0.6em + 6px)",
|
||||||
|
}}
|
||||||
|
className="card-container"
|
||||||
|
onClick={!!onClick ? onClick : defaultOnClick}
|
||||||
|
>
|
||||||
|
<MuiCard className="card card-actor" elevation={0}>
|
||||||
|
<div className="card-box">
|
||||||
|
<div
|
||||||
|
className="card-image-container"
|
||||||
|
style={{
|
||||||
|
aspectRatio: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{!!imageBlurhash && (
|
||||||
|
<Blurhash
|
||||||
|
hash={imageBlurhash}
|
||||||
|
width={128}
|
||||||
|
height={128}
|
||||||
|
resolutionX={24}
|
||||||
|
resolutionY={24}
|
||||||
|
className="card-image-blurhash"
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<div className="card-image-icon-container">
|
||||||
|
<MdiAccountTie className="card-image-icon" />
|
||||||
|
</div>
|
||||||
|
<img
|
||||||
|
src={window.api.getItemImageUrl(
|
||||||
|
!!seriesId ? item.SeriesId : item.Id,
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 80,
|
||||||
|
fillHeight: 448,
|
||||||
|
fillWidth: 448,
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
style={{
|
||||||
|
height: "100%",
|
||||||
|
width: "100%",
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
loading="lazy"
|
||||||
|
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||||
|
className="card-image"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="card-text-container"
|
||||||
|
style={{ display: hideText ? "none" : "block" }}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
fontWeight={500}
|
||||||
|
noWrap
|
||||||
|
textAlign="center"
|
||||||
|
style={{ opacity: 0.9 }}
|
||||||
|
>
|
||||||
|
{cardTitle}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
noWrap
|
||||||
|
textAlign="center"
|
||||||
|
style={{ opacity: 0.6 }}
|
||||||
|
lineHeight="auto"
|
||||||
|
>
|
||||||
|
{cardCaption}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</MuiCard>
|
||||||
|
</CardActionArea>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,403 +1,273 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
import React, { useState } from "react";
|
|
||||||
import PropTypes from "prop-types";
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import Box from "@mui/material/Box";
|
|
||||||
import MuiCard from "@mui/material/Card";
|
import MuiCard from "@mui/material/Card";
|
||||||
import CardContent from "@mui/material/CardContent";
|
|
||||||
import CardMedia from "@mui/material/CardMedia";
|
|
||||||
import CardActionArea from "@mui/material/CardActionArea";
|
import CardActionArea from "@mui/material/CardActionArea";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
import Chip from "@mui/material/Chip";
|
|
||||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
|
||||||
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
import { green, pink } from "@mui/material/colors";
|
|
||||||
|
|
||||||
import {
|
import { TypeIconCollectionCard } from "../utils/iconsCollection";
|
||||||
MediaCollectionTypeIconCollectionCard,
|
|
||||||
TypeIconCollectionCard,
|
|
||||||
} from "../utils/iconsCollection";
|
|
||||||
|
|
||||||
import { borderRadiusDefault } from "../../palette.module.scss";
|
|
||||||
import "./card.module.scss";
|
import "./card.module.scss";
|
||||||
import { MdiCheck } from "../icons/mdiCheck";
|
import { MdiCheck } from "../icons/mdiCheck";
|
||||||
|
|
||||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
import LikeButton from "../buttons/likeButton";
|
||||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
import PlayButton from "../buttons/playButton";
|
||||||
import { MdiHeart } from "../icons/mdiHeart";
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
|
||||||
|
const cardImageAspectRatios = {
|
||||||
|
thumb: 1.777,
|
||||||
|
portrait: 0.666,
|
||||||
|
square: 1,
|
||||||
|
};
|
||||||
|
|
||||||
|
const availableSpecialRoutes = [
|
||||||
|
BaseItemKind.Series,
|
||||||
|
BaseItemKind.BoxSet,
|
||||||
|
BaseItemKind.MusicAlbum,
|
||||||
|
BaseItemKind.Episode,
|
||||||
|
BaseItemKind.Playlist,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Props
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
|
||||||
|
* @property {string} cardTitle
|
||||||
|
* @property {string | number} cardCaption
|
||||||
|
* @property {string} imageType
|
||||||
|
* @property {string} imageBlurhash
|
||||||
|
* @property {'thumb' | 'portrait' | 'square'} cardType
|
||||||
|
* @property {Array} queryKey
|
||||||
|
* @property {string} userId
|
||||||
|
* @property {string} seriesId
|
||||||
|
* @property {boolean} hideText
|
||||||
|
* @property {() => {}} onClick
|
||||||
|
* @property {boolean} disableOverlay
|
||||||
|
* @property {boolean} disablePadding
|
||||||
|
* @property {any} overrideIcon
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Hero section for item pages
|
||||||
|
* @param {Props}
|
||||||
|
* @returns {React.Component}
|
||||||
|
*/
|
||||||
|
|
||||||
export const Card = ({
|
export const Card = ({
|
||||||
itemName,
|
item,
|
||||||
itemId,
|
cardTitle,
|
||||||
imageTags,
|
cardCaption,
|
||||||
iconType,
|
imageType = "Primary",
|
||||||
cardType = "",
|
imageBlurhash,
|
||||||
subText = "",
|
cardType,
|
||||||
playedPercent,
|
queryKey,
|
||||||
cardOrientation,
|
userId,
|
||||||
cardProps,
|
seriesId,
|
||||||
onClickEvent,
|
hideText,
|
||||||
watchedStatus,
|
onClick,
|
||||||
watchedCount,
|
disableOverlay = false,
|
||||||
blurhash,
|
disablePadding,
|
||||||
currentUser,
|
overrideIcon,
|
||||||
favourite,
|
|
||||||
disableOverlay,
|
|
||||||
}) => {
|
}) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [imgLoading, setImgLoading] = useState(true);
|
const defaultOnClick = () => {
|
||||||
const [isWatched, setIsWatched] = useState(watchedStatus);
|
if (availableSpecialRoutes.includes(item.Type)) {
|
||||||
const [isFavorite, setisFavorite] = useState(favourite);
|
navigate(`/${item.Type.toLocaleLowerCase()}/${item.Id}`);
|
||||||
const [watchedCountState, setWatchedCountState] = useState(watchedCount);
|
} else if (!!item.Role || item.Type == BaseItemKind.Person) {
|
||||||
const handleMarkAsPlayOrUnMarkAsPlay = async () => {
|
navigate(`/person/${item.Id}`);
|
||||||
let result;
|
} else if (item.Type == BaseItemKind.MusicArtist) {
|
||||||
if (!isWatched) {
|
navigate(`/artist/${item.Id}`);
|
||||||
result = await getPlaystateApi(window.api).markPlayedItem({
|
} else {
|
||||||
userId: currentUser.Id,
|
navigate(`/item/${item.Id}`);
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
} else if (isWatched) {
|
|
||||||
result = await getPlaystateApi(window.api).markUnplayedItem({
|
|
||||||
userId: currentUser.Id,
|
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
setIsWatched(result.data.Played);
|
|
||||||
setWatchedCountState(result.data.UnplayedItemCount);
|
|
||||||
};
|
};
|
||||||
const handleLiking = async () => {
|
|
||||||
let result;
|
|
||||||
if (isFavorite) {
|
|
||||||
result = await getUserLibraryApi(window.api).unmarkFavoriteItem({
|
|
||||||
userId: currentUser.Id,
|
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
} else if (!isFavorite) {
|
|
||||||
result = await getUserLibraryApi(window.api).markFavoriteItem({
|
|
||||||
userId: currentUser.Id,
|
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
setisFavorite(result.data.IsFavorite);
|
|
||||||
};
|
|
||||||
|
|
||||||
const availableMarkButtonTypes = [
|
|
||||||
"Audio",
|
|
||||||
"AudioBook",
|
|
||||||
"Book",
|
|
||||||
"BoxSet",
|
|
||||||
"CollectionFolder",
|
|
||||||
"Movie",
|
|
||||||
"Season",
|
|
||||||
"Series",
|
|
||||||
"Video",
|
|
||||||
"Episode",
|
|
||||||
];
|
|
||||||
const allowedLikeButton = [
|
|
||||||
"Audio",
|
|
||||||
"AudioBook",
|
|
||||||
"Book",
|
|
||||||
"BoxSet",
|
|
||||||
"CollectionFolder",
|
|
||||||
"Movie",
|
|
||||||
"MusicAlbum",
|
|
||||||
"MusicVideo",
|
|
||||||
"Season",
|
|
||||||
"Series",
|
|
||||||
"Video",
|
|
||||||
"Channel",
|
|
||||||
"MusicAlbum",
|
|
||||||
"MusicArtist",
|
|
||||||
"Person",
|
|
||||||
"Photo",
|
|
||||||
"Playlist",
|
|
||||||
"Studio",
|
|
||||||
"Episode",
|
|
||||||
];
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MuiCard
|
<CardActionArea
|
||||||
className={"card " + cardOrientation}
|
style={{
|
||||||
sx={{
|
padding: disablePadding ? 0 : "0.6em",
|
||||||
background: "transparent",
|
borderRadius: "calc(0.6em + 6px)",
|
||||||
borderRadius: borderRadiusDefault,
|
|
||||||
mr: 1,
|
|
||||||
}}
|
}}
|
||||||
elevation={0}
|
className="card-container"
|
||||||
{...cardProps}
|
onClick={!!onClick ? onClick : defaultOnClick}
|
||||||
>
|
>
|
||||||
<CardActionArea
|
<MuiCard className="card" elevation={0}>
|
||||||
sx={{ p: "1px" }}
|
<div className="card-box">
|
||||||
component={Box}
|
<div
|
||||||
onClick={
|
className="card-image-container"
|
||||||
!!onClickEvent
|
style={{
|
||||||
? onClickEvent
|
aspectRatio: cardImageAspectRatios[cardType],
|
||||||
: () => {
|
}}
|
||||||
navigate(`/item/${itemId}`);
|
>
|
||||||
}
|
{!!item.UserData && (
|
||||||
}
|
<>
|
||||||
className="cardBox"
|
<div
|
||||||
>
|
className="card-indicator check"
|
||||||
<Box
|
style={{
|
||||||
className="card-media-container"
|
opacity: item.UserData?.Played
|
||||||
sx={{
|
? 1
|
||||||
position: "relative",
|
: 0,
|
||||||
m: 1,
|
}}
|
||||||
aspectRatio:
|
>
|
||||||
cardOrientation == "landscape"
|
<MdiCheck />
|
||||||
? "1.777"
|
</div>
|
||||||
: cardOrientation == "portait"
|
<div
|
||||||
? "0.666"
|
className={`card-indicator text`}
|
||||||
: "1",
|
style={{
|
||||||
}}
|
opacity: !!item.UserData
|
||||||
>
|
?.UnplayedItemCount
|
||||||
<>
|
? 1
|
||||||
<Chip
|
: 0,
|
||||||
className="card-indicator"
|
}}
|
||||||
label={<MdiCheck />}
|
>
|
||||||
sx={{
|
<Typography
|
||||||
transition: "opacity 150ms",
|
variant="subtitle2"
|
||||||
opacity: isWatched ? 1 : 0,
|
padding="0.1em 0.4em"
|
||||||
}}
|
fontWeight={400}
|
||||||
/>
|
>
|
||||||
|
{
|
||||||
{!!watchedCountState && (
|
item.UserData
|
||||||
<Chip
|
?.UnplayedItemCount
|
||||||
className="card-indicator card-indicator-text"
|
}
|
||||||
label={watchedCountState}
|
</Typography>
|
||||||
></Chip>
|
</div>
|
||||||
|
</>
|
||||||
)}
|
)}
|
||||||
<div
|
{!!imageBlurhash && (
|
||||||
className="card-media-image-container"
|
|
||||||
style={{ opacity: imgLoading ? 0 : 1 }}
|
|
||||||
// style={{ opacity: 1 }}
|
|
||||||
>
|
|
||||||
{imageTags &&
|
|
||||||
(cardType == "thumb" ? (
|
|
||||||
<CardMedia
|
|
||||||
component="img"
|
|
||||||
image={
|
|
||||||
window.api.basePath +
|
|
||||||
"/Items/" +
|
|
||||||
itemId +
|
|
||||||
"/Images/Backdrop?fillHeight=300&fillWidth=532&quality=96"
|
|
||||||
}
|
|
||||||
alt={itemName}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
aspectRatio:
|
|
||||||
cardOrientation ==
|
|
||||||
"landscape"
|
|
||||||
? "1.777"
|
|
||||||
: cardOrientation ==
|
|
||||||
"portait"
|
|
||||||
? "0.666"
|
|
||||||
: "1",
|
|
||||||
borderRadius:
|
|
||||||
borderRadiusDefault,
|
|
||||||
overflow: "hidden",
|
|
||||||
}}
|
|
||||||
onLoad={() =>
|
|
||||||
setImgLoading(false)
|
|
||||||
}
|
|
||||||
className="card-image"
|
|
||||||
></CardMedia>
|
|
||||||
) : (
|
|
||||||
<CardMedia
|
|
||||||
component="img"
|
|
||||||
image={
|
|
||||||
iconType == "User"
|
|
||||||
? window.api
|
|
||||||
.basePath +
|
|
||||||
"/Users/" +
|
|
||||||
itemId +
|
|
||||||
"/Images/Primary?fillHeight=532&fillWidth=300&quality=96"
|
|
||||||
: window.api
|
|
||||||
.basePath +
|
|
||||||
"/Items/" +
|
|
||||||
itemId +
|
|
||||||
"/Images/Primary?fillHeight=532&fillWidth=300&quality=96"
|
|
||||||
}
|
|
||||||
alt={itemName}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
aspectRatio:
|
|
||||||
cardOrientation ==
|
|
||||||
"landscape"
|
|
||||||
? "1.777"
|
|
||||||
: cardOrientation ==
|
|
||||||
"portait"
|
|
||||||
? "0.666"
|
|
||||||
: "1",
|
|
||||||
}}
|
|
||||||
className="card-image"
|
|
||||||
onLoad={() =>
|
|
||||||
setImgLoading(false)
|
|
||||||
}
|
|
||||||
></CardMedia>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
{!!blurhash && (
|
|
||||||
<Blurhash
|
<Blurhash
|
||||||
hash={blurhash}
|
hash={imageBlurhash}
|
||||||
width="100%"
|
width={128}
|
||||||
height="100%"
|
height={128}
|
||||||
resolutionX={24}
|
resolutionX={24}
|
||||||
resolutionY={24}
|
resolutionY={24}
|
||||||
style={{
|
|
||||||
aspectRatio:
|
|
||||||
cardOrientation == "landscape"
|
|
||||||
? "1.777"
|
|
||||||
: cardOrientation ==
|
|
||||||
"portait"
|
|
||||||
? "0.666"
|
|
||||||
: "1",
|
|
||||||
}}
|
|
||||||
className="card-image-blurhash"
|
className="card-image-blurhash"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="card-image-icon-container">
|
<div className="card-image-icon-container">
|
||||||
{cardType == "lib"
|
{!!overrideIcon
|
||||||
? MediaCollectionTypeIconCollectionCard[
|
? TypeIconCollectionCard[overrideIcon]
|
||||||
iconType
|
: TypeIconCollectionCard[item.Type]}
|
||||||
]
|
|
||||||
: TypeIconCollectionCard[iconType]}
|
|
||||||
</div>
|
</div>
|
||||||
{!!playedPercent && (
|
<img
|
||||||
|
src={
|
||||||
|
overrideIcon == "User"
|
||||||
|
? `${window.api.basePath}/Users/${item.Id}/Images/Primary`
|
||||||
|
: window.api.getItemImageUrl(
|
||||||
|
!!seriesId
|
||||||
|
? item.SeriesId
|
||||||
|
: item.Id,
|
||||||
|
imageType,
|
||||||
|
{
|
||||||
|
quality: 85,
|
||||||
|
fillHeight: 462,
|
||||||
|
fillWidth: 462,
|
||||||
|
},
|
||||||
|
)
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
height: "100%",
|
||||||
|
width: "100%",
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
loading="lazy"
|
||||||
|
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||||
|
className="card-image"
|
||||||
|
/>
|
||||||
|
{!disableOverlay && (
|
||||||
|
<div className="card-overlay">
|
||||||
|
<PlayButton
|
||||||
|
itemId={item.Id}
|
||||||
|
userId={userId}
|
||||||
|
itemType={item.Type}
|
||||||
|
currentAudioTrack={0}
|
||||||
|
currentSubTrack={0}
|
||||||
|
currentVideoTrack={0}
|
||||||
|
className="card-play-button"
|
||||||
|
iconProps={{
|
||||||
|
style: { fontSize: "2.5em" },
|
||||||
|
}}
|
||||||
|
iconOnly
|
||||||
|
audio={
|
||||||
|
item.Type ==
|
||||||
|
BaseItemKind.MusicAlbum ||
|
||||||
|
item.Type ==
|
||||||
|
BaseItemKind.Audio ||
|
||||||
|
item.Type ==
|
||||||
|
BaseItemKind.AudioBook ||
|
||||||
|
item.Type ==
|
||||||
|
BaseItemKind.Playlist
|
||||||
|
}
|
||||||
|
playlistItem={
|
||||||
|
item.Type ==
|
||||||
|
BaseItemKind.Playlist
|
||||||
|
}
|
||||||
|
playlistItemId={item.Id}
|
||||||
|
/>
|
||||||
|
<LikeButton
|
||||||
|
itemId={item.Id}
|
||||||
|
itemName={item.Name}
|
||||||
|
isFavorite={
|
||||||
|
item.UserData?.IsFavorite
|
||||||
|
}
|
||||||
|
queryKey={queryKey}
|
||||||
|
userId={userId}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemId={item.Id}
|
||||||
|
itemName={item.Name}
|
||||||
|
isPlayed={item.UserData?.Played}
|
||||||
|
queryKey={queryKey}
|
||||||
|
userId={userId}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{item.UserData?.PlaybackPositionTicks > 0 && (
|
||||||
<LinearProgress
|
<LinearProgress
|
||||||
variant="determinate"
|
variant="determinate"
|
||||||
value={playedPercent}
|
value={item.UserData?.PlayedPercentage}
|
||||||
sx={{
|
style={{
|
||||||
width: "90%",
|
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
left: "5%",
|
left: 0,
|
||||||
bottom: "5%",
|
right: 0,
|
||||||
borderRadius: "100px",
|
bottom: 0,
|
||||||
height: "5px",
|
zIndex: 2,
|
||||||
|
height: "6px",
|
||||||
|
background:
|
||||||
|
"rgb(5 5 5 / 0.5) !important",
|
||||||
|
backdropFilter: "blur(5px)",
|
||||||
}}
|
}}
|
||||||
|
color="primary"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</div>
|
||||||
{!disableOverlay && (
|
<div
|
||||||
<Box
|
className="card-text-container"
|
||||||
className="card-media-overlay"
|
style={{ display: hideText ? "none" : "block" }}
|
||||||
sx={{
|
>
|
||||||
display: "flex",
|
<Typography
|
||||||
alignItems: "flex-end",
|
variant="subtitle1"
|
||||||
justifyContent: "flex-end",
|
fontWeight={500}
|
||||||
p: 1,
|
noWrap
|
||||||
}}
|
textAlign="center"
|
||||||
|
style={{ opacity: 0.9 }}
|
||||||
>
|
>
|
||||||
<ButtonGroup>
|
{cardTitle}
|
||||||
{availableMarkButtonTypes.includes(
|
</Typography>
|
||||||
iconType,
|
<Typography
|
||||||
) && (
|
variant="subtitle2"
|
||||||
<IconButton
|
noWrap
|
||||||
onClick={(e) => {
|
textAlign="center"
|
||||||
e.preventDefault();
|
style={{ opacity: 0.6 }}
|
||||||
e.stopPropagation();
|
lineHeight="auto"
|
||||||
handleMarkAsPlayOrUnMarkAsPlay();
|
>
|
||||||
}}
|
{cardCaption}
|
||||||
onFocus={(e) =>
|
</Typography>
|
||||||
e.stopPropagation
|
</div>
|
||||||
}
|
</div>
|
||||||
>
|
</MuiCard>
|
||||||
<MdiCheck
|
</CardActionArea>
|
||||||
sx={{
|
|
||||||
color: isWatched
|
|
||||||
? green[400]
|
|
||||||
: "white",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</IconButton>
|
|
||||||
)}
|
|
||||||
{allowedLikeButton.includes(
|
|
||||||
iconType,
|
|
||||||
) && (
|
|
||||||
<IconButton
|
|
||||||
onClick={(e) => {
|
|
||||||
e.preventDefault();
|
|
||||||
e.stopPropagation();
|
|
||||||
handleLiking();
|
|
||||||
}}
|
|
||||||
onFocus={(e) =>
|
|
||||||
e.stopPropagation
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{isFavorite ? (
|
|
||||||
<MdiHeart
|
|
||||||
sx={{
|
|
||||||
color: pink[700],
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<MdiHeartOutline />
|
|
||||||
)}
|
|
||||||
</IconButton>
|
|
||||||
)}
|
|
||||||
</ButtonGroup>
|
|
||||||
</Box>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
<CardContent
|
|
||||||
className="card-text-container"
|
|
||||||
sx={{
|
|
||||||
padding: "0 0.5em",
|
|
||||||
backgroundColor: "transparent",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
gutterBottom={false}
|
|
||||||
variant="h6"
|
|
||||||
component="div"
|
|
||||||
color="white"
|
|
||||||
fontWeight={500}
|
|
||||||
textAlign="left"
|
|
||||||
noWrap
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
>
|
|
||||||
{itemName}
|
|
||||||
</Typography>
|
|
||||||
|
|
||||||
<Typography
|
|
||||||
gutterBottom
|
|
||||||
variant="subtitle1"
|
|
||||||
component="div"
|
|
||||||
textAlign="left"
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
noWrap
|
|
||||||
sx={{ opacity: 0.5 }}
|
|
||||||
>
|
|
||||||
{subText}
|
|
||||||
</Typography>
|
|
||||||
</CardContent>
|
|
||||||
</CardActionArea>
|
|
||||||
</MuiCard>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
Card.propTypes = {
|
|
||||||
itemName: PropTypes.string.isRequired,
|
|
||||||
itemId: PropTypes.string.isRequired,
|
|
||||||
imageTags: PropTypes.bool,
|
|
||||||
iconType: PropTypes.string.isRequired,
|
|
||||||
cardType: PropTypes.string,
|
|
||||||
subText: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
||||||
playedPercent: PropTypes.number,
|
|
||||||
cardOrientation: PropTypes.string.isRequired,
|
|
||||||
onClickEvent: PropTypes.func,
|
|
||||||
watchedStatus: PropTypes.bool,
|
|
||||||
watchedCount: PropTypes.number,
|
|
||||||
blurhash: PropTypes.string,
|
|
||||||
currentUser: PropTypes.object,
|
|
||||||
favourite: PropTypes.bool,
|
|
||||||
};
|
|
||||||
@@ -1,92 +1,121 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
|
|
||||||
.card {
|
.card {
|
||||||
border-radius: $border-radius-default;
|
height: 100%;
|
||||||
&-media {
|
overflow: visible !important;
|
||||||
&-container {
|
align-items: flex-start;
|
||||||
position: relative;
|
background: transparent !important;
|
||||||
border-radius: $border-radius-default;
|
&-box {
|
||||||
overflow: hidden;
|
display: flex;
|
||||||
box-shadow: 0 0 7px rgb(0 0 0 / 0.2);
|
width: 100%;
|
||||||
}
|
height: 100%;
|
||||||
&-overlay {
|
position: relative;
|
||||||
position: absolute;
|
overflow: visible;
|
||||||
top: 0;
|
flex-direction: column;
|
||||||
left: 0;
|
justify-content: center;
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
background: rgb(0 0 0 / 0.6);
|
|
||||||
opacity: 0;
|
|
||||||
transition: opacity $transition-time-default;
|
|
||||||
z-index: 10;
|
|
||||||
}
|
|
||||||
&-image-container {
|
|
||||||
transition: opacity $transition-time-default;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&Box:hover .card-media-overlay,
|
|
||||||
&Box:focus-within .card-media-overlay,
|
|
||||||
&Box:focus .card-media-overlay {
|
|
||||||
opacity: 1;
|
|
||||||
}
|
}
|
||||||
&-image {
|
&-image {
|
||||||
position: relative;
|
width: 100%;
|
||||||
border-radius: $border-radius-default;
|
height: 100%;
|
||||||
background-size: cover;
|
object-fit: cover;
|
||||||
background-position: center;
|
transition: opacity $transition-time-fast;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 1;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
&-container {
|
&-container {
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
border-radius: $border-radius-default;
|
border-radius: $border-radius-default;
|
||||||
|
box-shadow: 0 4px 8px rgb(0 0 0 / 0.2);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
height: auto;
|
||||||
|
z-index: 0;
|
||||||
}
|
}
|
||||||
&-icon {
|
&-icon {
|
||||||
font-size: 4.5em !important;
|
position: absolute;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-size: 5.4em !important;
|
||||||
fill: url(#clr-gradient-default) !important;
|
fill: url(#clr-gradient-default) !important;
|
||||||
|
color: transparent;
|
||||||
&-container {
|
&-container {
|
||||||
display: flex !important;
|
|
||||||
aspect-ratio: 1.777;
|
|
||||||
justify-content: center;
|
|
||||||
align-items: center;
|
|
||||||
width: 100% !important;
|
|
||||||
color: transparent;
|
|
||||||
background: $clr-gradient-dark;
|
background: $clr-gradient-dark;
|
||||||
border-radius: 10px;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
bottom: 0;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
z-index: -2;
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
z-index: 0;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-blurhash {
|
&-blurhash {
|
||||||
position: absolute !important;
|
position: absolute;
|
||||||
width: 100%;
|
z-index: 1;
|
||||||
height: 100%;
|
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
border-radius: $border-radius-default;
|
width: 100% !important;
|
||||||
overflow: hidden;
|
height: 100% !important;
|
||||||
z-index: -1;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
&-text-container {
|
&-overlay {
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
background: rgb(0 0 0 / 0.6);
|
||||||
|
z-index: 10;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity $transition-time-default;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
align-items: flex-end;
|
||||||
justify-content: center;
|
justify-content: flex-end;
|
||||||
align-items: center;
|
padding: 0.5em;
|
||||||
|
}
|
||||||
|
&-container:hover,
|
||||||
|
&-container:focus,
|
||||||
|
&-container:focus-within {
|
||||||
|
.card-overlay {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-play-button {
|
||||||
|
position: absolute !important;
|
||||||
|
top: 50%;
|
||||||
|
left: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
z-index: 1;
|
||||||
}
|
}
|
||||||
&-indicator {
|
&-indicator {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 5px;
|
top: 0.4em;
|
||||||
top: 5px;
|
right: 0.4em;
|
||||||
z-index: 10;
|
z-index: 2;
|
||||||
// border-radius: 100px;
|
padding: 0.2em 0.75em;
|
||||||
background: $clr-gradient-default;
|
background: rgb(20 20 20 / 0.5);
|
||||||
box-shadow: 0 0 5px rgb(0 0 0 / 0.4);
|
display: flex;
|
||||||
&-text {
|
align-items: center;
|
||||||
aspect-ratio: 1;
|
justify-content: center;
|
||||||
padding: 5px !important;
|
backdrop-filter: blur(5px);
|
||||||
|
transition: opacity 250ms;
|
||||||
|
border-radius: 100px;
|
||||||
|
box-shadow: 0 0 5px rgb(0 0 0 / 0.2);
|
||||||
|
}
|
||||||
|
&-text {
|
||||||
|
&-container {
|
||||||
|
height: 15%;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-episode {
|
||||||
|
.card-box {
|
||||||
|
height: unset !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&-actor {
|
||||||
|
.card-image-container {
|
||||||
|
border-radius: 100% !important;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,421 +1,214 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
import React, { useState } from "react";
|
|
||||||
import PropTypes from "prop-types";
|
|
||||||
|
|
||||||
import { useNavigate } from "react-router-dom";
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
import Divider from "@mui/material/Divider";
|
|
||||||
import Stack from "@mui/material/Stack";
|
|
||||||
import Box from "@mui/material/Box";
|
|
||||||
import MuiCard from "@mui/material/Card";
|
import MuiCard from "@mui/material/Card";
|
||||||
import CardContent from "@mui/material/CardContent";
|
|
||||||
import CardMedia from "@mui/material/CardMedia";
|
|
||||||
import CardActionArea from "@mui/material/CardActionArea";
|
import CardActionArea from "@mui/material/CardActionArea";
|
||||||
import Typography from "@mui/material/Typography";
|
import Typography from "@mui/material/Typography";
|
||||||
import LinearProgress from "@mui/material/LinearProgress";
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
import Chip from "@mui/material/Chip";
|
|
||||||
import ButtonGroup from "@mui/material/ButtonGroup";
|
|
||||||
import IconButton from "@mui/material/IconButton";
|
|
||||||
import { Blurhash } from "react-blurhash";
|
import { Blurhash } from "react-blurhash";
|
||||||
import { green, pink } from "@mui/material/colors";
|
|
||||||
|
|
||||||
import { TypeIconCollectionCard } from "../utils/iconsCollection";
|
|
||||||
|
|
||||||
import { borderRadiusDefault } from "../../palette.module.scss";
|
|
||||||
import "./card.module.scss";
|
import "./card.module.scss";
|
||||||
import { MdiCheck } from "../icons/mdiCheck";
|
import { MdiCheck } from "../icons/mdiCheck";
|
||||||
|
|
||||||
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
import LikeButton from "../buttons/likeButton";
|
||||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
import { MdiHeartOutline } from "../icons/mdiHeartOutline";
|
import PlayButton from "../buttons/playButton";
|
||||||
import { MdiHeart } from "../icons/mdiHeart";
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
import { endsAt, getRuntime } from "../../utils/date/time";
|
import { MdiTelevisionClassic } from "../icons/mdiTelevisionClassic";
|
||||||
import { MdiStarHalfFull } from "../icons/mdiStarHalfFull";
|
import { getRuntimeCompact } from "../../utils/date/time";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Props
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
|
||||||
|
* @property {string} cardTitle
|
||||||
|
* @property {string | number} cardCaption
|
||||||
|
* @property {string} imageBlurhash
|
||||||
|
* @property {Array} queryKey
|
||||||
|
* @property {string} userId
|
||||||
|
* @property {() => {}} onClick
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Hero section for item pages
|
||||||
|
* @param {Props}
|
||||||
|
* @returns {React.Component}
|
||||||
|
*/
|
||||||
|
|
||||||
export const EpisodeCard = ({
|
export const EpisodeCard = ({
|
||||||
itemName,
|
item,
|
||||||
itemRating,
|
cardTitle,
|
||||||
itemTicks,
|
cardCaption,
|
||||||
itemId,
|
imageBlurhash,
|
||||||
imageTags,
|
queryKey,
|
||||||
subText = "",
|
userId,
|
||||||
playedPercent,
|
onClick,
|
||||||
cardProps,
|
|
||||||
onClickEvent,
|
|
||||||
watchedStatus,
|
|
||||||
blurhash,
|
|
||||||
currentUser,
|
|
||||||
favourite,
|
|
||||||
showName,
|
|
||||||
episodeLocation,
|
|
||||||
centerAlignText = false,
|
|
||||||
parentId,
|
|
||||||
}) => {
|
}) => {
|
||||||
const navigate = useNavigate();
|
const navigate = useNavigate();
|
||||||
const [imgLoaded, setImgLoaded] = useState(false);
|
const defaultOnClick = () => {
|
||||||
const [isWatched, setIsWatched] = useState(watchedStatus);
|
navigate(`/episode/${item.Id}`);
|
||||||
const [isFavourite, setIsFavourite] = useState(favourite);
|
|
||||||
const handleMarkAsPlayOrUnMarkAsPlay = async () => {
|
|
||||||
let result;
|
|
||||||
if (!isWatched) {
|
|
||||||
result = await getPlaystateApi(window.api).markPlayedItem({
|
|
||||||
userId: currentUser.Id,
|
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
} else if (isWatched) {
|
|
||||||
result = await getPlaystateApi(window.api).markUnplayedItem({
|
|
||||||
userId: currentUser.Id,
|
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
setIsWatched(result.data.Played);
|
|
||||||
};
|
};
|
||||||
const handleLiking = async () => {
|
|
||||||
let result;
|
|
||||||
if (isFavourite) {
|
|
||||||
result = await getUserLibraryApi(window.api).unmarkFavoriteItem({
|
|
||||||
userId: currentUser.Id,
|
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
} else if (!isFavourite) {
|
|
||||||
result = await getUserLibraryApi(window.api).markFavoriteItem({
|
|
||||||
userId: currentUser.Id,
|
|
||||||
itemId: itemId,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
setIsFavourite(result.data.IsFavorite);
|
|
||||||
};
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<MuiCard
|
<CardActionArea
|
||||||
className="card landscape"
|
style={{
|
||||||
sx={{
|
padding: "0.6em",
|
||||||
background: "transparent",
|
borderRadius: "calc(0.6em + 6px)",
|
||||||
borderRadius: borderRadiusDefault,
|
|
||||||
mr: 1,
|
|
||||||
mb: 0.5,
|
|
||||||
}}
|
}}
|
||||||
elevation={0}
|
className="card-container"
|
||||||
{...cardProps}
|
onClick={!!onClick ? onClick : defaultOnClick}
|
||||||
>
|
>
|
||||||
<CardActionArea
|
<MuiCard className="card card-episode" elevation={0}>
|
||||||
sx={{ p: "1px" }}
|
<div className="card-box">
|
||||||
component="div"
|
<div
|
||||||
onClick={
|
className="card-image-container"
|
||||||
!!onClickEvent
|
style={{
|
||||||
? onClickEvent
|
aspectRatio: 1.777,
|
||||||
: () => {
|
}}
|
||||||
navigate(`/item/${itemId}`);
|
>
|
||||||
}
|
{!!item.UserData && (
|
||||||
}
|
<div
|
||||||
className="cardBox"
|
className="card-indicator check"
|
||||||
>
|
|
||||||
<Box
|
|
||||||
className="card-media-container"
|
|
||||||
sx={{
|
|
||||||
position: "relative",
|
|
||||||
m: 1,
|
|
||||||
aspectRatio: "1.777",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<>
|
|
||||||
<Chip
|
|
||||||
className="card-indicator"
|
|
||||||
label={<MdiCheck />}
|
|
||||||
sx={{
|
|
||||||
transition: "opacity 150ms",
|
|
||||||
opacity: isWatched ? 1 : 0,
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
<Box
|
|
||||||
className="card-media-image-container"
|
|
||||||
sx={{
|
|
||||||
opacity: imgLoaded ? 1 : 0,
|
|
||||||
transition: "opacity 250ms",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{imageTags && (
|
|
||||||
<CardMedia
|
|
||||||
component="img"
|
|
||||||
image={
|
|
||||||
window.api.basePath +
|
|
||||||
"/Items/" +
|
|
||||||
itemId +
|
|
||||||
"/Images/Primary?fillHeight=300&fillWidth=532&quality=96"
|
|
||||||
}
|
|
||||||
alt={itemName}
|
|
||||||
sx={{
|
|
||||||
width: "100%",
|
|
||||||
aspectRatio: "1.777",
|
|
||||||
borderRadius:
|
|
||||||
borderRadiusDefault,
|
|
||||||
overflow: "hidden",
|
|
||||||
}}
|
|
||||||
onLoad={() => setImgLoaded(true)}
|
|
||||||
className="card-image"
|
|
||||||
></CardMedia>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
{!!blurhash && (
|
|
||||||
<Blurhash
|
|
||||||
hash={blurhash}
|
|
||||||
width="100%"
|
|
||||||
height="100%"
|
|
||||||
resolutionX={12}
|
|
||||||
resolutionY={18}
|
|
||||||
style={{
|
style={{
|
||||||
aspectRatio: "1.777",
|
opacity: item.UserData?.Played
|
||||||
|
? 1
|
||||||
|
: 0,
|
||||||
}}
|
}}
|
||||||
|
>
|
||||||
|
<MdiCheck />
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{!!imageBlurhash && (
|
||||||
|
<Blurhash
|
||||||
|
hash={imageBlurhash}
|
||||||
|
width={128}
|
||||||
|
height={128}
|
||||||
|
resolutionX={24}
|
||||||
|
resolutionY={24}
|
||||||
className="card-image-blurhash"
|
className="card-image-blurhash"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
<div className="card-image-icon-container">
|
<div className="card-image-icon-container">
|
||||||
{TypeIconCollectionCard["Episode"]}
|
<MdiTelevisionClassic className="card-image-icon" />
|
||||||
</div>
|
</div>
|
||||||
{!!playedPercent && (
|
<img
|
||||||
|
src={window.api.getItemImageUrl(
|
||||||
|
item.Id,
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 90,
|
||||||
|
fillHeight: 512,
|
||||||
|
fillWidth: 512,
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
style={{
|
||||||
|
height: "100%",
|
||||||
|
width: "100%",
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
loading="lazy"
|
||||||
|
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||||
|
className="card-image"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className="card-overlay">
|
||||||
|
<PlayButton
|
||||||
|
itemId={item.Id}
|
||||||
|
userId={userId}
|
||||||
|
itemType={item.Type}
|
||||||
|
currentAudioTrack={0}
|
||||||
|
currentSubTrack={0}
|
||||||
|
currentVideoTrack={0}
|
||||||
|
className="card-play-button"
|
||||||
|
iconProps={{
|
||||||
|
style: { fontSize: "2.5em" },
|
||||||
|
}}
|
||||||
|
iconOnly
|
||||||
|
/>
|
||||||
|
<LikeButton
|
||||||
|
itemId={item.Id}
|
||||||
|
itemName={item.Name}
|
||||||
|
isFavorite={item.UserData?.IsFavorite}
|
||||||
|
queryKey={queryKey}
|
||||||
|
userId={userId}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemId={item.Id}
|
||||||
|
itemName={item.Name}
|
||||||
|
isPlayed={item.UserData.Played}
|
||||||
|
queryKey={queryKey}
|
||||||
|
userId={userId}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
{100 > item.UserData?.PlayedPercentage > 0 && (
|
||||||
<LinearProgress
|
<LinearProgress
|
||||||
variant="determinate"
|
variant="determinate"
|
||||||
value={playedPercent}
|
value={item.UserData.PlayedPercentage}
|
||||||
sx={{
|
style={{
|
||||||
width: "90%",
|
|
||||||
position: "absolute",
|
position: "absolute",
|
||||||
left: "5%",
|
left: 0,
|
||||||
bottom: "5%",
|
right: 0,
|
||||||
borderRadius: "100px",
|
bottom: 0,
|
||||||
height: "5px",
|
zIndex: 2,
|
||||||
|
height: "6px",
|
||||||
|
background:
|
||||||
|
"rgb(5 5 5 / 0.5) !important",
|
||||||
|
backdropFilter: "blur(5px)",
|
||||||
}}
|
}}
|
||||||
color="white"
|
color="primary"
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
</>
|
</div>
|
||||||
<Box
|
<div
|
||||||
className="card-media-overlay"
|
className="card-text-container"
|
||||||
sx={{
|
style={{ display: "block", marginTop: "0.5em" }}
|
||||||
display: "flex",
|
|
||||||
alignItems: "flex-end",
|
|
||||||
justifyContent: "flex-end",
|
|
||||||
p: 1,
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<ButtonGroup>
|
<div
|
||||||
<IconButton
|
style={{
|
||||||
onMouseDown={(e) => {
|
display: "flex",
|
||||||
e.stopPropagation();
|
alignItems: "center",
|
||||||
e.preventDefault();
|
justifyContent: "space-between",
|
||||||
handleMarkAsPlayOrUnMarkAsPlay();
|
gap: "1em",
|
||||||
}}
|
}}
|
||||||
>
|
|
||||||
<MdiCheck
|
|
||||||
sx={{
|
|
||||||
color: isWatched
|
|
||||||
? green[200]
|
|
||||||
: "white",
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</IconButton>
|
|
||||||
<IconButton
|
|
||||||
onMouseDown={(e) => {
|
|
||||||
e.stopPropagation();
|
|
||||||
e.preventDefault();
|
|
||||||
handleLiking();
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{isFavourite ? (
|
|
||||||
<MdiHeart
|
|
||||||
sx={{ color: pink[700] }}
|
|
||||||
/>
|
|
||||||
) : (
|
|
||||||
<MdiHeartOutline />
|
|
||||||
)}
|
|
||||||
</IconButton>
|
|
||||||
</ButtonGroup>
|
|
||||||
</Box>
|
|
||||||
</Box>
|
|
||||||
|
|
||||||
<CardContent
|
|
||||||
className="card-text-container"
|
|
||||||
sx={{
|
|
||||||
padding: "0 0.5em",
|
|
||||||
alignItems: "flex-start",
|
|
||||||
backgroundColor: "transparent",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{!!showName && (
|
|
||||||
<>
|
|
||||||
<Typography
|
|
||||||
gutterBottom={false}
|
|
||||||
variant="h5"
|
|
||||||
component="div"
|
|
||||||
color="white"
|
|
||||||
fontWeight={500}
|
|
||||||
textAlign="left"
|
|
||||||
noWrap
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
onClick={(e) => {
|
|
||||||
e.stopPropagation();
|
|
||||||
navigate(`/item/${parentId}`);
|
|
||||||
}}
|
|
||||||
sx={{
|
|
||||||
"&:hover": {
|
|
||||||
textDecoration: "underline",
|
|
||||||
},
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{showName}
|
|
||||||
{" - "}
|
|
||||||
{episodeLocation}
|
|
||||||
</Typography>
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
<Box
|
|
||||||
sx={{
|
|
||||||
display: "flex",
|
|
||||||
opacity: !!showName ? 0.75 : 1,
|
|
||||||
justifyContent: "space-between",
|
|
||||||
alignItems: "center",
|
|
||||||
}}
|
|
||||||
width="100%"
|
|
||||||
mb={0.5}
|
|
||||||
mt={0.5}
|
|
||||||
>
|
|
||||||
<Typography
|
|
||||||
gutterBottom={false}
|
|
||||||
variant="h6"
|
|
||||||
component="div"
|
|
||||||
color="white"
|
|
||||||
fontWeight={500}
|
|
||||||
textAlign={
|
|
||||||
centerAlignText ? "center" : "left"
|
|
||||||
}
|
|
||||||
noWrap
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
>
|
>
|
||||||
{itemName}
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
fontWeight={500}
|
||||||
|
textAlign="start"
|
||||||
|
noWrap
|
||||||
|
style={{
|
||||||
|
opacity: 0.9,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{cardTitle}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
fontWeight={500}
|
||||||
|
noWrap
|
||||||
|
textAlign="start"
|
||||||
|
style={{ opacity: 0.8, flexShrink: 0 }}
|
||||||
|
>
|
||||||
|
{getRuntimeCompact(item.RunTimeTicks)}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
textAlign="start"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
display: "-webkit-box",
|
||||||
|
overflow: "hidden",
|
||||||
|
WebkitBoxOrient: "vertical",
|
||||||
|
WebkitLineClamp: 3,
|
||||||
|
}}
|
||||||
|
lineHeight="auto"
|
||||||
|
>
|
||||||
|
{cardCaption}
|
||||||
</Typography>
|
</Typography>
|
||||||
{!!itemTicks && (
|
</div>
|
||||||
<Typography
|
</div>
|
||||||
gutterBottom={false}
|
</MuiCard>
|
||||||
variant="h6"
|
</CardActionArea>
|
||||||
component="div"
|
|
||||||
color="white"
|
|
||||||
fontWeight={300}
|
|
||||||
textAlign="left"
|
|
||||||
noWrap
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
sx={{
|
|
||||||
opacity: 0.65,
|
|
||||||
flexShrink: 0,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{getRuntime(itemTicks)}
|
|
||||||
</Typography>
|
|
||||||
)}
|
|
||||||
</Box>
|
|
||||||
<Stack
|
|
||||||
alignItems="flex-start"
|
|
||||||
width="100%"
|
|
||||||
direction="row"
|
|
||||||
gap={1}
|
|
||||||
divider={
|
|
||||||
<Divider
|
|
||||||
flexItem
|
|
||||||
orientation="vertical"
|
|
||||||
variant="middle"
|
|
||||||
/>
|
|
||||||
}
|
|
||||||
mb={1}
|
|
||||||
>
|
|
||||||
{!!itemRating && (
|
|
||||||
<Typography
|
|
||||||
gutterBottom={false}
|
|
||||||
variant="subtitle1"
|
|
||||||
component="div"
|
|
||||||
color="white"
|
|
||||||
fontWeight={300}
|
|
||||||
textAlign="left"
|
|
||||||
noWrap
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
sx={{
|
|
||||||
opacity: 0.65,
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "flex-start",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<MdiStarHalfFull
|
|
||||||
sx={{
|
|
||||||
fontSize: "1.2em",
|
|
||||||
mr: "0.25em",
|
|
||||||
}}
|
|
||||||
/>{" "}
|
|
||||||
{Math.round(itemRating * 10) / 10}
|
|
||||||
</Typography>
|
|
||||||
)}
|
|
||||||
{!!itemTicks && (
|
|
||||||
<Typography
|
|
||||||
gutterBottom={false}
|
|
||||||
variant="subtitle1"
|
|
||||||
component="div"
|
|
||||||
color="white"
|
|
||||||
fontWeight={300}
|
|
||||||
textAlign="left"
|
|
||||||
noWrap
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
sx={{
|
|
||||||
opacity: 0.65,
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "flex-start",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{endsAt(itemTicks)}
|
|
||||||
</Typography>
|
|
||||||
)}
|
|
||||||
</Stack>
|
|
||||||
<Typography
|
|
||||||
gutterBottom
|
|
||||||
variant="body2"
|
|
||||||
component="div"
|
|
||||||
color="white"
|
|
||||||
textAlign="left"
|
|
||||||
width="fit-content"
|
|
||||||
maxWidth="100%"
|
|
||||||
sx={{
|
|
||||||
display: "-webkit-box",
|
|
||||||
overflow: "hidden",
|
|
||||||
WebkitBoxOrient: "vertical",
|
|
||||||
WebkitLineClamp: 3,
|
|
||||||
opacity: 0.45,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{subText}
|
|
||||||
</Typography>
|
|
||||||
</CardContent>
|
|
||||||
</CardActionArea>
|
|
||||||
</MuiCard>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
EpisodeCard.propTypes = {
|
|
||||||
itemName: PropTypes.string.isRequired,
|
|
||||||
itemId: PropTypes.string.isRequired,
|
|
||||||
imageTags: PropTypes.bool,
|
|
||||||
subText: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
|
|
||||||
playedPercent: PropTypes.number,
|
|
||||||
onClickEvent: PropTypes.func,
|
|
||||||
watchedStatus: PropTypes.bool,
|
|
||||||
blurhash: PropTypes.string,
|
|
||||||
currentUser: PropTypes.object,
|
|
||||||
favourite: PropTypes.bool,
|
|
||||||
showName: PropTypes.string,
|
|
||||||
episodeLocation: PropTypes.string,
|
|
||||||
itemTicks: PropTypes.number,
|
|
||||||
itemRating: PropTypes.number,
|
|
||||||
centerAlignText: PropTypes.bool,
|
|
||||||
parentId: PropTypes.any,
|
|
||||||
};
|
|
||||||
@@ -29,21 +29,25 @@ export const CardScroller = ({
|
|||||||
breakpoint: { max: 4000, min: 3000 },
|
breakpoint: { max: 4000, min: 3000 },
|
||||||
items: displayCards + 1,
|
items: displayCards + 1,
|
||||||
slidesToSlide: displayCards + 1,
|
slidesToSlide: displayCards + 1,
|
||||||
|
partialVisibilityGutter: 40,
|
||||||
},
|
},
|
||||||
desktop: {
|
desktop: {
|
||||||
breakpoint: { max: 3000, min: 625 },
|
breakpoint: { max: 3000, min: 625 },
|
||||||
items: displayCards,
|
items: displayCards,
|
||||||
slidesToSlide: displayCards, // optional, default to 1.
|
slidesToSlide: displayCards, // optional, default to 1.
|
||||||
|
partialVisibilityGutter: 30,
|
||||||
},
|
},
|
||||||
tablet: {
|
tablet: {
|
||||||
breakpoint: { max: 624, min: 464 },
|
breakpoint: { max: 624, min: 464 },
|
||||||
items: displayCards - 2,
|
items: displayCards - 2,
|
||||||
slidesToSlide: displayCards - 2, // optional, default to 1.
|
slidesToSlide: displayCards - 2, // optional, default to 1.
|
||||||
|
partialVisibilityGutter: 20,
|
||||||
},
|
},
|
||||||
mobile: {
|
mobile: {
|
||||||
breakpoint: { max: 464, min: 0 },
|
breakpoint: { max: 464, min: 0 },
|
||||||
items: displayCards - 5,
|
items: displayCards - 5,
|
||||||
slidesToSlide: displayCards - 5, // optional, default to 1.
|
slidesToSlide: displayCards - 5, // optional, default to 1.
|
||||||
|
partialVisibilityGutter: 10,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,7 +64,7 @@ export const CardScroller = ({
|
|||||||
}
|
}
|
||||||
>
|
>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h4"
|
variant="h5"
|
||||||
color="textPrimary"
|
color="textPrimary"
|
||||||
className="card-scroller-heading"
|
className="card-scroller-heading"
|
||||||
{...headingProps}
|
{...headingProps}
|
||||||
@@ -89,9 +93,9 @@ export const CardScroller = ({
|
|||||||
responsive={responsive}
|
responsive={responsive}
|
||||||
arrows={false}
|
arrows={false}
|
||||||
ref={(el) => setCarouselRef(el)}
|
ref={(el) => setCarouselRef(el)}
|
||||||
// customButtonGroup={<HomeSectionHeader />}
|
|
||||||
// renderButtonGroupOutside={true}
|
|
||||||
className="card-scroller"
|
className="card-scroller"
|
||||||
|
customTransition="all .6s"
|
||||||
|
transitionDuration={600}
|
||||||
>
|
>
|
||||||
{children}
|
{children}
|
||||||
</Carousel>
|
</Carousel>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@
|
|||||||
margin-bottom: 0.25em !important;
|
margin-bottom: 0.25em !important;
|
||||||
&-decoration {
|
&-decoration {
|
||||||
width: 0.75em;
|
width: 0.75em;
|
||||||
height: 3px;
|
height: 2px;
|
||||||
background: white;
|
background: white;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,44 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.carousel {
|
||||||
|
position: relative;
|
||||||
|
height: 100vh;
|
||||||
|
&-button {
|
||||||
|
position: absolute !important;
|
||||||
|
top: 50%;
|
||||||
|
transform: translateY(-50%);
|
||||||
|
z-index: 100;
|
||||||
|
&.right {
|
||||||
|
right: 0.5em;
|
||||||
|
}
|
||||||
|
&.left {
|
||||||
|
left: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-indicator {
|
||||||
|
height: 2px;
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 10px;
|
||||||
|
transition: background $transition-time-fast,
|
||||||
|
height $transition-time-fast;
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
height: 5px;
|
||||||
|
background: rgb(255 255 255 / 0.8) !important;
|
||||||
|
}
|
||||||
|
&-container {
|
||||||
|
display: flex;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 1em;
|
||||||
|
width: calc(100vw - 2em);
|
||||||
|
left: 1em;
|
||||||
|
right: 1em;
|
||||||
|
gap: 1em;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
&.active {
|
||||||
|
height: 5px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,145 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useEffect, useState } from "react";
|
||||||
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
import { MdiChevronLeft } from "../icons/mdiChevronLeft";
|
||||||
|
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||||
|
|
||||||
|
import "./carousel.scss";
|
||||||
|
import { useCarouselStore } from "../../utils/store/carousel";
|
||||||
|
|
||||||
|
const swipeConfidenceThreshold = 8000;
|
||||||
|
const swipePower = (offset, velocity) => {
|
||||||
|
return Math.abs(offset) * velocity;
|
||||||
|
};
|
||||||
|
|
||||||
|
const Carousel = ({ content, onChange }) => {
|
||||||
|
const [currentSlide, setCurrentSlide] = useState(0);
|
||||||
|
|
||||||
|
const [setDirection, dir] = useCarouselStore((state) => [
|
||||||
|
state.setDirection,
|
||||||
|
state.direction,
|
||||||
|
]);
|
||||||
|
useEffect(() => {
|
||||||
|
onChange(currentSlide);
|
||||||
|
}, [content[currentSlide].key]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="carousel">
|
||||||
|
<IconButton
|
||||||
|
className="carousel-button left"
|
||||||
|
onClick={() => {
|
||||||
|
if (currentSlide > 0) {
|
||||||
|
setDirection("left");
|
||||||
|
setCurrentSlide((init) => init - 1);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
sx={{
|
||||||
|
background: " rgb(200 200 200 / 0.05)",
|
||||||
|
}}
|
||||||
|
disabled={currentSlide == 0}
|
||||||
|
>
|
||||||
|
<MdiChevronLeft />
|
||||||
|
</IconButton>
|
||||||
|
<AnimatePresence>
|
||||||
|
<motion.div
|
||||||
|
key={currentSlide}
|
||||||
|
initial={{ opacity: 0 }}
|
||||||
|
animate={{ opacity: 1 }}
|
||||||
|
exit={{ opacity: 0 }}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
drag={"x"}
|
||||||
|
dragConstraints={{ left: 0, right: 0 }}
|
||||||
|
dragElastic={1}
|
||||||
|
onDragEnd={(e, { offset, velocity }) => {
|
||||||
|
const swipe = swipePower(offset.x, velocity.x);
|
||||||
|
if (
|
||||||
|
currentSlide != content.length - 1 &&
|
||||||
|
swipe < -swipeConfidenceThreshold
|
||||||
|
) {
|
||||||
|
setDirection("right");
|
||||||
|
setCurrentSlide((init) => init + 1);
|
||||||
|
} else if (
|
||||||
|
currentSlide != 0 &&
|
||||||
|
swipe > swipeConfidenceThreshold
|
||||||
|
) {
|
||||||
|
setDirection("left");
|
||||||
|
setCurrentSlide((init) => init - 1);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
height: "100vh",
|
||||||
|
width: "100vw",
|
||||||
|
position: "absolute",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{content[currentSlide]}
|
||||||
|
</motion.div>
|
||||||
|
</AnimatePresence>
|
||||||
|
<IconButton
|
||||||
|
className="carousel-button right"
|
||||||
|
onClick={() => {
|
||||||
|
if (currentSlide < content.length - 1) {
|
||||||
|
setDirection("right");
|
||||||
|
setCurrentSlide((init) => init + 1);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
disabled={currentSlide == content.length - 1}
|
||||||
|
sx={{
|
||||||
|
background: " rgb(200 200 200 / 0.05)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdiChevronRight />
|
||||||
|
</IconButton>
|
||||||
|
<div className="carousel-indicator-container">
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
currentSlide == 0
|
||||||
|
? "carousel-indicator active"
|
||||||
|
: "carousel-indicator"
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
background:
|
||||||
|
currentSlide == 0
|
||||||
|
? "white"
|
||||||
|
: "rgb(255 255 255 / 0.5)",
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
setDirection("left");
|
||||||
|
setCurrentSlide(0);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{content.map((item, index) => (
|
||||||
|
<div
|
||||||
|
className={
|
||||||
|
currentSlide == index + 1
|
||||||
|
? "carousel-indicator active"
|
||||||
|
: "carousel-indicator"
|
||||||
|
}
|
||||||
|
key={index}
|
||||||
|
style={{
|
||||||
|
background:
|
||||||
|
currentSlide == index + 1
|
||||||
|
? "white"
|
||||||
|
: "rgb(255 255 255 / 0.5)",
|
||||||
|
}}
|
||||||
|
onClick={() => {
|
||||||
|
if (currentSlide > index) {
|
||||||
|
setDirection("left");
|
||||||
|
} else if (currentSlide <= index) {
|
||||||
|
setDirection("right");
|
||||||
|
}
|
||||||
|
setCurrentSlide(index + 1);
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Carousel;
|
||||||
@@ -0,0 +1,329 @@
|
|||||||
|
/** @format */
|
||||||
|
import React, { memo } from "react";
|
||||||
|
import { Blurhash } from "react-blurhash";
|
||||||
|
|
||||||
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import Paper from "@mui/material/Paper";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Stack from "@mui/material/Stack";
|
||||||
|
import Chip from "@mui/material/Chip";
|
||||||
|
import Button from "@mui/material/Button";
|
||||||
|
|
||||||
|
import { yellow } from "@mui/material/colors";
|
||||||
|
import ErrorBoundary from "../errorBoundary";
|
||||||
|
|
||||||
|
import CarouselSlideError from "../errors/carousel";
|
||||||
|
import { MdiStar } from "../icons/mdiStar";
|
||||||
|
import { endsAt, getRuntime } from "../../utils/date/time";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
import { MediaTypeIconCollection } from "../utils/iconsCollection";
|
||||||
|
import { MdiChevronRight } from "../icons/mdiChevronRight";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import LikeButton from "../buttons/likeButton";
|
||||||
|
import MarkPlayedButton from "../buttons/markPlayedButton";
|
||||||
|
import { useCarouselStore } from "../../utils/store/carousel";
|
||||||
|
import PlayButton from "../buttons/playButton";
|
||||||
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
|
||||||
|
const availableSpecialRoutes = [
|
||||||
|
BaseItemKind.Series,
|
||||||
|
BaseItemKind.BoxSet,
|
||||||
|
BaseItemKind.MusicAlbum,
|
||||||
|
];
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Props
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Carousel slide component
|
||||||
|
* @param {Props}
|
||||||
|
* @returns {React.Component}
|
||||||
|
*/
|
||||||
|
const CarouselSlide = ({ item }) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const handleMoreInfo = () => {
|
||||||
|
if (availableSpecialRoutes.includes(item.Type)) {
|
||||||
|
navigate(`/${item.Type.toLocaleLowerCase()}/${item.Id}`);
|
||||||
|
} else if (!!item.Role) {
|
||||||
|
navigate(`/person/${item.Id}`);
|
||||||
|
} else {
|
||||||
|
navigate(`/item/${item.Id}`);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const [animationDirection] = useCarouselStore((state) => [
|
||||||
|
state.direction,
|
||||||
|
]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<ErrorBoundary fallback={<CarouselSlideError itemName={item.Name} />}>
|
||||||
|
<Paper
|
||||||
|
className="hero-carousel-slide"
|
||||||
|
sx={{
|
||||||
|
background: "transparent",
|
||||||
|
px: 3,
|
||||||
|
boxShadow: "none !important",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="hero-carousel-background-container">
|
||||||
|
{!!item.ImageBlurHashes.Backdrop && (
|
||||||
|
<>
|
||||||
|
{Object.keys(item.ImageBlurHashes.Backdrop)
|
||||||
|
.length != 0 && (
|
||||||
|
<Blurhash
|
||||||
|
hash={
|
||||||
|
item.ImageBlurHashes.Backdrop[
|
||||||
|
Object.keys(
|
||||||
|
item.ImageBlurHashes
|
||||||
|
.Backdrop,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
// hash="LEHV6nWB2yk8pyo0adR*.7kCMdnj"
|
||||||
|
width="1080"
|
||||||
|
height="720"
|
||||||
|
resolutionX={64}
|
||||||
|
resolutionY={96}
|
||||||
|
className="hero-carousel-background-blurhash"
|
||||||
|
punch={1}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<img
|
||||||
|
className="hero-carousel-background-image"
|
||||||
|
src={
|
||||||
|
!!item.ParentBackdropItemId
|
||||||
|
? `${window.api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.Id}/Images/Backdrop`
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
onLoad={(e) =>
|
||||||
|
(e.target.style.opacity = 1)
|
||||||
|
}
|
||||||
|
loading="eager"
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<div className="hero-carousel-background-icon-container">
|
||||||
|
{MediaTypeIconCollection[item.Type]}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<motion.div
|
||||||
|
initial={{
|
||||||
|
transform:
|
||||||
|
animationDirection == "right"
|
||||||
|
? "translateX(40px)"
|
||||||
|
: "translateX(-40px)",
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
transform: "translateX(0px)",
|
||||||
|
opacity: 1,
|
||||||
|
}}
|
||||||
|
exit={{
|
||||||
|
transform:
|
||||||
|
animationDirection == "right"
|
||||||
|
? "translateX(-40px)"
|
||||||
|
: "translateX(40px)",
|
||||||
|
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.25,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
className="hero-carousel-detail"
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
key={item.Id}
|
||||||
|
variant="h2"
|
||||||
|
className="hero-carousel-text"
|
||||||
|
sx={{
|
||||||
|
mb: 2.5,
|
||||||
|
}}
|
||||||
|
overflow="visible"
|
||||||
|
>
|
||||||
|
{!item.ImageTags.Logo ? (
|
||||||
|
item.Name
|
||||||
|
) : (
|
||||||
|
<img
|
||||||
|
className="hero-carousel-text-logo"
|
||||||
|
src={
|
||||||
|
window.api.basePath +
|
||||||
|
"/Items/" +
|
||||||
|
item.Id +
|
||||||
|
"/Images/Logo?quality=80&tag=" +
|
||||||
|
item.ImageTags.Logo
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
opacity: 0,
|
||||||
|
transition: "opacity 0.2s",
|
||||||
|
}}
|
||||||
|
onLoad={(e) =>
|
||||||
|
(e.target.style.opacity = 1)
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={1}
|
||||||
|
divider={
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "4px",
|
||||||
|
height: "4px",
|
||||||
|
background: "white",
|
||||||
|
alignSelf: "center",
|
||||||
|
aspectRatio: 1,
|
||||||
|
borderRadius: "10px",
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
}
|
||||||
|
className="hero-carousel-info"
|
||||||
|
>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{!!item.ProductionYear
|
||||||
|
? item.ProductionYear
|
||||||
|
: "Unknown"}
|
||||||
|
</Typography>
|
||||||
|
<Chip
|
||||||
|
variant="filled"
|
||||||
|
label={item.OfficialRating ?? "Not Rated"}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.25em",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
className="hero-carousel-info-rating"
|
||||||
|
>
|
||||||
|
{!!item.CommunityRating ? (
|
||||||
|
<>
|
||||||
|
<MdiStar
|
||||||
|
sx={{
|
||||||
|
color: yellow[700],
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{Math.round(
|
||||||
|
item.CommunityRating *
|
||||||
|
10,
|
||||||
|
) / 10}
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
No Community Rating
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{!!item.RunTimeTicks && (
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{getRuntime(item.RunTimeTicks)}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
{!!item.RunTimeTicks && (
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{endsAt(item.RunTimeTicks)}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
className="hero-carousel-text"
|
||||||
|
sx={{
|
||||||
|
display: "-webkit-box",
|
||||||
|
maxWidth: "70%",
|
||||||
|
maxHeight: "50%",
|
||||||
|
textOverflow: "ellipsis",
|
||||||
|
overflow: "hidden",
|
||||||
|
WebkitLineClamp: "4",
|
||||||
|
WebkitBoxOrient: "vertical",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.Overview}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
|
{/* TODO Link PLay and More info buttons in carousel */}
|
||||||
|
<Stack
|
||||||
|
mt={3}
|
||||||
|
direction="row"
|
||||||
|
gap={3}
|
||||||
|
width="100%"
|
||||||
|
className="hero-carousel-button-container"
|
||||||
|
alignItems="center"
|
||||||
|
>
|
||||||
|
<PlayButton
|
||||||
|
itemId={item.Id}
|
||||||
|
userId={user.data.Id}
|
||||||
|
itemType={item.Type}
|
||||||
|
currentAudioTrack={0}
|
||||||
|
currentSubTrack={0}
|
||||||
|
currentVideoTrack={0}
|
||||||
|
buttonProps={{
|
||||||
|
size: "large",
|
||||||
|
}}
|
||||||
|
itemUserData={item.UserData}
|
||||||
|
audio={
|
||||||
|
item.Type == BaseItemKind.MusicAlbum ||
|
||||||
|
item.Type == BaseItemKind.Audio ||
|
||||||
|
item.Type == BaseItemKind.AudioBook ||
|
||||||
|
item.Type == BaseItemKind.Playlist
|
||||||
|
}
|
||||||
|
playlistItem={
|
||||||
|
item.Type == BaseItemKind.Playlist
|
||||||
|
}
|
||||||
|
playlistItemId={item.Id}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Button
|
||||||
|
size="large"
|
||||||
|
color="white"
|
||||||
|
variant="outlined"
|
||||||
|
endIcon={<MdiChevronRight />}
|
||||||
|
onClick={handleMoreInfo}
|
||||||
|
>
|
||||||
|
More info
|
||||||
|
</Button>
|
||||||
|
<Stack direction="row" gap={1}>
|
||||||
|
<LikeButton
|
||||||
|
itemId={item.Id}
|
||||||
|
queryKey={["home", "latestMedia"]}
|
||||||
|
userId={user.data.Id}
|
||||||
|
isFavorite={item.UserData.IsFavorite}
|
||||||
|
itemName={item.Name}
|
||||||
|
/>
|
||||||
|
<MarkPlayedButton
|
||||||
|
itemId={item.Id}
|
||||||
|
queryKey={["home", "latestMedia"]}
|
||||||
|
userId={user.data.Id}
|
||||||
|
isPlayed={item.UserData.Played}
|
||||||
|
itemName={item.Name}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
|
</Stack>
|
||||||
|
</motion.div>
|
||||||
|
</Paper>
|
||||||
|
</ErrorBoundary>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default memo(CarouselSlide);
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
/** @format */
|
||||||
|
import React from "react";
|
||||||
|
class ErrorBoundary extends React.Component {
|
||||||
|
constructor(props) {
|
||||||
|
super(props);
|
||||||
|
this.state = { hasError: false };
|
||||||
|
}
|
||||||
|
|
||||||
|
static getDerivedStateFromError(error) {
|
||||||
|
// Update state so the next render will show the fallback UI.
|
||||||
|
return { hasError: true };
|
||||||
|
}
|
||||||
|
|
||||||
|
componentDidCatch(error, info) {
|
||||||
|
// Example "componentStack":
|
||||||
|
// in ComponentThatThrows (created by App)
|
||||||
|
// in ErrorBoundary (created by App)
|
||||||
|
// in div (created by App)
|
||||||
|
// in App
|
||||||
|
logErrorToMyService(error, info.componentStack);
|
||||||
|
}
|
||||||
|
|
||||||
|
render() {
|
||||||
|
if (this.state.hasError) {
|
||||||
|
// You can render any custom fallback UI
|
||||||
|
return this.props.fallback;
|
||||||
|
}
|
||||||
|
|
||||||
|
return this.props.children;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
export default ErrorBoundary;
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import Paper from "@mui/material/Paper";
|
||||||
|
import Stack from "@mui/material/Stack";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { MdiEmoticonDead } from "../icons/mdiEmoticonDead";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
|
||||||
|
import { red } from "@mui/material/colors";
|
||||||
|
|
||||||
|
import slideBackground from "../../assets/errorbg.png";
|
||||||
|
|
||||||
|
const CarouselSlideError = ({ itemName }) => {
|
||||||
|
return (
|
||||||
|
<Paper className="hero-carousel-slide">
|
||||||
|
<Stack
|
||||||
|
justifyContent="center"
|
||||||
|
alignItems="center"
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
background: `url(${slideBackground})`,
|
||||||
|
backgroundSize: "cover",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdiEmoticonDead
|
||||||
|
sx={{ fontSize: "10em", opacity: "0.8" }}
|
||||||
|
/>
|
||||||
|
<Typography mb={2} variant="h4" sx={{ opacity: "0.5" }}>
|
||||||
|
Error caused by
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
mt={2}
|
||||||
|
variant="h3"
|
||||||
|
sx={{
|
||||||
|
background: "rgb(255 255 255 /0.1)",
|
||||||
|
padding: 1,
|
||||||
|
borderRadius: 3,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{itemName}
|
||||||
|
</Typography>
|
||||||
|
</Stack>
|
||||||
|
</Paper>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default CarouselSlideError;
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiCogSync } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiCogSync = (props) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon {...props}>
|
||||||
|
<path d={mdiCogSync}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiFilmstripBoxMultiple } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiFilmstripBoxMultiple = (props) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon {...props}>
|
||||||
|
<path d={mdiFilmstripBoxMultiple}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiSkipNext } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiSkipNext = (props) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon {...props}>
|
||||||
|
<path d={mdiSkipNext}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
import SvgIcon from "@mui/material/SvgIcon";
|
||||||
|
|
||||||
|
import { mdiSkipPrevious } from "@mdi/js";
|
||||||
|
|
||||||
|
export const MdiSkipPrevious = (props) => {
|
||||||
|
return (
|
||||||
|
<SvgIcon {...props}>
|
||||||
|
<path d={mdiSkipPrevious}></path>
|
||||||
|
</SvgIcon>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -1,11 +1,29 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
|
|
||||||
.album {
|
.album {
|
||||||
&-image-icon {
|
&-image {
|
||||||
fill: url(#clr-gradient-default) !important;
|
aspect-ratio: 1;
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
width: 12em;
|
||||||
|
box-shadow: 0 0 10px rgb(0 0 0 /0.2);
|
||||||
|
position: relative;
|
||||||
|
height: 12em;
|
||||||
|
&-icon {
|
||||||
|
fill: url(#clr-gradient-default) !important;
|
||||||
|
|
||||||
&-container {
|
&-container {
|
||||||
background: $clr-gradient-dark;
|
background: $clr-gradient-dark;
|
||||||
|
position: absolute;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -29,6 +29,9 @@ import { MdiHeartOutline } from "../../icons/mdiHeartOutline";
|
|||||||
import { MdiAlbum } from "../../icons/mdiAlbum";
|
import { MdiAlbum } from "../../icons/mdiAlbum";
|
||||||
|
|
||||||
import "./albumArtist.scss";
|
import "./albumArtist.scss";
|
||||||
|
import { useAudioPlayback } from "../../../utils/store/audioPlayback";
|
||||||
|
import LikeButton from "../../buttons/likeButton";
|
||||||
|
import { SortOrder } from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
|
||||||
export const ArtistAlbum = ({ user, album, boxProps }) => {
|
export const ArtistAlbum = ({ user, album, boxProps }) => {
|
||||||
const albumTracks = useQuery({
|
const albumTracks = useQuery({
|
||||||
@@ -37,9 +40,12 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
const result = await getItemsApi(window.api).getItems({
|
const result = await getItemsApi(window.api).getItems({
|
||||||
userId: user.Id,
|
userId: user.Id,
|
||||||
parentId: album.Id,
|
parentId: album.Id,
|
||||||
|
sortOrder: SortOrder.Ascending,
|
||||||
|
sortBy: "IndexNumber",
|
||||||
});
|
});
|
||||||
return result.data;
|
return result.data;
|
||||||
},
|
},
|
||||||
|
|
||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -61,22 +67,43 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
|
|
||||||
const [imgLoaded, setImgLoaded] = useState(false);
|
const [imgLoaded, setImgLoaded] = useState(false);
|
||||||
|
|
||||||
|
const [
|
||||||
|
currentTrackItem,
|
||||||
|
setCurrentAudioTrack,
|
||||||
|
setAudioUrl,
|
||||||
|
setAudioDisplay,
|
||||||
|
setAudioItem,
|
||||||
|
setAudioTracks,
|
||||||
|
] = useAudioPlayback((state) => [
|
||||||
|
state.item,
|
||||||
|
state.setCurrentTrack,
|
||||||
|
state.setUrl,
|
||||||
|
state.setDisplay,
|
||||||
|
state.setItem,
|
||||||
|
state.setTracks,
|
||||||
|
]);
|
||||||
|
const playTrack = (index) => {
|
||||||
|
setAudioTracks(albumTracks.data.Items);
|
||||||
|
setCurrentAudioTrack(index);
|
||||||
|
setAudioUrl(
|
||||||
|
`${window.api.basePath}/Audio/${albumTracks.data.Items[index].Id}/universal?deviceId=${window.api.deviceInfo.id}&userId=${user.Id}&api_key=${window.api.accessToken}`,
|
||||||
|
);
|
||||||
|
setAudioItem(albumTracks.data.Items[index]);
|
||||||
|
setAudioDisplay(true);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box sx={{ mb: 6 }} {...boxProps}>
|
<div style={{ marginBottom: "3em" }} {...boxProps}>
|
||||||
<Stack direction="row" gap={3} mb={3}>
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "row",
|
||||||
|
gap: "1em",
|
||||||
|
marginBottom: "1em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
{!!album.ImageTags?.Primary && (
|
{!!album.ImageTags?.Primary && (
|
||||||
<Box
|
<div className="album-image">
|
||||||
className="album-image"
|
|
||||||
sx={{
|
|
||||||
aspectRatio: 1,
|
|
||||||
borderRadius: "10px",
|
|
||||||
overflow: "hidden",
|
|
||||||
width: "12em",
|
|
||||||
boxShadow: "0 0 10px rgb(0 0 0 /0.2)",
|
|
||||||
position: "relative",
|
|
||||||
height: "12em",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<img
|
<img
|
||||||
src={`${window.api.basePath}/Items/${album.Id}/Images/Primary?fillHeight=532&fillWidth=532&quality=96`}
|
src={`${window.api.basePath}/Items/${album.Id}/Images/Primary?fillHeight=532&fillWidth=532&quality=96`}
|
||||||
style={{
|
style={{
|
||||||
@@ -90,37 +117,24 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
}}
|
}}
|
||||||
onLoad={() => setImgLoaded(true)}
|
onLoad={() => setImgLoaded(true)}
|
||||||
/>
|
/>
|
||||||
<Box
|
<div className="album-image-icon-container">
|
||||||
className="album-image-icon-container"
|
|
||||||
sx={{
|
|
||||||
position: "absolute",
|
|
||||||
width: "100%",
|
|
||||||
height: "100%",
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
display: "flex",
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
zIndex: 1,
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<MdiAlbum
|
<MdiAlbum
|
||||||
className="album-image-icon"
|
className="album-image-icon"
|
||||||
sx={{ fontSize: "6em" }}
|
sx={{ fontSize: "6em" }}
|
||||||
/>
|
/>
|
||||||
</Box>
|
</div>
|
||||||
</Box>
|
</div>
|
||||||
)}
|
)}
|
||||||
<Stack>
|
<Stack>
|
||||||
<Typography
|
<Typography
|
||||||
variant="h5"
|
variant="h5"
|
||||||
sx={{ opacity: `0.7`, mb: 1 }}
|
style={{ opacity: `0.6`, mb: 1 }}
|
||||||
>
|
>
|
||||||
{album.ProductionYear}
|
{album.ProductionYear}
|
||||||
</Typography>
|
</Typography>
|
||||||
<MuiLink
|
<MuiLink
|
||||||
component={Link}
|
component={Link}
|
||||||
to={`/item/${album.Id}`}
|
to={`/musicalbum/${album.Id}`}
|
||||||
variant="h3"
|
variant="h3"
|
||||||
color="inherit"
|
color="inherit"
|
||||||
underline="hover"
|
underline="hover"
|
||||||
@@ -128,110 +142,132 @@ export const ArtistAlbum = ({ user, album, boxProps }) => {
|
|||||||
{album.Name}
|
{album.Name}
|
||||||
</MuiLink>
|
</MuiLink>
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</div>
|
||||||
|
|
||||||
<TableContainer
|
{albumTracks.isSuccess && (
|
||||||
component={Paper}
|
<Paper
|
||||||
sx={{ mb: 2, borderRadius: "15px" }}
|
className="item-detail-album-tracks"
|
||||||
>
|
style={{
|
||||||
<Table>
|
marginBottom: "1.2em",
|
||||||
<TableHead
|
}}
|
||||||
sx={{
|
>
|
||||||
mb: 1,
|
<div
|
||||||
|
key={0}
|
||||||
|
className="item-detail-album-track"
|
||||||
|
style={{
|
||||||
|
padding: "0.75em 0 ",
|
||||||
|
background: "rgb(255 255 255 / 0.1)",
|
||||||
|
boxShadow: "0 0 10px rgb(0 0 0 / 0.5)",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TableRow>
|
<Typography
|
||||||
<TableCell
|
variant="h6"
|
||||||
sx={{
|
fontWeight={400}
|
||||||
maxWidth: 120,
|
style={{
|
||||||
width: 20,
|
justifySelf: "end",
|
||||||
}}
|
}}
|
||||||
|
>
|
||||||
|
#
|
||||||
|
</Typography>
|
||||||
|
<div></div>
|
||||||
|
<Typography
|
||||||
|
variant="h6"
|
||||||
|
style={{
|
||||||
|
justifySelf: "start",
|
||||||
|
}}
|
||||||
|
fontWeight={400}
|
||||||
|
>
|
||||||
|
Name
|
||||||
|
</Typography>
|
||||||
|
<MdiClockOutline />
|
||||||
|
</div>
|
||||||
|
{albumTracks.data.Items.map((track, index) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={track.Id}
|
||||||
|
className={
|
||||||
|
currentTrackItem.Id == track.Id &&
|
||||||
|
currentTrackItem.ParentId ==
|
||||||
|
track.ParentId
|
||||||
|
? "item-detail-album-track playing"
|
||||||
|
: "item-detail-album-track"
|
||||||
|
}
|
||||||
|
onClick={() => playTrack(index)}
|
||||||
>
|
>
|
||||||
<Typography variant="h6">#</Typography>
|
<Typography
|
||||||
</TableCell>
|
variant="subtitle1"
|
||||||
<TableCell sx={{ width: 20 }}></TableCell>
|
style={{
|
||||||
<TableCell>
|
justifySelf: "end",
|
||||||
<Typography variant="h6">
|
}}
|
||||||
Name
|
>
|
||||||
|
{!!track.IndexNumber
|
||||||
|
? track.IndexNumber
|
||||||
|
: "-"}
|
||||||
</Typography>
|
</Typography>
|
||||||
</TableCell>
|
|
||||||
<TableCell>
|
<LikeButton
|
||||||
<Typography variant="h6" align="right">
|
itemId={track.Id}
|
||||||
<MdiClockOutline />
|
isFavorite={
|
||||||
</Typography>
|
track.UserData?.IsFavorite
|
||||||
</TableCell>
|
}
|
||||||
</TableRow>
|
queryKey={[
|
||||||
</TableHead>
|
"artist",
|
||||||
<TableBody>
|
"album",
|
||||||
{albumTracks.isSuccess &&
|
album.Id,
|
||||||
albumTracks.data.Items.map(
|
]}
|
||||||
(mitem, mindex) => {
|
userId={user.Id}
|
||||||
return (
|
itemName={track.Name}
|
||||||
<TableRow
|
color={
|
||||||
key={mindex}
|
currentTrackItem.Id ==
|
||||||
sx={{
|
track.Id &&
|
||||||
"&:last-child td, &:last-child th":
|
currentTrackItem.ParentId ==
|
||||||
{
|
track.ParentId
|
||||||
border: 0,
|
? "hsl(337, 96%, 56%)"
|
||||||
},
|
: "white"
|
||||||
"&:hover": {
|
}
|
||||||
background:
|
/>
|
||||||
"rgb(255 255 255 / 0.05)",
|
|
||||||
},
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
justifySelf: "start",
|
||||||
|
}}
|
||||||
|
fontWeight={500}
|
||||||
|
>
|
||||||
|
{track.Name}
|
||||||
|
</Typography>
|
||||||
|
{track.AlbumArtist ==
|
||||||
|
"Various Artists" && (
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<TableCell
|
{track.ArtistItems.map(
|
||||||
sx={{
|
(artist) =>
|
||||||
maxWidth: 120,
|
artist.Name,
|
||||||
width: 20,
|
).join(", ")}
|
||||||
}}
|
</Typography>
|
||||||
>
|
)}
|
||||||
<Typography variant="body1">
|
</div>
|
||||||
{
|
<Typography variant="subtitle1">
|
||||||
mitem.IndexNumber
|
{getRuntimeMusic(
|
||||||
}
|
track.RunTimeTicks,
|
||||||
</Typography>
|
)}
|
||||||
</TableCell>
|
</Typography>
|
||||||
<TableCell
|
</div>
|
||||||
sx={{
|
);
|
||||||
width: 20,
|
})}
|
||||||
}}
|
</Paper>
|
||||||
align="center"
|
)}
|
||||||
>
|
</div>
|
||||||
<IconButton
|
|
||||||
onClick={() =>
|
|
||||||
handleLikingTrack(
|
|
||||||
mitem,
|
|
||||||
)
|
|
||||||
}
|
|
||||||
>
|
|
||||||
{mitem.UserData
|
|
||||||
.IsFavorite ? (
|
|
||||||
<MdiHeart />
|
|
||||||
) : (
|
|
||||||
<MdiHeartOutline />
|
|
||||||
)}
|
|
||||||
</IconButton>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell>
|
|
||||||
<Typography variant="body1">
|
|
||||||
{mitem.Name}
|
|
||||||
</Typography>
|
|
||||||
</TableCell>
|
|
||||||
<TableCell align="right">
|
|
||||||
<Typography variant="body1">
|
|
||||||
{getRuntimeMusic(
|
|
||||||
mitem.RunTimeTicks,
|
|
||||||
)}
|
|
||||||
</Typography>
|
|
||||||
</TableCell>
|
|
||||||
</TableRow>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
)}
|
|
||||||
</TableBody>
|
|
||||||
</Table>
|
|
||||||
</TableContainer>
|
|
||||||
</Box>
|
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
|
|
||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery } from "@tanstack/react-query";
|
||||||
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
import { CardScroller } from "../../cardScroller/cardScroller";
|
||||||
import { Card } from "../../components/card/card";
|
import { Card } from "../../card/card";
|
||||||
import { CardsSkeleton } from "../skeleton/cards";
|
import { CardsSkeleton } from "../../skeleton/cards";
|
||||||
|
|
||||||
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
@@ -11,7 +11,7 @@ import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
|
|||||||
|
|
||||||
export const LatestMediaSection = ({ latestMediaLib }) => {
|
export const LatestMediaSection = ({ latestMediaLib }) => {
|
||||||
const user = useQuery({
|
const user = useQuery({
|
||||||
queryKey: ["home", "user"],
|
queryKey: ["user"],
|
||||||
queryFn: async () => {
|
queryFn: async () => {
|
||||||
let usr = await getUserApi(window.api).getCurrentUser();
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
return usr.data;
|
return usr.data;
|
||||||
@@ -45,52 +45,52 @@ export const LatestMediaSection = ({ latestMediaLib }) => {
|
|||||||
{data.data.map((item, index) => {
|
{data.data.map((item, index) => {
|
||||||
return (
|
return (
|
||||||
<Card
|
<Card
|
||||||
key={index}
|
key={item.Id}
|
||||||
itemName={
|
item={item}
|
||||||
!!item.SeriesId
|
seriesId={item.SeriesId}
|
||||||
|
cardTitle={
|
||||||
|
item.Type == BaseItemKind.Episode
|
||||||
? item.SeriesName
|
? item.SeriesName
|
||||||
: item.Name
|
: item.Name
|
||||||
}
|
}
|
||||||
itemId={
|
imageType={"Primary"}
|
||||||
!!item.SeriesId
|
cardCaption={
|
||||||
? item.SeriesId
|
item.Type == BaseItemKind.Episode
|
||||||
: item.Id
|
? `S${item.ParentIndexNumber}:E${item.IndexNumber} - ${item.Name}`
|
||||||
|
: item.Type == BaseItemKind.Series
|
||||||
|
? `${item.ProductionYear} - ${
|
||||||
|
!!item.EndDate
|
||||||
|
? new Date(
|
||||||
|
item.EndDate,
|
||||||
|
).toLocaleString(
|
||||||
|
[],
|
||||||
|
{
|
||||||
|
year: "numeric",
|
||||||
|
},
|
||||||
|
)
|
||||||
|
: "Present"
|
||||||
|
}`
|
||||||
|
: item.ProductionYear
|
||||||
}
|
}
|
||||||
// imageTags={false}
|
cardType={
|
||||||
imageTags={!!item.ImageTags.Primary}
|
item.Type == BaseItemKind.MusicAlbum ||
|
||||||
iconType={item.Type}
|
|
||||||
subText={item.ProductionYear}
|
|
||||||
playedPercent={
|
|
||||||
item.UserData.PlayedPercentage
|
|
||||||
}
|
|
||||||
cardOrientation={
|
|
||||||
item.PrimaryImageAspectRatio == 1
|
|
||||||
? "sqaure"
|
|
||||||
: "portait"
|
|
||||||
}
|
|
||||||
watchedStatus={
|
|
||||||
item.Type == BaseItemKind.Audio
|
item.Type == BaseItemKind.Audio
|
||||||
? false
|
? "square"
|
||||||
: item.UserData.Played
|
: "portrait"
|
||||||
}
|
}
|
||||||
watchedCount={
|
queryKey={[
|
||||||
item.UserData.UnplayedItemCount
|
"homeSection, latestMedia",
|
||||||
|
latestMediaLib,
|
||||||
|
]}
|
||||||
|
userId={user.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
!!item.ImageBlurHashes?.Primary &&
|
||||||
|
item.ImageBlurHashes?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
item.ImageBlurHashes.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
}
|
}
|
||||||
blurhash={
|
|
||||||
item.ImageBlurHashes == {}
|
|
||||||
? ""
|
|
||||||
: !!item.ImageTags.Primary
|
|
||||||
? !!item.ImageBlurHashes.Primary
|
|
||||||
? item.ImageBlurHashes
|
|
||||||
.Primary[
|
|
||||||
item.ImageTags
|
|
||||||
.Primary
|
|
||||||
]
|
|
||||||
: ""
|
|
||||||
: ""
|
|
||||||
}
|
|
||||||
currentUser={user.data}
|
|
||||||
favourite={item.UserData.IsFavorite}
|
|
||||||
></Card>
|
></Card>
|
||||||
);
|
);
|
||||||
})}
|
})}
|
||||||
@@ -0,0 +1,722 @@
|
|||||||
|
/** @format */
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import React, { useEffect, useState } from "react";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import Chip from "@mui/material/Chip";
|
||||||
|
import Stack from "@mui/material/Stack";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
|
||||||
|
// import { BaseItemDto } from "";
|
||||||
|
// import { BaseItemPerson } from "@jellyfin/sdk/lib/generated-client/models/base-item-person";
|
||||||
|
import { BaseItemKind } from "@jellyfin/sdk/lib/generated-client/models/base-item-kind";
|
||||||
|
import { MediaStreamType } from "@jellyfin/sdk/lib/generated-client/models/media-stream-type";
|
||||||
|
|
||||||
|
import { Card } from "../../card/card";
|
||||||
|
import { MdiStar } from "../../icons/mdiStar";
|
||||||
|
import { yellow } from "@mui/material/colors";
|
||||||
|
import { endsAt, getRuntime, getRuntimeFull } from "../../../utils/date/time";
|
||||||
|
import LikeButton from "../../buttons/likeButton";
|
||||||
|
import MarkPlayedButton from "../../buttons/markPlayedButton";
|
||||||
|
import PlayButton from "../../buttons/playButton";
|
||||||
|
|
||||||
|
import "./hero.module.scss";
|
||||||
|
import { Blurhash } from "react-blurhash";
|
||||||
|
import TextLink from "../../textLink";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Props
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
|
||||||
|
* @property {Array} queryKey
|
||||||
|
* @property {string} userId
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemPerson[]} writers
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemPerson[]} directors
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemPerson[]} artists
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").NameGuidPair[]} studios
|
||||||
|
* @property {bool} disableInfoStrip
|
||||||
|
* @property {bool} disablePlayButton
|
||||||
|
* @property {bool} disableLikeButton
|
||||||
|
* @property {bool} disableMarkAsPlayedButton
|
||||||
|
* @property {string} albumBy
|
||||||
|
* @property {bool} audioPlayButton
|
||||||
|
* @property {bool} favourParentImg
|
||||||
|
* @property {"portrait"| "thumb"| 'square'} cardType
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Hero section for item pages
|
||||||
|
* @param {Props}
|
||||||
|
* @returns {React.Component}
|
||||||
|
*/
|
||||||
|
const Hero = ({
|
||||||
|
item,
|
||||||
|
queryKey,
|
||||||
|
userId,
|
||||||
|
writers = [],
|
||||||
|
directors = [],
|
||||||
|
artists = [],
|
||||||
|
studios = [],
|
||||||
|
disableInfoStrip,
|
||||||
|
disablePlayButton,
|
||||||
|
disableLikeButton,
|
||||||
|
disableMarkAsPlayedButton,
|
||||||
|
albumBy,
|
||||||
|
audioPlayButton = false,
|
||||||
|
favourParentImg = true,
|
||||||
|
isEpisode = false,
|
||||||
|
cardType = "portrait",
|
||||||
|
}) => {
|
||||||
|
const filterMediaStreamVideo = (source) => {
|
||||||
|
if (source.Type == MediaStreamType.Video) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
const filterMediaStreamAudio = (source) => {
|
||||||
|
if (source.Type == MediaStreamType.Audio) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
const filterMediaStreamSubtitle = (source) => {
|
||||||
|
if (source.Type == MediaStreamType.Subtitle) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
const videoTracks = item.MediaStreams?.filter(filterMediaStreamVideo);
|
||||||
|
const audioTracks = item.MediaStreams?.filter(filterMediaStreamAudio);
|
||||||
|
const subtitleTracks = item.MediaStreams?.filter(
|
||||||
|
filterMediaStreamSubtitle,
|
||||||
|
);
|
||||||
|
|
||||||
|
const [currentVideoIndex, setCurrentVideoIndex] = useState(0);
|
||||||
|
const [currentAudioIndex, setCurrentAudioIndex] = useState(0);
|
||||||
|
const [currentSubtitleIndex, setCurrentSubtitleIndex] = useState(0);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (!!videoTracks && !!audioTracks & !!subtitleTracks) {
|
||||||
|
setCurrentVideoIndex(videoTracks[0]?.Index);
|
||||||
|
setCurrentAudioIndex(audioTracks[0]?.Index);
|
||||||
|
setCurrentSubtitleIndex(subtitleTracks[0]?.Index);
|
||||||
|
}
|
||||||
|
}, [videoTracks, audioTracks, subtitleTracks]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="item-detail-hero hero"
|
||||||
|
style={{
|
||||||
|
marginBottom: "2em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div className="hero-backdrop">
|
||||||
|
{!!item.ImageBlurHashes.Backdrop && (
|
||||||
|
<>
|
||||||
|
{Object.keys(item.ImageBlurHashes.Backdrop)
|
||||||
|
.length != 0 && (
|
||||||
|
<Blurhash
|
||||||
|
hash={
|
||||||
|
item.ImageBlurHashes.Backdrop[
|
||||||
|
Object.keys(
|
||||||
|
item.ImageBlurHashes
|
||||||
|
.Backdrop,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
width="1080"
|
||||||
|
height="720"
|
||||||
|
resolutionX={64}
|
||||||
|
resolutionY={96}
|
||||||
|
className="hero-backdrop-blurhash"
|
||||||
|
punch={1}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
<img
|
||||||
|
className="hero-backdrop-image"
|
||||||
|
src={
|
||||||
|
!!item.ParentBackdropItemId
|
||||||
|
? `${window.api.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.Id}/Images/Backdrop`
|
||||||
|
}
|
||||||
|
style={{
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||||
|
loading="eager"
|
||||||
|
/>
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
<div className="hero-backdrop-icon-container"></div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
className="item-detail-hero-info-container"
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div>
|
||||||
|
<div className="item-name">
|
||||||
|
{isEpisode ? (
|
||||||
|
<>
|
||||||
|
<TextLink
|
||||||
|
variant="h2"
|
||||||
|
location={`/series/${item.SeriesId}`}
|
||||||
|
otherProps={{
|
||||||
|
fontWeight: 300,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{!!item.ParentLogoImageTag ? (
|
||||||
|
<img
|
||||||
|
src={`${window.api.basePath}/Items/${item.SeriesId}/Images/Logo`}
|
||||||
|
className="hero-name-logo"
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
item.SeriesName
|
||||||
|
)}
|
||||||
|
</TextLink>
|
||||||
|
<Typography
|
||||||
|
variant="h3"
|
||||||
|
fontWeight={300}
|
||||||
|
>
|
||||||
|
{`S${item.ParentIndexNumber}:E${item.IndexNumber} ${item.Name}`}
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<Typography variant="h2" fontWeight={300}>
|
||||||
|
{!!item.ImageTags.Logo ? (
|
||||||
|
<img
|
||||||
|
src={
|
||||||
|
!!item.SeriesId
|
||||||
|
? `${window.api.basePath}/Items/${item.SeriesId}/Images/Logo`
|
||||||
|
: `${window.api.basePath}/Items/${item.Id}/Images/Logo`
|
||||||
|
}
|
||||||
|
className="hero-name-logo"
|
||||||
|
onLoad={(e) => {
|
||||||
|
e.target.style.opacity = 1;
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
item.Name
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
{!!albumBy && (
|
||||||
|
<TextLink
|
||||||
|
variant="h6"
|
||||||
|
location={`/artist/${albumBy.Id}`}
|
||||||
|
otherProps={{
|
||||||
|
fontWeight: 400,
|
||||||
|
style: {
|
||||||
|
opacity: 0.8,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
By {albumBy.Name}
|
||||||
|
</TextLink>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{!disableInfoStrip && (
|
||||||
|
<Stack
|
||||||
|
direction="row"
|
||||||
|
gap={1}
|
||||||
|
divider={
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "4px",
|
||||||
|
height: "4px",
|
||||||
|
background: "white",
|
||||||
|
alignSelf: "center",
|
||||||
|
aspectRatio: 1,
|
||||||
|
borderRadius: "10px",
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
}
|
||||||
|
className="hero-carousel-info"
|
||||||
|
mt={1}
|
||||||
|
justifyItems="flex-start"
|
||||||
|
alignItems="center"
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
style={{ opacity: "0.8" }}
|
||||||
|
variant="subtitle1"
|
||||||
|
>
|
||||||
|
{!!item.ProductionYear
|
||||||
|
? item.ProductionYear
|
||||||
|
: "Unknown"}
|
||||||
|
</Typography>
|
||||||
|
<Chip
|
||||||
|
variant="filled"
|
||||||
|
label={
|
||||||
|
item.OfficialRating ?? "Not Rated"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "0.25em",
|
||||||
|
alignItems: "center",
|
||||||
|
}}
|
||||||
|
className="hero-carousel-info-rating"
|
||||||
|
>
|
||||||
|
{!!item.CommunityRating ? (
|
||||||
|
<>
|
||||||
|
<MdiStar
|
||||||
|
sx={{
|
||||||
|
color: yellow[700],
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Typography
|
||||||
|
style={{
|
||||||
|
opacity: "0.8",
|
||||||
|
}}
|
||||||
|
variant="subtitle1"
|
||||||
|
>
|
||||||
|
{Math.round(
|
||||||
|
item.CommunityRating *
|
||||||
|
10,
|
||||||
|
) / 10}
|
||||||
|
</Typography>
|
||||||
|
</>
|
||||||
|
) : (
|
||||||
|
<Typography
|
||||||
|
style={{ opacity: "0.8" }}
|
||||||
|
variant="subtitle1"
|
||||||
|
>
|
||||||
|
No Community Rating
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
{!!item.RunTimeTicks && (
|
||||||
|
<Typography
|
||||||
|
style={{ opacity: "0.8" }}
|
||||||
|
variant="subtitle1"
|
||||||
|
>
|
||||||
|
{getRuntime(item.RunTimeTicks)}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
{!!item.RunTimeTicks && (
|
||||||
|
<Typography
|
||||||
|
style={{ opacity: "0.8" }}
|
||||||
|
variant="subtitle1"
|
||||||
|
>
|
||||||
|
{endsAt(item.RunTimeTicks)}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</Stack>
|
||||||
|
)}
|
||||||
|
<Typography
|
||||||
|
style={{ opacity: "0.8" }}
|
||||||
|
variant="subtitle1"
|
||||||
|
mt={1}
|
||||||
|
>
|
||||||
|
{item.Genres.join(", ")}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
{item.UserData?.PlaybackPositionTicks > 0 && (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: "0.5em",
|
||||||
|
margin: " 1em 0 0 0",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<LinearProgress
|
||||||
|
variant="determinate"
|
||||||
|
value={item.UserData?.PlayedPercentage}
|
||||||
|
style={{
|
||||||
|
width: "50%",
|
||||||
|
borderRadius: "1em",
|
||||||
|
}}
|
||||||
|
color="white"
|
||||||
|
/>
|
||||||
|
<Typography variant="subtitle1" fontWeight={600}>
|
||||||
|
{getRuntimeFull(
|
||||||
|
item.RunTimeTicks -
|
||||||
|
item.UserData
|
||||||
|
.PlaybackPositionTicks,
|
||||||
|
)}{" "}
|
||||||
|
remaining
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
margin: "1em 0",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
gap: "1em",
|
||||||
|
}}
|
||||||
|
className="item-button-container"
|
||||||
|
>
|
||||||
|
{!disablePlayButton && (
|
||||||
|
<PlayButton
|
||||||
|
itemId={item.Id}
|
||||||
|
userId={userId}
|
||||||
|
itemType={item.Type}
|
||||||
|
currentVideoTrack={currentVideoIndex}
|
||||||
|
currentAudioTrack={currentAudioIndex}
|
||||||
|
currentSubTrack={currentSubtitleIndex}
|
||||||
|
buttonProps={{
|
||||||
|
size: "large",
|
||||||
|
}}
|
||||||
|
itemUserData={item.UserData}
|
||||||
|
audio={audioPlayButton}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{!disableLikeButton && (
|
||||||
|
<LikeButton
|
||||||
|
queryKey={["item", item.Id]}
|
||||||
|
itemId={item.Id}
|
||||||
|
itemName={item.Name}
|
||||||
|
isFavorite={item.UserData?.IsFavorite}
|
||||||
|
userId={userId}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{!disableMarkAsPlayedButton && (
|
||||||
|
<MarkPlayedButton
|
||||||
|
queryKey={["item", item.Id]}
|
||||||
|
itemId={item.Id}
|
||||||
|
itemName={item.Name}
|
||||||
|
isPlayed={item.UserData?.Played}
|
||||||
|
userId={userId}
|
||||||
|
/>
|
||||||
|
)}{" "}
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.4em",
|
||||||
|
maxWidth: "60%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{Boolean(videoTracks?.length) && (
|
||||||
|
<div className="hero-grid">
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
>
|
||||||
|
Video
|
||||||
|
</Typography>
|
||||||
|
<TextField
|
||||||
|
size="small"
|
||||||
|
value={currentVideoIndex}
|
||||||
|
select
|
||||||
|
onChange={(e) =>
|
||||||
|
setCurrentVideoIndex(
|
||||||
|
e.target.value,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
SelectProps={{
|
||||||
|
MenuProps: {
|
||||||
|
disableScrollLock: true,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{videoTracks.map((track, index) => {
|
||||||
|
return (
|
||||||
|
<MenuItem
|
||||||
|
key={track.Index}
|
||||||
|
value={track.Index}
|
||||||
|
>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</TextField>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{Boolean(audioTracks?.length) && (
|
||||||
|
<div className="hero-grid">
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
>
|
||||||
|
Audio
|
||||||
|
</Typography>
|
||||||
|
<TextField
|
||||||
|
size="small"
|
||||||
|
value={currentAudioIndex}
|
||||||
|
select
|
||||||
|
onChange={(e) =>
|
||||||
|
setCurrentAudioIndex(
|
||||||
|
e.target.value,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
SelectProps={{
|
||||||
|
MenuProps: {
|
||||||
|
disableScrollLock: true,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{audioTracks.map((track, index) => {
|
||||||
|
return (
|
||||||
|
<MenuItem
|
||||||
|
key={track.Index}
|
||||||
|
value={track.Index}
|
||||||
|
>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</TextField>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{Boolean(subtitleTracks?.length) && (
|
||||||
|
<div className="hero-grid">
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
>
|
||||||
|
Subtitle
|
||||||
|
</Typography>
|
||||||
|
<TextField
|
||||||
|
size="small"
|
||||||
|
value={currentSubtitleIndex}
|
||||||
|
select
|
||||||
|
onChange={(e) =>
|
||||||
|
setCurrentSubtitleIndex(
|
||||||
|
e.target.value,
|
||||||
|
)
|
||||||
|
}
|
||||||
|
SelectProps={{
|
||||||
|
MenuProps: {
|
||||||
|
disableScrollLock: true,
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{subtitleTracks.map((track, index) => {
|
||||||
|
return (
|
||||||
|
<MenuItem
|
||||||
|
key={track.Index}
|
||||||
|
value={track.Index}
|
||||||
|
>
|
||||||
|
{track.DisplayTitle}
|
||||||
|
</MenuItem>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</TextField>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
marginTop: "0.2em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
fontStyle="italic"
|
||||||
|
variant="h5"
|
||||||
|
mb={1}
|
||||||
|
mt={1}
|
||||||
|
>
|
||||||
|
{item.Taglines[0]}
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{item.Overview}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
marginTop: "2em",
|
||||||
|
alignSelf: "flex-end",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{writers.length > 0 && (
|
||||||
|
<div className="hero-grid">
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
>
|
||||||
|
Written by
|
||||||
|
</Typography>
|
||||||
|
<div className="hero-text-container">
|
||||||
|
{writers.map((writer, index) => (
|
||||||
|
<>
|
||||||
|
<TextLink
|
||||||
|
key={index}
|
||||||
|
variant={"subtitle1"}
|
||||||
|
location={`/person/${writer.Id}`}
|
||||||
|
>
|
||||||
|
{writer.Name}
|
||||||
|
</TextLink>
|
||||||
|
{index !=
|
||||||
|
writers.length - 1 && (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
whiteSpace:
|
||||||
|
"pre",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
,{" "}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{directors.length > 0 && (
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
marginTop: "0.5em",
|
||||||
|
}}
|
||||||
|
className="hero-grid"
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
>
|
||||||
|
Directed by
|
||||||
|
</Typography>
|
||||||
|
<div className="hero-text-container">
|
||||||
|
{directors.map((director, index) => (
|
||||||
|
<>
|
||||||
|
<TextLink
|
||||||
|
key={index}
|
||||||
|
variant={"subtitle1"}
|
||||||
|
location={`/person/${director.Id}`}
|
||||||
|
>
|
||||||
|
{director.Name}
|
||||||
|
</TextLink>
|
||||||
|
{index !=
|
||||||
|
directors.length - 1 && (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
whiteSpace:
|
||||||
|
"pre",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
,{" "}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{artists.length > 0 && (
|
||||||
|
<div
|
||||||
|
className="hero-grid"
|
||||||
|
style={{
|
||||||
|
marginTop: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
>
|
||||||
|
Artists
|
||||||
|
</Typography>
|
||||||
|
<div className="hero-text-container">
|
||||||
|
{artists.map((artist, index) => (
|
||||||
|
<>
|
||||||
|
<TextLink
|
||||||
|
key={index}
|
||||||
|
variant={"subtitle1"}
|
||||||
|
location={`/artist/${artist.Id}`}
|
||||||
|
>
|
||||||
|
{artist.Name}
|
||||||
|
</TextLink>
|
||||||
|
{index !=
|
||||||
|
artists.length - 1 && (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
whiteSpace:
|
||||||
|
"pre",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
,{" "}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{studios.length > 0 && (
|
||||||
|
<div
|
||||||
|
className="hero-grid"
|
||||||
|
style={{
|
||||||
|
marginTop: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
opacity: 0.6,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
>
|
||||||
|
Studios
|
||||||
|
</Typography>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{studios
|
||||||
|
.map((studio) => studio.Name)
|
||||||
|
.join(", ")}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="item-detail-primaryImage">
|
||||||
|
<Card
|
||||||
|
item={item}
|
||||||
|
seriesId={favourParentImg && item.SeriesId}
|
||||||
|
imageType={"Primary"}
|
||||||
|
cardType={cardType}
|
||||||
|
queryKey={queryKey}
|
||||||
|
userId={userId}
|
||||||
|
imageBlurhash={
|
||||||
|
!!item.ImageBlurHashes?.Primary &&
|
||||||
|
item.ImageBlurHashes?.Primary[
|
||||||
|
Object.keys(item.ImageBlurHashes.Primary)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
hideText
|
||||||
|
disablePadding
|
||||||
|
disableOverlay
|
||||||
|
onClick={() => {}}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default Hero;
|
||||||
|
|
||||||
|
Hero.defaultProps = {
|
||||||
|
disableInfoStrip: false,
|
||||||
|
disablePlayButton: false,
|
||||||
|
disableLikeButton: false,
|
||||||
|
disableMarkAsPlayedButton: false,
|
||||||
|
};
|
||||||
@@ -0,0 +1,79 @@
|
|||||||
|
/** @format */
|
||||||
|
$maskPercentage: 40%;
|
||||||
|
.hero {
|
||||||
|
display: flex;
|
||||||
|
width: 100%;
|
||||||
|
gap: 2em;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding-right: 1em;
|
||||||
|
.item-detail-primaryImage {
|
||||||
|
width: 26%;
|
||||||
|
flex-shrink: 0;
|
||||||
|
}
|
||||||
|
&-backdrop {
|
||||||
|
position: fixed;
|
||||||
|
background-attachment: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100vh;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
z-index: -1;
|
||||||
|
filter: brightness(0.4);
|
||||||
|
mask-image: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
black $maskPercentage,
|
||||||
|
transparent
|
||||||
|
),
|
||||||
|
linear-gradient(to left, black $maskPercentage, transparent);
|
||||||
|
-webkit-mask-image: linear-gradient(
|
||||||
|
to bottom,
|
||||||
|
black $maskPercentage,
|
||||||
|
transparent
|
||||||
|
),
|
||||||
|
linear-gradient(to left, black $maskPercentage, transparent);
|
||||||
|
mask-composite: source-in;
|
||||||
|
-webkit-mask-composite: source-in;
|
||||||
|
& > * {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
&-image {
|
||||||
|
object-fit: cover;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
&-blurhash {
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
&-icon {
|
||||||
|
&-container {
|
||||||
|
background: url(../../../assets/herobg.png);
|
||||||
|
background-size: cover;
|
||||||
|
z-index: -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
width: 100%;
|
||||||
|
grid-template-columns: 1fr 85%;
|
||||||
|
}
|
||||||
|
|
||||||
|
&-name-logo {
|
||||||
|
width: 10.4em;
|
||||||
|
height: 2.6em;
|
||||||
|
object-fit: contain;
|
||||||
|
object-position: left;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity $transition-time-fast;
|
||||||
|
filter: drop-shadow(0px 4px 10px rgb(0 0 0 / 0.5));
|
||||||
|
}
|
||||||
|
&-text-container {
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: wrap;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -122,15 +122,15 @@ export const SideMenu = ({}) => {
|
|||||||
sx: {
|
sx: {
|
||||||
backgroundColor: "inherit",
|
backgroundColor: "inherit",
|
||||||
border: "none",
|
border: "none",
|
||||||
width: `calc(${theme.spacing(7)} + 10px)`,
|
width: `4em`,
|
||||||
height: "100vh",
|
height: "100vh",
|
||||||
zIndex: "1",
|
zIndex: "1",
|
||||||
// display: visible ? "block" : "none",
|
|
||||||
},
|
},
|
||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
|
zIndex: 1,
|
||||||
width: `calc(${theme.spacing(7)} + 10px)`,
|
width: `calc(${theme.spacing(7)} + 10px)`,
|
||||||
background: theme.palette.background.paper,
|
background: "transparent !important ",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<DrawerHeader
|
<DrawerHeader
|
||||||
@@ -139,7 +139,6 @@ export const SideMenu = ({}) => {
|
|||||||
justifyContent: "center",
|
justifyContent: "center",
|
||||||
}}
|
}}
|
||||||
></DrawerHeader>
|
></DrawerHeader>
|
||||||
<Divider />
|
|
||||||
{libraries.isLoading ? (
|
{libraries.isLoading ? (
|
||||||
<>
|
<>
|
||||||
<Skeleton
|
<Skeleton
|
||||||
@@ -152,6 +151,45 @@ export const SideMenu = ({}) => {
|
|||||||
) : (
|
) : (
|
||||||
<>
|
<>
|
||||||
<List sx={{ border: "none" }}>
|
<List sx={{ border: "none" }}>
|
||||||
|
<Tooltip
|
||||||
|
title="Home"
|
||||||
|
placement="right"
|
||||||
|
followCursor
|
||||||
|
arrow
|
||||||
|
>
|
||||||
|
<ListItem
|
||||||
|
className="sidemenu-item-container"
|
||||||
|
disablePadding
|
||||||
|
sx={{
|
||||||
|
mb: 1,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ListItemButton
|
||||||
|
component={NavLink}
|
||||||
|
to="/home"
|
||||||
|
className="sidemenu-item"
|
||||||
|
sx={{
|
||||||
|
minHeight: 48,
|
||||||
|
justifyContent:
|
||||||
|
"center",
|
||||||
|
px: 2.5,
|
||||||
|
display: "flex",
|
||||||
|
flexDirection:
|
||||||
|
"column",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<ListItemIcon
|
||||||
|
sx={{
|
||||||
|
minWidth: 0,
|
||||||
|
justifyContent:
|
||||||
|
"center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<MdiHomeVariantOutline />
|
||||||
|
</ListItemIcon>
|
||||||
|
</ListItemButton>
|
||||||
|
</ListItem>
|
||||||
|
</Tooltip>
|
||||||
{libraries.data.Items.map(
|
{libraries.data.Items.map(
|
||||||
(library, index) => {
|
(library, index) => {
|
||||||
return (
|
return (
|
||||||
@@ -161,6 +199,9 @@ export const SideMenu = ({}) => {
|
|||||||
arrow
|
arrow
|
||||||
followCursor
|
followCursor
|
||||||
key={index}
|
key={index}
|
||||||
|
sx={{
|
||||||
|
mb: 1,
|
||||||
|
}}
|
||||||
>
|
>
|
||||||
<ListItem
|
<ListItem
|
||||||
className="sidemenu-item-container"
|
className="sidemenu-item-container"
|
||||||
@@ -207,43 +248,6 @@ export const SideMenu = ({}) => {
|
|||||||
)}
|
)}
|
||||||
</List>
|
</List>
|
||||||
<List sx={{ marginTop: "auto" }}>
|
<List sx={{ marginTop: "auto" }}>
|
||||||
<Divider />
|
|
||||||
<Tooltip
|
|
||||||
title="Home"
|
|
||||||
placement="right"
|
|
||||||
followCursor
|
|
||||||
arrow
|
|
||||||
>
|
|
||||||
<ListItem
|
|
||||||
className="sidemenu-item-container"
|
|
||||||
disablePadding
|
|
||||||
>
|
|
||||||
<ListItemButton
|
|
||||||
component={NavLink}
|
|
||||||
to="/home"
|
|
||||||
className="sidemenu-item"
|
|
||||||
sx={{
|
|
||||||
minHeight: 48,
|
|
||||||
justifyContent:
|
|
||||||
"center",
|
|
||||||
px: 2.5,
|
|
||||||
display: "flex",
|
|
||||||
flexDirection:
|
|
||||||
"column",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<ListItemIcon
|
|
||||||
sx={{
|
|
||||||
minWidth: 0,
|
|
||||||
justifyContent:
|
|
||||||
"center",
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
<MdiHomeVariantOutline />
|
|
||||||
</ListItemIcon>
|
|
||||||
</ListItemButton>
|
|
||||||
</ListItem>
|
|
||||||
</Tooltip>
|
|
||||||
<Tooltip
|
<Tooltip
|
||||||
title="Logout"
|
title="Logout"
|
||||||
placement="right"
|
placement="right"
|
||||||
|
|||||||
@@ -0,0 +1,135 @@
|
|||||||
|
/** @format */
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import "./musicTrack.module.scss";
|
||||||
|
import { getRuntimeMusic } from "../../utils/date/time";
|
||||||
|
import LikeButton from "../buttons/likeButton";
|
||||||
|
import TextLink from "../textLink";
|
||||||
|
import PlayButton from "../buttons/playButton";
|
||||||
|
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @typedef {Object} Props
|
||||||
|
* @property {import("@jellyfin/sdk/lib/generated-client/models").BaseItemDto} item
|
||||||
|
* @property {Array} queryKey
|
||||||
|
* @property {string} userId
|
||||||
|
* @property {bool} playlistItem
|
||||||
|
* @property {string | undefined} playlistItemId
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @description Music Track element displayed in ArtistTitlePage and Songs library
|
||||||
|
* @param {Props}
|
||||||
|
* @returns {React.Component}
|
||||||
|
*/
|
||||||
|
|
||||||
|
const MusicTrack = ({
|
||||||
|
item,
|
||||||
|
queryKey,
|
||||||
|
userId,
|
||||||
|
playlistItem = false,
|
||||||
|
playlistItemId,
|
||||||
|
className = "",
|
||||||
|
}) => {
|
||||||
|
const [currentTrackItem] = useAudioPlayback((state) => [state.item]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className={`music-track ${className}`}>
|
||||||
|
<div className="music-track-image">
|
||||||
|
<img
|
||||||
|
src={window.api.getItemImageUrl(
|
||||||
|
Object.keys(item.ImageTags).length == 0
|
||||||
|
? item.AlbumId
|
||||||
|
: item.Id,
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 70,
|
||||||
|
fillHeight: 128,
|
||||||
|
fillWidth: 128,
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100%",
|
||||||
|
objectFit: "cover",
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
onLoad={(e) => (e.target.style.opacity = 1)}
|
||||||
|
/>
|
||||||
|
<div className="music-track-image-overlay">
|
||||||
|
<PlayButton
|
||||||
|
itemId={item.Id}
|
||||||
|
userId={userId}
|
||||||
|
itemType={item.Type}
|
||||||
|
size="small"
|
||||||
|
iconOnly
|
||||||
|
audio
|
||||||
|
playlistItem={playlistItem}
|
||||||
|
playlistItemId={playlistItemId}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div className="music-track-info">
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
color:
|
||||||
|
item.Id == currentTrackItem.Id
|
||||||
|
? "hsl(337, 96%, 56%)"
|
||||||
|
: "white",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.Name}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
opacity: 0.8,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.ArtistItems.map((artist, index) => (
|
||||||
|
<>
|
||||||
|
<TextLink
|
||||||
|
text={artist.Name}
|
||||||
|
variant={"subtitle2"}
|
||||||
|
location={`/artist/${artist.Id}`}
|
||||||
|
otherProps={{
|
||||||
|
fontWeight: 400,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
{index != item.ArtistItems.length - 1 && (
|
||||||
|
<span
|
||||||
|
style={{
|
||||||
|
whiteSpace: "pre",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
,{" "}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
|
</>
|
||||||
|
))}
|
||||||
|
</div>
|
||||||
|
{/* <Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{item.Name}
|
||||||
|
</Typography> */}
|
||||||
|
</div>
|
||||||
|
<Typography variant="subtitl1">
|
||||||
|
{getRuntimeMusic(item.RunTimeTicks)}
|
||||||
|
</Typography>
|
||||||
|
<LikeButton
|
||||||
|
itemId={item.Id}
|
||||||
|
isFavorite={item.UserData?.IsFavorite}
|
||||||
|
queryKey={queryKey}
|
||||||
|
userId={userId}
|
||||||
|
itemName={item.Name}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MusicTrack;
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.music-track {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 4.5em 80% 1fr 1fr;
|
||||||
|
gap: 0.5em;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
width: 100%;
|
||||||
|
&-image {
|
||||||
|
margin: 0.4em;
|
||||||
|
border-radius: $border-radius-default;
|
||||||
|
overflow: hidden;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
position: relative;
|
||||||
|
&-overlay {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity $transition-time-fast;
|
||||||
|
}
|
||||||
|
box-shadow: 0 0 10px rgb(0 0 0 / 0.2);
|
||||||
|
transition: opacity $transition-time-fast;
|
||||||
|
}
|
||||||
|
&-info {
|
||||||
|
justify-self: start;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
.music-track-image-overlay {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.audio-player {
|
||||||
|
position: fixed;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
|
background: $clr-background-dark-opacity-0_8;
|
||||||
|
z-index: 10;
|
||||||
|
display: grid;
|
||||||
|
padding: 1em;
|
||||||
|
margin: 1em;
|
||||||
|
backdrop-filter: blur(10px);
|
||||||
|
border-radius: 10px;
|
||||||
|
overflow: hidden;
|
||||||
|
gap: 1em;
|
||||||
|
box-shadow: 0 0 20px rgb(0 0 0 / 0.25);
|
||||||
|
|
||||||
|
grid-template-columns: 25% 1fr 25%;
|
||||||
|
|
||||||
|
#waveform {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&-controls {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 1em;
|
||||||
|
flex-flow: column;
|
||||||
|
}
|
||||||
|
&-info {
|
||||||
|
display: grid;
|
||||||
|
gap: 0.5em;
|
||||||
|
grid-template-columns: minmax(0, 4.5em) minmax(0, 1fr);
|
||||||
|
width: fit-content;
|
||||||
|
align-items: center;
|
||||||
|
flex-grow: 1;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
&-image {
|
||||||
|
width: 4.5em;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
object-fit: cover;
|
||||||
|
z-index: 1;
|
||||||
|
flex-shrink: 0;
|
||||||
|
flex-grow: 1;
|
||||||
|
|
||||||
|
position: relative;
|
||||||
|
&-container {
|
||||||
|
border-radius: $border-radius-default;
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background: $clr-gradient-dark;
|
||||||
|
height: fit-content;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
}
|
||||||
|
&-icon {
|
||||||
|
position: absolute;
|
||||||
|
left: 50%;
|
||||||
|
top: 50%;
|
||||||
|
transform: translate(-50%, -50%);
|
||||||
|
font-size: 2em !important;
|
||||||
|
fill: url(#clr-gradient-default) !important;
|
||||||
|
z-index: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-track {
|
||||||
|
grid-template-columns: 4.5em 60% 0.5fr 0.5fr !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,464 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useEffect, useRef, useState } from "react";
|
||||||
|
|
||||||
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import Fab from "@mui/material/Fab";
|
||||||
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Slider from "@mui/material/Slider";
|
||||||
|
import Popper from "@mui/material/Popper";
|
||||||
|
import Paper from "@mui/material/Paper";
|
||||||
|
|
||||||
|
import WaveSurfer from "wavesurfer.js";
|
||||||
|
|
||||||
|
import { useAudioPlayback } from "../../../utils/store/audioPlayback";
|
||||||
|
|
||||||
|
import "./audioPlayer.module.scss";
|
||||||
|
import { MdiPlay } from "../../icons/mdiPlay";
|
||||||
|
import { MdiPause } from "../../icons/mdiPause";
|
||||||
|
import { AnimatePresence } from "framer-motion";
|
||||||
|
|
||||||
|
import { getRuntimeMusic, secToTicks } from "../../../utils/date/time";
|
||||||
|
import { MdiSkipNext } from "../../icons/mdiSkipNext";
|
||||||
|
import { MdiSkipPrevious } from "../../icons/mdiSkipPrevious";
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { MdiClose } from "../../icons/mdiClose";
|
||||||
|
import { MdiMusic } from "../../icons/mdiMusic";
|
||||||
|
|
||||||
|
import { theme } from "../../../theme";
|
||||||
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
|
import { MdiVolumeHigh } from "../../icons/mdiVolumeHigh";
|
||||||
|
import { MdiVolumeOff } from "../../icons/mdiVolumeOff";
|
||||||
|
import { MdiPlaylistMusicOutline } from "../../icons/mdiPlaylistMusicOutline";
|
||||||
|
import MusicTrack from "../../musicTrack";
|
||||||
|
|
||||||
|
const AudioPlayer = () => {
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const waveSurferRef = useRef(null);
|
||||||
|
const waveSurferContainerRef = useRef(null);
|
||||||
|
|
||||||
|
const [playerReady, setPlayerReady] = useState(false);
|
||||||
|
const [playing, setPlaying] = useState(true);
|
||||||
|
const [volume, setVolume] = useState(0.8);
|
||||||
|
const [isMuted, setIsMuted] = useState(false);
|
||||||
|
|
||||||
|
const [loading, setLoading] = useState(true);
|
||||||
|
|
||||||
|
const [showWaveform, setShowWaveform] = useState(false);
|
||||||
|
|
||||||
|
const [currentTime, setCurrentTime] = useState(0);
|
||||||
|
|
||||||
|
const [queueButton, setQueueButton] = useState(null);
|
||||||
|
const handleOpenQueue = (event) => {
|
||||||
|
setQueueButton(queueButton ? null : event.currentTarget);
|
||||||
|
};
|
||||||
|
|
||||||
|
const [
|
||||||
|
url,
|
||||||
|
display,
|
||||||
|
item,
|
||||||
|
tracks,
|
||||||
|
currentTrack,
|
||||||
|
setCurrentTrack,
|
||||||
|
setAudioUrl,
|
||||||
|
setAudioDisplay,
|
||||||
|
setAudioItem,
|
||||||
|
setAudioTracks,
|
||||||
|
resetPlayer,
|
||||||
|
playlistItemId,
|
||||||
|
] = useAudioPlayback((state) => [
|
||||||
|
state.url,
|
||||||
|
state.display,
|
||||||
|
state.item,
|
||||||
|
state.tracks,
|
||||||
|
state.currentTrack,
|
||||||
|
state.setCurrentTrack,
|
||||||
|
state.setUrl,
|
||||||
|
state.setDisplay,
|
||||||
|
state.setItem,
|
||||||
|
state.setTracks,
|
||||||
|
state.reset,
|
||||||
|
state.playlistItemId,
|
||||||
|
]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (display) {
|
||||||
|
const waveSurfer = WaveSurfer.create({
|
||||||
|
container: waveSurferContainerRef.current,
|
||||||
|
barHeight: 0.8,
|
||||||
|
dragToSeek: true,
|
||||||
|
height: 35,
|
||||||
|
cursorColor: "#fb2376",
|
||||||
|
progressColor: "#fb2376",
|
||||||
|
waveColor: "#ffffff2f",
|
||||||
|
normalize: true,
|
||||||
|
});
|
||||||
|
waveSurfer.load(url);
|
||||||
|
waveSurfer.on("load", () => {
|
||||||
|
setLoading(true);
|
||||||
|
});
|
||||||
|
waveSurfer.on("ready", () => {
|
||||||
|
waveSurferRef.current = waveSurfer;
|
||||||
|
waveSurfer.play();
|
||||||
|
waveSurfer.setVolume(volume);
|
||||||
|
waveSurfer.setMuted(isMuted);
|
||||||
|
setPlayerReady(true);
|
||||||
|
setLoading(false);
|
||||||
|
});
|
||||||
|
waveSurfer.on("timeupdate", async (time) => {
|
||||||
|
setCurrentTime(time);
|
||||||
|
});
|
||||||
|
waveSurfer.on("redraw", () => {
|
||||||
|
setShowWaveform(true);
|
||||||
|
});
|
||||||
|
waveSurfer.on("play", () => {
|
||||||
|
setPlaying(true);
|
||||||
|
});
|
||||||
|
waveSurfer.on("pause", () => {
|
||||||
|
setPlaying(false);
|
||||||
|
});
|
||||||
|
waveSurfer.on("finish", () => {
|
||||||
|
setPlaying(false);
|
||||||
|
if (currentTrack != tracks.length - 1) {
|
||||||
|
setCurrentTrack(currentTrack + 1);
|
||||||
|
setAudioUrl(
|
||||||
|
`${window.api.basePath}/Audio/${
|
||||||
|
tracks[currentTrack + 1].Id
|
||||||
|
}/universal?deviceId=${
|
||||||
|
window.api.deviceInfo.id
|
||||||
|
}&userId=${user.data.Id}&api_key=${
|
||||||
|
window.api.accessToken
|
||||||
|
}`,
|
||||||
|
);
|
||||||
|
setAudioItem(tracks[currentTrack + 1]);
|
||||||
|
setShowWaveform(false);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
waveSurfer.on("destroy", () => {
|
||||||
|
waveSurfer.unAll();
|
||||||
|
setLoading(true);
|
||||||
|
});
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
waveSurfer.destroy();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}, [url, display, currentTrack]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (playerReady) {
|
||||||
|
waveSurferRef.current.setVolume(volume);
|
||||||
|
waveSurferRef.current.setMuted(isMuted);
|
||||||
|
}
|
||||||
|
}, [playerReady, volume, isMuted]);
|
||||||
|
|
||||||
|
const handlePlayPause = () => {
|
||||||
|
waveSurferRef.current.playPause();
|
||||||
|
};
|
||||||
|
|
||||||
|
const handleNext = () => {
|
||||||
|
setPlaying(false);
|
||||||
|
setCurrentTrack(currentTrack + 1);
|
||||||
|
setAudioUrl(
|
||||||
|
`${window.api.basePath}/Audio/${
|
||||||
|
tracks[currentTrack + 1].Id
|
||||||
|
}/universal?deviceId=${window.api.deviceInfo.id}&userId=${
|
||||||
|
user.data.Id
|
||||||
|
}&api_key=${window.api.accessToken}`,
|
||||||
|
);
|
||||||
|
setAudioItem(tracks[currentTrack + 1]);
|
||||||
|
setShowWaveform(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
const handlePrevious = () => {
|
||||||
|
setPlaying(false);
|
||||||
|
setCurrentTrack(currentTrack - 1);
|
||||||
|
setAudioUrl(
|
||||||
|
`${window.api.basePath}/Audio/${
|
||||||
|
tracks[currentTrack - 1].Id
|
||||||
|
}/universal?deviceId=${window.api.deviceInfo.id}&userId=${
|
||||||
|
user.data.Id
|
||||||
|
}&api_key=${window.api.accessToken}`,
|
||||||
|
);
|
||||||
|
setAudioItem(tracks[currentTrack - 1]);
|
||||||
|
setShowWaveform(false);
|
||||||
|
};
|
||||||
|
|
||||||
|
return (
|
||||||
|
<AnimatePresence>
|
||||||
|
{display && (
|
||||||
|
<motion.div
|
||||||
|
key={display}
|
||||||
|
initial={{
|
||||||
|
transform: "translateY(100%)",
|
||||||
|
}}
|
||||||
|
animate={{ transform: "translateY(0)" }}
|
||||||
|
exit={{
|
||||||
|
transform: "translateY(100%)",
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
width: `calc(100vw - ${theme.spacing(
|
||||||
|
13,
|
||||||
|
)} - 10px)`,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.1,
|
||||||
|
ease: "easeInOut",
|
||||||
|
}}
|
||||||
|
className="audio-player"
|
||||||
|
>
|
||||||
|
<motion.div
|
||||||
|
key={item.Id}
|
||||||
|
initial={{
|
||||||
|
filter: "opacity(0)",
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
filter: "opacity(1)",
|
||||||
|
}}
|
||||||
|
exit={{
|
||||||
|
filter: "opacity(0)",
|
||||||
|
}}
|
||||||
|
className="audio-player-info"
|
||||||
|
>
|
||||||
|
<div className="audio-player-image-container">
|
||||||
|
<img
|
||||||
|
className="audio-player-image"
|
||||||
|
src={window.api.getItemImageUrl(
|
||||||
|
Object.keys(item.ImageTags)
|
||||||
|
.length == 0
|
||||||
|
? item.AlbumId
|
||||||
|
: item.Id,
|
||||||
|
"Primary",
|
||||||
|
{
|
||||||
|
quality: 85,
|
||||||
|
fillHeight: 462,
|
||||||
|
fillWidth: 462,
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
<MdiMusic className="audio-player-image-icon" />
|
||||||
|
</div>
|
||||||
|
<div className="audio-player-info-text">
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
fontWeight={500}
|
||||||
|
>
|
||||||
|
{!!item.IndexNumber
|
||||||
|
? `${item.IndexNumber}. ${item.Name}`
|
||||||
|
: item.Name}
|
||||||
|
</Typography>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
noWrap
|
||||||
|
fontWeight={400}
|
||||||
|
>
|
||||||
|
by{" "}
|
||||||
|
{item.Artists.map(
|
||||||
|
(artist) => artist,
|
||||||
|
).join(",")}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</motion.div>
|
||||||
|
<div className="audio-player-controls">
|
||||||
|
<div style={{ display: "flex", gap: "1em" }}>
|
||||||
|
<IconButton
|
||||||
|
onClick={handlePrevious}
|
||||||
|
disabled={currentTrack == 0}
|
||||||
|
>
|
||||||
|
<MdiSkipPrevious />
|
||||||
|
</IconButton>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "inline-flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
position: "relative",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress
|
||||||
|
size={48}
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
zIndex: 1,
|
||||||
|
opacity: loading ? 1 : 0,
|
||||||
|
transition: "opacity 500ms",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<Fab
|
||||||
|
size="small"
|
||||||
|
onClick={handlePlayPause}
|
||||||
|
>
|
||||||
|
{playing ? (
|
||||||
|
<MdiPause />
|
||||||
|
) : (
|
||||||
|
<MdiPlay />
|
||||||
|
)}
|
||||||
|
</Fab>
|
||||||
|
</div>
|
||||||
|
<IconButton
|
||||||
|
onClick={handleNext}
|
||||||
|
disabled={
|
||||||
|
tracks.length - 1 == currentTrack
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<MdiSkipNext />
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
width: "100%",
|
||||||
|
display: "flex",
|
||||||
|
gap: "1em",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
fontWeight={300}
|
||||||
|
style={{
|
||||||
|
opacity: 0.8,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getRuntimeMusic(
|
||||||
|
secToTicks(currentTime),
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
<div
|
||||||
|
id="waveform"
|
||||||
|
style={{
|
||||||
|
opacity: showWaveform ? 1 : 0,
|
||||||
|
transition: "opacity 250ms",
|
||||||
|
}}
|
||||||
|
ref={waveSurferContainerRef}
|
||||||
|
></div>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
fontWeight={300}
|
||||||
|
style={{
|
||||||
|
opacity: 0.8,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{getRuntimeMusic(item.RunTimeTicks)}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "flex-end",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Popper
|
||||||
|
open={Boolean(queueButton)}
|
||||||
|
anchorEl={queueButton}
|
||||||
|
placement="top"
|
||||||
|
style={{
|
||||||
|
zIndex: 100,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Paper
|
||||||
|
style={{
|
||||||
|
padding: "1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
width: "36em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{tracks.map((track, index) => {
|
||||||
|
return (
|
||||||
|
<MusicTrack
|
||||||
|
item={track}
|
||||||
|
key={track.Id}
|
||||||
|
queryKey={[]}
|
||||||
|
userId={user.data.Id}
|
||||||
|
className="audio-player-track"
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Paper>
|
||||||
|
</Popper>
|
||||||
|
<IconButton onClick={handleOpenQueue}>
|
||||||
|
<MdiPlaylistMusicOutline />
|
||||||
|
</IconButton>
|
||||||
|
<IconButton
|
||||||
|
onClick={(e) => {
|
||||||
|
setIsMuted(!isMuted);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{isMuted ? (
|
||||||
|
<MdiVolumeOff />
|
||||||
|
) : (
|
||||||
|
<MdiVolumeHigh />
|
||||||
|
)}
|
||||||
|
</IconButton>
|
||||||
|
<Slider
|
||||||
|
value={isMuted ? 0 : volume * 100}
|
||||||
|
step={1}
|
||||||
|
max={100}
|
||||||
|
onChange={(e, newVal) =>
|
||||||
|
setVolume(newVal / 100)
|
||||||
|
}
|
||||||
|
valueLabelDisplay="auto"
|
||||||
|
valueLabelFormat={(value) =>
|
||||||
|
Math.floor(value)
|
||||||
|
}
|
||||||
|
size="small"
|
||||||
|
sx={{
|
||||||
|
mr: 1,
|
||||||
|
ml: 1,
|
||||||
|
width: "10em",
|
||||||
|
"& .MuiSlider-valueLabel": {
|
||||||
|
lineHeight: 1.2,
|
||||||
|
fontSize: 24,
|
||||||
|
background: "rgb(0 0 0 / 0.5)",
|
||||||
|
backdropFilter: "blur(5px)",
|
||||||
|
padding: 1,
|
||||||
|
borderRadius: "10px",
|
||||||
|
border: "1px solid rgb(255 255 255 / 0.15)",
|
||||||
|
boxShadow:
|
||||||
|
"0 0 10px rgb(0 0 0 / 0.4) ",
|
||||||
|
transform:
|
||||||
|
"translatey(-120%) scale(0)",
|
||||||
|
"&:before": {
|
||||||
|
display: "none",
|
||||||
|
},
|
||||||
|
"&.MuiSlider-valueLabelOpen": {
|
||||||
|
transform:
|
||||||
|
"translateY(-120%) scale(1)",
|
||||||
|
},
|
||||||
|
"& > *": {
|
||||||
|
transform: "rotate(0deg)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<IconButton onClick={resetPlayer}>
|
||||||
|
<MdiClose />
|
||||||
|
</IconButton>
|
||||||
|
</div>
|
||||||
|
</motion.div>
|
||||||
|
)}
|
||||||
|
</AnimatePresence>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default AudioPlayer;
|
||||||
@@ -10,13 +10,19 @@ import Box from "@mui/material/Box";
|
|||||||
|
|
||||||
export const CardsSkeleton = () => {
|
export const CardsSkeleton = () => {
|
||||||
return (
|
return (
|
||||||
<Box sx={{ display: "flex", flexFlow: "column", mb: 4 }}>
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexFlow: "column",
|
||||||
|
marginBottom: "2em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
<Typography variant="h4" sx={{ mb: "0.15em" }}>
|
<Typography variant="h4" sx={{ mb: "0.15em" }}>
|
||||||
<Skeleton width="35%" animation="wave" />
|
<Skeleton width="35%" animation="wave" />
|
||||||
</Typography>
|
</Typography>
|
||||||
<Skeleton width="100%" variant="rounded" animation="wave">
|
<Skeleton width="100%" variant="rounded" animation="wave">
|
||||||
<div style={{ paddingTop: "20%" }}></div>
|
<div style={{ paddingTop: "20%" }}></div>
|
||||||
</Skeleton>
|
</Skeleton>
|
||||||
</Box>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -7,9 +7,13 @@ import { theme } from "../../theme";
|
|||||||
export const CarouselSkeleton = () => {
|
export const CarouselSkeleton = () => {
|
||||||
return (
|
return (
|
||||||
<Paper
|
<Paper
|
||||||
className="hero-carousel-slide"
|
className="hero-carousel-skeleton"
|
||||||
|
elevation={0}
|
||||||
sx={{
|
sx={{
|
||||||
background: theme.palette.primary.background.dark,
|
height: "100vh",
|
||||||
|
position: "relative",
|
||||||
|
background: theme.palette.primary.background.main,
|
||||||
|
borderRadius: 0,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<div className="hero-carousel-background">
|
<div className="hero-carousel-background">
|
||||||
@@ -17,9 +21,15 @@ export const CarouselSkeleton = () => {
|
|||||||
variant="rectangular"
|
variant="rectangular"
|
||||||
height="100%"
|
height="100%"
|
||||||
animation="wave"
|
animation="wave"
|
||||||
|
sx={{
|
||||||
|
width: "100vw",
|
||||||
|
height: "100vh",
|
||||||
|
position: "absolute",
|
||||||
|
background: "transparent !important",
|
||||||
|
}}
|
||||||
></Skeleton>
|
></Skeleton>
|
||||||
</div>
|
</div>
|
||||||
<Box className="hero-carousel-detail">
|
<div className="hero-carousel-detail">
|
||||||
<Typography variant="h3" className="hero-carousel-text">
|
<Typography variant="h3" className="hero-carousel-text">
|
||||||
<Skeleton
|
<Skeleton
|
||||||
variant="text"
|
variant="text"
|
||||||
@@ -36,7 +46,7 @@ export const CarouselSkeleton = () => {
|
|||||||
animation="wave"
|
animation="wave"
|
||||||
></Skeleton>
|
></Skeleton>
|
||||||
</Typography>
|
</Typography>
|
||||||
</Box>
|
</div>
|
||||||
</Paper>
|
</Paper>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
@@ -53,13 +53,7 @@ export const EpisodeCardsSkeleton = () => {
|
|||||||
animation="wave"
|
animation="wave"
|
||||||
/>
|
/>
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography variant="subtitle1" mb={1}>
|
|
||||||
<Skeleton
|
|
||||||
variant="text"
|
|
||||||
width="50%"
|
|
||||||
animation="wave"
|
|
||||||
/>
|
|
||||||
</Typography>
|
|
||||||
<Typography variant="body2">
|
<Typography variant="body2">
|
||||||
<Skeleton
|
<Skeleton
|
||||||
variant="text"
|
variant="text"
|
||||||
@@ -69,6 +63,7 @@ export const EpisodeCardsSkeleton = () => {
|
|||||||
variant="text"
|
variant="text"
|
||||||
animation="wave"
|
animation="wave"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
<Skeleton
|
<Skeleton
|
||||||
variant="text"
|
variant="text"
|
||||||
animation="wave"
|
animation="wave"
|
||||||
|
|||||||
@@ -0,0 +1,112 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import Card from "@mui/material/Card";
|
||||||
|
import CardMedia from "@mui/material/CardMedia";
|
||||||
|
import CardContent from "@mui/material/CardContent";
|
||||||
|
import Grid from "@mui/material/Unstable_Grid2";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Skeleton from "@mui/material/Skeleton";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
|
||||||
|
import { borderRadiusDefault } from "../../palette.module.scss";
|
||||||
|
|
||||||
|
export const SeasonSelectorSkeleton = () => {
|
||||||
|
return (
|
||||||
|
<Grid
|
||||||
|
container
|
||||||
|
columns={{
|
||||||
|
xs: 2,
|
||||||
|
sm: 3,
|
||||||
|
md: 4,
|
||||||
|
}}
|
||||||
|
sx={{ width: "100%" }}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
gap: "1em",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography variant="h3">
|
||||||
|
<Skeleton
|
||||||
|
width={320}
|
||||||
|
variant="text"
|
||||||
|
animation="wave"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
<Skeleton animation="wave" height={64} width={128} />
|
||||||
|
</div>
|
||||||
|
<Divider
|
||||||
|
style={{
|
||||||
|
display: "block",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
width: "100%",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
paddingBottom: " 0.5em",
|
||||||
|
}}
|
||||||
|
></div>
|
||||||
|
{Array.from(new Array(4)).map((a, index) => {
|
||||||
|
return (
|
||||||
|
<Grid xs={1} sm={1} md={1} key={index}>
|
||||||
|
<Card
|
||||||
|
sx={{ background: "transparent" }}
|
||||||
|
elevation={0}
|
||||||
|
>
|
||||||
|
<CardMedia>
|
||||||
|
<Skeleton
|
||||||
|
animation="wave"
|
||||||
|
variant="rectangular"
|
||||||
|
sx={{
|
||||||
|
aspectRatio: "1.777",
|
||||||
|
height: "auto",
|
||||||
|
m: 1,
|
||||||
|
borderRadius:
|
||||||
|
borderRadiusDefault,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</CardMedia>
|
||||||
|
<CardContent
|
||||||
|
sx={{
|
||||||
|
padding: "0 0.5em",
|
||||||
|
alignItems: "flex-start",
|
||||||
|
backgroundColor: "transparent",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography variant="h6">
|
||||||
|
<Skeleton
|
||||||
|
variant="text"
|
||||||
|
animation="wave"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
|
||||||
|
<Typography variant="body2">
|
||||||
|
<Skeleton
|
||||||
|
variant="text"
|
||||||
|
animation="wave"
|
||||||
|
/>
|
||||||
|
<Skeleton
|
||||||
|
variant="text"
|
||||||
|
animation="wave"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<Skeleton
|
||||||
|
variant="text"
|
||||||
|
animation="wave"
|
||||||
|
/>
|
||||||
|
</Typography>
|
||||||
|
</CardContent>
|
||||||
|
</Card>
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Grid>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import { useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
import "./textLink.module.scss";
|
||||||
|
|
||||||
|
const TextLink = ({ children, location, variant, otherProps }) => {
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Typography
|
||||||
|
variant={variant}
|
||||||
|
className="link"
|
||||||
|
onClick={() => navigate(location)}
|
||||||
|
{...otherProps}
|
||||||
|
>
|
||||||
|
{children}
|
||||||
|
</Typography>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export default TextLink;
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.link {
|
||||||
|
text-decoration: underline;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 0.5);
|
||||||
|
white-space: pre-line;
|
||||||
|
width: fit-content;
|
||||||
|
&:hover {
|
||||||
|
cursor: pointer;
|
||||||
|
text-decoration-color: rgb(255 255 255 / 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -24,6 +24,7 @@ import { MdiDramaMasks } from "../icons/mdiDramaMasks";
|
|||||||
import { MdiMusic } from "../icons/mdiMusic";
|
import { MdiMusic } from "../icons/mdiMusic";
|
||||||
import { MdiAccountTie } from "../icons/mdiAccountTie";
|
import { MdiAccountTie } from "../icons/mdiAccountTie";
|
||||||
import { MdiAccount } from "../icons/mdiAccount";
|
import { MdiAccount } from "../icons/mdiAccount";
|
||||||
|
import { MdiFilmstripBoxMultiple } from "../icons/mdiFilmstripBoxMultiple";
|
||||||
|
|
||||||
export const MediaCollectionTypeIconCollection = {
|
export const MediaCollectionTypeIconCollection = {
|
||||||
universal: <MdiMultimedia />,
|
universal: <MdiMultimedia />,
|
||||||
@@ -31,7 +32,7 @@ export const MediaCollectionTypeIconCollection = {
|
|||||||
music: <MdiMusicBoxMultipleOutline />,
|
music: <MdiMusicBoxMultipleOutline />,
|
||||||
playlists: <MdiPlaylistMusicOutline />,
|
playlists: <MdiPlaylistMusicOutline />,
|
||||||
tvshows: <MdiTelevision />,
|
tvshows: <MdiTelevision />,
|
||||||
boxsets: <MdiMovieOutline />,
|
boxsets: <MdiFilmstripBoxMultiple />,
|
||||||
musicvideos: <MdiFolderMusicOutline />,
|
musicvideos: <MdiFolderMusicOutline />,
|
||||||
trailers: <MdiYoutube />,
|
trailers: <MdiYoutube />,
|
||||||
books: <MdiBookMultiple />,
|
books: <MdiBookMultiple />,
|
||||||
@@ -47,7 +48,7 @@ export const MediaCollectionTypeIconCollectionCard = {
|
|||||||
music: <MdiMusicBoxMultipleOutline className="card-image-icon" />,
|
music: <MdiMusicBoxMultipleOutline className="card-image-icon" />,
|
||||||
playlists: <MdiPlaylistMusicOutline className="card-image-icon" />,
|
playlists: <MdiPlaylistMusicOutline className="card-image-icon" />,
|
||||||
tvshows: <MdiTelevision className="card-image-icon" />,
|
tvshows: <MdiTelevision className="card-image-icon" />,
|
||||||
boxsets: <MdiMovieOutline className="card-image-icon" />,
|
boxsets: <MdiFilmstripBoxMultiple className="card-image-icon" />,
|
||||||
musicvideos: <MdiFolderMusicOutline className="card-image-icon" />,
|
musicvideos: <MdiFolderMusicOutline className="card-image-icon" />,
|
||||||
trailers: <MdiYoutube className="card-image-icon" />,
|
trailers: <MdiYoutube className="card-image-icon" />,
|
||||||
books: <MdiBookMultiple className="card-image-icon" />,
|
books: <MdiBookMultiple className="card-image-icon" />,
|
||||||
@@ -58,6 +59,7 @@ export const MediaCollectionTypeIconCollectionCard = {
|
|||||||
|
|
||||||
export const MediaTypeIconCollection = {
|
export const MediaTypeIconCollection = {
|
||||||
Movie: <MdiFilmstrip className="hero-carousel-background-icon" />,
|
Movie: <MdiFilmstrip className="hero-carousel-background-icon" />,
|
||||||
|
Series: <MdiTelevision className="hero-carousel-background-icon" />,
|
||||||
Audio: <MdiMicrophone className="hero-carousel-background-icon" />,
|
Audio: <MdiMicrophone className="hero-carousel-background-icon" />,
|
||||||
Photo: <MdiImage className="hero-carousel-background-icon" />,
|
Photo: <MdiImage className="hero-carousel-background-icon" />,
|
||||||
Book: <MdiBook className="hero-carousel-background-icon" />,
|
Book: <MdiBook className="hero-carousel-background-icon" />,
|
||||||
@@ -66,6 +68,7 @@ export const MediaTypeIconCollection = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
export const TypeIconCollectionCard = {
|
export const TypeIconCollectionCard = {
|
||||||
|
Actor: <MdiAccountTie className="card-image-icon" />,
|
||||||
AggregateFolder: <MdiFolderMultiple className="card-image-icon" />,
|
AggregateFolder: <MdiFolderMultiple className="card-image-icon" />,
|
||||||
Audio: <MdiMicrophone className="card-image-icon" />,
|
Audio: <MdiMicrophone className="card-image-icon" />,
|
||||||
AudioBook: <MdiBookMusic className="card-image-icon" />,
|
AudioBook: <MdiBookMusic className="card-image-icon" />,
|
||||||
@@ -75,7 +78,7 @@ export const TypeIconCollectionCard = {
|
|||||||
Channel: <MdiTelevisionClassic className="card-image-icon" />,
|
Channel: <MdiTelevisionClassic className="card-image-icon" />,
|
||||||
ChannelFolderItem: <MdiTelevisionClassic className="card-image-icon" />,
|
ChannelFolderItem: <MdiTelevisionClassic className="card-image-icon" />,
|
||||||
CollectionFolder: <MdiFolderOutline className="card-image-icon" />,
|
CollectionFolder: <MdiFolderOutline className="card-image-icon" />,
|
||||||
Episode: <MdiTelevision className="card-image-icon" />,
|
Episode: <MdiTelevisionClassic className="card-image-icon" />,
|
||||||
Folder: <MdiFolderOutline className="card-image-icon" />,
|
Folder: <MdiFolderOutline className="card-image-icon" />,
|
||||||
LiveTvChannel: <MdiTelevisionClassic className="card-image-icon" />,
|
LiveTvChannel: <MdiTelevisionClassic className="card-image-icon" />,
|
||||||
LiveTvProgram: <MdiTelevisionClassic className="card-image-icon" />,
|
LiveTvProgram: <MdiTelevisionClassic className="card-image-icon" />,
|
||||||
@@ -106,4 +109,5 @@ export const TypeIconCollectionCard = {
|
|||||||
Video: <MdiFilmstrip className="card-image-icon" />,
|
Video: <MdiFilmstrip className="card-image-icon" />,
|
||||||
Year: <MdiMultimedia className="card-image-icon" />,
|
Year: <MdiMultimedia className="card-image-icon" />,
|
||||||
Genre: <MdiDramaMasks className="card-image-icon" />,
|
Genre: <MdiDramaMasks className="card-image-icon" />,
|
||||||
|
Library: <MdiMultimedia className="card-image-icon" />,
|
||||||
};
|
};
|
||||||
@@ -15,13 +15,17 @@ const queryClient = new QueryClient({
|
|||||||
defaultOptions: {
|
defaultOptions: {
|
||||||
queries: {
|
queries: {
|
||||||
networkMode: "always",
|
networkMode: "always",
|
||||||
|
cacheTime: 120000,
|
||||||
|
},
|
||||||
|
mutations: {
|
||||||
|
networkMode: "always",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
ReactDOM.createRoot(document.getElementById("root")).render(
|
ReactDOM.createRoot(document.getElementById("root")).render(
|
||||||
<React.StrictMode>
|
<React.StrictMode>
|
||||||
<QueryClientProvider client={queryClient} option>
|
<QueryClientProvider client={queryClient}>
|
||||||
<Router>
|
<Router>
|
||||||
<App />
|
<App />
|
||||||
</Router>
|
</Router>
|
||||||
@@ -32,5 +36,6 @@ ReactDOM.createRoot(document.getElementById("root")).render(
|
|||||||
document.addEventListener("DOMContentLoaded", () => {
|
document.addEventListener("DOMContentLoaded", () => {
|
||||||
// This will wait for the window to load, but you could
|
// This will wait for the window to load, but you could
|
||||||
// run this function on whatever trigger you want
|
// run this function on whatever trigger you want
|
||||||
|
console.info("Initial render complete");
|
||||||
invoke("close_splashscreen");
|
invoke("close_splashscreen");
|
||||||
});
|
});
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.item-detail-album {
|
||||||
|
&-track {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 4% 1fr 80% 1fr;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
gap: 0.5em;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.25em 0;
|
||||||
|
background: rgb(255 255 255 / 0);
|
||||||
|
transition: background $transition-time-default;
|
||||||
|
|
||||||
|
&:first-child,
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
border-bottom: 1px solid rgb(255 255 255 / 0.05);
|
||||||
|
&s {
|
||||||
|
border-radius: 10px !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
background: $clr-background-dark-opacity-0_8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgb(255 255 255 / 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.playing {
|
||||||
|
color: $clr-accent-default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,430 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Paper from "@mui/material/Paper";
|
||||||
|
import { IconButton, useTheme } from "@mui/material";
|
||||||
|
|
||||||
|
import { useParams, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
SortOrder,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
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 { MdiClockOutline } from "../../components/icons/mdiClockOutline";
|
||||||
|
|
||||||
|
import { getRuntimeMusic, getRuntimeFull, endsAt } from "../../utils/date/time";
|
||||||
|
|
||||||
|
import Hero from "../../components/layouts/item/hero";
|
||||||
|
import { Card } from "../../components/card/card";
|
||||||
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
|
|
||||||
|
import "./album.module.scss";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
|
import { MdiPlayOutline } from "../../components/icons/mdiPlayOutline";
|
||||||
|
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||||
|
function TabPanel(props) {
|
||||||
|
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 && <Box>{children}</Box>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TabPanel.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
index: PropTypes.number.isRequired,
|
||||||
|
value: PropTypes.number.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
function a11yProps(index) {
|
||||||
|
return {
|
||||||
|
id: `full-width-tab-${index}`,
|
||||||
|
"aria-controls": `full-width-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const MusicAlbumTitlePage = () => {
|
||||||
|
const { id } = useParams();
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(window.api).getItem({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: id,
|
||||||
|
fields: [ItemFields.Crew],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const similarItems = useQuery({
|
||||||
|
queryKey: ["item", id, "similarItem"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let result = await getLibraryApi(window.api).getSimilarAlbums({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: item.data.Id,
|
||||||
|
limit: 16,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const musicTracks = useQuery({
|
||||||
|
queryKey: ["item", id, "musicTracks"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
parentId: item.data.Id,
|
||||||
|
sortOrder: SortOrder.Ascending,
|
||||||
|
sortBy: "IndexNumber",
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.MusicAlbum,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const [
|
||||||
|
currentTrackItem,
|
||||||
|
setCurrentAudioTrack,
|
||||||
|
setAudioUrl,
|
||||||
|
setAudioDisplay,
|
||||||
|
setAudioItem,
|
||||||
|
setAudioTracks,
|
||||||
|
] = useAudioPlayback((state) => [
|
||||||
|
state.item,
|
||||||
|
state.setCurrentTrack,
|
||||||
|
state.setUrl,
|
||||||
|
state.setDisplay,
|
||||||
|
state.setItem,
|
||||||
|
state.setTracks,
|
||||||
|
]);
|
||||||
|
const playTrack = (index) => {
|
||||||
|
setAudioTracks(musicTracks.data.Items);
|
||||||
|
setCurrentAudioTrack(index);
|
||||||
|
setAudioUrl(
|
||||||
|
`${window.api.basePath}/Audio/${musicTracks.data.Items[index].Id}/universal?deviceId=${window.api.deviceInfo.id}&userId=${user.data.Id}&api_key=${window.api.accessToken}`,
|
||||||
|
);
|
||||||
|
setAudioItem(musicTracks.data.Items[index]);
|
||||||
|
setAudioDisplay(true);
|
||||||
|
};
|
||||||
|
|
||||||
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess) {
|
||||||
|
setAppBackdrop(
|
||||||
|
item.data.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
item.data.Type === BaseItemKind.Episode
|
||||||
|
? `${window.api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
|
item.data.Id,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
if (item.isLoading || similarItems.isLoading) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess && similarItems.isSuccess) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="scrollY"
|
||||||
|
style={{
|
||||||
|
padding: "5em 2em 2em 1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Hero
|
||||||
|
item={item.data}
|
||||||
|
userId={user.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
artists={item.data.ArtistItems}
|
||||||
|
albumBy={item.data.AlbumArtists[0]}
|
||||||
|
disableMarkAsPlayedButton
|
||||||
|
audioPlayButton
|
||||||
|
cardType="square"
|
||||||
|
/>
|
||||||
|
{musicTracks.isLoading ? (
|
||||||
|
<></>
|
||||||
|
) : (
|
||||||
|
musicTracks.data.TotalRecordCount > 0 && (
|
||||||
|
<Paper
|
||||||
|
className="item-detail-album-tracks"
|
||||||
|
style={{
|
||||||
|
marginBottom: "1.2em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<div
|
||||||
|
key={0}
|
||||||
|
className="item-detail-album-track"
|
||||||
|
style={{
|
||||||
|
padding: "0.75em 0 ",
|
||||||
|
background:
|
||||||
|
"rgb(255 255 255 / 0.1)",
|
||||||
|
boxShadow:
|
||||||
|
"0 0 10px rgb(0 0 0 / 0.5)",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="h6"
|
||||||
|
fontWeight={400}
|
||||||
|
style={{
|
||||||
|
justifySelf: "end",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
#
|
||||||
|
</Typography>
|
||||||
|
<div></div>
|
||||||
|
<Typography
|
||||||
|
variant="h6"
|
||||||
|
style={{
|
||||||
|
justifySelf: "start",
|
||||||
|
}}
|
||||||
|
fontWeight={400}
|
||||||
|
>
|
||||||
|
Name
|
||||||
|
</Typography>
|
||||||
|
<MdiClockOutline />
|
||||||
|
</div>
|
||||||
|
{musicTracks.data.Items.map(
|
||||||
|
(track, index) => {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
key={track.Id}
|
||||||
|
className={
|
||||||
|
currentTrackItem.Id ==
|
||||||
|
track.Id &&
|
||||||
|
currentTrackItem.ParentId ==
|
||||||
|
track.ParentId
|
||||||
|
? "item-detail-album-track playing"
|
||||||
|
: "item-detail-album-track"
|
||||||
|
}
|
||||||
|
onClick={() =>
|
||||||
|
playTrack(index)
|
||||||
|
}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
justifySelf:
|
||||||
|
"end",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{!!track.IndexNumber
|
||||||
|
? track.IndexNumber
|
||||||
|
: "-"}
|
||||||
|
</Typography>
|
||||||
|
|
||||||
|
<LikeButton
|
||||||
|
itemId={track.Id}
|
||||||
|
isFavorite={
|
||||||
|
track.UserData
|
||||||
|
?.IsFavorite
|
||||||
|
}
|
||||||
|
queryKey={[
|
||||||
|
"item",
|
||||||
|
id,
|
||||||
|
"musicTracks",
|
||||||
|
]}
|
||||||
|
userId={
|
||||||
|
user.data.Id
|
||||||
|
}
|
||||||
|
itemName={
|
||||||
|
track.Name
|
||||||
|
}
|
||||||
|
color={
|
||||||
|
currentTrackItem.Id ==
|
||||||
|
track.Id &&
|
||||||
|
currentTrackItem.ParentId ==
|
||||||
|
track.ParentId
|
||||||
|
? "hsl(337, 96%, 56%)"
|
||||||
|
: "white"
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
flexDirection:
|
||||||
|
"column",
|
||||||
|
width: "100%",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Typography
|
||||||
|
variant="subtitle1"
|
||||||
|
style={{
|
||||||
|
justifySelf:
|
||||||
|
"start",
|
||||||
|
}}
|
||||||
|
fontWeight={
|
||||||
|
500
|
||||||
|
}
|
||||||
|
>
|
||||||
|
{track.Name}
|
||||||
|
</Typography>
|
||||||
|
{track.AlbumArtist ==
|
||||||
|
"Various Artists" && (
|
||||||
|
<Typography
|
||||||
|
variant="subtitle2"
|
||||||
|
style={{
|
||||||
|
opacity: 0.5,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{track.ArtistItems.map(
|
||||||
|
(
|
||||||
|
artist,
|
||||||
|
) =>
|
||||||
|
artist.Name,
|
||||||
|
).join(
|
||||||
|
", ",
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
<Typography variant="subtitle1">
|
||||||
|
{getRuntimeMusic(
|
||||||
|
track.RunTimeTicks,
|
||||||
|
)}
|
||||||
|
</Typography>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</Paper>
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
|
||||||
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="You might also like"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{similarItems.data.Items.map((similar, index) => {
|
||||||
|
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.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
!!similar.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
similar.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
similar
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError || similarItems.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default MusicAlbumTitlePage;
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.item-detail-artist {
|
||||||
|
&-container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&-header {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&-cards {
|
||||||
|
display: grid;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(8, minmax(0, 1fr));
|
||||||
|
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
@@ -0,0 +1,461 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Stack from "@mui/material/Stack";
|
||||||
|
import Chip from "@mui/material/Chip";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
import Tabs from "@mui/material/Tabs";
|
||||||
|
import Tab from "@mui/material/Tab";
|
||||||
|
import Grid2 from "@mui/material/Unstable_Grid2";
|
||||||
|
import Button from "@mui/material/Button";
|
||||||
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
import Paper from "@mui/material/Paper";
|
||||||
|
import TableContainer from "@mui/material/TableContainer";
|
||||||
|
import Table from "@mui/material/Table";
|
||||||
|
import TableHead from "@mui/material/TableHead";
|
||||||
|
import TableRow from "@mui/material/TableRow";
|
||||||
|
import TableBody from "@mui/material/TableBody";
|
||||||
|
import TableCell from "@mui/material/TableCell";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import Link from "@mui/material/Link";
|
||||||
|
import { green, pink, yellow } from "@mui/material/colors";
|
||||||
|
|
||||||
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { Blurhash } from "react-blurhash";
|
||||||
|
import { useParams, useNavigate, Link as RouterLink } from "react-router-dom";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
LocationType,
|
||||||
|
MediaStreamType,
|
||||||
|
SortOrder,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
|
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import { MdiPlayOutline } from "../../components/icons/mdiPlayOutline";
|
||||||
|
import { MdiStar } from "../../components/icons/mdiStar";
|
||||||
|
import { MdiCheck } from "../../components/icons/mdiCheck";
|
||||||
|
import { MdiHeartOutline } from "../../components/icons/mdiHeartOutline";
|
||||||
|
import { MdiHeart } from "../../components/icons/mdiHeart";
|
||||||
|
import { MdiClockOutline } from "../../components/icons/mdiClockOutline";
|
||||||
|
|
||||||
|
import { getRuntimeMusic, getRuntimeFull, endsAt } from "../../utils/date/time";
|
||||||
|
import { TypeIconCollectionCard } from "../../components/utils/iconsCollection";
|
||||||
|
|
||||||
|
import Hero from "../../components/layouts/item/hero";
|
||||||
|
import { Card } from "../../components/card/card";
|
||||||
|
import { EpisodeCard } from "../../components/card/episodeCard";
|
||||||
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
|
|
||||||
|
import "./artist.module.scss";
|
||||||
|
import { EpisodeCardsSkeleton } from "../../components/skeleton/episodeCards";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
|
||||||
|
import { MdiMusic } from "../../components/icons/mdiMusic";
|
||||||
|
import { usePlaybackStore } from "../../utils/store/playback";
|
||||||
|
import { Tooltip } from "@mui/material";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
import { ActorCard } from "../../components/card/actorCards";
|
||||||
|
import MusicTrack from "../../components/musicTrack";
|
||||||
|
function TabPanel(props) {
|
||||||
|
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 && <Box>{children}</Box>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TabPanel.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
index: PropTypes.number.isRequired,
|
||||||
|
value: PropTypes.number.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
function a11yProps(index) {
|
||||||
|
return {
|
||||||
|
id: `full-width-tab-${index}`,
|
||||||
|
"aria-controls": `full-width-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const ArtistTitlePage = () => {
|
||||||
|
const { id } = useParams();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
const [primageImageLoaded, setPrimaryImageLoaded] = useState(false);
|
||||||
|
const [backdropImageLoaded, setBackdropImageLoaded] = useState(false);
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(window.api).getItem({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: id,
|
||||||
|
fields: [ItemFields.Crew],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const artistDiscography = useQuery({
|
||||||
|
queryKey: ["item", id, "artist", "discography"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
albumArtistIds: [item.data.Id],
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: [SortOrder.Descending],
|
||||||
|
recursive: true,
|
||||||
|
includeItemTypes: [BaseItemKind.MusicAlbum],
|
||||||
|
userId: user.data.Id,
|
||||||
|
fields: [ItemFields.Overview],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.MusicArtist,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const artistSongs = useQuery({
|
||||||
|
queryKey: ["item", id, "artist", "songs"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
artistIds: [item.data.Id],
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: [SortOrder.Ascending],
|
||||||
|
recursive: true,
|
||||||
|
includeItemTypes: [BaseItemKind.Audio],
|
||||||
|
userId: user.data.Id,
|
||||||
|
fields: [ItemFields.Overview],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.MusicArtist,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const artistAppearances = useQuery({
|
||||||
|
queryKey: ["item", id, "artist", "appearences"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
contributingArtistIds: [item.data.Id],
|
||||||
|
excludeItemIds: [item.data.Id],
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: [SortOrder.Descending],
|
||||||
|
recursive: true,
|
||||||
|
includeItemTypes: [BaseItemKind.MusicAlbum],
|
||||||
|
userId: user.data.Id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.MusicArtist,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const artistTabs = [
|
||||||
|
{ title: "Discography", data: artistDiscography },
|
||||||
|
{ title: "Songs", data: artistSongs },
|
||||||
|
{ title: "Appearances", data: artistAppearances },
|
||||||
|
];
|
||||||
|
const [activeArtistTab, setActiveArtistTab] = useState(0);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (
|
||||||
|
artistDiscography.isSuccess &&
|
||||||
|
artistSongs.isSuccess &&
|
||||||
|
artistAppearances.isSuccess
|
||||||
|
) {
|
||||||
|
if (artistDiscography.data.TotalRecordCount != 0) {
|
||||||
|
setActiveArtistTab(0);
|
||||||
|
} else if (artistSongs.data.TotalRecordCount != 0) {
|
||||||
|
setActiveArtistTab(1);
|
||||||
|
} else if (artistAppearances.data.TotalRecordCount != 0) {
|
||||||
|
setActiveArtistTab(2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [
|
||||||
|
artistDiscography.isLoading,
|
||||||
|
artistSongs.isLoading,
|
||||||
|
artistAppearances.isLoading,
|
||||||
|
]);
|
||||||
|
|
||||||
|
const [animationDirection, setAnimationDirection] = useState("forward");
|
||||||
|
|
||||||
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess) {
|
||||||
|
setAppBackdrop(
|
||||||
|
item.data.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
item.data.Type === BaseItemKind.Episode
|
||||||
|
? `${window.api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
|
item.data.Id,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
if (item.isLoading) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="scrollY"
|
||||||
|
style={{
|
||||||
|
padding: "5em 2em 2em 1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Hero
|
||||||
|
item={item.data}
|
||||||
|
userId={user.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
disableMarkAsPlayedButton
|
||||||
|
audioPlayButton
|
||||||
|
disableInfoStrip
|
||||||
|
/>
|
||||||
|
|
||||||
|
<div className="item-detail-artist-container">
|
||||||
|
<div className="item-detail-artist-header">
|
||||||
|
<Tabs
|
||||||
|
variant="scrollable"
|
||||||
|
value={activeArtistTab}
|
||||||
|
onChange={(e, newVal) => {
|
||||||
|
if (newVal > activeArtistTab) {
|
||||||
|
setAnimationDirection("forward");
|
||||||
|
} else if (newVal < activeArtistTab) {
|
||||||
|
setAnimationDirection("backwards");
|
||||||
|
}
|
||||||
|
setActiveArtistTab(newVal);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{artistTabs.map((tab, index) => {
|
||||||
|
return (
|
||||||
|
<Tab
|
||||||
|
key={index}
|
||||||
|
label={tab.title}
|
||||||
|
disabled={
|
||||||
|
tab.data.data
|
||||||
|
?.TotalRecordCount ==
|
||||||
|
0
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</Tabs>
|
||||||
|
<Divider />
|
||||||
|
</div>
|
||||||
|
<AnimatePresence>
|
||||||
|
<TabPanel value={activeArtistTab} index={0}>
|
||||||
|
<motion.div
|
||||||
|
key={activeArtistTab}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
transform:
|
||||||
|
animationDirection ==
|
||||||
|
"forward"
|
||||||
|
? "translate(30px)"
|
||||||
|
: "translate(-30px)",
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
transform: "translate(0px)",
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.2,
|
||||||
|
ease: "anticipate",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{artistDiscography.isSuccess &&
|
||||||
|
artistDiscography.data.Items.map(
|
||||||
|
(tabitem, aindex) => {
|
||||||
|
return (
|
||||||
|
<ArtistAlbum
|
||||||
|
key={aindex}
|
||||||
|
user={
|
||||||
|
user.data
|
||||||
|
}
|
||||||
|
album={tabitem}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
</TabPanel>
|
||||||
|
<TabPanel value={activeArtistTab} index={1}>
|
||||||
|
<motion.div
|
||||||
|
key={activeArtistTab}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
transform:
|
||||||
|
animationDirection ==
|
||||||
|
"forward"
|
||||||
|
? "translate(30px)"
|
||||||
|
: "translate(-30px)",
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
transform: "translate(0px)",
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.2,
|
||||||
|
ease: "anticipate",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{artistSongs.isSuccess &&
|
||||||
|
artistSongs.data.Items.map(
|
||||||
|
(tabitem, aindex) => {
|
||||||
|
return (
|
||||||
|
<MusicTrack
|
||||||
|
item={tabitem}
|
||||||
|
key={
|
||||||
|
tabitem.Id
|
||||||
|
}
|
||||||
|
queryKey={[
|
||||||
|
"item",
|
||||||
|
id,
|
||||||
|
"artist",
|
||||||
|
"songs",
|
||||||
|
]}
|
||||||
|
userId={
|
||||||
|
user.data
|
||||||
|
.Id
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
</TabPanel>
|
||||||
|
<TabPanel value={activeArtistTab} index={2}>
|
||||||
|
<motion.div
|
||||||
|
key={activeArtistTab}
|
||||||
|
initial={{
|
||||||
|
opacity: 0,
|
||||||
|
transform:
|
||||||
|
animationDirection ==
|
||||||
|
"forward"
|
||||||
|
? "translate(30px)"
|
||||||
|
: "translate(-30px)",
|
||||||
|
}}
|
||||||
|
animate={{
|
||||||
|
opacity: 1,
|
||||||
|
transform: "translate(0px)",
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.2,
|
||||||
|
ease: "anticipate",
|
||||||
|
}}
|
||||||
|
className="grid"
|
||||||
|
>
|
||||||
|
{artistAppearances.isSuccess &&
|
||||||
|
artistAppearances.data.Items.map(
|
||||||
|
(tabitem, aindex) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={
|
||||||
|
tabitem.Id
|
||||||
|
}
|
||||||
|
item={tabitem}
|
||||||
|
cardTitle={
|
||||||
|
tabitem.Name
|
||||||
|
}
|
||||||
|
imageType={
|
||||||
|
"Primary"
|
||||||
|
}
|
||||||
|
cardCaption={
|
||||||
|
tabitem.AlbumArtist
|
||||||
|
}
|
||||||
|
cardType={
|
||||||
|
"square"
|
||||||
|
}
|
||||||
|
queryKey={[
|
||||||
|
"item",
|
||||||
|
id,
|
||||||
|
"artist",
|
||||||
|
"appearences",
|
||||||
|
]}
|
||||||
|
userId={
|
||||||
|
user.data
|
||||||
|
.Id
|
||||||
|
}
|
||||||
|
imageBlurhash={
|
||||||
|
!!tabitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
tabitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
tabitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
></Card>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
</TabPanel>
|
||||||
|
</AnimatePresence>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default ArtistTitlePage;
|
||||||
@@ -0,0 +1,328 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import { useParams, useNavigate, Link as RouterLink } from "react-router-dom";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
LocationType,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
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 Hero from "../../components/layouts/item/hero";
|
||||||
|
import { Card } from "../../components/card/card";
|
||||||
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
|
|
||||||
|
import "./boxset.module.scss";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
function TabPanel(props) {
|
||||||
|
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 && <Box>{children}</Box>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TabPanel.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
index: PropTypes.number.isRequired,
|
||||||
|
value: PropTypes.number.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
function a11yProps(index) {
|
||||||
|
return {
|
||||||
|
id: `full-width-tab-${index}`,
|
||||||
|
"aria-controls": `full-width-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const BoxSetTitlePage = () => {
|
||||||
|
const { id } = useParams();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(window.api).getItem({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: id,
|
||||||
|
fields: [ItemFields.Crew],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const collectionItems = useQuery({
|
||||||
|
queryKey: ["item", id, `collection`],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
parentId: item.data.Id,
|
||||||
|
fields: [ItemFields.SeasonUserData, ItemFields.Overview],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const similarItems = useQuery({
|
||||||
|
queryKey: ["item", id, "similarItem"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getLibraryApi(window.api).getSimilarItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: item.data.Id,
|
||||||
|
limit: 16,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
|
const [directors, setDirectors] = useState([]);
|
||||||
|
const [writers, setWriters] = useState([]);
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess) {
|
||||||
|
setAppBackdrop(
|
||||||
|
item.data.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
item.data.Type === BaseItemKind.Episode
|
||||||
|
? `${window.api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
|
item.data.Id,
|
||||||
|
);
|
||||||
|
let direTp = item.data.People.filter(
|
||||||
|
(itm) => itm.Type == "Director",
|
||||||
|
);
|
||||||
|
setDirectors(direTp);
|
||||||
|
let writeTp = item.data.People.filter(
|
||||||
|
(itm) => itm.Type == "Writer",
|
||||||
|
);
|
||||||
|
setWriters(writeTp);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
if (item.isLoading || similarItems.isLoading) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess && similarItems.isSuccess) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="scrollY"
|
||||||
|
style={{
|
||||||
|
padding: "5em 2em 2em 1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Hero
|
||||||
|
item={item.data}
|
||||||
|
userId={user.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
writers={writers}
|
||||||
|
directors={directors}
|
||||||
|
studios={item.data.Studios}
|
||||||
|
/>
|
||||||
|
{item.data.People.length > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Cast & Crew"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{item.data.People.map((person, index) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={person.Id}
|
||||||
|
item={person}
|
||||||
|
cardTitle={person.Name}
|
||||||
|
cardCaption={person.Role}
|
||||||
|
cardType="square"
|
||||||
|
userId={user.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
person.ImageBlurHashes
|
||||||
|
?.Primary[0]
|
||||||
|
}
|
||||||
|
overrideIcon="Person"
|
||||||
|
disableOverlay
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
{collectionItems.data.TotalRecordCount > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Items"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{collectionItems.data.Items.map(
|
||||||
|
(similar, index) => {
|
||||||
|
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,
|
||||||
|
`collection`,
|
||||||
|
]}
|
||||||
|
userId={user.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
!!similar.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
similar.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
similar
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="You might also like"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{similarItems.data.Items.map((similar, index) => {
|
||||||
|
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.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
!!similar.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
similar.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
similar
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError || similarItems.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default BoxSetTitlePage;
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.episode .item-detail-primaryImage {
|
||||||
|
align-self: center;
|
||||||
|
}
|
||||||
@@ -0,0 +1,329 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useState, useEffect, useRef } from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Stack from "@mui/material/Stack";
|
||||||
|
import Chip from "@mui/material/Chip";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
import LinearProgress from "@mui/material/LinearProgress";
|
||||||
|
import Tabs from "@mui/material/Tabs";
|
||||||
|
import Tab from "@mui/material/Tab";
|
||||||
|
import Grid2 from "@mui/material/Unstable_Grid2";
|
||||||
|
import Button from "@mui/material/Button";
|
||||||
|
import IconButton from "@mui/material/IconButton";
|
||||||
|
import Paper from "@mui/material/Paper";
|
||||||
|
import TableContainer from "@mui/material/TableContainer";
|
||||||
|
import Table from "@mui/material/Table";
|
||||||
|
import TableHead from "@mui/material/TableHead";
|
||||||
|
import TableRow from "@mui/material/TableRow";
|
||||||
|
import TableBody from "@mui/material/TableBody";
|
||||||
|
import TableCell from "@mui/material/TableCell";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
import Link from "@mui/material/Link";
|
||||||
|
import { green, pink, yellow } from "@mui/material/colors";
|
||||||
|
|
||||||
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { Blurhash } from "react-blurhash";
|
||||||
|
import { useParams, useNavigate, Link as RouterLink } from "react-router-dom";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
LocationType,
|
||||||
|
MediaStreamType,
|
||||||
|
SortOrder,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
|
||||||
|
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import { MdiPlayOutline } from "../../components/icons/mdiPlayOutline";
|
||||||
|
import { MdiStar } from "../../components/icons/mdiStar";
|
||||||
|
import { MdiCheck } from "../../components/icons/mdiCheck";
|
||||||
|
import { MdiHeartOutline } from "../../components/icons/mdiHeartOutline";
|
||||||
|
import { MdiHeart } from "../../components/icons/mdiHeart";
|
||||||
|
import { MdiClockOutline } from "../../components/icons/mdiClockOutline";
|
||||||
|
|
||||||
|
import { getRuntimeMusic, getRuntimeFull, endsAt } from "../../utils/date/time";
|
||||||
|
import { TypeIconCollectionCard } from "../../components/utils/iconsCollection";
|
||||||
|
|
||||||
|
import Hero from "../../components/layouts/item/hero";
|
||||||
|
import { Card } from "../../components/card/card";
|
||||||
|
import { EpisodeCard } from "../../components/card/episodeCard";
|
||||||
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
|
|
||||||
|
import "./episode.module.scss";
|
||||||
|
import { EpisodeCardsSkeleton } from "../../components/skeleton/episodeCards";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import { ArtistAlbum } from "../../components/layouts/artist/artistAlbum";
|
||||||
|
import { MdiMusic } from "../../components/icons/mdiMusic";
|
||||||
|
import { usePlaybackStore } from "../../utils/store/playback";
|
||||||
|
import { Tooltip } from "@mui/material";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
import { ActorCard } from "../../components/card/actorCards";
|
||||||
|
function TabPanel(props) {
|
||||||
|
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 && <Box>{children}</Box>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TabPanel.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
index: PropTypes.number.isRequired,
|
||||||
|
value: PropTypes.number.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
function a11yProps(index) {
|
||||||
|
return {
|
||||||
|
id: `full-width-tab-${index}`,
|
||||||
|
"aria-controls": `full-width-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const EpisodeTitlePage = () => {
|
||||||
|
const { id } = useParams();
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(window.api).getItem({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: id,
|
||||||
|
fields: [ItemFields.Crew],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [videoTracks, setVideoTracks] = useState([]);
|
||||||
|
const [audioTracks, setAudioTracks] = useState([]);
|
||||||
|
const [subtitleTracks, setSubtitleTracks] = useState([]);
|
||||||
|
|
||||||
|
const filterMediaStreamVideo = (source) => {
|
||||||
|
if (source.Type == MediaStreamType.Video) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
const filterMediaStreamAudio = (source) => {
|
||||||
|
if (source.Type == MediaStreamType.Audio) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
const filterMediaStreamSubtitle = (source) => {
|
||||||
|
if (source.Type == MediaStreamType.Subtitle) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
};
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess && !!item.data.MediaStreams) {
|
||||||
|
let videos = item.data.MediaStreams.filter(
|
||||||
|
filterMediaStreamVideo,
|
||||||
|
);
|
||||||
|
let audios = item.data.MediaStreams.filter(
|
||||||
|
filterMediaStreamAudio,
|
||||||
|
);
|
||||||
|
let subs = item.data.MediaStreams.filter(
|
||||||
|
filterMediaStreamSubtitle,
|
||||||
|
);
|
||||||
|
|
||||||
|
setVideoTracks(videos);
|
||||||
|
setAudioTracks(audios);
|
||||||
|
setSubtitleTracks(subs);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
const upcomingEpisodes = useQuery({
|
||||||
|
queryKey: ["item", id, "episode", "upcomingEpisodes"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
parentId: item.data.ParentId,
|
||||||
|
startIndex: item.data.IndexNumber,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.Episode,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
|
const [directors, setDirectors] = useState([]);
|
||||||
|
const [writers, setWriters] = useState([]);
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess) {
|
||||||
|
setAppBackdrop(
|
||||||
|
item.data.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
item.data.Type === BaseItemKind.Episode
|
||||||
|
? `${window.api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
|
item.data.Id,
|
||||||
|
);
|
||||||
|
let direTp = item.data.People.filter(
|
||||||
|
(itm) => itm.Type == "Director",
|
||||||
|
);
|
||||||
|
setDirectors(direTp);
|
||||||
|
let writeTp = item.data.People.filter(
|
||||||
|
(itm) => itm.Type == "Writer",
|
||||||
|
);
|
||||||
|
setWriters(writeTp);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
if (item.isLoading) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="scrollY episode"
|
||||||
|
style={{
|
||||||
|
padding: "5em 2em 2em 1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Hero
|
||||||
|
item={item.data}
|
||||||
|
userId={user.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
writers={writers}
|
||||||
|
directors={directors}
|
||||||
|
videoTracks={videoTracks}
|
||||||
|
audioTracks={audioTracks}
|
||||||
|
subtitleTracks={subtitleTracks}
|
||||||
|
favourParentImg={false}
|
||||||
|
isEpisode
|
||||||
|
cardType="thumb"
|
||||||
|
/>
|
||||||
|
{item.data.People.length > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Cast & Crew"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{item.data.People.map((person, index) => {
|
||||||
|
return (
|
||||||
|
<ActorCard
|
||||||
|
key={person.Id}
|
||||||
|
item={person}
|
||||||
|
cardTitle={person.Name}
|
||||||
|
cardCaption={person.Role}
|
||||||
|
cardType="square"
|
||||||
|
userId={user.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
person.ImageBlurHashes
|
||||||
|
?.Primary[0]
|
||||||
|
}
|
||||||
|
overrideIcon="Person"
|
||||||
|
disableOverlay
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
{upcomingEpisodes.isSuccess &&
|
||||||
|
upcomingEpisodes.data.Items.length > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Upcoming Episodes"
|
||||||
|
displayCards={4}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{upcomingEpisodes.data.Items.map(
|
||||||
|
(episode, index) => {
|
||||||
|
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.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
!!episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
></Card>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default EpisodeTitlePage;
|
||||||
@@ -1,4 +1,20 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
|
.home {
|
||||||
|
&-background {
|
||||||
|
&-container {
|
||||||
|
position: fixed !important;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
&-backdrop {
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
& > * {
|
||||||
|
all: inherit;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.hero-carousel {
|
.hero-carousel {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -6,8 +22,8 @@
|
|||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
&-slide {
|
&-slide {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 70vh;
|
height: 100%;
|
||||||
border-radius: 10px !important;
|
border-radius: 0px !important;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
@@ -17,6 +33,7 @@
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
|
filter: brightness(0.7);
|
||||||
}
|
}
|
||||||
&-container {
|
&-container {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -25,16 +42,17 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
mask-image: linear-gradient(
|
opacity: 0.8;
|
||||||
to right,
|
mask-image: linear-gradient(to bottom, black 40%, transparent),
|
||||||
rgba(0, 0, 0, 0.1),
|
linear-gradient(to left, black 40%, transparent);
|
||||||
black 90%
|
|
||||||
);
|
|
||||||
-webkit-mask-image: linear-gradient(
|
-webkit-mask-image: linear-gradient(
|
||||||
to right,
|
to bottom,
|
||||||
rgba(0, 0, 0, 0.1),
|
black 40%,
|
||||||
black 90%
|
transparent
|
||||||
);
|
),
|
||||||
|
linear-gradient(to left, black 40%, transparent);
|
||||||
|
mask-composite: source-in;
|
||||||
|
-webkit-mask-composite: source-in;
|
||||||
}
|
}
|
||||||
&-image {
|
&-image {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -45,19 +63,10 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background-position: center;
|
background-position: center;
|
||||||
opacity: 1;
|
object-fit: cover;
|
||||||
mask-image: linear-gradient(
|
width: 100%;
|
||||||
to right,
|
height: 100%;
|
||||||
transparent 2%,
|
transition: opacity 0.5s;
|
||||||
rgba(0, 0, 0, 0.5) 20%,
|
|
||||||
black 70%
|
|
||||||
);
|
|
||||||
-webkit-mask-image: linear-gradient(
|
|
||||||
to right,
|
|
||||||
transparent 2%,
|
|
||||||
rgba(0, 0, 0, 0.5) 20%,
|
|
||||||
black 70%
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
&-icon {
|
&-icon {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -84,8 +93,8 @@
|
|||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
&-logo {
|
&-logo {
|
||||||
max-width: 12em;
|
max-width: 9em;
|
||||||
height: 2em;
|
height: 3em;
|
||||||
object-fit: contain;
|
object-fit: contain;
|
||||||
object-position: bottom;
|
object-position: bottom;
|
||||||
}
|
}
|
||||||
@@ -94,14 +103,21 @@
|
|||||||
position: relative;
|
position: relative;
|
||||||
z-index: 0;
|
z-index: 0;
|
||||||
display: flex;
|
display: flex;
|
||||||
height: 70vh;
|
height: 100%;
|
||||||
width: 70%;
|
width: 80%;
|
||||||
padding: 2em;
|
padding: 2em;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: center;
|
justify-content: flex-end;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
|
padding-bottom: 5em;
|
||||||
}
|
}
|
||||||
&-indicator {
|
&-indicator {
|
||||||
|
&-container {
|
||||||
|
width: calc(100% - 2em) !important;
|
||||||
|
margin-top: -1em !important;
|
||||||
|
margin-left: 1em !important;
|
||||||
|
margin-right: 1em !important;
|
||||||
|
}
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 5px;
|
height: 5px;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
|
|||||||
@@ -1,84 +1 @@
|
|||||||
/** @format */
|
/** @format */
|
||||||
|
|
||||||
.item-detail {
|
|
||||||
&-heading {
|
|
||||||
opacity: 0.85;
|
|
||||||
}
|
|
||||||
&-backdrop {
|
|
||||||
position: fixed;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
width: inherit;
|
|
||||||
height: 100%;
|
|
||||||
z-index: -2;
|
|
||||||
opacity: 0.2;
|
|
||||||
}
|
|
||||||
&-header {
|
|
||||||
display: flex;
|
|
||||||
gap: 1em;
|
|
||||||
justify-content: flex-start;
|
|
||||||
align-items: flex-end;
|
|
||||||
position: relative;
|
|
||||||
flex-wrap: wrap;
|
|
||||||
&-backdrop {
|
|
||||||
position: absolute;
|
|
||||||
width: 100vw;
|
|
||||||
height: 80vh;
|
|
||||||
top: -88px;
|
|
||||||
width: 100vw;
|
|
||||||
right: 0;
|
|
||||||
left: -24px;
|
|
||||||
z-index: -2;
|
|
||||||
filter: brightness(0.6);
|
|
||||||
mask-image: linear-gradient(0deg, transparent, black 75%);
|
|
||||||
-webkit-mask-image: linear-gradient(
|
|
||||||
0deg,
|
|
||||||
transparent,
|
|
||||||
black 75%
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&-image {
|
|
||||||
position: absolute;
|
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: top;
|
|
||||||
transition: opacity $transition-time-default;
|
|
||||||
&-blurhash {
|
|
||||||
z-index: -1;
|
|
||||||
}
|
|
||||||
&-container {
|
|
||||||
width: 15%;
|
|
||||||
flex-shrink: 0;
|
|
||||||
position: relative;
|
|
||||||
border-radius: $border-radius-default;
|
|
||||||
overflow: hidden;
|
|
||||||
box-shadow: 0 0 15px rgb(0 0 0 / 0.4);
|
|
||||||
&.Episode {
|
|
||||||
flex-shrink: 0;
|
|
||||||
flex-grow: 0.25;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&-icon-container {
|
|
||||||
background: $clr-gradient-dark;
|
|
||||||
position: absolute;
|
|
||||||
top: 0;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
bottom: 0;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
justify-content: center;
|
|
||||||
z-index: -2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
&-title-logo {
|
|
||||||
filter: drop-shadow(0 0 10px rgb(0 0 0 /0.2));
|
|
||||||
height: 100%;
|
|
||||||
max-height: 5em;
|
|
||||||
width: 45%;
|
|
||||||
object-fit: contain;
|
|
||||||
object-position: bottom;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -34,3 +34,46 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.library {
|
||||||
|
padding: 0 !important;
|
||||||
|
position: relative;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: stretch;
|
||||||
|
&-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(8, minmax(0, 1fr));
|
||||||
|
justify-items: center;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
&-items {
|
||||||
|
height: calc(100vh - 4em);
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
|
padding-bottom: 1em;
|
||||||
|
padding-right: 1em;
|
||||||
|
padding-top: 4.5em;
|
||||||
|
&-header {
|
||||||
|
position: absolute;
|
||||||
|
top: 4.4em;
|
||||||
|
z-index: 10;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 100%;
|
||||||
|
height: 4em;
|
||||||
|
}
|
||||||
|
&-options {
|
||||||
|
padding: 0.5em 1.2em;
|
||||||
|
gap: 0.5em;
|
||||||
|
background: $clr-background-opacity-0_5;
|
||||||
|
border-radius: 100px;
|
||||||
|
overflow: hidden;
|
||||||
|
backdrop-filter: blur(5px);
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -282,19 +282,18 @@ export const UserLogin = () => {
|
|||||||
>
|
>
|
||||||
<Card
|
<Card
|
||||||
key={index}
|
key={index}
|
||||||
itemName={item.Name}
|
cardTitle={item.Name}
|
||||||
itemId={item.Id}
|
item={item}
|
||||||
imageTags={
|
|
||||||
!!item.PrimaryImageTag
|
|
||||||
}
|
|
||||||
disableOverlay
|
disableOverlay
|
||||||
iconType="User"
|
itemType="User"
|
||||||
cardOrientation="sqaure"
|
cardType="square"
|
||||||
onClickEvent={() =>
|
onClick={() =>
|
||||||
navigate(
|
navigate(
|
||||||
`/login/withImg/${item.Name}/${item.Id}/`,
|
`/login/withImg/${item.Name}/${item.Id}/`,
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
overrideIcon="User"
|
||||||
|
imageType="Primary"
|
||||||
/>
|
/>
|
||||||
</Grid>
|
</Grid>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -0,0 +1,455 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
import Tabs from "@mui/material/Tabs";
|
||||||
|
import Tab from "@mui/material/Tab";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
|
||||||
|
import { AnimatePresence, motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { useParams } from "react-router-dom";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
LocationType,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import { getItemsApi } from "@jellyfin/sdk/lib/utils/api/items-api";
|
||||||
|
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import Hero from "../../components/layouts/item/hero";
|
||||||
|
import { Card } from "../../components/card/card";
|
||||||
|
|
||||||
|
import "./person.module.scss";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
|
||||||
|
function TabPanel(props) {
|
||||||
|
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>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TabPanel.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
index: PropTypes.number.isRequired,
|
||||||
|
value: PropTypes.number.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
function a11yProps(index) {
|
||||||
|
return {
|
||||||
|
id: `full-width-tab-${index}`,
|
||||||
|
"aria-controls": `full-width-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const PersonTitlePage = () => {
|
||||||
|
const { id } = useParams();
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(window.api).getItem({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: id,
|
||||||
|
fields: [ItemFields.Crew],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const personMovies = useQuery({
|
||||||
|
queryKey: ["item", id, "personMovies"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Movie],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: ["Descending"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.Person,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
const personShows = useQuery({
|
||||||
|
queryKey: ["item", id, "personShows"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Series],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: ["Descending"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.Person,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const personBooks = useQuery({
|
||||||
|
queryKey: ["item", id, "personBooks"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Book],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
sortOrder: ["Descending"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.Person,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
const personPhotos = useQuery({
|
||||||
|
queryKey: ["item", id, "personPhotos"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Photo],
|
||||||
|
recursive: true,
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.Person,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
const personEpisodes = useQuery({
|
||||||
|
queryKey: ["item", id, "personEpisodes"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getItemsApi(window.api).getItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
personIds: [id],
|
||||||
|
includeItemTypes: [BaseItemKind.Episode],
|
||||||
|
recursive: true,
|
||||||
|
fields: ["SeasonUserData", "Overview"],
|
||||||
|
sortBy: ["PremiereDate", "ProductionYear", "SortName"],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
limit: 24,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == BaseItemKind.Person,
|
||||||
|
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"],
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}, [
|
||||||
|
personMovies.isLoading,
|
||||||
|
personShows.isLoading,
|
||||||
|
personBooks.isLoading,
|
||||||
|
personPhotos.isLoading,
|
||||||
|
personEpisodes.isLoading,
|
||||||
|
]);
|
||||||
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
|
const [animationDirection, setAnimationDirection] = useState("forward");
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess) {
|
||||||
|
setAppBackdrop(
|
||||||
|
item.data.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
item.data.Type === BaseItemKind.Episode
|
||||||
|
? `${window.api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
|
item.data.Id,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
if (item.isLoading) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="scrollY"
|
||||||
|
style={{
|
||||||
|
padding: "5em 2em 2em 1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Hero
|
||||||
|
item={item.data}
|
||||||
|
userId={user.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
disableInfoStrip
|
||||||
|
disablePlayButton
|
||||||
|
disableLikeButton
|
||||||
|
disableMarkAsPlayedButton
|
||||||
|
/>
|
||||||
|
<div className="item-detail-person-container">
|
||||||
|
<div className="item-detail-person-header">
|
||||||
|
<Tabs
|
||||||
|
variant="scrollable"
|
||||||
|
value={activePersonTab}
|
||||||
|
onChange={(e, newVal) => {
|
||||||
|
if (newVal > activePersonTab) {
|
||||||
|
setAnimationDirection("forward");
|
||||||
|
} else if (newVal < activePersonTab) {
|
||||||
|
setAnimationDirection("backwards");
|
||||||
|
}
|
||||||
|
setActivePersonTab(newVal);
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{personTabs.map((tab, index) => {
|
||||||
|
return (
|
||||||
|
<Tab
|
||||||
|
key={index}
|
||||||
|
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-8`
|
||||||
|
: `col-4`
|
||||||
|
}`}
|
||||||
|
key={tab.queryKey}
|
||||||
|
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,
|
||||||
|
index,
|
||||||
|
) => {
|
||||||
|
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
|
||||||
|
.data
|
||||||
|
.Id
|
||||||
|
}
|
||||||
|
imageBlurhash={
|
||||||
|
!!tabitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
tabitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
tabitem
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</motion.div>
|
||||||
|
{tab.data.isSuccess &&
|
||||||
|
tab.data.data
|
||||||
|
.TotalRecordCount >
|
||||||
|
24 && (
|
||||||
|
<Typography
|
||||||
|
variant="h6"
|
||||||
|
style={{
|
||||||
|
opacity: 0.8,
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
And more...
|
||||||
|
</Typography>
|
||||||
|
)}
|
||||||
|
</TabPanel>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</AnimatePresence>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PersonTitlePage;
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.item-detail-person {
|
||||||
|
&-container {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&-header {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
&-cards {
|
||||||
|
display: grid;
|
||||||
|
align-items: start;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.col-8 {
|
||||||
|
grid-template-columns: repeat(8, minmax(0, 1fr));
|
||||||
|
}
|
||||||
|
.col-4 {
|
||||||
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
||||||
|
}
|
||||||
@@ -210,7 +210,7 @@ export const VideoPlayer = () => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
className="video"
|
className="video-player-container"
|
||||||
sx={{ background: "black" }}
|
sx={{ background: "black" }}
|
||||||
onMouseMove={() => {
|
onMouseMove={() => {
|
||||||
setShowControls(true);
|
setShowControls(true);
|
||||||
@@ -249,7 +249,12 @@ export const VideoPlayer = () => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Toolbar>
|
<Toolbar>
|
||||||
<IconButton onClick={() => navigate(-1)}>
|
<IconButton
|
||||||
|
onClick={async () => {
|
||||||
|
await appWindow.setFullscreen(false);
|
||||||
|
navigate(-1);
|
||||||
|
}}
|
||||||
|
>
|
||||||
<MdiArrowLeft />
|
<MdiArrowLeft />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Typography ml={2} variant="h6">
|
<Typography ml={2} variant="h6">
|
||||||
@@ -562,7 +567,10 @@ export const VideoPlayer = () => {
|
|||||||
src: `${window.api.basePath}/Videos/${itemId}/${itemId}/Subtitles/${currentSubtrack}/Stream.vtt?api_key=${window.api.accessToken}`,
|
src: `${window.api.basePath}/Videos/${itemId}/${itemId}/Subtitles/${currentSubtrack}/Stream.vtt?api_key=${window.api.accessToken}`,
|
||||||
srcLang: "",
|
srcLang: "",
|
||||||
default: true,
|
default: true,
|
||||||
mode: "showing",
|
mode:
|
||||||
|
currentSubtrack == -1
|
||||||
|
? "hidden"
|
||||||
|
: "showing",
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,10 +4,21 @@
|
|||||||
&-osd {
|
&-osd {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
transition: opacity 0.1s linear;
|
transition: opacity 0.1s linear;
|
||||||
|
width: 100vw;
|
||||||
}
|
}
|
||||||
&-osd-visible &-osd {
|
&-osd-visible &-osd {
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
&-player-container {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
video {
|
video {
|
||||||
|
|||||||
@@ -0,0 +1,273 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Paper from "@mui/material/Paper";
|
||||||
|
import { IconButton, useTheme } from "@mui/material";
|
||||||
|
|
||||||
|
import { useParams, useNavigate } from "react-router-dom";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
SortOrder,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import { getPlaylistsApi } from "@jellyfin/sdk/lib/utils/api/playlists-api";
|
||||||
|
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
import { MdiClockOutline } from "../../components/icons/mdiClockOutline";
|
||||||
|
|
||||||
|
import { getRuntimeMusic, getRuntimeFull, endsAt } from "../../utils/date/time";
|
||||||
|
|
||||||
|
import Hero from "../../components/layouts/item/hero";
|
||||||
|
import { Card } from "../../components/card/card";
|
||||||
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
|
|
||||||
|
import "./playlist.module.scss";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
import LikeButton from "../../components/buttons/likeButton";
|
||||||
|
import { MdiPlayOutline } from "../../components/icons/mdiPlayOutline";
|
||||||
|
import { useAudioPlayback } from "../../utils/store/audioPlayback";
|
||||||
|
import MusicTrack from "../../components/musicTrack";
|
||||||
|
function TabPanel(props) {
|
||||||
|
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 && <Box>{children}</Box>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TabPanel.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
index: PropTypes.number.isRequired,
|
||||||
|
value: PropTypes.number.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
function a11yProps(index) {
|
||||||
|
return {
|
||||||
|
id: `full-width-tab-${index}`,
|
||||||
|
"aria-controls": `full-width-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const PlaylistTitlePage = () => {
|
||||||
|
const { id } = useParams();
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(window.api).getItem({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: id,
|
||||||
|
fields: [ItemFields.Crew],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const similarItems = useQuery({
|
||||||
|
queryKey: ["item", id, "similarItem"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let result = await getLibraryApi(window.api).getSimilarAlbums({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: item.data.Id,
|
||||||
|
limit: 16,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const musicTracks = useQuery({
|
||||||
|
queryKey: ["item", id, "musicTracks"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getPlaylistsApi(
|
||||||
|
window.api,
|
||||||
|
).getPlaylistItems({
|
||||||
|
userId: user.data.Id,
|
||||||
|
playlistId: item.data.Id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess) {
|
||||||
|
setAppBackdrop(
|
||||||
|
item.data.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
item.data.Type === BaseItemKind.Episode
|
||||||
|
? `${window.api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
|
item.data.Id,
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
if (item.isLoading || similarItems.isLoading) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess && similarItems.isSuccess) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="scrollY"
|
||||||
|
style={{
|
||||||
|
padding: "5em 2em 2em 1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Hero
|
||||||
|
item={item.data}
|
||||||
|
userId={user.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
artists={item.data.ArtistItems}
|
||||||
|
disableMarkAsPlayedButton
|
||||||
|
audioPlayButton
|
||||||
|
cardType="square"
|
||||||
|
/>
|
||||||
|
{musicTracks.isLoading ? (
|
||||||
|
<></>
|
||||||
|
) : (
|
||||||
|
musicTracks.data.TotalRecordCount > 0 &&
|
||||||
|
musicTracks.data.Items.map((track, index) => {
|
||||||
|
return (
|
||||||
|
<MusicTrack
|
||||||
|
item={track}
|
||||||
|
key={track.Id}
|
||||||
|
queryKey={["item", id, "musicTracks"]}
|
||||||
|
userId={user.data.Id}
|
||||||
|
playlistItem
|
||||||
|
playlistItemId={item.data.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})
|
||||||
|
)}
|
||||||
|
|
||||||
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="You might also like"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{similarItems.data.Items.map((similar, index) => {
|
||||||
|
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.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
!!similar.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
similar.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
similar
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError || similarItems.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default PlaylistTitlePage;
|
||||||
@@ -0,0 +1,34 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.item-detail-playlist {
|
||||||
|
&-track {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: 4% 1fr 80% 1fr;
|
||||||
|
align-items: center;
|
||||||
|
justify-items: center;
|
||||||
|
gap: 0.5em;
|
||||||
|
width: 100%;
|
||||||
|
padding: 0.25em 0;
|
||||||
|
background: rgb(255 255 255 / 0);
|
||||||
|
transition: background $transition-time-default;
|
||||||
|
|
||||||
|
&:first-child,
|
||||||
|
&:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
border-bottom: 1px solid rgb(255 255 255 / 0.05);
|
||||||
|
&s {
|
||||||
|
border-radius: 10px !important;
|
||||||
|
overflow: hidden !important;
|
||||||
|
background: $clr-background-dark-opacity-0_8 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:hover {
|
||||||
|
background: rgb(255 255 255 / 0.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
&.playing {
|
||||||
|
color: $clr-accent-default;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,610 @@
|
|||||||
|
/** @format */
|
||||||
|
import { useState, useEffect } from "react";
|
||||||
|
import PropTypes from "prop-types";
|
||||||
|
|
||||||
|
import Box from "@mui/material/Box";
|
||||||
|
import CircularProgress from "@mui/material/CircularProgress";
|
||||||
|
import Typography from "@mui/material/Typography";
|
||||||
|
import Chip from "@mui/material/Chip";
|
||||||
|
import Divider from "@mui/material/Divider";
|
||||||
|
import TextField from "@mui/material/TextField";
|
||||||
|
import MenuItem from "@mui/material/MenuItem";
|
||||||
|
|
||||||
|
import { motion } from "framer-motion";
|
||||||
|
|
||||||
|
import { useParams, useNavigate, Link as RouterLink } from "react-router-dom";
|
||||||
|
|
||||||
|
import {
|
||||||
|
BaseItemKind,
|
||||||
|
ItemFields,
|
||||||
|
LocationType,
|
||||||
|
} from "@jellyfin/sdk/lib/generated-client";
|
||||||
|
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
|
||||||
|
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
|
||||||
|
import { getLibraryApi } from "@jellyfin/sdk/lib/utils/api/library-api";
|
||||||
|
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
|
||||||
|
|
||||||
|
import { useQuery } from "@tanstack/react-query";
|
||||||
|
|
||||||
|
import { getRuntimeMusic, getRuntimeFull, endsAt } from "../../utils/date/time";
|
||||||
|
|
||||||
|
import Hero from "../../components/layouts/item/hero";
|
||||||
|
import { Card } from "../../components/card/card";
|
||||||
|
import { EpisodeCard } from "../../components/card/episodeCard";
|
||||||
|
import { CardScroller } from "../../components/cardScroller/cardScroller";
|
||||||
|
|
||||||
|
import "./series.module.scss";
|
||||||
|
import { EpisodeCardsSkeleton } from "../../components/skeleton/episodeCards";
|
||||||
|
import { ErrorNotice } from "../../components/notices/errorNotice/errorNotice";
|
||||||
|
import { usePlaybackStore } from "../../utils/store/playback";
|
||||||
|
|
||||||
|
import { useBackdropStore } from "../../utils/store/backdrop";
|
||||||
|
import { ActorCard } from "../../components/card/actorCards";
|
||||||
|
import { SeasonSelectorSkeleton } from "../../components/skeleton/seasonSelector";
|
||||||
|
function TabPanel(props) {
|
||||||
|
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 && <Box>{children}</Box>}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
TabPanel.propTypes = {
|
||||||
|
children: PropTypes.node,
|
||||||
|
index: PropTypes.number.isRequired,
|
||||||
|
value: PropTypes.number.isRequired,
|
||||||
|
};
|
||||||
|
|
||||||
|
function a11yProps(index) {
|
||||||
|
return {
|
||||||
|
id: `full-width-tab-${index}`,
|
||||||
|
"aria-controls": `full-width-tabpanel-${index}`,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
const SeriesTitlePage = () => {
|
||||||
|
const { id } = useParams();
|
||||||
|
const navigate = useNavigate();
|
||||||
|
|
||||||
|
const user = useQuery({
|
||||||
|
queryKey: ["user"],
|
||||||
|
queryFn: async () => {
|
||||||
|
let usr = await getUserApi(window.api).getCurrentUser();
|
||||||
|
return usr.data;
|
||||||
|
},
|
||||||
|
networkMode: "always",
|
||||||
|
});
|
||||||
|
|
||||||
|
const item = useQuery({
|
||||||
|
queryKey: ["item", id],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(window.api).getItem({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: id,
|
||||||
|
fields: [ItemFields.Crew],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: !!user.data,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const similarItems = useQuery({
|
||||||
|
queryKey: ["item", id, "similarItem"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getLibraryApi(window.api).getSimilarShows({
|
||||||
|
userId: user.data.Id,
|
||||||
|
itemId: item.data.Id,
|
||||||
|
limit: 16,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const seasons = useQuery({
|
||||||
|
queryKey: ["item", id, "seasons"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getTvShowsApi(window.api).getSeasons({
|
||||||
|
userId: user.data.Id,
|
||||||
|
seriesId: item.data.Id,
|
||||||
|
isSpecialSeason: false,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const nextUpEpisode = useQuery({
|
||||||
|
queryKey: ["item", id, "nextUp"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getTvShowsApi(window.api).getNextUp({
|
||||||
|
userId: user.data.Id,
|
||||||
|
limit: 1,
|
||||||
|
parentId: item.data.Id,
|
||||||
|
disableFirstEpisode: true,
|
||||||
|
fields: [ItemFields.Overview],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess && item.data.Type == "Series",
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const [currentSeason, setCurrentSeason] = useState(0);
|
||||||
|
const episodes = useQuery({
|
||||||
|
queryKey: ["item", id, `season ${currentSeason + 1}`, "episodes"],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getTvShowsApi(window.api).getEpisodes({
|
||||||
|
userId: user.data.Id,
|
||||||
|
seriesId: item.data.Id,
|
||||||
|
seasonId: seasons.data.Items[currentSeason].Id,
|
||||||
|
fields: [ItemFields.Overview],
|
||||||
|
excludeLocationTypes: [LocationType.Virtual],
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: seasons.isSuccess,
|
||||||
|
networkMode: "always",
|
||||||
|
refetchOnWindowFocus: true,
|
||||||
|
});
|
||||||
|
|
||||||
|
const specialFeatures = useQuery({
|
||||||
|
queryKey: ["item", id, `specialFeatures`],
|
||||||
|
queryFn: async () => {
|
||||||
|
const result = await getUserLibraryApi(
|
||||||
|
window.api,
|
||||||
|
).getSpecialFeatures({
|
||||||
|
itemId: item.data.Id,
|
||||||
|
userId: user.data.Id,
|
||||||
|
});
|
||||||
|
return result.data;
|
||||||
|
},
|
||||||
|
enabled: item.isSuccess,
|
||||||
|
});
|
||||||
|
const [
|
||||||
|
setUrl,
|
||||||
|
setPosition,
|
||||||
|
setDuration,
|
||||||
|
setItemId,
|
||||||
|
setItemName,
|
||||||
|
setSubtitleTracksStore,
|
||||||
|
setSelectedSubtitleTrack,
|
||||||
|
] = usePlaybackStore((state) => [
|
||||||
|
state.setUrl,
|
||||||
|
state.setPosition,
|
||||||
|
state.setDuration,
|
||||||
|
state.setItemId,
|
||||||
|
state.setItemName,
|
||||||
|
state.setSubtitleTracks,
|
||||||
|
state.setSelectedSubtitleTrack,
|
||||||
|
]);
|
||||||
|
|
||||||
|
const [setAppBackdrop] = useBackdropStore((state) => [state.setBackdrop]);
|
||||||
|
|
||||||
|
const [directors, setDirectors] = useState([]);
|
||||||
|
const [writers, setWriters] = useState([]);
|
||||||
|
useEffect(() => {
|
||||||
|
if (item.isSuccess) {
|
||||||
|
setAppBackdrop(
|
||||||
|
item.data.Type === BaseItemKind.MusicAlbum ||
|
||||||
|
item.data.Type === BaseItemKind.Episode
|
||||||
|
? `${window.api.basePath}/Items/${item.data.ParentBackdropItemId}/Images/Backdrop`
|
||||||
|
: `${window.api.basePath}/Items/${item.data.Id}/Images/Backdrop`,
|
||||||
|
item.data.Id,
|
||||||
|
);
|
||||||
|
let direTp = item.data.People.filter(
|
||||||
|
(itm) => itm.Type == "Director",
|
||||||
|
);
|
||||||
|
setDirectors(direTp);
|
||||||
|
let writeTp = item.data.People.filter(
|
||||||
|
(itm) => itm.Type == "Writer",
|
||||||
|
);
|
||||||
|
setWriters(writeTp);
|
||||||
|
}
|
||||||
|
}, [item.isSuccess]);
|
||||||
|
|
||||||
|
if (item.isLoading || similarItems.isLoading) {
|
||||||
|
return (
|
||||||
|
<Box
|
||||||
|
sx={{
|
||||||
|
width: "100%",
|
||||||
|
height: "100vh",
|
||||||
|
display: "flex",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<CircularProgress />
|
||||||
|
</Box>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isSuccess && similarItems.isSuccess) {
|
||||||
|
return (
|
||||||
|
<div
|
||||||
|
className="scrollY"
|
||||||
|
style={{
|
||||||
|
padding: "5em 2em 2em 1em",
|
||||||
|
display: "flex",
|
||||||
|
flexDirection: "column",
|
||||||
|
gap: "0.5em",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<Hero
|
||||||
|
item={item.data}
|
||||||
|
userId={user.data.Id}
|
||||||
|
queryKey={["item", id]}
|
||||||
|
writers={writers}
|
||||||
|
directors={directors}
|
||||||
|
studios={item.data.Studios}
|
||||||
|
/>
|
||||||
|
|
||||||
|
{nextUpEpisode.isSuccess &&
|
||||||
|
nextUpEpisode.data.TotalRecordCount > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Next Up"
|
||||||
|
displayCards={4}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{nextUpEpisode.data.Items.map(
|
||||||
|
(episode, index) => {
|
||||||
|
return (
|
||||||
|
<EpisodeCard
|
||||||
|
item={episode}
|
||||||
|
cardTitle={`S${episode.ParentIndexNumber}:E${episode.IndexNumber} - ${episode.Name}`}
|
||||||
|
cardCaption={
|
||||||
|
episode.Overview
|
||||||
|
}
|
||||||
|
imageBlurhash={
|
||||||
|
episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
queryKey={[
|
||||||
|
"item",
|
||||||
|
id,
|
||||||
|
`season ${
|
||||||
|
currentSeason +
|
||||||
|
1
|
||||||
|
}`,
|
||||||
|
"episodes",
|
||||||
|
]}
|
||||||
|
userId={user.data.Id}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{seasons.isLoading ? (
|
||||||
|
<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.isLoading ? (
|
||||||
|
<CircularProgress
|
||||||
|
size={20}
|
||||||
|
style={{
|
||||||
|
display: "flex",
|
||||||
|
alignItems:
|
||||||
|
"center",
|
||||||
|
justifyContent:
|
||||||
|
"center",
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
episodes.data
|
||||||
|
.TotalRecordCount
|
||||||
|
)
|
||||||
|
}
|
||||||
|
></Chip>
|
||||||
|
</div>
|
||||||
|
<TextField
|
||||||
|
value={currentSeason}
|
||||||
|
onChange={(e) =>
|
||||||
|
setCurrentSeason(e.target.value)
|
||||||
|
}
|
||||||
|
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>
|
||||||
|
<Divider />
|
||||||
|
<div className="item-detail-episodes-container">
|
||||||
|
{episodes.isLoading ? (
|
||||||
|
<EpisodeCardsSkeleton />
|
||||||
|
) : (
|
||||||
|
episodes.data.Items.map(
|
||||||
|
(episode, index) => {
|
||||||
|
return (
|
||||||
|
<motion.div
|
||||||
|
key={episode.Id}
|
||||||
|
initial={{
|
||||||
|
transform:
|
||||||
|
"translateY(10px)",
|
||||||
|
opacity: 0,
|
||||||
|
}}
|
||||||
|
whileInView={{
|
||||||
|
opacity: 1,
|
||||||
|
transform:
|
||||||
|
"translateY(0px)",
|
||||||
|
}}
|
||||||
|
viewport={{
|
||||||
|
once: true,
|
||||||
|
}}
|
||||||
|
transition={{
|
||||||
|
duration: 0.2,
|
||||||
|
ease: "backInOut",
|
||||||
|
}}
|
||||||
|
style={{
|
||||||
|
maxWidth:
|
||||||
|
"23.3vw",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
<EpisodeCard
|
||||||
|
item={episode}
|
||||||
|
cardTitle={
|
||||||
|
episode.ParentIndexNumber ==
|
||||||
|
0
|
||||||
|
? `${episode.SeasonName} - ${episode.Name}`
|
||||||
|
: !!episode.IndexNumberEnd
|
||||||
|
? `${episode.IndexNumber}-${episode.IndexNumberEnd}. ${episode.Name}`
|
||||||
|
: `${episode.IndexNumber}. ${episode.Name}`
|
||||||
|
}
|
||||||
|
cardCaption={
|
||||||
|
episode.Overview
|
||||||
|
}
|
||||||
|
imageBlurhash={
|
||||||
|
!!episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
episode
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
queryKey={[
|
||||||
|
"item",
|
||||||
|
id,
|
||||||
|
`season ${
|
||||||
|
currentSeason +
|
||||||
|
1
|
||||||
|
}`,
|
||||||
|
"episodes",
|
||||||
|
]}
|
||||||
|
userId={
|
||||||
|
user.data
|
||||||
|
.Id
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
</motion.div>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
)}
|
||||||
|
{specialFeatures.isSuccess &&
|
||||||
|
specialFeatures.data.length > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Special Features"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{specialFeatures.data.map(
|
||||||
|
(special, index) => {
|
||||||
|
return (
|
||||||
|
<Card
|
||||||
|
key={special.Id}
|
||||||
|
item={special}
|
||||||
|
seriesId={
|
||||||
|
special.SeriesId
|
||||||
|
}
|
||||||
|
cardTitle={special.Name}
|
||||||
|
imageType="Primary"
|
||||||
|
cardCaption={getRuntimeMusic(
|
||||||
|
special.RunTimeTicks,
|
||||||
|
)}
|
||||||
|
cardType="portrait"
|
||||||
|
queryKey={[
|
||||||
|
"item",
|
||||||
|
id,
|
||||||
|
"similarItem",
|
||||||
|
]}
|
||||||
|
imageBlurhash={
|
||||||
|
!!special
|
||||||
|
.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
special
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary[
|
||||||
|
Object.keys(
|
||||||
|
special
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
userId={user.data.Id}
|
||||||
|
onClick={() => {}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
)}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
{item.data.People.length > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="Cast & Crew"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{item.data.People.map((person, index) => {
|
||||||
|
return (
|
||||||
|
<ActorCard
|
||||||
|
key={person.Id}
|
||||||
|
item={person}
|
||||||
|
cardTitle={person.Name}
|
||||||
|
cardCaption={person.Role}
|
||||||
|
cardType="square"
|
||||||
|
userId={user.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
person.ImageBlurHashes
|
||||||
|
?.Primary[0]
|
||||||
|
}
|
||||||
|
overrideIcon="Person"
|
||||||
|
disableOverlay
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
{similarItems.data.TotalRecordCount > 0 && (
|
||||||
|
<CardScroller
|
||||||
|
title="You might also like"
|
||||||
|
displayCards={8}
|
||||||
|
disableDecoration
|
||||||
|
>
|
||||||
|
{similarItems.data.Items.map((similar, index) => {
|
||||||
|
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.data.Id}
|
||||||
|
imageBlurhash={
|
||||||
|
!!similar.ImageBlurHashes
|
||||||
|
?.Primary &&
|
||||||
|
similar.ImageBlurHashes
|
||||||
|
?.Primary[
|
||||||
|
Object.keys(
|
||||||
|
similar
|
||||||
|
.ImageBlurHashes
|
||||||
|
.Primary,
|
||||||
|
)[0]
|
||||||
|
]
|
||||||
|
}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
})}
|
||||||
|
</CardScroller>
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
if (item.isError || similarItems.isError) {
|
||||||
|
return <ErrorNotice />;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
export default SeriesTitlePage;
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
/** @format */
|
||||||
|
|
||||||
|
.item-detail {
|
||||||
|
&-episodes-container {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
|
||||||
|
gap: 0.25em;
|
||||||
|
margin-top: 0.5em;
|
||||||
|
align-items: start;
|
||||||
|
justify-items: stretch;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -16,7 +16,7 @@ div::-webkit-scrollbar {
|
|||||||
::-webkit-scrollbar-track {
|
::-webkit-scrollbar-track {
|
||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgb(255 255 255 / 0.15);
|
background-color: rgb(255 255 255 / 0.1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
::-webkit-scrollbar-thumb {
|
::-webkit-scrollbar-thumb {
|
||||||
@@ -25,12 +25,12 @@ div::-webkit-scrollbar {
|
|||||||
border-radius: 9999px;
|
border-radius: 9999px;
|
||||||
background-color: rgb(255 255 255 / 0.25);
|
background-color: rgb(255 255 255 / 0.25);
|
||||||
&:hover {
|
&:hover {
|
||||||
background-color: rgb(255 255 255 / 0.35);
|
background-color: rgb(255 255 255 / 0.45);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
body {
|
body {
|
||||||
font-family: "Open Sans";
|
font-family: "Open Sans Variable";
|
||||||
background: $clr-background-default;
|
background: $clr-background-default;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -39,6 +39,25 @@ body {
|
|||||||
height: 100vh;
|
height: 100vh;
|
||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: overlay;
|
overflow-y: overlay;
|
||||||
|
overscroll-behavior: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.app-backdrop {
|
||||||
|
object-fit: cover;
|
||||||
|
width: calc(100% + 100px);
|
||||||
|
height: calc(100% + 100px);
|
||||||
|
position: absolute;
|
||||||
|
top: -100px;
|
||||||
|
left: -100px;
|
||||||
|
z-index: -1;
|
||||||
|
filter: blur(100px) saturate(120%) contrast(90%);
|
||||||
|
&-container {
|
||||||
|
position: fixed;
|
||||||
|
width: 100vw;
|
||||||
|
height: 100vh;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#root,
|
#root,
|
||||||
@@ -46,8 +65,7 @@ body {
|
|||||||
height: fit-content;
|
height: fit-content;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow-y: hidden;
|
overflow: hidden;
|
||||||
overflow-x: hidden;
|
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -100,9 +118,16 @@ h1 {
|
|||||||
overflow-x: hidden;
|
overflow-x: hidden;
|
||||||
overflow-y: visible;
|
overflow-y: visible;
|
||||||
height: fit-content;
|
height: fit-content;
|
||||||
width: inherit;
|
width: 100%;
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
min-height: 100vh;
|
min-height: 100vh;
|
||||||
|
padding-left: 1em;
|
||||||
|
padding-right: calc(1em + 14px);
|
||||||
|
}
|
||||||
|
|
||||||
|
.home {
|
||||||
|
padding-left: 0 !important;
|
||||||
|
padding-right: 14px !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.empty {
|
.empty {
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ $clr-accent-dark: hsl(337, 96%, 20%);
|
|||||||
$clr-secondary-default: hsl(273, 100%, 36%);
|
$clr-secondary-default: hsl(273, 100%, 36%);
|
||||||
$clr-secondary-dark: hsl(273, 100%, 12%);
|
$clr-secondary-dark: hsl(273, 100%, 12%);
|
||||||
$clr-background-default: hsl(256, 100%, 6%);
|
$clr-background-default: hsl(256, 100%, 6%);
|
||||||
|
$clr-background-opacity-0_5: hsl(256, 100%, 6%, 50%);
|
||||||
|
|
||||||
$clr-background-dark: hsl(256, 100%, 4%);
|
$clr-background-dark: hsl(256, 100%, 4%);
|
||||||
$clr-background-dark-opacity-0_8: hsl(256, 100%, 4%, 80%);
|
$clr-background-dark-opacity-0_8: hsl(256, 100%, 4%, 80%);
|
||||||
@@ -21,8 +22,8 @@ $clr-gradient-dark: linear-gradient(
|
|||||||
$clr-secondary-dark
|
$clr-secondary-dark
|
||||||
);
|
);
|
||||||
|
|
||||||
$border-radius-default: 10px;
|
$border-radius-default: 6px;
|
||||||
$border-radius-intensity-1: 5px;
|
$border-radius-intensity-1: 4px;
|
||||||
|
|
||||||
$transition-time-default: 250ms;
|
$transition-time-default: 250ms;
|
||||||
$transition-time-fast: 150ms;
|
$transition-time-fast: 150ms;
|
||||||
@@ -32,7 +32,7 @@ export const theme = createTheme({
|
|||||||
mode: "dark",
|
mode: "dark",
|
||||||
},
|
},
|
||||||
typography: {
|
typography: {
|
||||||
fontFamily: "Open Sans",
|
fontFamily: "Open Sans Variable",
|
||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
MuiButton: {
|
MuiButton: {
|
||||||
@@ -42,5 +42,12 @@ export const theme = createTheme({
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
MuiChip: {
|
||||||
|
styleOverrides: {
|
||||||
|
root: {
|
||||||
|
backdropFilter: "blur(5px)",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
@@ -98,6 +98,27 @@ export const getRuntimeFull = (ticks) => {
|
|||||||
return formatedTime;
|
return formatedTime;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @format
|
||||||
|
* @param {number} ticks - C# ticks of a particular item
|
||||||
|
* @return {number} Converted ticks to Hhr Mmin formate
|
||||||
|
*/
|
||||||
|
export const getRuntimeCompact = (ticks) => {
|
||||||
|
let time = ticksToMs(ticks);
|
||||||
|
let formatedTime = "";
|
||||||
|
let timeSec = Math.floor(time / 1000);
|
||||||
|
let timeMin = Math.floor(timeSec / 60);
|
||||||
|
timeSec -= timeMin * 60;
|
||||||
|
if (timeMin > 60) {
|
||||||
|
let timeHr = Math.floor(timeMin / 60);
|
||||||
|
timeMin -= timeHr * 60;
|
||||||
|
formatedTime = `${timeHr}h ${timeMin}m`;
|
||||||
|
} else {
|
||||||
|
formatedTime = `${timeMin}m`;
|
||||||
|
}
|
||||||
|
return formatedTime;
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @format
|
* @format
|
||||||
* @param {number} ticks - C# ticks of a particular item
|
* @param {number} ticks - C# ticks of a particular item
|
||||||
|
|||||||