Full Code of prayag17/JellyPlayer for AI

main 45dbfbb7ecb1 cached
266 files
1.2 MB
335.0k tokens
210 symbols
1 requests
Download .txt
Showing preview only (1,358K chars total). Download the full file or copy to clipboard to get everything.
Repository: prayag17/JellyPlayer
Branch: main
Commit: 45dbfbb7ecb1
Files: 266
Total size: 1.2 MB

Directory structure:
gitextract_zji3jkza/

├── .babelrc
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── release.yaml
│   └── workflows/
│       ├── continuous-integration.yml
│       ├── release.yml
│       └── winget-releaser.yml
├── .gitignore
├── .vscode/
│   ├── extensions.json
│   ├── launch.json
│   ├── settings.json
│   └── tasks.json
├── CHANGELOG.md
├── LICENSE
├── README.md
├── biome.json
├── index.html
├── latest.json
├── package.json
├── pnpm-workspace.yaml
├── renovate.json
├── src/
│   ├── components/
│   │   ├── Slider/
│   │   │   ├── index.tsx
│   │   │   └── style.scss
│   │   ├── addServerDialog/
│   │   │   └── index.tsx
│   │   ├── albumMusicTrack/
│   │   │   ├── albumMusicTrack.scss
│   │   │   └── index.tsx
│   │   ├── alphaSelector/
│   │   │   ├── alphaSelector.scss
│   │   │   └── index.tsx
│   │   ├── appBar/
│   │   │   ├── appBar.scss
│   │   │   ├── appBar.tsx
│   │   │   ├── backOnly.tsx
│   │   │   └── navigationDrawer.tsx
│   │   ├── avatar/
│   │   │   ├── avatar.module.scss
│   │   │   └── avatar.tsx
│   │   ├── backdrop/
│   │   │   └── index.tsx
│   │   ├── blurhash-canvas/
│   │   │   └── index.tsx
│   │   ├── buttons/
│   │   │   ├── backButton.tsx
│   │   │   ├── likeButton.tsx
│   │   │   ├── markPlayedButton.tsx
│   │   │   ├── playButton.tsx
│   │   │   ├── playNextButton.tsx
│   │   │   ├── playPreviousButtom.tsx
│   │   │   ├── queueButton.scss
│   │   │   ├── queueButton.tsx
│   │   │   ├── quickConnectButton.tsx
│   │   │   └── trailerButton.tsx
│   │   ├── card/
│   │   │   ├── card.scss
│   │   │   └── card.tsx
│   │   ├── cardScroller/
│   │   │   ├── cardScroller.scss
│   │   │   └── cardScroller.tsx
│   │   ├── carousel/
│   │   │   ├── carousel.scss
│   │   │   ├── index.tsx
│   │   │   └── tickers.tsx
│   │   ├── carouselSlide/
│   │   │   └── index.tsx
│   │   ├── circularPageLoadingAnimation/
│   │   │   └── index.tsx
│   │   ├── filtersDialog/
│   │   │   └── index.tsx
│   │   ├── iconLink/
│   │   │   └── index.tsx
│   │   ├── itemBackdrop/
│   │   │   └── index.tsx
│   │   ├── itemHeader/
│   │   │   ├── index.tsx
│   │   │   └── itemHeader.scss
│   │   ├── layouts/
│   │   │   ├── artist/
│   │   │   │   ├── albumArtist.scss
│   │   │   │   └── artistAlbum.tsx
│   │   │   └── homeSection/
│   │   │       └── latestMediaSection.tsx
│   │   ├── libraryHeader/
│   │   │   ├── index.tsx
│   │   │   └── libraryHeader.scss
│   │   ├── libraryItemsGrid/
│   │   │   ├── index.tsx
│   │   │   └── libraryItemsGrid.scss
│   │   ├── listItemLink/
│   │   │   └── index.tsx
│   │   ├── musicTrack/
│   │   │   ├── index.tsx
│   │   │   └── musicTrack.scss
│   │   ├── nProgress/
│   │   │   └── index.tsx
│   │   ├── notices/
│   │   │   ├── emptyNotice/
│   │   │   │   └── emptyNotice.tsx
│   │   │   └── errorNotice/
│   │   │       └── errorNotice.tsx
│   │   ├── outroCard/
│   │   │   ├── index.tsx
│   │   │   └── outroCard.scss
│   │   ├── playback/
│   │   │   ├── audioPlayer/
│   │   │   │   ├── audioPlayer.scss
│   │   │   │   ├── components/
│   │   │   │   │   ├── LyricsPanel.tsx
│   │   │   │   │   ├── PlayerActions.tsx
│   │   │   │   │   ├── PlayerControls.tsx
│   │   │   │   │   ├── PlayerInfo.tsx
│   │   │   │   │   ├── PlayerProgress.tsx
│   │   │   │   │   ├── PlayerVolume.tsx
│   │   │   │   │   ├── QueuePanel.tsx
│   │   │   │   │   └── StatsPanel.tsx
│   │   │   │   └── index.tsx
│   │   │   └── videoPlayer/
│   │   │       ├── EndsAtDisplay.tsx
│   │   │       ├── ErrorDisplay.tsx
│   │   │       ├── LoadingIndicator.tsx
│   │   │       ├── ProgressDisplay.tsx
│   │   │       ├── StatsForNerds.tsx
│   │   │       ├── VolumeChangeOverlay.tsx
│   │   │       ├── bubbleSlider/
│   │   │       │   └── index.tsx
│   │   │       ├── buttons/
│   │   │       │   ├── CaptionsButton.tsx
│   │   │       │   ├── ChaptersListButton.tsx
│   │   │       │   ├── ForwardButton.tsx
│   │   │       │   ├── FullscreenButton.tsx
│   │   │       │   ├── NextChapterButton.tsx
│   │   │       │   ├── PlayPauseButton.tsx
│   │   │       │   ├── PrevChapterButton.tsx
│   │   │       │   ├── RewindButton.tsx
│   │   │       │   └── SkipSegmentButton.tsx
│   │   │       ├── controls.scss
│   │   │       ├── controls.tsx
│   │   │       ├── settingsMenu.tsx
│   │   │       ├── upNextFlyout.scss
│   │   │       └── upNextFlyout.tsx
│   │   ├── queueListItem/
│   │   │   └── index.tsx
│   │   ├── queueTrack/
│   │   │   └── index.tsx
│   │   ├── routerLoading/
│   │   │   └── index.tsx
│   │   ├── search/
│   │   │   ├── index.tsx
│   │   │   └── item.tsx
│   │   ├── settingOption/
│   │   │   └── index.tsx
│   │   ├── settingOptionSelect/
│   │   │   └── index.tsx
│   │   ├── showMoreText/
│   │   │   └── index.tsx
│   │   ├── skeleton/
│   │   │   ├── cards.tsx
│   │   │   ├── carousel.tsx
│   │   │   ├── episode.tsx
│   │   │   ├── item.tsx
│   │   │   ├── libraryItems.tsx
│   │   │   └── seasonSelector.tsx
│   │   ├── tagChip/
│   │   │   ├── index.tsx
│   │   │   └── tagChip.scss
│   │   ├── updater/
│   │   │   └── index.tsx
│   │   ├── userAvatarMenu/
│   │   │   └── index.tsx
│   │   └── utils/
│   │       ├── easterEgg.tsx
│   │       └── iconsCollection.tsx
│   ├── global.d.ts
│   ├── main.tsx
│   ├── palette.module.scss
│   ├── routeTree.gen.ts
│   ├── routes/
│   │   ├── __root.tsx
│   │   ├── _api/
│   │   │   ├── album/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── album.scss
│   │   │   ├── artist/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── artist.scss
│   │   │   ├── boxset/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── boxset.scss
│   │   │   ├── episode/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── episode.scss
│   │   │   ├── favorite/
│   │   │   │   ├── favorite.scss
│   │   │   │   └── index.tsx
│   │   │   ├── home/
│   │   │   │   ├── home.scss
│   │   │   │   └── index.tsx
│   │   │   ├── item/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── item.scss
│   │   │   ├── library/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── library.scss
│   │   │   ├── login/
│   │   │   │   ├── $userId.$userName.tsx
│   │   │   │   ├── list.tsx
│   │   │   │   ├── login.scss
│   │   │   │   └── manual.tsx
│   │   │   ├── login.tsx
│   │   │   ├── person/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── person.scss
│   │   │   ├── player/
│   │   │   │   ├── audio.scss
│   │   │   │   ├── audio.tsx
│   │   │   │   ├── index.tsx
│   │   │   │   ├── photos.scss
│   │   │   │   ├── photos.tsx
│   │   │   │   └── videoPlayer.scss
│   │   │   ├── playlist/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── playlist.scss
│   │   │   ├── search/
│   │   │   │   ├── index.tsx
│   │   │   │   └── search.scss
│   │   │   ├── series/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── series.scss
│   │   │   ├── settings/
│   │   │   │   ├── about.scss
│   │   │   │   ├── about.tsx
│   │   │   │   ├── changeServer/
│   │   │   │   │   └── index.tsx
│   │   │   │   └── preferences.tsx
│   │   │   ├── settings.scss
│   │   │   └── settings.tsx
│   │   ├── _api.tsx
│   │   ├── error/
│   │   │   └── $code.tsx
│   │   ├── index.tsx
│   │   └── setup/
│   │       ├── server.add.tsx
│   │       ├── server.error.scss
│   │       ├── server.error.tsx
│   │       ├── server.list.tsx
│   │       ├── server.scss
│   │       └── serverList.scss
│   ├── styles/
│   │   ├── global.scss
│   │   └── variables.scss
│   ├── theme.ts
│   └── utils/
│       ├── browser-detection.ts
│       ├── constants/
│       │   └── library.ts
│       ├── date/
│       │   ├── formateDate.ts
│       │   └── time.ts
│       ├── hooks/
│       │   ├── useDebounce.ts
│       │   ├── useDefaultSeason.ts
│       │   ├── useInterval.tsx
│       │   ├── useKeyPress.tsx
│       │   └── useParallax.tsx
│       ├── methods/
│       │   ├── getImageUrlsApi.ts
│       │   ├── getSubtitles.ts
│       │   ├── playback.ts
│       │   └── ticksDisplay.ts
│       ├── misc/
│       │   ├── debug.ts
│       │   ├── konami.ts
│       │   └── relaunch.ts
│       ├── navigation.ts
│       ├── playback-profiles/
│       │   ├── README.md
│       │   ├── directplay-profile.ts
│       │   ├── helpers/
│       │   │   ├── audio-formats.ts
│       │   │   ├── codec-profiles.ts
│       │   │   ├── fmp4-audio-formats.ts
│       │   │   ├── fmp4-video-formats.ts
│       │   │   ├── hls-formats.ts
│       │   │   ├── mp4-audio-formats.ts
│       │   │   ├── mp4-video-formats.ts
│       │   │   ├── transcoding-formats.ts
│       │   │   ├── ts-audio-formats.ts
│       │   │   ├── ts-video-formats.ts
│       │   │   ├── webm-audio-formats.ts
│       │   │   └── webm-video-formats.ts
│       │   ├── index.ts
│       │   ├── response-profile.ts
│       │   ├── subtitle-profile.ts
│       │   └── transcoding-profile.ts
│       ├── queries/
│       │   ├── about.ts
│       │   ├── items.ts
│       │   ├── library.ts
│       │   └── libraryItems.ts
│       ├── reducers/
│       │   └── videoPlayerReducer.ts
│       ├── schema/
│       │   └── librarySearch.ts
│       ├── storage/
│       │   ├── player.ts
│       │   ├── servers.ts
│       │   ├── settings.ts
│       │   └── user.ts
│       ├── store/
│       │   ├── api.tsx
│       │   ├── audioPlayback.ts
│       │   ├── backdrop.tsx
│       │   ├── carousel.ts
│       │   ├── central.tsx
│       │   ├── drawer.ts
│       │   ├── header.ts
│       │   ├── libraryDraft.ts
│       │   ├── libraryState.ts
│       │   ├── photosPlayback.ts
│       │   ├── playback.ts
│       │   ├── queue.ts
│       │   ├── search.tsx
│       │   └── settings.tsx
│       ├── types/
│       │   ├── audioPlaybackInfo.ts
│       │   ├── introMediaInfo.ts
│       │   ├── mediaQualityInfo.ts
│       │   ├── playResult.ts
│       │   ├── seriesBackdrop.ts
│       │   └── subtitlePlaybackInfo.ts
│       └── workers/
│           └── backdrop.worker.ts
├── src-tauri/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── build.rs
│   ├── capabilities/
│   │   ├── desktop.json
│   │   ├── main.json
│   │   └── migrated.json
│   ├── gen/
│   │   └── schemas/
│   │       ├── acl-manifests.json
│   │       ├── capabilities.json
│   │       ├── desktop-schema.json
│   │       └── windows-schema.json
│   ├── icons/
│   │   └── icon.icns
│   ├── src/
│   │   └── main.rs
│   └── tauri.conf.json
├── tsconfig.json
└── vite.config.ts

================================================
FILE CONTENTS
================================================

================================================
FILE: .babelrc
================================================
{}

================================================
FILE: .github/FUNDING.yml
================================================
# These are supported funding model platforms

github: [prayag17] # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
polar: # Replace with a single Polar username
buy_me_a_coffee: # Replace with a single Buy Me a Coffee username
thanks_dev: # Replace with a single thanks.dev username
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']


================================================
FILE: .github/ISSUE_TEMPLATE/bug_report.md
================================================
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: ''
assignees: ''

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
 - OS: [e.g. Windows]
 - Version [e.g. v0.0.6-dev]
 - Jellyfin Version [e.g. 10.9]
**Additional context**
Add any other context about the problem here.


================================================
FILE: .github/ISSUE_TEMPLATE/feature_request.md
================================================
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

**Describe the solution you'd like**
A clear and concise description of what you want to happen.

**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.

**Additional context**
Add any other context or screenshots about the feature request here.


================================================
FILE: .github/release.yaml
================================================
changelog:
  categories:
    - title: 🏕 Features
      labels:
        - '*'
      exclude:
        labels:
          - dependencies
    - title: 👒 Dependencies
      labels:
        - dependencies


================================================
FILE: .github/workflows/continuous-integration.yml
================================================
# @format

name: Continuous Integration
on:
     push:
          branches:
               - main
     pull_request:
          types: [opened, synchronize, reopened, ready_for_review]

jobs:
     build_web:
          runs-on: ubuntu-latest
          steps:
               - name: Checkout repository
                 uses: actions/checkout@v6

               - uses: pnpm/action-setup@v4
                 name: Install pnpm
                 with:
                      version: 10
                      run_install: false

               - name: Get pnpm store directory
                 shell: bash
                 run: |
                      echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

               - uses: actions/cache@v5
                 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
                 uses: actions/setup-node@v6
                 with:
                      node-version: "lts/*"
                      cache: "pnpm"

               - name: Install dependencies
                 run: pnpm install --no-frozen-lockfile

               # - name: Lint
               #   run: pnpm run lint

               - name: Build
                 run: pnpm run build

     build:
          needs: build_web
          # Prevent forked PRs from running the build job which is expensive
          if: github.repository == 'prayag17/Blink'
          strategy:
               fail-fast: false
               matrix:
                    platform: [macos-latest, ubuntu-22.04, windows-latest]
          runs-on: ${{ matrix.platform }}
          environment: TAURI
          steps:
               - name: Checkout repository
                 uses: actions/checkout@v6

               - name: Install dependencies (ubuntu only)
                 if: matrix.platform == 'ubuntu-22.04'
                 # You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
                 run: |
                      sudo apt-get update
                      sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev

               - name: Rust setup
                 uses: dtolnay/rust-toolchain@stable

               - name: Rust cache
                 uses: swatinem/rust-cache@v2
                 with:
                      workspaces: "./src-tauri -> target"

               - uses: pnpm/action-setup@v4
                 name: Install pnpm
                 with:
                      version: 10
                      run_install: false

               - name: Get pnpm store directory
                 shell: bash
                 run: |
                      echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

               - uses: actions/cache@v5
                 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
                 uses: actions/setup-node@v6
                 with:
                      node-version: "lts/*"
                      cache: "pnpm"

               - name: Install dependencies
                 run: pnpm install --no-frozen-lockfile

               - name: Build app
                 run: pnpm run tauri build --debug
                 env:
                      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
                      TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
                      TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
                      TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
                      TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}

                      # TODO: Remove the below command after upstream issue is fixed
                      # Related issue: https://github.com/tauri-apps/tauri/issues/10702
                      WEBKIT_DISABLE_DMABUF_RENDERER: 1 # Disable DMABUF renderer on Wayland

               - name: Upload build Artifacts
                 uses: actions/upload-artifact@v6
                 with:
                      name: Blink-${{ matrix.platform }}-dev${{ github.sha }}
                      path: src-tauri/target/debug/bundle/*

     # Create or update nightly release
     nightly_release:
          needs: build
          if: github.repository == 'prayag17/Blink' && github.event_name == 'push' && github.ref == 'refs/heads/main'
          runs-on: ubuntu-latest
          permissions:
               contents: write     # Required for creating/updating releases
          steps:
               - name: Checkout repository
                 uses: actions/checkout@v6.0.1

               - name: Download all artifacts
                 uses: actions/download-artifact@v7.0.0
                 with:
                    path: artifacts
                    
               - name: Prepare assets
                 run: |
                   mkdir -p release_assets
                   find artifacts -type f \( -name "*.exe" -o -name "*.msi" -o -name "*.dmg" -o -name "*.deb" -o -name "*.AppImage" -o -name "*.rpm" -o -name "*.tar.gz" \) | while read -r file; do
                     # Extract platform from artifact name (e.g. Blink-ubuntu-22.04-devSHA)
                     artifact_name=$(echo "$file" | cut -d'/' -f2)
                     platform=$(echo "$artifact_name" | sed -E 's/Blink-(.*)-dev.*/\1/' | sed 's/-/_/g')
                     filename=$(basename "$file")
                     cp "$file" "release_assets/${platform}-${filename}"
                   done

               - name: Delete old nightly release
                 run: gh release delete nightly --yes --repo ${{ github.repository }} || true
                 env:
                    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

               - name: Create nightly release
                 uses: softprops/action-gh-release@v2.5.0
                 with:
                    tag_name: nightly
                    name: Nightly Build (${{ github.sha }})
                    body: |
                      Nightly build from the latest main branch.
                      
                      **Last commit:** ${{ github.event.head_commit.message }}
                      **SHA:** ${{ github.sha }}
                    prerelease: true
                    files: release_assets/*
                    fail_on_unmatched_files: true



================================================
FILE: .github/workflows/release.yml
================================================
# @format

name: Release
on:
     push:
          tags:
               - "v*"
     workflow_dispatch:

jobs:
     release:
          strategy:
               fail-fast: false
               matrix:
                    platform: [macos-latest, ubuntu-22.04, windows-latest]
          runs-on: ${{ matrix.platform }}
          environment: TAURI
          steps:
               - name: Checkout repository
                 uses: actions/checkout@v6

               - name: Install dependencies (ubuntu only)
                 if: matrix.platform == 'ubuntu-22.04'
                 # You can remove libayatana-appindicator3-dev if you don't use the system tray feature.
                 run: |
                      sudo apt-get update
                      sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev librsvg2-dev

               - name: Rust setup
                 uses: dtolnay/rust-toolchain@stable
                 with:
                      # Those targets are only used on macos runners so it's in an `if` to slightly speed up windows and linux builds.
                      targets: ${{ matrix.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }}

               - name: Rust cache
                 uses: swatinem/rust-cache@v2
                 with:
                      workspaces: "./src-tauri -> target"

               - uses: pnpm/action-setup@v4
                 name: Install pnpm
                 with:
                      version: 10
                      run_install: false

               - name: Get pnpm store directory
                 shell: bash
                 run: |
                      echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV

               - uses: actions/cache@v5
                 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
                 uses: actions/setup-node@v6
                 with:
                      node-version: "lts/*"
                      cache: "pnpm" # Set this to npm, yarn or pnpm.

               - name: Install app dependencies and build web
                 # Remove `&& yarn build` if you build your frontend in `beforeBuildCommand`
                 run: pnpm install --no-frozen-lockfile && pnpm run build # Change this to npm, yarn or pnpm.

               - name: Build the app
                 uses: tauri-apps/tauri-action@v0

                 env:
                      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
                      TAURI_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
                      TAURI_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
                      TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
                      TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
                 with:
                      tagName: ${{ github.ref_name }} # This only works if your workflow triggers on new tags.
                      releaseName: "App Name v__VERSION__" # tauri-action replaces \_\_VERSION\_\_ with the app version.
                      releaseBody: "See the assets to download and install this version."
                      releaseDraft: true
                      prerelease: false
                      args: ${{ matrix.platform == 'macos-latest' && '--target universal-apple-darwin' || '' }}


================================================
FILE: .github/workflows/winget-releaser.yml
================================================
name: Publish Releases to WinGet
on:
  release:
    types: [published]
jobs:
  publish-alpha:
    runs-on: ubuntu-latest
    if: contains(github.event.release.tag_name, '-alpha')
    steps:
      - uses: vedantmgoyal9/winget-releaser@main
        with:
          identifier: prayag17.Blink.Alpha
          version: ${{ github.event.release.tag_name }}
          installers-regex: '\.exe$'
          token: ${{ secrets.WINGET_TOKEN }}

  publish-stable:
    runs-on: ubuntu-latest
    if: "!contains(github.event.release.tag_name, '-alpha')"
    steps:
      - uses: vedantmgoyal9/winget-releaser@main
        with:
          identifier: prayag17.Blink
          version: ${{ github.event.release.tag_name }}
          installers-regex: '\.exe$'
          token: ${{ secrets.WINGET_TOKEN }}


================================================
FILE: .gitignore
================================================
*dist
*build
__pycache__
*.mkv
*.mp4
*mpv*
sh-agent*
.pytest_cache

### react ###
.DS_*
*.log
logs
**/*.backup.*
**/*.back.*

node_modules
bower_components

*.sublime*

psd
thumb
sketch

### Rust ###
# Generated by Cargo
# will have compiled files and executables
debug/
target/

# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
# Cargo.lock

# These are backup files generated by rustfmt
**/*.rs.bk

# MSVC Windows builds of rustc generate these, which store debugging information
*.pdb

generateBanner
# Million Lint
.million


================================================
FILE: .vscode/extensions.json
================================================
{
    "recommendations": [
        "biomejs.biome",
        "github.vscode-github-actions",
        "swellaby.rust-pack",
        "1yib.rust-bundle",
        "sibiraj-s.vscode-scss-formatter",
        "tauri-apps.tauri-vscode"
    ]
}

================================================
FILE: .vscode/launch.json
================================================
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "lldb",
            "request": "launch",
            "name": "Tauri Development Debug",
            "cargo": {
                "args": [
                    "build",
                    "--manifest-path=./src-tauri/Cargo.toml",
                    "--no-default-features"
                ]
            },
            // task for the `beforeDevCommand` if used, must be configured in `.vscode/tasks.json`
            "preLaunchTask": "ui:dev"
        },
        {
            "type": "lldb",
            "request": "launch",
            "name": "Tauri Production Debug",
            "cargo": {
                "args": [
                    "build",
                    "--release",
                    "--manifest-path=./src-tauri/Cargo.toml"
                ]
            },
            // task for the `beforeBuildCommand` if used, must be configured in `.vscode/tasks.json`
            "preLaunchTask": "ui:build"
        }
    ]
}

================================================
FILE: .vscode/settings.json
================================================
{
	"editor.defaultFormatter": "biomejs.biome",
	"editor.codeActionsOnSave": {
		"quickfix.biome": "always",
		"source.organizeImports.biome": "explicit"
	},
	"[github-actions-workflow]": {
		"editor.defaultFormatter": "esbenp.prettier-vscode"
	},
	"[json]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"[typescriptreact]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"[typescript]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"[javascriptreact]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"[javascript]": {
		"editor.defaultFormatter": "biomejs.biome"
	},
	"rust-analyzer.linkedProjects": ["./src-tauri/Cargo.toml"],
	"typescript.tsdk": "node_modules/typescript/lib",
	"[scss]": {
		"editor.defaultFormatter": "vscode.css-language-features"
	},
	"millionLint.theme": "million",
	"millionLint.disableOutdatedVersionMessage": true
}


================================================
FILE: .vscode/tasks.json
================================================
{
    // See https://go.microsoft.com/fwlink/?LinkId=733558
    // for the documentation about the tasks.json format
    "version": "2.0.0",
    "tasks": [
        {
            "label": "ui:dev",
            "type": "shell",
            // `dev` keeps running in the background
            // ideally you should also configure a `problemMatcher`
            // see https://code.visualstudio.com/docs/editor/tasks#_can-a-background-task-be-used-as-a-prelaunchtask-in-launchjson
            "isBackground": true,
            // change this to your `beforeDevCommand`:
            "command": "yarn",
            "args": [
                "dev"
            ]
        },
        {
            "label": "ui:build",
            "type": "shell",
            // change this to your `beforeBuildCommand`:
            "command": "yarn",
            "args": [
                "build"
            ]
        }
    ]
}

================================================
FILE: CHANGELOG.md
================================================
- # Alpha 3 (11/12/2024)
    - refactor: prepare for alpha 3
    - refactor: cleanup
    - refactor: remove unused imports
    - fix: series page not fetching correct season
    - feat: add key binding for macos users #435
    - refactor: remove jellyPlayer naming from code #460
    - feat: add playlist playback support
    - refactor: improve server add process
    - feat: show current time while scrubbing video progress #339
    - style: increase the sharpness of card images
    - feat: add skip recap button
    - refactor: cleanup video player
    - feat: add chapter navigation buttons to video player #457
    - feat: allow changing audio track from video player
    - feat: allow changing chapters from a chapter list #457
    - refactor: cleanup search route
    - refactor: cleanup some components
    - refactor: unmount card image if not inView
    - refactor: cleanup person route
    - style: replace noto-sans with plus-jakarta-sans
    - refactor: cleanup login routes
    - fix: library items not of same size #380
    - refactor: cleanup item.tsx
    - fix: series page breaking if season is not loaded
    - fix: do not display missing items in series
    - refactor: move more files to ts
    - refactor: move more files to ts
    - refactor: move more files to ts
    - refactor: move more files to typescript
    - refactor: move more components to ts
    - refactore: cleanup __root.tsx
    - chore(deps): update dependencies
    - fix: collections page not rendering #447
    - fix: quick connect not working #445
    - fix: playback error if subtitle is not set
    - fix: index not being assigned proper value #420
    - fix: synced lyrics not working
    - Merge pull request #446 from prayag17/renovate/node-22.x-lockfile
    - refactor: use saved lyrics
    - refactor: change GenreView to genreFilter
    - fix(deps): update dependency @types/node to v22.10.1
    - Merge pull request #393 from prayag17/renovate/tanstack-router-monorepo
    - Merge pull request #424 from prayag17/renovate/tanstack-query-monorepo
    - fix(deps): update tanstack-router monorepo
    - Merge pull request #426 from prayag17/renovate/node-22.x-lockfile
    - fix(deps): update dependency @types/node to v22.10.0
    - Merge pull request #437 from prayag17/dependabot/cargo/src-tauri/rustls-0.23.18
    - fix(deps): update tanstack-query monorepo to v5.61.4
    - Merge pull request #438 from prayag17/renovate/axios-1.x-lockfile
    - Merge pull request #439 from prayag17/renovate/vitejs-plugin-react-4.x-lockfile
    - chore(deps): update dependency @vitejs/plugin-react to v4.3.4
    - refactore: move more components to typescript
    - fix: episode and series not playing if episode is not present in nextUp and continueWatching
    - feat: show current episode in PlayButton
    - fix: episode indexing for absolute numbering indexNumbers in PlayButton
    - fix: unable to read Id of undefined in PlayButton
    - fix(deps): update dependency axios to v1.7.8
    - chore(deps): bump rustls from 0.23.16 to 0.23.18 in /src-tauri
    - fix(ci): not uploading debug builds
    - refactor(ci): build debug builds in CI
    - Merge pull request #425 from prayag17/renovate/serde_json-1.x-lockfile
    - Merge pull request #436 from sambartik/macos-universal-dmg
    - chore(deps): update dependencies
    - refactor: convert more files to typescript
    - fix: improper handling of undefined api leading to crashes
    - refactor: move all buttons to tsx #338
    - Add universal dmg for macOS in release job
    - fix: audio queue not moving after 2 changes #182
    - fix: playing track from album not updating the queue #182
    - refactor: use MediaSegments api for intro/outro skipping
    - fix: trickplay images not showing up
    - refactor: improve login page UI #338 #202
    - chore(release): update latest.json
    - fix(deps): update rust crate serde_json to v1.0.133

- # 0.0.7-dev (20/11/2024)
    - chore(deps): update dependencies
    - refactor: change UI of login/list and fix Api not being defined in context
    - fix: player/audio route not able to interact with audioPlayer
    - fix: audio player info not visible
    - fix: audio player not playing audio
    - fix: toggling ssubtitles not working
    - fix: subtitles not being rendered #401
    - fix: hero carousel indicators not scrolling
    - fix: vite build error for safari13
    - fix: blink not launching or rendering on opening
    - Merge branch 'main' of https://github.com/prayag17/JellyPlayer
    - chore(deps): update dependencies
    - Merge pull request #410 from prayag17/renovate/tauri-plugin-notification-2.x-lockfile
    - Merge pull request #409 from Blackspirits/patch-1
    - chore(deps): update dependencies
    - (origin/renovate/tauri-plugin-notification-2.x-lockfile) fix(deps): update rust crate tauri-plugin-notification to v2.0.1  
    - feat: allow downloading images from ImageViewer
    - Update index.tsx
    - feat: implement basic image viewer #338 #240
    - fix: react infinite depth error
    - fix: vite config
    - refactor: remove @million/js and @million/lint
    - refactor: remove Cargo.lock from .gitignore #400
    - chore(deps): update dependencies
    - refactor: code cleanup
    - fix: bug_report showing extra fields
    - refactor: remove redundant calls for getCurrentUser
    - feat: show queue item from currently playing item in queueButton
    - chore(deps): update dependencies
    - feat: remember library filters #192
    - Merge pull request #370 from prayag17/renovate/tauri-apps-plugin-clipboard-manager-2.x
    - fix(deps): update dependency @tauri-apps/plugin-clipboard-manager to v2.1.0-beta.6
    - Merge pull request #381 from prayag17/renovate/wavesurfer.js-7.x-lockfile
    - Merge pull request #342 from prayag17/renovate/tanstack-router-monorepo
    - Merge pull request #368 from prayag17/renovate/tauri-monorepo
    - chore(release): update latest.json

- # 0.0.6-dev (9/7/2024)
    > **Note** : This is an unstable release
    - feat: add video player slider bubble theming #337
    - feat: add trickplay support #338 #337
    - fix(ci): update env variables
    - fix(ci): fix ubuntu build failing
    - chore(deps): update js and rust deps
    - feat: add chapter markers #337
    - feat: add subtitle support #337
    - fix(ci): invalid tauri build command
    - fix(ci):workflow repo name
    - feat: remember last search query
    - feat: add new audioPlayer route and allow reordering queue
    - chore(deps): update deps
    - chore(deps): cleanup unused dependencies and update dependencies
    - refactor: replace wavesurfer with html audio player
    - feat: add new album page
    - fix: quick connect not working
    - chore: change tauri updater signing keys
    - feat: show upNext card for episode items in player
    - fix: login page not working
    - Merge pull request #332 from pypp/feat/double-click-fullscreen
    - Merge pull request #333 from pypp/feat/scrollwheel-volume-control
    - fix: removed subtitleRenderer state that was added while merging
    - fix: fixed bug caused by merge econflicts
    - Merge remote-tracking branch 'upstream/main' into feat/scrollwheel-volume-control
    - fix: fixed fucntion to use the new API
    - Merge remote-tracking branch 'upstream/main' into feat/double-click-fullscreen
    - Merge branch 'main' of https://github.com/pypp/JellyPlayer into feat/double-click-fullscreen
    - fix(deps): update dependency babel-plugin-react-compiler to v0.0.0
    - fix(deps): update tauri monorepo
    - chore(deps): update dependencies
    - feat: allow toggling subtitles on and off from player
    - fix: playNext and playPrevious logic
    - feat: add intro-skipper
    - refactor: cleanup unused variables in playbackStore
    - chore(deps): update packages
    - refactor: support vtt and ass subtitles
    - refactor: add sorting options to library page for Series and BoxSets
    - style: update hero-carousel styling
    - chore(deps): update deps
    - fix(deps): update dependency framer-motion to v11.2.9
    - refactor: move most routing logic to tanstack
    - refactor: implement new login logic and verify context.api status
    - chore(deps): update dependencies
    - refactor: move to tanstack router
    - fix: videoPlayer not restoring playback position when queueItem is updated
    - fix: Slight UI regression when changing servers on latest version #288
    - fix: eac3 codec support
    - refactor: queueItem playback
    - fix(deps): update rust crate tauri to 1.6.2 (#298)
    - fix: episode playback
    - feat: add queueButton
    - Merge branch 'main' of https://github.com/prayag17/JellyPlayer
    - chore(deps): fix vite 5.2 bundle
    - fix(deps): update dependency @types/react to v18.3.1 (#295)
    - fix: scrollTrigger in libraryView
    - style: improve styling
    - fix: backdrop flashing
    - feat: use tanstack virtual for rendering library items
    - style: improve login notice ui
    - refactor: fetch mediaSource for series
    - refactor: implement new playback method for playbutton (wip)
    - ui: improve glass texture
    - ui: implement new appBar #284
    - feat: display sdr and hdr only videoRange
    - style: improve hdr10 logo spacing
    - chore: update title-movie screenshot in README.md
    - chore: update title-movie.png
    - fix: hdr10 icon height not matching
    - style: update mediainfo icons
    - style: update mediainfo icons
    - fix: no subtitle option not selecting
    - feat: use brand logo for hdr10plus
    - fix: default subtitle not being selected properly
    - style: display backdrops in boxset
    - fix: videoPlayer not exiting if subtitles are disabled
    - chore: add kitsu icon to iconLink
    - fix: carousel not rendering
    - chore: update readme
    - chore: update screenshots
    - fix: improve hdr10+ detection
    - feat: add quality and audio brand labels
    - style: improve page-margin
    - fix(player): unable to play media without subtitles
    - fix: album not displaying if no parent backdrop is found
    - chore: add screenshots and some features of JellyPlayer #242
    - chore: upload screenshots
    - fix(nsis): nsis setup images not displaying correctly
    - style: Improve titlePage styling
    - style: change cardText styling
    - style: Improve overall app component paddings and margins and rollback vite to 5.1.6
    - chore(deps): update dependency vite to v5.2.6 (#286)
    - fix(deps): update material-ui monorepo (#270)
    - fix(deps): update dependency @types/node to v20.11.29 (#292)
    - fix(deps): update dependency @types/react to v18.2.67 (#293)
    - fix(deps): update tanstack-query monorepo to v5.28.6 (#271)
    - fix(deps): update dependency @types/react to v18.2.67 (#272)
    - fix(deps): update dependency @types/node to v20.11.29 (#274)
    - fix(deps): update dependency framer-motion to v11.0.15 (#278)
    - fix(deps): update dependency typescript to v5.4.3 (#287)
    - fix(deps): update dependency material-symbols to v0.17.1 (#289)
    - chore(deps): update dependency @biomejs/biome to v1.6.2 (#290)
    - fix(deps): update rust crate log to ^0.4.21 (#276)
    - chore: update latest.json

- # v0.0.5-dev
    > **Note** : This is an unstable release
    - feat(web): Add new About page (#258) by @prayag17
    - feat(web): Allow managing servers from settings dialog by @prayag17
    - feat(search): Add Episode to search by @prayag17
    - feat(settings-server): Add a refretch button by @prayag17
    - feat(web): Add a global query fetch/mutation status by @prayag17
    - fix(server): Use redirect instead of relaunch when changing or deleting a server by @prayag17
    - refactor(player): Rewrite and improve video playback by @prayag17
    - feat(web): Use season backdrop in series page if available by @prayag17
    - feat(player): Allow selecting subtitles during playback by @prayag17
    - feat(ui): Add new episode layout by @prayag17

================================================
FILE: LICENSE
================================================
                    GNU GENERAL PUBLIC LICENSE
                       Version 3, 29 June 2007

 Copyright (C) 2007 Free Software Foundation, Inc. <https://fsf.org/>
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.

                            Preamble

  The GNU General Public License is a free, copyleft license for
software and other kinds of works.

  The licenses for most software and other practical works are designed
to take away your freedom to share and change the works.  By contrast,
the GNU General Public License is intended to guarantee your freedom to
share and change all versions of a program--to make sure it remains free
software for all its users.  We, the Free Software Foundation, use the
GNU General Public License for most of our software; it applies also to
any other work released this way by its authors.  You can apply it to
your programs, too.

  When we speak of free software, we are referring to freedom, not
price.  Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
them if you wish), that you receive source code or can get it if you
want it, that you can change the software or use pieces of it in new
free programs, and that you know you can do these things.

  To protect your rights, we need to prevent others from denying you
these rights or asking you to surrender the rights.  Therefore, you have
certain responsibilities if you distribute copies of the software, or if
you modify it: responsibilities to respect the freedom of others.

  For example, if you distribute copies of such a program, whether
gratis or for a fee, you must pass on to the recipients the same
freedoms that you received.  You must make sure that they, too, receive
or can get the source code.  And you must show them these terms so they
know their rights.

  Developers that use the GNU GPL protect your rights with two steps:
(1) assert copyright on the software, and (2) offer you this License
giving you legal permission to copy, distribute and/or modify it.

  For the developers' and authors' protection, the GPL clearly explains
that there is no warranty for this free software.  For both users' and
authors' sake, the GPL requires that modified versions be marked as
changed, so that their problems will not be attributed erroneously to
authors of previous versions.

  Some devices are designed to deny users access to install or run
modified versions of the software inside them, although the manufacturer
can do so.  This is fundamentally incompatible with the aim of
protecting users' freedom to change the software.  The systematic
pattern of such abuse occurs in the area of products for individuals to
use, which is precisely where it is most unacceptable.  Therefore, we
have designed this version of the GPL to prohibit the practice for those
products.  If such problems arise substantially in other domains, we
stand ready to extend this provision to those domains in future versions
of the GPL, as needed to protect the freedom of users.

  Finally, every program is threatened constantly by software patents.
States should not allow patents to restrict development and use of
software on general-purpose computers, but in those that do, we wish to
avoid the special danger that patents applied to a free program could
make it effectively proprietary.  To prevent this, the GPL assures that
patents cannot be used to render the program non-free.

  The precise terms and conditions for copying, distribution and
modification follow.

                       TERMS AND CONDITIONS

  0. Definitions.

  "This License" refers to version 3 of the GNU General Public License.

  "Copyright" also means copyright-like laws that apply to other kinds of
works, such as semiconductor masks.

  "The Program" refers to any copyrightable work licensed under this
License.  Each licensee is addressed as "you".  "Licensees" and
"recipients" may be individuals or organizations.

  To "modify" a work means to copy from or adapt all or part of the work
in a fashion requiring copyright permission, other than the making of an
exact copy.  The resulting work is called a "modified version" of the
earlier work or a work "based on" the earlier work.

  A "covered work" means either the unmodified Program or a work based
on the Program.

  To "propagate" a work means to do anything with it that, without
permission, would make you directly or secondarily liable for
infringement under applicable copyright law, except executing it on a
computer or modifying a private copy.  Propagation includes copying,
distribution (with or without modification), making available to the
public, and in some countries other activities as well.

  To "convey" a work means any kind of propagation that enables other
parties to make or receive copies.  Mere interaction with a user through
a computer network, with no transfer of a copy, is not conveying.

  An interactive user interface displays "Appropriate Legal Notices"
to the extent that it includes a convenient and prominently visible
feature that (1) displays an appropriate copyright notice, and (2)
tells the user that there is no warranty for the work (except to the
extent that warranties are provided), that licensees may convey the
work under this License, and how to view a copy of this License.  If
the interface presents a list of user commands or options, such as a
menu, a prominent item in the list meets this criterion.

  1. Source Code.

  The "source code" for a work means the preferred form of the work
for making modifications to it.  "Object code" means any non-source
form of a work.

  A "Standard Interface" means an interface that either is an official
standard defined by a recognized standards body, or, in the case of
interfaces specified for a particular programming language, one that
is widely used among developers working in that language.

  The "System Libraries" of an executable work include anything, other
than the work as a whole, that (a) is included in the normal form of
packaging a Major Component, but which is not part of that Major
Component, and (b) serves only to enable use of the work with that
Major Component, or to implement a Standard Interface for which an
implementation is available to the public in source code form.  A
"Major Component", in this context, means a major essential component
(kernel, window system, and so on) of the specific operating system
(if any) on which the executable work runs, or a compiler used to
produce the work, or an object code interpreter used to run it.

  The "Corresponding Source" for a work in object code form means all
the source code needed to generate, install, and (for an executable
work) run the object code and to modify the work, including scripts to
control those activities.  However, it does not include the work's
System Libraries, or general-purpose tools or generally available free
programs which are used unmodified in performing those activities but
which are not part of the work.  For example, Corresponding Source
includes interface definition files associated with source files for
the work, and the source code for shared libraries and dynamically
linked subprograms that the work is specifically designed to require,
such as by intimate data communication or control flow between those
subprograms and other parts of the work.

  The Corresponding Source need not include anything that users
can regenerate automatically from other parts of the Corresponding
Source.

  The Corresponding Source for a work in source code form is that
same work.

  2. Basic Permissions.

  All rights granted under this License are granted for the term of
copyright on the Program, and are irrevocable provided the stated
conditions are met.  This License explicitly affirms your unlimited
permission to run the unmodified Program.  The output from running a
covered work is covered by this License only if the output, given its
content, constitutes a covered work.  This License acknowledges your
rights of fair use or other equivalent, as provided by copyright law.

  You may make, run and propagate covered works that you do not
convey, without conditions so long as your license otherwise remains
in force.  You may convey covered works to others for the sole purpose
of having them make modifications exclusively for you, or provide you
with facilities for running those works, provided that you comply with
the terms of this License in conveying all material for which you do
not control copyright.  Those thus making or running the covered works
for you must do so exclusively on your behalf, under your direction
and control, on terms that prohibit them from making any copies of
your copyrighted material outside their relationship with you.

  Conveying under any other circumstances is permitted solely under
the conditions stated below.  Sublicensing is not allowed; section 10
makes it unnecessary.

  3. Protecting Users' Legal Rights From Anti-Circumvention Law.

  No covered work shall be deemed part of an effective technological
measure under any applicable law fulfilling obligations under article
11 of the WIPO copyright treaty adopted on 20 December 1996, or
similar laws prohibiting or restricting circumvention of such
measures.

  When you convey a covered work, you waive any legal power to forbid
circumvention of technological measures to the extent such circumvention
is effected by exercising rights under this License with respect to
the covered work, and you disclaim any intention to limit operation or
modification of the work as a means of enforcing, against the work's
users, your or third parties' legal rights to forbid circumvention of
technological measures.

  4. Conveying Verbatim Copies.

  You may convey verbatim copies of the Program's source code as you
receive it, in any medium, provided that you conspicuously and
appropriately publish on each copy an appropriate copyright notice;
keep intact all notices stating that this License and any
non-permissive terms added in accord with section 7 apply to the code;
keep intact all notices of the absence of any warranty; and give all
recipients a copy of this License along with the Program.

  You may charge any price or no price for each copy that you convey,
and you may offer support or warranty protection for a fee.

  5. Conveying Modified Source Versions.

  You may convey a work based on the Program, or the modifications to
produce it from the Program, in the form of source code under the
terms of section 4, provided that you also meet all of these conditions:

    a) The work must carry prominent notices stating that you modified
    it, and giving a relevant date.

    b) The work must carry prominent notices stating that it is
    released under this License and any conditions added under section
    7.  This requirement modifies the requirement in section 4 to
    "keep intact all notices".

    c) You must license the entire work, as a whole, under this
    License to anyone who comes into possession of a copy.  This
    License will therefore apply, along with any applicable section 7
    additional terms, to the whole of the work, and all its parts,
    regardless of how they are packaged.  This License gives no
    permission to license the work in any other way, but it does not
    invalidate such permission if you have separately received it.

    d) If the work has interactive user interfaces, each must display
    Appropriate Legal Notices; however, if the Program has interactive
    interfaces that do not display Appropriate Legal Notices, your
    work need not make them do so.

  A compilation of a covered work with other separate and independent
works, which are not by their nature extensions of the covered work,
and which are not combined with it such as to form a larger program,
in or on a volume of a storage or distribution medium, is called an
"aggregate" if the compilation and its resulting copyright are not
used to limit the access or legal rights of the compilation's users
beyond what the individual works permit.  Inclusion of a covered work
in an aggregate does not cause this License to apply to the other
parts of the aggregate.

  6. Conveying Non-Source Forms.

  You may convey a covered work in object code form under the terms
of sections 4 and 5, provided that you also convey the
machine-readable Corresponding Source under the terms of this License,
in one of these ways:

    a) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by the
    Corresponding Source fixed on a durable physical medium
    customarily used for software interchange.

    b) Convey the object code in, or embodied in, a physical product
    (including a physical distribution medium), accompanied by a
    written offer, valid for at least three years and valid for as
    long as you offer spare parts or customer support for that product
    model, to give anyone who possesses the object code either (1) a
    copy of the Corresponding Source for all the software in the
    product that is covered by this License, on a durable physical
    medium customarily used for software interchange, for a price no
    more than your reasonable cost of physically performing this
    conveying of source, or (2) access to copy the
    Corresponding Source from a network server at no charge.

    c) Convey individual copies of the object code with a copy of the
    written offer to provide the Corresponding Source.  This
    alternative is allowed only occasionally and noncommercially, and
    only if you received the object code with such an offer, in accord
    with subsection 6b.

    d) Convey the object code by offering access from a designated
    place (gratis or for a charge), and offer equivalent access to the
    Corresponding Source in the same way through the same place at no
    further charge.  You need not require recipients to copy the
    Corresponding Source along with the object code.  If the place to
    copy the object code is a network server, the Corresponding Source
    may be on a different server (operated by you or a third party)
    that supports equivalent copying facilities, provided you maintain
    clear directions next to the object code saying where to find the
    Corresponding Source.  Regardless of what server hosts the
    Corresponding Source, you remain obligated to ensure that it is
    available for as long as needed to satisfy these requirements.

    e) Convey the object code using peer-to-peer transmission, provided
    you inform other peers where the object code and Corresponding
    Source of the work are being offered to the general public at no
    charge under subsection 6d.

  A separable portion of the object code, whose source code is excluded
from the Corresponding Source as a System Library, need not be
included in conveying the object code work.

  A "User Product" is either (1) a "consumer product", which means any
tangible personal property which is normally used for personal, family,
or household purposes, or (2) anything designed or sold for incorporation
into a dwelling.  In determining whether a product is a consumer product,
doubtful cases shall be resolved in favor of coverage.  For a particular
product received by a particular user, "normally used" refers to a
typical or common use of that class of product, regardless of the status
of the particular user or of the way in which the particular user
actually uses, or expects or is expected to use, the product.  A product
is a consumer product regardless of whether the product has substantial
commercial, industrial or non-consumer uses, unless such uses represent
the only significant mode of use of the product.

  "Installation Information" for a User Product means any methods,
procedures, authorization keys, or other information required to install
and execute modified versions of a covered work in that User Product from
a modified version of its Corresponding Source.  The information must
suffice to ensure that the continued functioning of the modified object
code is in no case prevented or interfered with solely because
modification has been made.

  If you convey an object code work under this section in, or with, or
specifically for use in, a User Product, and the conveying occurs as
part of a transaction in which the right of possession and use of the
User Product is transferred to the recipient in perpetuity or for a
fixed term (regardless of how the transaction is characterized), the
Corresponding Source conveyed under this section must be accompanied
by the Installation Information.  But this requirement does not apply
if neither you nor any third party retains the ability to install
modified object code on the User Product (for example, the work has
been installed in ROM).

  The requirement to provide Installation Information does not include a
requirement to continue to provide support service, warranty, or updates
for a work that has been modified or installed by the recipient, or for
the User Product in which it has been modified or installed.  Access to a
network may be denied when the modification itself materially and
adversely affects the operation of the network or violates the rules and
protocols for communication across the network.

  Corresponding Source conveyed, and Installation Information provided,
in accord with this section must be in a format that is publicly
documented (and with an implementation available to the public in
source code form), and must require no special password or key for
unpacking, reading or copying.

  7. Additional Terms.

  "Additional permissions" are terms that supplement the terms of this
License by making exceptions from one or more of its conditions.
Additional permissions that are applicable to the entire Program shall
be treated as though they were included in this License, to the extent
that they are valid under applicable law.  If additional permissions
apply only to part of the Program, that part may be used separately
under those permissions, but the entire Program remains governed by
this License without regard to the additional permissions.

  When you convey a copy of a covered work, you may at your option
remove any additional permissions from that copy, or from any part of
it.  (Additional permissions may be written to require their own
removal in certain cases when you modify the work.)  You may place
additional permissions on material, added by you to a covered work,
for which you have or can give appropriate copyright permission.

  Notwithstanding any other provision of this License, for material you
add to a covered work, you may (if authorized by the copyright holders of
that material) supplement the terms of this License with terms:

    a) Disclaiming warranty or limiting liability differently from the
    terms of sections 15 and 16 of this License; or

    b) Requiring preservation of specified reasonable legal notices or
    author attributions in that material or in the Appropriate Legal
    Notices displayed by works containing it; or

    c) Prohibiting misrepresentation of the origin of that material, or
    requiring that modified versions of such material be marked in
    reasonable ways as different from the original version; or

    d) Limiting the use for publicity purposes of names of licensors or
    authors of the material; or

    e) Declining to grant rights under trademark law for use of some
    trade names, trademarks, or service marks; or

    f) Requiring indemnification of licensors and authors of that
    material by anyone who conveys the material (or modified versions of
    it) with contractual assumptions of liability to the recipient, for
    any liability that these contractual assumptions directly impose on
    those licensors and authors.

  All other non-permissive additional terms are considered "further
restrictions" within the meaning of section 10.  If the Program as you
received it, or any part of it, contains a notice stating that it is
governed by this License along with a term that is a further
restriction, you may remove that term.  If a license document contains
a further restriction but permits relicensing or conveying under this
License, you may add to a covered work material governed by the terms
of that license document, provided that the further restriction does
not survive such relicensing or conveying.

  If you add terms to a covered work in accord with this section, you
must place, in the relevant source files, a statement of the
additional terms that apply to those files, or a notice indicating
where to find the applicable terms.

  Additional terms, permissive or non-permissive, may be stated in the
form of a separately written license, or stated as exceptions;
the above requirements apply either way.

  8. Termination.

  You may not propagate or modify a covered work except as expressly
provided under this License.  Any attempt otherwise to propagate or
modify it is void, and will automatically terminate your rights under
this License (including any patent licenses granted under the third
paragraph of section 11).

  However, if you cease all violation of this License, then your
license from a particular copyright holder is reinstated (a)
provisionally, unless and until the copyright holder explicitly and
finally terminates your license, and (b) permanently, if the copyright
holder fails to notify you of the violation by some reasonable means
prior to 60 days after the cessation.

  Moreover, your license from a particular copyright holder is
reinstated permanently if the copyright holder notifies you of the
violation by some reasonable means, this is the first time you have
received notice of violation of this License (for any work) from that
copyright holder, and you cure the violation prior to 30 days after
your receipt of the notice.

  Termination of your rights under this section does not terminate the
licenses of parties who have received copies or rights from you under
this License.  If your rights have been terminated and not permanently
reinstated, you do not qualify to receive new licenses for the same
material under section 10.

  9. Acceptance Not Required for Having Copies.

  You are not required to accept this License in order to receive or
run a copy of the Program.  Ancillary propagation of a covered work
occurring solely as a consequence of using peer-to-peer transmission
to receive a copy likewise does not require acceptance.  However,
nothing other than this License grants you permission to propagate or
modify any covered work.  These actions infringe copyright if you do
not accept this License.  Therefore, by modifying or propagating a
covered work, you indicate your acceptance of this License to do so.

  10. Automatic Licensing of Downstream Recipients.

  Each time you convey a covered work, the recipient automatically
receives a license from the original licensors, to run, modify and
propagate that work, subject to this License.  You are not responsible
for enforcing compliance by third parties with this License.

  An "entity transaction" is a transaction transferring control of an
organization, or substantially all assets of one, or subdividing an
organization, or merging organizations.  If propagation of a covered
work results from an entity transaction, each party to that
transaction who receives a copy of the work also receives whatever
licenses to the work the party's predecessor in interest had or could
give under the previous paragraph, plus a right to possession of the
Corresponding Source of the work from the predecessor in interest, if
the predecessor has it or can get it with reasonable efforts.

  You may not impose any further restrictions on the exercise of the
rights granted or affirmed under this License.  For example, you may
not impose a license fee, royalty, or other charge for exercise of
rights granted under this License, and you may not initiate litigation
(including a cross-claim or counterclaim in a lawsuit) alleging that
any patent claim is infringed by making, using, selling, offering for
sale, or importing the Program or any portion of it.

  11. Patents.

  A "contributor" is a copyright holder who authorizes use under this
License of the Program or a work on which the Program is based.  The
work thus licensed is called the contributor's "contributor version".

  A contributor's "essential patent claims" are all patent claims
owned or controlled by the contributor, whether already acquired or
hereafter acquired, that would be infringed by some manner, permitted
by this License, of making, using, or selling its contributor version,
but do not include claims that would be infringed only as a
consequence of further modification of the contributor version.  For
purposes of this definition, "control" includes the right to grant
patent sublicenses in a manner consistent with the requirements of
this License.

  Each contributor grants you a non-exclusive, worldwide, royalty-free
patent license under the contributor's essential patent claims, to
make, use, sell, offer for sale, import and otherwise run, modify and
propagate the contents of its contributor version.

  In the following three paragraphs, a "patent license" is any express
agreement or commitment, however denominated, not to enforce a patent
(such as an express permission to practice a patent or covenant not to
sue for patent infringement).  To "grant" such a patent license to a
party means to make such an agreement or commitment not to enforce a
patent against the party.

  If you convey a covered work, knowingly relying on a patent license,
and the Corresponding Source of the work is not available for anyone
to copy, free of charge and under the terms of this License, through a
publicly available network server or other readily accessible means,
then you must either (1) cause the Corresponding Source to be so
available, or (2) arrange to deprive yourself of the benefit of the
patent license for this particular work, or (3) arrange, in a manner
consistent with the requirements of this License, to extend the patent
license to downstream recipients.  "Knowingly relying" means you have
actual knowledge that, but for the patent license, your conveying the
covered work in a country, or your recipient's use of the covered work
in a country, would infringe one or more identifiable patents in that
country that you have reason to believe are valid.

  If, pursuant to or in connection with a single transaction or
arrangement, you convey, or propagate by procuring conveyance of, a
covered work, and grant a patent license to some of the parties
receiving the covered work authorizing them to use, propagate, modify
or convey a specific copy of the covered work, then the patent license
you grant is automatically extended to all recipients of the covered
work and works based on it.

  A patent license is "discriminatory" if it does not include within
the scope of its coverage, prohibits the exercise of, or is
conditioned on the non-exercise of one or more of the rights that are
specifically granted under this License.  You may not convey a covered
work if you are a party to an arrangement with a third party that is
in the business of distributing software, under which you make payment
to the third party based on the extent of your activity of conveying
the work, and under which the third party grants, to any of the
parties who would receive the covered work from you, a discriminatory
patent license (a) in connection with copies of the covered work
conveyed by you (or copies made from those copies), or (b) primarily
for and in connection with specific products or compilations that
contain the covered work, unless you entered into that arrangement,
or that patent license was granted, prior to 28 March 2007.

  Nothing in this License shall be construed as excluding or limiting
any implied license or other defenses to infringement that may
otherwise be available to you under applicable patent law.

  12. No Surrender of Others' Freedom.

  If conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License.  If you cannot convey a
covered work so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you may
not convey it at all.  For example, if you agree to terms that obligate you
to collect a royalty for further conveying from those to whom you convey
the Program, the only way you could satisfy both those terms and this
License would be to refrain entirely from conveying the Program.

  13. Use with the GNU Affero General Public License.

  Notwithstanding any other provision of this License, you have
permission to link or combine any covered work with a work licensed
under version 3 of the GNU Affero General Public License into a single
combined work, and to convey the resulting work.  The terms of this
License will continue to apply to the part which is the covered work,
but the special requirements of the GNU Affero General Public License,
section 13, concerning interaction through a network will apply to the
combination as such.

  14. Revised Versions of this License.

  The Free Software Foundation may publish revised and/or new versions of
the GNU General Public License from time to time.  Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.

  Each version is given a distinguishing version number.  If the
Program specifies that a certain numbered version of the GNU General
Public License "or any later version" applies to it, you have the
option of following the terms and conditions either of that numbered
version or of any later version published by the Free Software
Foundation.  If the Program does not specify a version number of the
GNU General Public License, you may choose any version ever published
by the Free Software Foundation.

  If the Program specifies that a proxy can decide which future
versions of the GNU General Public License can be used, that proxy's
public statement of acceptance of a version permanently authorizes you
to choose that version for the Program.

  Later license versions may give you additional or different
permissions.  However, no additional obligations are imposed on any
author or copyright holder as a result of your choosing to follow a
later version.

  15. Disclaimer of Warranty.

  THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
APPLICABLE LAW.  EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

  16. Limitation of Liability.

  IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES.

  17. Interpretation of Sections 15 and 16.

  If the disclaimer of warranty and limitation of liability provided
above cannot be given local legal effect according to their terms,
reviewing courts shall apply local law that most closely approximates
an absolute waiver of all civil liability in connection with the
Program, unless a warranty or assumption of liability accompanies a
copy of the Program in return for a fee.

                     END OF TERMS AND CONDITIONS

            How to Apply These Terms to Your New Programs

  If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.

  To do so, attach the following notices to the program.  It is safest
to attach them to the start of each source file to most effectively
state the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.

    <one line to give the program's name and a brief idea of what it does.>
    Copyright (C) <year>  <name of author>

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <https://www.gnu.org/licenses/>.

Also add information on how to contact you by electronic and paper mail.

  If the program does terminal interaction, make it output a short
notice like this when it starts in an interactive mode:

    <program>  Copyright (C) <year>  <name of author>
    This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
    This is free software, and you are welcome to redistribute it
    under certain conditions; type `show c' for details.

The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License.  Of course, your program's commands
might be different; for a GUI interface, you would use an "about box".

  You should also get your employer (if you work as a programmer) or school,
if any, to sign a "copyright disclaimer" for the program, if necessary.
For more information on this, and how to apply and follow the GNU GPL, see
<https://www.gnu.org/licenses/>.

  The GNU General Public License does not permit incorporating your program
into proprietary programs.  If your program is a subroutine library, you
may consider it more useful to permit linking proprietary applications with
the library.  If this is what you want to do, use the GNU Lesser General
Public License instead of this License.  But first, please read
<https://www.gnu.org/licenses/why-not-lgpl.html>.


================================================
FILE: README.md
================================================
![Banner](https://github.com/user-attachments/assets/cf3ffbe3-3b48-4fab-bd7e-f011928286fa)
<div align="center">
<img alt="GitHub Release" src="https://img.shields.io/github/v/release/prayag17/Blink?sort=date&display_name=tag&style=for-the-badge&logo=data%3Aimage%2Fsvg%2Bxml%3Bbase64%2CPHN2ZyB3aWR0aD0iODc4IiBoZWlnaHQ9IjEwMTIiIHZpZXdCb3g9IjAgMCA4NzggMTAxMiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik00MzguODA5IDUwNkwzNS40MDQ4IDczOC45MDZMNDM4LjgwOSA5NzEuODEyTDg0Mi4yMTQgNzM4LjkwNlYyNzMuMDk0TDQzOC44MDkgNDAuMTg4NUwzNS40MDQ4IDI3My4wOTRMNDM4LjgwOSA1MDZaTTQzOC44MDkgMEw4NzcuMDE4IDI1M1Y3NTlMNDM4LjgwOSAxMDEyTDAuNjAwNTg2IDc1OVY3MTguODEyVjI5My4xODhWMjUzTDQzOC44MDkgMFoiIGZpbGw9IndoaXRlIi8%2BCjwvc3ZnPgo%3D&labelColor=000&link=https%3A%2F%2Fgithub.com%2Fprayag17%Blink%2Freleases%2Flatest">
<img alt="GitHub Repo stars" src="https://img.shields.io/github/stars/prayag17/Blink?style=for-the-badge&logo=github&labelColor=000&link=https%3A%2F%2Fgithub.com%2Fprayag17%Blink%2Fstargazers">
<img alt="GitHub License" src="https://img.shields.io/github/license/prayag17/Blink?style=for-the-badge&labelColor=000">  
<img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/prayag17/Blink/continuous-integration.yml?style=for-the-badge&logo=github&label=CI&labelColor=000&link=https%3A%2F%2Fgithub.com%2Fprayag17%Blink%2Factions%2Fworkflows%2Fcontinuous-integration.yml">
</div>

### 

> [!IMPORTANT]
> **JellyPlayer** has been renamed to **Blink** to avoid confusion with first party Jellyfin apps

## 📝 Prerequisites

- Nodejs (22.14.0)
- Rust (>=1.85.0)
- 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:

  ```shell
  pnpm install
  ```

## 🛠️ Development

- Running the app:

  ```shell
  pnpm run tauri dev
  ```

- Building the app:

  ```shell
  pnpm run tauri build
  ```

- other commands can be found inside the `"scripts"` inside [package.json](https://github.com/prayag17/Blink/blob/main/package.json)

## 💻 Contribution

- Checkout `issues` to see currently worked on features and bugs
- Add features or fix bugs
- Create a pull request

## ✨ Features

- Play any media supported by the system (DirectPlay most files on windows, mac and linux)
- Clean and minimal UI.
- Multi Jellyfin server support
- Cross Platform
- Mediainfo recognition (DolbyVision, DolbyAtoms, Dts, Hdr10+, and more...)
- Sort/Filter library items
- Queue playback support 
- Intro Skip button using [jumoog/Intro-Skipper](https://github.com/jumoog/intro-skipper) plugin
- Mediasegment support

## 📷 Screenshots

- Home
  <img width="2560" height="1600" alt="Screenshot 2026-02-10 212208" src="https://github.com/user-attachments/assets/036c2339-e8f1-4c8d-a908-af0ece9bb1f3" />
- Library
  <img width="2560" height="1600" alt="Screenshot 2026-02-10 212723" src="https://github.com/user-attachments/assets/6520a325-3cf3-47a0-9056-b27aded4bb8c" />
- Music Player Detailed
  <img width="2560" height="1600" alt="Screenshot 2026-02-10 213017" src="https://github.com/user-attachments/assets/00a89efa-0a4c-4272-868e-f52c9fcfeaac" />
- Item Page
  <img width="2560" height="1600" alt="Screenshot 2026-02-10 212653" src="https://github.com/user-attachments/assets/5d281f8c-48ba-4787-b8ca-a4b86ccab5c1" />
- Album / Music Player
  <img width="2560" height="1600" alt="Screenshot 2026-02-10 212949" src="https://github.com/user-attachments/assets/d99aaea5-e242-4b3d-a5c5-d2868313728b" />
- Search Dialog
  <img width="2560" height="1600" alt="Screenshot 2026-02-10 212749" src="https://github.com/user-attachments/assets/4ad87072-86ad-4510-95a4-567d6d11e997" />
- Video Player
  <img width="2560" height="1600" alt="Screenshot 2026-02-10 213049" src="https://github.com/user-attachments/assets/effcca22-3650-46e1-9a86-b3b434851f2f" />


## 📃 Roadmap

- Checkout [GitHub Project](https://github.com/users/prayag17/projects/3)
  

## 🎊 Special thanks to

- [@ferferga](https://github.com/ferferga) for helping in development behind the scenes.
- All contributors of [jellyfin/jellyfin-vue](https://github.com/jellyfin/jellyfin-vue).
- And also [@jellyfin](https://github.com/jellyfin/) for creating the main service



================================================
FILE: biome.json
================================================
{
	"$schema": "https://biomejs.dev/schemas/2.3.13/schema.json",
	"assist": { "actions": { "source": { "organizeImports": "on" } } },
	"linter": {
		"enabled": true,
		"rules": {
			"recommended": true,
			"style": {
				"noNonNullAssertion": "off",
				"useEnumInitializers": "off",
				"noParameterAssign": "error",
				"useAsConstAssertion": "error",
				"useDefaultParameterLast": "error",
				"useSelfClosingElements": "error",
				"useSingleVarDeclarator": "error",
				"noUnusedTemplateLiteral": "error",
				"useNumberNamespace": "error",
				"noInferrableTypes": "error",
				"noUselessElse": "error"
			},
			"a11y": {
				"useKeyWithClickEvents": "off",
				"useMediaCaption": "off",
				"noStaticElementInteractions": "off"
			},
			"correctness": {
				"useExhaustiveDependencies": "off",
				"noUnusedImports": "off"
			},
			"suspicious": {
				"noExplicitAny": "off"
			},
			"nursery": {}
		}
	},
	"files": {
		"includes": [
			"**/src/**/*.ts",
			"**/src/**/*.tsx",
			"**/src/**/*.jsx",
			"**/src/**/*.js",
			"**/*.json",
			"**/*.scss"
		],
		"ignoreUnknown": true
	},
	"formatter": {
		"formatWithErrors": true
	}
}


================================================
FILE: index.html
================================================
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <!-- <script src="http://localhost:8097"></script> -->
  <title>Blink</title>
  <style>
    .app-loading {
      position: fixed;
      top: 50%;
      left: 50%;
      transform: translate(-50%,-50%);
      width: 10em;
      height: 10em;
      background: rgb(180 180 180);
      z-index: 100000;
      mask-image: url("./src/assets/icon-outline.png");
      mask-size: contain;
    }

    .app-loading.hidden {
      display: none;
    }

    
    .app-loading-anim{
      width: 150%;
      height: 100%;
      position: absolute;
      top: 0;
      left: 0;
      background: linear-gradient(to right,transparent,rgb(255 255 255),transparent);
      transform: scaleX(0);
      animation: loading 0.75s linear infinite both;
        transform-origin: left;
    }

    @keyframes loading {
      0%{
        transform: translate(-100%);
      }
      50%{
        transform: translate(0%);
      }
      100%{
        transform: translate(100%);
      }
    }
  </style>
</head>

<body>
  <div class="app-loading">
    <!-- <img src="./src/assets/icon-outline.svg" class="app-loading-logo" /> -->
    <div class="app-loading-anim"></div>
  </div>
  <div id="root"></div>
  <svg style="width: 0; height: 0; position: absolute" aria-hidden="true" focusable="false">
    <linearGradient id="clr-gradient-default" x2="1" y2="1">
      <stop offset="0%" stop-color="hsl(337, 96%, 56%)" />
      <stop offset="100%" stop-color="hsl(273, 100%, 36%)" />
    </linearGradient>
  </svg>
  <script type="module" src="/src/main.tsx"></script>
</body>

</html>

================================================
FILE: latest.json
================================================
{
	"version": "0.0.7-dev",
	"notes": "![Banner](https://i.imgur.com/rnhjwsl.png)\n- chore(deps): update dependencies\n- refactor: change UI of login/list and fix Api not being defined in context\n- fix: player/audio route not able to interact with audioPlayer\n- fix: audio player info not visible\n- fix: audio player not playing audio\n- fix: toggling ssubtitles not working\n- fix: subtitles not being rendered #401\n- fix: hero carousel indicators not scrolling\n- fix: vite build error for safari13\n- fix: blink not launching or rendering on opening\n- Merge branch 'main' of https://github.com/prayag17/JellyPlayer\n- chore(deps): update dependencies\n- Merge pull request #410 from prayag17/renovate/tauri-plugin-notification-2.x-lockfile\n- Merge pull request #409 from Blackspirits/patch-1\n- chore(deps): update dependencies\n- fix(deps): update rust crate tauri-plugin-notification to v2.0.1\n- feat: allow downloading images from ImageViewer\n- Update index.tsx\n- feat: implement basic image viewer #338 #240\n- fix: react infinite depth error\n- fix: vite config\n- refactor: remove @million/js and @million/lint\n- refactor: remove Cargo.lock from .gitignore #400\n- chore(deps): update dependencies\n- refactor: code cleanup\n- fix: bug_report showing extra fields\n- refactor: remove redundant calls for getCurrentUser\n- feat: show queue item from currently playing item in queueButton\n- chore(deps): update dependencies\n- feat: remember library filters #192\n- Merge pull request #370 from prayag17/renovate/tauri-apps-plugin-clipboard-manager-2.x\n- fix(deps): update dependency @tauri-apps/plugin-clipboard-manager to v2.1.0-beta.6\n- Merge pull request #381 from prayag17/renovate/wavesurfer.js-7.x-lockfile\n- Merge pull request #342 from prayag17/renovate/tanstack-router-monorepo\n- Merge pull request #368 from prayag17/renovate/tauri-monorepo\n- chore(release): update latest.json",
	"pub_date": "2024-11-20T07:04:53.965Z",
	"platforms": {
		"darwin-aarch64": {
			"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSNkxEL1dFMElZL2RHaC9wc3VMQzJxeFRYaHVVN0xEZW91WWgwZkluYkYrdW5hUWl2UFlSeEUyRk93dm13WUdmQVZETWhmNW9MZ2lPUFdOdERzbGFibkpPNHJWMU1BYlFrPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzMyMDg1ODYyCWZpbGU6QmxpbmsuYXBwLnRhci5negpjK0VIaW9oVzlrUU92UWZudzcvRGlZNExwM0NOdmpHVGd1QUc2WWZ0bnRkU2NsWkdqQUJrR01ucVVRTktvR0RaV0l0L09KQ2luZHNUdjMvTGVlM2RCUT09Cg==",
			"url": "https://github.com/prayag17/Blink/releases/download/v0.0.7-dev/Blink_aarch64.app.tar.gz"
		},
		"linux-x86_64": {
			"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSNkxEL1dFMElZL1hKZGoxZFUvZzl5SmNnUEFRTGQ2TmFNMlphK25lTU9MTjJEM0JYQWt0Sy91Um9yRmk4QTl6dEtUSmRuRmFNODRwajJ2YW4rTGJzYVZjcmhFb1IxZkFnPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzMyMDg2MTQxCWZpbGU6QmxpbmtfMC4wLjctZGV2X2FtZDY0LkFwcEltYWdlCndKZURUdjF0bkNna1VCVDNEMFNodEZBZGkzZFBKVWx2cThSNE5najBmd2U5Rzh5SDFIbUxqRHlKOWdxMnY2QU9NdTRiQmtWY2VVaVlhNjRrNDVHMUFRPT0K",
			"url": "https://github.com/prayag17/Blink/releases/download/v0.0.7-dev/Blink_0.0.7-dev_amd64.AppImage"
		},
		"windows-x86_64": {
			"signature": "dW50cnVzdGVkIGNvbW1lbnQ6IHNpZ25hdHVyZSBmcm9tIHRhdXJpIHNlY3JldCBrZXkKUlVSNkxEL1dFMElZL1MwRVJ0UXBUUEYvd01JbXhBalFwQ0w5bEdkZkdlblZNeW1EMXQxajhYeVd0cERWcnhWOWFOaXV4Q0hDU1VRTEhabXF1ekFIbzB0KzRmL0pxdEIzMEFrPQp0cnVzdGVkIGNvbW1lbnQ6IHRpbWVzdGFtcDoxNzMyMDg2Mjg5CWZpbGU6QmxpbmtfMC4wLjctZGV2X3g2NC1zZXR1cC5uc2lzLnppcApJMmRORUFhV3NKV3BCTTliQkIwcWtSZStKTzEwY002QndCWmxKb0ZRd2p2K0cvek90dmdsbmQ0MHhNOVJsWnE3Y29qQmNDckdxdUNabWpTWjJ3d0xBUT09Cg==",
			"url": "https://github.com/prayag17/Blink/releases/download/v0.0.7-dev/Blink_0.0.7-dev_x64-setup.nsis.zip"
		}
	}
}

================================================
FILE: package.json
================================================
{
	"name": "blink",
	"private": true,
	"version": "1.0.0-alpha.4",
	"type": "module",
	"scripts": {
		"dev": "vite --force && tsr watch",
		"build": "vite build",
		"preview": "vite preview",
		"tauri": "tauri",
		"lint": "biome check src/**/*",
		"lint:fix": "biome check --apply src/**/*",
		"tanstack-router-dev": "tsr watch"
	},
	"dependencies": {
		"@dnd-kit/core": "^6.3.1",
		"@dnd-kit/modifiers": "^9.0.0",
		"@dnd-kit/sortable": "^10.0.0",
		"@dnd-kit/utilities": "^3.2.2",
		"@emotion/react": "^11.14.0",
		"@emotion/styled": "^11.14.1",
		"@fontsource-variable/jetbrains-mono": "^5.2.8",
		"@fontsource-variable/noto-sans": "^5.2.10",
		"@fontsource-variable/plus-jakarta-sans": "^5.2.8",
		"@fontsource-variable/space-grotesk": "^5.2.10",
		"@jellyfin/sdk": "0.13.0",
		"@mui/lab": "7.0.1-beta.21",
		"@mui/material": "7.3.7",
		"@popperjs/core": "^2.11.8",
		"@react-spring/web": "^10.0.3",
		"@tanem/react-nprogress": "^5.0.59",
		"@tanstack/react-form": "^1.28.0",
		"@tanstack/react-query": "^5.90.20",
		"@tanstack/react-query-devtools": "^5.91.3",
		"@tanstack/react-router": "^1.158.4",
		"@tanstack/react-router-devtools": "^1.158.4",
		"@tanstack/react-virtual": "^3.13.18",
		"@tauri-apps/api": "2.10.1",
		"@tauri-apps/plugin-clipboard-manager": "2.3.2",
		"@tauri-apps/plugin-dialog": "2.6.0",
		"@tauri-apps/plugin-global-shortcut": "~2.3.1",
		"@tauri-apps/plugin-notification": "2.3.3",
		"@tauri-apps/plugin-process": "2.3.1",
		"@tauri-apps/plugin-shell": "~2.3.5",
		"@tauri-apps/plugin-store": "github:tauri-apps/tauri-plugin-store#v2",
		"@tauri-apps/plugin-updater": "2.10.0",
		"@tauri-apps/plugin-upload": "2.4.0",
		"@tauri-apps/plugin-window-state": "~2.4.1",
		"@types/node": "^25.2.1",
		"@types/react": "^19.2.13",
		"@types/react-dom": "^19.2.3",
		"axios": "^1.13.4",
		"axios-tauri-api-adapter": "^2.0.6",
		"blurhash": "^2.0.5",
		"blurhash-wasm": "^0.2.0",
		"immer": "^11.1.3",
		"jassub": "^2.4.1",
		"libpgs": "^0.8.1",
		"lodash": "^4.17.23",
		"material-symbols": "^0.40.2",
		"motion": "^12.33.0",
		"notistack": "^3.0.2",
		"react": "^19.2.4",
		"react-blurhash": "^0.3.0",
		"react-dnd": "^16.0.1",
		"react-dnd-html5-backend": "^16.0.1",
		"react-dom": "^19.2.4",
		"react-error-boundary": "^6.1.0",
		"react-intersection-observer": "^10.0.2",
		"react-markdown": "^10.1.0",
		"react-multi-carousel": "^2.8.6",
		"react-player": "^3.4.0",
		"remark-gfm": "^4.0.1",
		"typescript": "^5.9.3",
		"vite-plugin-svgr": "^4.5.0",
		"vite-plugin-top-level-await": "^1.6.0",
		"wavesurfer.js": "^7.12.1",
		"zod": "^4.3.6",
		"zustand": "5.0.11"
	},
	"devDependencies": {
		"@babel/plugin-proposal-optional-chaining-assign": "^7.27.1",
		"@biomejs/biome": "^2.3.14",
		"@tanstack/router-cli": "^1.158.4",
		"@tanstack/router-devtools": "^1.158.4",
		"@tanstack/router-vite-plugin": "^1.158.4",
		"@tauri-apps/cli": "2.10.0",
		"@types/lodash": "^4.17.23",
		"@vitejs/plugin-react": "^5.1.3",
		"babel-plugin-react-compiler": "19.1.0-rc.3",
		"eslint-plugin-react-hooks": "7.0.1",
		"prop-types": "^15.8.1",
		"sass": "^1.97.3",
		"vite": "^7.3.1",
		"vite-plugin-wasm": "^3.5.0"
	},
	"license": "GPL-3.0-only"
}


================================================
FILE: pnpm-workspace.yaml
================================================
onlyBuiltDependencies:
  - '@parcel/watcher'
  - core-js
  - esbuild


================================================
FILE: renovate.json
================================================
{
	"$schema": "https://docs.renovatebot.com/renovate-schema.json",
	"extends": ["config:base", ":disableDependencyDashboard"],
	"labels": ["dependencies"]
}


================================================
FILE: src/components/Slider/index.tsx
================================================
import React, {
	type ReactNode,
	useCallback,
	useEffect,
	useRef,
	useState,
} from "react";

import { useSpring } from "@react-spring/web";
import { debounce } from "lodash";

import "./style.scss";
import { IconButton } from "@mui/material";

const Slider = ({
	content,
	currentSlide,
}: { content: ReactNode[]; currentSlide: number }) => {
	const containerRef = useRef<HTMLDivElement>(null);
	const [scrollPos, setScrollPos] = useState({ isStart: true, isEnd: false });

	const handleScroll = useCallback(() => {
		const scrollWidth = containerRef.current?.scrollWidth ?? 0;
		const clientWidth =
			containerRef.current?.getBoundingClientRect().width ?? 0;
		const scrolledPostion = containerRef.current?.scrollLeft ?? 0;
		if (content.length === 0) {
			setScrollPos({ isStart: true, isEnd: true });
		} else if (clientWidth >= scrollWidth) {
			setScrollPos({ isStart: true, isEnd: true });
		} else if (
			scrolledPostion >=
			(containerRef.current?.scrollWidth ?? 0) - clientWidth
		) {
			setScrollPos({ isStart: false, isEnd: true });
		} else if (scrolledPostion > 0) {
			setScrollPos({ isStart: false, isEnd: false });
		} else {
			setScrollPos({ isStart: true, isEnd: false });
		}
	}, [content]);

	const debouncedScroll = useCallback(
		() => debounce(handleScroll, 50),
		[handleScroll],
	);
	useEffect(() => {
		const handleResize = () => {
			debouncedScroll();
		};
		window.addEventListener("resize", handleResize, { passive: true });
		return () => window.removeEventListener("resize", handleResize);
	}, [debouncedScroll]);

	useEffect(() => {
		handleScroll();
	}, [handleScroll, content]);

	const onScroll = () => {
		debouncedScroll();
	};

	const [, setX] = useSpring(() => ({
		from: { x: 0 },
		to: { x: 0 },
		onChange: (results) => {
			if (containerRef.current) {
				containerRef.current.scrollLeft = results.value.x;
			}
		},
	}));

	const slideLeft = useCallback(() => {
		const clientWidth =
			containerRef.current?.getBoundingClientRect().width ?? 0;
		const cardWidth =
			containerRef.current?.firstElementChild?.getBoundingClientRect().width ??
			0;
		const scrollPosition = containerRef.current?.scrollLeft ?? 0;
		const visibleItems = Math.floor(clientWidth / cardWidth);
		const scrollOffset = scrollPosition % cardWidth;

		const newX = Math.max(
			scrollPosition - scrollOffset - visibleItems * cardWidth,
			0,
		);
		setX({
			from: { x: scrollPosition },
			to: { x: newX },
			onChange: (results) => {
				if (containerRef.current) {
					containerRef.current.scrollLeft = results.value.x;
				}
			},
			reset: true,
			config: { friction: 60, tension: 1000, velocity: 2 },
		});

		if (newX === 0) {
			setScrollPos({ isStart: true, isEnd: false });
		} else {
			setScrollPos({ isStart: false, isEnd: false });
		}
	}, [setX]);

	const slideRight = useCallback(() => {
		const clientWidth =
			containerRef.current?.getBoundingClientRect().width ?? 0;
		const cardWidth =
			containerRef.current?.firstElementChild?.getBoundingClientRect().width ??
			0;
		const scrollPosition = containerRef.current?.scrollLeft ?? 0;
		const visibleItems = Math.floor(clientWidth / cardWidth);
		const scrollOffset = scrollPosition % cardWidth;

		const newX = Math.min(
			scrollPosition - scrollOffset + visibleItems * cardWidth,
			containerRef.current?.scrollWidth ?? 0 - clientWidth,
		);
		setX({
			from: { x: scrollPosition },
			to: { x: newX },
			onChange: (results) => {
				if (containerRef.current) {
					containerRef.current.scrollLeft = results.value.x;
				}
			},
			reset: true,
			config: { friction: 60, tension: 500, velocity: 2 },
		});

		if (newX >= (containerRef.current?.scrollWidth ?? 0) - clientWidth) {
			setScrollPos({ isStart: false, isEnd: true });
		} else {
			setScrollPos({ isStart: false, isEnd: false });
		}
	}, [setX]);

	return (
		<div className="slider">
			<IconButton
				className="slider-button left"
				onClick={slideLeft}
				disabled={scrollPos.isStart}
			>
				<span className="material-symbols-rounded">chevron_left</span>
			</IconButton>
			<div className="slider-track" ref={containerRef} onScroll={onScroll}>
				{content?.map((item, index) => (
					<div
						//biome-ignore lint/suspicious/noArrayIndexKey: item does not have a unique key
						key={index}
						className={
							currentSlide === index
								? "slider-track-item active"
								: "slider-track-item"
						}
					>
						{item}
					</div>
				))}
			</div>
			<IconButton
				className="slider-button right"
				onClick={slideRight}
				disabled={scrollPos.isEnd}
			>
				<span className="material-symbols-rounded">chevron_right</span>
			</IconButton>
		</div>
	);
};
export default Slider;

================================================
FILE: src/components/Slider/style.scss
================================================
.slider {
    position: relative;

    &-track {
        overflow-y: hidden;
        overflow-x: auto;
        white-space: nowrap;
        position: relative;
        overscroll-behavior-x: contain;
        margin: 0.5em 1em;
        &::-webkit-scrollbar {
                display: none;
            }

        &-item {
            display: inline-block;
            // align-self: top;
            padding: 0.5em 0;
        }
    }

    &-button {
        position: absolute !important;
        bottom: 1.3em;

        &.left {
            left: -1.2em;
        }

        &.right {
            right: -1.2em;
        }
    }
}

================================================
FILE: src/components/addServerDialog/index.tsx
================================================
import { LoadingButton } from "@mui/lab";
import {
	Box,
	Button,
	Dialog,
	InputBase,
	Stack,
	Typography,
} from "@mui/material";
import { useMutation } from "@tanstack/react-query";
import { enqueueSnackbar } from "notistack";
import React, { useState } from "react";
import { setServer } from "@/utils/storage/servers";
import { jellyfin } from "@/utils/store/api";

type AddServerDialogProps = {
	open: boolean;
	setAddServerDialog: (value: boolean) => void;
	sideEffect?: () => Promise<unknown>;
	hideBackdrop?: boolean;
};

export default function AddServerDialog(props: AddServerDialogProps) {
	const { open, setAddServerDialog, sideEffect, hideBackdrop } = props;

	const [serverIp, setServerIp] = useState("");
	const addServer = useMutation({
		mutationKey: ["add-server"],
		mutationFn: async () => {
			const servers =
				await jellyfin.discovery.getRecommendedServerCandidates(serverIp);
			const bestServer = jellyfin.discovery.findBestServer(servers);
			return bestServer;
		},
		onSuccess: async (bestServer) => {
			if (bestServer) {
				await setServer(bestServer.systemInfo?.Id ?? "", bestServer);
				setAddServerDialog(false);
				enqueueSnackbar(
					"Client added successfully. You might need to refresh client list.",
					{
						variant: "success",
					},
				);
				if (sideEffect) {
					await sideEffect();
				}
			}
		},
		onError: (err) => {
			console.error(err);
			enqueueSnackbar(`${err}`, { variant: "error" });
			enqueueSnackbar("Something went wrong", { variant: "error" });
		},
		onSettled: async (bestServer) => {
			if (!bestServer) {
				enqueueSnackbar("Provided server address is not a Jellyfin server.", {
					variant: "error",
				});
			}
		},
	});

	return (
		<Dialog
			open={open}
			onClose={() => setAddServerDialog(false)}
			hideBackdrop={Boolean(hideBackdrop)}
			fullWidth
			maxWidth="sm"
			disableScrollLock={true}
			PaperProps={{
				sx: {
					backgroundColor: "rgba(20, 20, 30, 0.7)",
					backdropFilter: "blur(24px) saturate(180%)",
					backgroundImage:
						"linear-gradient(rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0))",
					border: "1px solid rgba(255, 255, 255, 0.08)",
					boxShadow: "0 20px 50px rgba(0,0,0,0.5)",
					borderRadius: 4,
					overflow: "hidden",
				},
			}}
		>
			<Stack p={4} spacing={3}>
				<Stack spacing={1} alignItems="center">
					<span
						className="material-symbols-rounded"
						style={{
							fontSize: "48px",
							color: "var(--mui-palette-primary-main)",
						}}
					>
						add_to_queue
					</span>
					<Typography variant="h5" fontWeight="bold" textAlign="center">
						Connect to Server
					</Typography>
					<Typography variant="body2" color="text.secondary" textAlign="center">
						Enter your Jellyfin server address to continue
					</Typography>
				</Stack>

				<Box
					sx={{
						p: "2px 16px",
						bgcolor: "rgba(0,0,0,0.2)",
						borderRadius: 2,
						border: "1px solid",
						borderColor: "rgba(255,255,255,0.05)",
						display: "flex",
						alignItems: "center",
						gap: 2,
						"&:focus-within": {
							borderColor: "var(--mui-palette-primary-main)",
							bgcolor: "rgba(0,0,0,0.3)",
						},
						transition: "border-color 0.2s, background-color 0.2s",
					}}
				>
					<span className="material-symbols-rounded" style={{ opacity: 0.5 }}>
						dns
					</span>
					<InputBase
						placeholder="https://jellyfin.example.com"
						fullWidth
						value={serverIp}
						onChange={(e) => setServerIp(e.target.value)}
						sx={{ py: 1.5 }}
						autoFocus
						onKeyDown={(e) => {
							if (e.key === "Enter") {
								addServer.mutate();
							}
						}}
					/>
				</Box>

				<Stack direction="row" spacing={2} justifyContent="flex-end" pt={1}>
					<Button
						onClick={() => setAddServerDialog(false)}
						color="inherit"
						variant="text"
						sx={{ borderRadius: 2 }}
					>
						Cancel
					</Button>
					<LoadingButton
						loading={addServer.isPending}
						onClick={() => addServer.mutate()}
						variant="contained"
						color="primary"
						sx={{ borderRadius: 2, px: 3 }}
						disabled={!serverIp}
					>
						Connect
					</LoadingButton>
				</Stack>
			</Stack>
		</Dialog>
	);
}

================================================
FILE: src/components/albumMusicTrack/albumMusicTrack.scss
================================================
.item-info-track{
    display: grid;
        grid-template-columns: 3em 60% 6em 1fr;
        gap: 1em;
        padding: 1em;
        align-items: center;
        cursor: pointer;
        border-radius: $border-radius-default;
        transition: background $transition-time-fast;
        &.header {
            border-bottom: 1px solid rgb(255 255 255 / 0.2);
            color: rgb(255 255 255 / 0.7);
            border-radius: 0 !important;
        }
        .index-container {
            justify-self: center;
            position: relative;
            .material-symbols-rounded {
                position: absolute;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                font-size: 2em !important;
                opacity: 0;
                transition: none !important;
                color: $clr-accent-default;
            }
        }
        &-info {
            display: flex;
            flex-direction: column;
            gap: 0.1em
        }
        &:hover {
            background: rgb(255 255 255 / 0.1) !important;
            .index-container {
                // font-size: 0em;
                .index {
                    opacity: 0;
                    transition: opacity 0;
                }
                .material-symbols-rounded {
                    opacity: 1;
                    font-size: 2.2em !important;
                }
            }
        }
        &.playing {
            background: rgb(0 0 0 / 0.4) !important;
            .item-info-track-info-name, .index {
                color: $clr-accent-default;
                font-weight: 600;
            }
        }
        &-container {
            display: flex;
            flex-direction: column;
            gap: 0.4em
        }
}

================================================
FILE: src/components/albumMusicTrack/index.tsx
================================================
import {
	generateAudioStreamUrl,
	playAudio,
	useAudioPlayback,
} from "@/utils/store/audioPlayback";
import type {
	BaseItemDto,
	BaseItemDtoQueryResult,
} from "@jellyfin/sdk/lib/generated-client";
import { Typography } from "@mui/material";
import React from "react";

import { getRuntimeMusic } from "@/utils/date/time";
import { useApiInContext } from "@/utils/store/api";
import { useCentralStore } from "@/utils/store/central";
import { setQueue } from "@/utils/store/queue";
import { useSnackbar } from "notistack";
import lyricsIcon from "../../assets/icons/lyrics.svg";
import LikeButton from "../buttons/likeButton";

import "./albumMusicTrack.scss";

type AlbumMusicTrackProps = {
	track: BaseItemDto;
	/**
	 * This is the index of the track in the musicTracks array (not to be confused with IndexNumber property of the track)
	 */
	trackIndex: number;
	musicTracks: BaseItemDtoQueryResult | null;
};

export default function AlbumMusicTrack(props: AlbumMusicTrackProps) {
	const { track, musicTracks, trackIndex } = props;
	const [currentPlayingItem] = useAudioPlayback((state) => [state.item]);

	const user = useCentralStore((state) => state.currentUser);
	const api = useApiInContext((s) => s.api);

	const { enqueueSnackbar } = useSnackbar();

	const handlePlayback = (
		index: number,
		item: BaseItemDto,
		queue: BaseItemDto[],
	) => {
		if (!user?.Id || !api) {
			console.error("User not logged in");
			enqueueSnackbar("You need to be logged in to play music", {
				variant: "error",
			});
			return;
		}
		if (item.Id) {
			const url = generateAudioStreamUrl(
				item.Id,
				user.Id,
				api.deviceInfo.id,
				api.basePath,
				api.accessToken,
			);
			playAudio(url, item);
			setQueue(queue, index);
		}
	};
	return (
		<div
			className={
				currentPlayingItem?.Id === track.Id
					? "item-info-track playing"
					: "item-info-track"
			}
			key={track.Id}
			onClick={() => {
				if (musicTracks?.Items) {
					handlePlayback(trackIndex, track, musicTracks.Items);
				}
			}}
		>
			<div className="index-container">
				<span className="material-symbols-rounded fill ">play_arrow</span>
				<Typography className="index">{track.IndexNumber ?? "-"}</Typography>
			</div>
			<div className="item-info-track-info">
				<Typography className="item-info-track-info-name">
					{track.Name}
				</Typography>
				<Typography
					variant="subtitle2"
					style={{
						opacity: 0.6,
						display: "flex",
						alignItems: "center",
						gap: "0.6em",
					}}
					fontWeight={300}
				>
					{track.HasLyrics && <img src={lyricsIcon} alt="lyrics" />}
					{track.Artists?.join(", ")}
				</Typography>
			</div>
			<Typography>{getRuntimeMusic(track.RunTimeTicks ?? 0)}</Typography>
			<div className="flex flex-align-center">
				<LikeButton
					itemId={track.Id}
					isFavorite={track.UserData?.IsFavorite}
					queryKey={["item", "musicTracks"]}
					userId={user?.Id}
					itemName={track.Name}
				/>
			</div>
		</div>
	);
}

================================================
FILE: src/components/alphaSelector/alphaSelector.scss
================================================
.alpha-selector {
  position: sticky;
  top: 80px;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 4px;
  margin-left: auto;
  user-select: none;
  z-index: 2;
}

.alpha-letter {
  font-size: 12px;
  line-height: 1;
  padding: 6px 8px;
  border-radius: 8px;
  background: transparent;
  color: rgba(255,255,255,0.7);
  border: none;
  cursor: pointer;
}

.alpha-letter.active {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.alpha-letter:hover {
  background: rgba(255,255,255,0.08);
}


================================================
FILE: src/components/alphaSelector/index.tsx
================================================
import { getRouteApi } from "@tanstack/react-router";
import React, { useMemo } from "react";
import { useShallow } from "zustand/shallow";
import { useLibraryStateStore } from "@/utils/store/libraryState";
import "./alphaSelector.scss";

const libraryRoute = getRouteApi("/_api/library/$id");

export const AlphaSelector = React.memo(function AlphaSelector() {
	const { id: currentLibraryId } = libraryRoute.useParams();
	const { nameStartsWith } = useLibraryStateStore(
		useShallow((s) => ({
			nameStartsWith: s.libraries[currentLibraryId || ""]?.nameStartsWith,
		})),
	);
	const updateLibrary = useLibraryStateStore((s) => s.updateLibrary);

	const letters = useMemo(() => {
		const arr = Array.from({ length: 26 }, (_, i) =>
			String.fromCharCode(65 + i),
		);
		return ["All", ...arr];
	}, []);

	const handleSelect = (letter: string) => {
		const value = letter === "All" ? undefined : letter;
		if (currentLibraryId)
			updateLibrary(currentLibraryId, { nameStartsWith: value });
	};

	return (
		<div className="alpha-selector">
			{letters.map((l) => {
				const active = (nameStartsWith || "All") === l;
				return (
					<button
						key={l}
						className={active ? "alpha-letter active" : "alpha-letter"}
						onClick={() => handleSelect(l)}
						aria-label={`Filter by ${l}`}
						type="button"
					>
						{l}
					</button>
				);
			})}
		</div>
	);
});

export default AlphaSelector;


================================================
FILE: src/components/appBar/appBar.scss
================================================

.appBar {
	// Limit transitions to cheaper properties; avoid animating box-shadow directly
	transition: background-color $transition-time-fast;
	padding: 0.8em ($page-margin - 1.7em);
	z-index: 999 !important;
	.flex {
		// Avoid animating padding; it causes layout reflow on each frame.
		transition: background-color $transition-time-fast;
		// Avoid using will-change: scroll-position; it can degrade performance when misused
		// will-change: opacity, transform;
		border-radius: 1000px;
		position: relative;

		// Pseudo-element handles elevation shadow; we animate its opacity
		&::after {
			content: "";
			position: absolute;
			inset: -0.35em;
			pointer-events: none;
			border-radius: inherit;
			
			@include glass-effect;

			opacity: 0;
			z-index: -1;
			transition: all $transition-time-fast;
		}
	}

	// Inner content wrapper that we can scale without causing layout reflow
	.flex-inner {
		transform-origin: top center;
		transition: transform $transition-time-fast;
	}
	&.elevated{
		.flex {
			&::after {
				opacity: 1;
			}
		}

		// Apply a subtle scale to simulate shrink without layout changes
		.flex-inner {
			transform: scaleY(0.95);
		}
	}
	&-avatar {
		background: rgb(255 255 255 / 0.1) !important;
		&-icon {
			color: white;
		}
	}
	&-text {
		opacity: 0.7;
		transition: opacity $transition-time-fast;
		position: relative;
		color: white;
		text-decoration: none;
		&::after {
			content: "";
			width: 100%;
			height: 1.2px;
			background: white;
			opacity: 0.7;
			position: absolute;
			bottom: 4.6px;
			left: 0;
			transform: scaleX(0);
			transition: transform $transition-time-fast,
			background $transition-time-fast,
			opacity $transition-time-fast;
		}
		&:hover {
			opacity: 0.8;
			&::after {
				transform: scaleX(0.25);
				opacity: 0.8;
			}
		}
		&.active {
			opacity: 1;
			color: $clr-accent-default;
			&::after {
				transform: scaleX(0.5);
				opacity: 1;
				background: $clr-accent-default;
			}
		}
	}
}

.library-drawer {
	// Ensure the drawer paper itself gets the styling
	&.MuiDrawer-paper {
		width: 280px;
		margin: 16px;
		height: calc(100% - 32px) !important; // float in the middle
		border-radius: 24px;
		background: rgba(20, 20, 25, 0.75); // Darker, substantial base
		backdrop-filter: blur(24px) saturate(180%);
		border: 1px solid rgba(255, 255, 255, 0.06);
		box-shadow: 
			0 24px 48px rgba(0, 0, 0, 0.4),
			0 4px 8px rgba(0, 0, 0, 0.2);
		overflow: hidden; // Contain scrollbars
	}

	.MuiList-root {
		padding: 8px; // Reduced from 16px
		gap: 2px; // Reduced gap
	}

	.MuiDivider-root {
		border-color: rgba(255, 255, 255, 0.1);
		margin: 4px 12px; // Reduced margins
	}

	// Navigation Items
	.MuiListItemButton-root {
		border-radius: 12px !important; // Slightly smaller radius
		padding: 8px 12px; // Reduced padding (was 12px 16px)
		margin-bottom: 2px;
		transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
		color: rgba(255, 255, 255, 0.6);
		
		&:hover {
			background: rgba(255, 255, 255, 0.08);
			color: #fff;
			transform: scale(1.02);
		}

		.material-symbols-rounded {
			margin-right: 12px; // Reduced spacing
			font-size: 22px; // Slightly smaller icons usually look better with less padding
			transition: all 0.2s ease;
			color: inherit;
		}

		.MuiListItemText-primary {
			font-weight: 600;
			font-size: 0.9rem; // Slightly smaller text
			letter-spacing: 0.02em;
		}
	}

	// Active State
	.library-drawer-item.active {
		.MuiListItemButton-root {
			background: linear-gradient(90deg, rgba($clr-accent-default, 0.2), rgba($clr-accent-default, 0.05));
			color: $clr-accent-default;
			
			.material-symbols-rounded {
				font-variation-settings: 'FILL' 1;
				color: $clr-accent-default;
			}

			// Active Indicator Bar
			&::before {
				content: '';
				position: absolute;
				left: 0;
				top: 50%;
				transform: translateY(-50%);
				height: 24px;
				width: 4px;
				background: $clr-accent-default;
				border-radius: 0 4px 4px 0;
			}
		}
	}

	// Custom Scrollbar for the drawer content
	&::-webkit-scrollbar {
		width: 4px;
	}
	&::-webkit-scrollbar-track {
		background: transparent;
	}
	&::-webkit-scrollbar-thumb {
		background: rgba(255, 255, 255, 0.1);
		border-radius: 4px;
		&:hover {
			background: rgba(255, 255, 255, 0.2);
		}
	}
}

.appLoading {
	opacity: 0;
}


================================================
FILE: src/components/appBar/appBar.tsx
================================================
import MuiAppBar from "@mui/material/AppBar";
import IconButton from "@mui/material/IconButton";
import useScrollTrigger from "@mui/material/useScrollTrigger";
import { useLocation, useNavigate } from "@tanstack/react-router";
import React, { useCallback, useMemo, useState } from "react";

import "./appBar.scss";

import { useShallow } from "zustand/shallow";
// removed search placeholder; library state now managed via zustand
import { useApiInContext } from "@/utils/store/api";
import { useCentralStore } from "@/utils/store/central";
import useHeaderStore from "@/utils/store/header";
import useSearchStore from "@/utils/store/search";
import BackButton from "../buttons/backButton";
import { UserAvatarMenu } from "../userAvatarMenu";
import { NavigationDrawer } from "./navigationDrawer";

const MemoizeBackButton = React.memo(BackButton);

const HIDDEN_PATHS = [
	"/login",
	"/setup",
	"/server",
	"/player",
	"/error",
	"/settings",
	"/library",
	"/search",
];

export const AppBar = () => {
	const navigate = useNavigate();
	const location = useLocation();

	const toggleSearchDialog = useSearchStore(
		useShallow((s) => s.toggleSearchDialog),
	);

	const display = !HIDDEN_PATHS.some(
		(path) =>
			(location.pathname.startsWith(path) &&
				location.pathname !== "/player/audio") ||
			location.pathname === "/",
	);

	const trigger = useScrollTrigger({
		disableHysteresis: true,
		threshold: 20,
	});

	const [showDrawer, setShowDrawer] = useState(false);

	const appBarStyling = useMemo(() => {
		return {
			backgroundColor: "transparent",
			paddingRight: "0 !important",
		};
	}, []);

	const _handleNavigateToSearch = useCallback(
		() => navigate({ to: "/search", search: { query: "" } }),
		[navigate],
	);

	const handleDrawerClose = useCallback(() => {
		setShowDrawer(false);
	}, []);

	const handleDrawerOpen = useCallback(() => {
		setShowDrawer(true);
	}, []);

	const handleNavigateToHome = useCallback(() => navigate({ to: "/home" }), []);
	const handleNavigateToFavorite = useCallback(() => {
		navigate({ to: "/favorite" });
	}, []);

	useHeaderStore(useShallow((s) => ({ pageTitle: s.pageTitle })));

	if (!display) {
		return null;
	}
	if (display) {
		return (
			<>
				<MuiAppBar
					style={appBarStyling}
					className={
						trigger
							? "appBar flex flex-row flex-justify-spaced-between elevated"
							: "appBar flex flex-row flex-justify-spaced-between"
					}
					elevation={0}
					color="transparent"
				>
					<div className="flex flex-row" style={{ gap: "0.6em" }}>
						<IconButton onClick={handleDrawerOpen}>
							<span className="material-symbols-rounded">menu</span>
						</IconButton>
						<MemoizeBackButton />
						<IconButton onClick={handleNavigateToHome}>
							<span
								className={
									location.pathname === "/home"
										? "material-symbols-rounded fill"
										: "material-symbols-rounded"
								}
							>
								home
							</span>
						</IconButton>
					</div>

					<div className="flex flex-row" style={{ gap: "0.6em" }}>
						<IconButton onClick={toggleSearchDialog}>
							<span className="material-symbols-rounded">search</span>
						</IconButton>
						<IconButton onClick={handleNavigateToFavorite}>
							<span className="material-symbols-rounded">favorite</span>
						</IconButton>
						<UserAvatarMenu />
					</div>
				</MuiAppBar>
				<NavigationDrawer open={showDrawer} onClose={handleDrawerClose} />
			</>
		);
	}
};

================================================
FILE: src/components/appBar/backOnly.tsx
================================================
import AppBar from "@mui/material/AppBar";
import IconButton from "@mui/material/IconButton";
import Toolbar from "@mui/material/Toolbar";
import { useLocation, useRouter } from "@tanstack/react-router";
import React from "react";
import QuickConnectButton from "../buttons/quickConnectButton";

export default function AppBarBackOnly() {
	const { history } = useRouter();
	const location = useLocation();

	const handleBack = () => {
		history.go(-1);
	};

	const hideQuickConnect = location.pathname === "/setup/server/list";

	return (
		<AppBar elevation={0} color="transparent" position="fixed">
			<Toolbar>
				<IconButton
					size="large"
					edge="start"
					//@ts-ignore
					color="white"
					aria-label="back"
					disabled={history.length <= 1}
					onClick={handleBack}
					sx={{ mr: 2 }}
				>
					<span className="material-symbols-rounded">arrow_back</span>
				</IconButton>
				{!hideQuickConnect && (
					<QuickConnectButton
						sx={{
							marginLeft: "auto",
							flex: "none !important",
							borderRadius: "10px",
						}}
						color="secondary"
					/>
				)}
			</Toolbar>
		</AppBar>
	);
};


================================================
FILE: src/components/appBar/navigationDrawer.tsx
================================================
import { getUserViewsApi } from "@jellyfin/sdk/lib/utils/api/user-views-api";
import { Divider, Drawer, List, ListItem, ListItemButton } from "@mui/material";
import { useQuery } from "@tanstack/react-query";
import React, { useMemo } from "react";
import { useApiInContext } from "@/utils/store/api";
import { useCentralStore } from "@/utils/store/central";
import ListItemLink from "../listItemLink";
import { getTypeIcon } from "../utils/iconsCollection";

interface NavigationDrawerProps {
    open: boolean;
    onClose: () => void;
}

export const NavigationDrawer = ({ open, onClose }: NavigationDrawerProps) => {
    const api = useApiInContext((s) => s.api);
    const [user] = useCentralStore((s) => [s.currentUser]);

    const libraries = useQuery({
        queryKey: ["libraries"],
        queryFn: async () => {
            if (!user?.Id || !api?.accessToken) {
                return;
            }
            const libs = await getUserViewsApi(api).getUserViews({
                userId: user.Id,
            });
            return libs.data;
        },
        enabled: !!user?.Id && !!api?.accessToken,
        networkMode: "always",
    });

    const drawerPaperProps = useMemo(() => {
        return {
            className: "glass library-drawer",
            elevation: 6,
        };
    }, []);

    return (
        <Drawer
            open={open}
            slotProps={{ paper: drawerPaperProps }}
            className="library-drawer"
            onClose={onClose}
        >
            <List>
                <ListItem>
                    <ListItemButton onClick={onClose}>
                        <span className="material-symbols-rounded">menu_open</span>
                        <div style={{ marginLeft: "8px" }}>Close</div>
                    </ListItemButton>
                </ListItem>
            </List>
            <Divider variant="middle" />
            <List>
                <ListItemLink
                    className="library-drawer-item"
                    to="/home"
                    icon="home"
                    primary="Home"
                    onClick={onClose}
                />
                {libraries.isSuccess &&
                    libraries.data?.Items?.map((library) => (
                        <ListItemLink
                            className="library-drawer-item"
                            key={library.Id}
                            to="/library/$id"
                            params={{ id: library.Id ?? "" }}
                            icon={
                                library.CollectionType &&
                                getTypeIcon(library.CollectionType)
                            }
                            primary={library.Name ?? "Library"}
                            onClick={onClose}
                        />
                    ))}
            </List>
            <Divider variant="middle" />
            <List>
                <ListItemLink
                    to="/settings/preferences"
                    icon="settings"
                    primary="Settings"
                    className="library-drawer-item"
                    onClick={onClose}
                />
                <ListItemLink
                    to="/settings/changeServer"
                    icon="dns"
                    primary="Change Server"
                    className="library-drawer-item"
                    onClick={onClose}
                />
                <ListItemLink
                    to="/settings/about"
                    icon="info"
                    primary="About"
                    className="library-drawer-item"
                    onClick={onClose}
                />
            </List>
        </Drawer>
    );
};


================================================
FILE: src/components/avatar/avatar.module.scss
================================================

.avatar-image {
	aspect-ratio: 1;
	height: 100%;
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: center;

	&-container {
		width: fit-content;
		aspect-ratio: 1;
		position: relative;
		border-radius: 100vh;
		overflow: hidden;
	}
	&-icon {
		height: 100%;
		padding: 0.2em;
		background: rgb(255 255 255 / 0.1);
		color: white;
		font-size: 7em !important;
	}
}


================================================
FILE: src/components/avatar/avatar.tsx
================================================
import React from "react";

import "./avatar.module.scss";
import { useApiInContext } from "@/utils/store/api";

export const AvatarImage = ({ userId }: { userId: string }) => {
	const api = useApiInContext((s) => s.api);
	if (!api) return null;

	return (
		<div className="avatar-image-container">
			<div
				className="avatar-image"
				style={{
					backgroundImage: `url('${api.basePath}/Users/${userId}/Images/Primary')`,
				}}
			/>

			<div className="avatar-image-icon-container">
				<span className="material-symbols-rounded avatar-image-icon">
					account_circle
				</span>
			</div>
		</div>
	);
};

================================================
FILE: src/components/backdrop/index.tsx
================================================
import { AnimatePresence, motion } from "motion/react";
import React from "react";
import { useShallow } from "zustand/shallow";
import { useBackdropStore } from "@/utils/store/backdrop";
import BlurhashCanvas from "../blurhash-canvas";

export default function Backdrop() {
	// const [backdropLoading, setBackdropLoading] = useState(true);

	const { backdropHash } = useBackdropStore(
		useShallow((state) => ({
			backdropHash: state.backdropHash,
		})),
	);

	if (!backdropHash) {
		return null;
	}

	return (
		<AnimatePresence mode="sync">
			<motion.div
				initial={{ opacity: 0 }}
				animate={{ opacity: 1 }}
				key={backdropHash}
				exit={{ opacity: 0 }}
				transition={{
					duration: 2,
					ease: "easeInOut",
				}}
				className="app-backdrop-container"
			>
				<BlurhashCanvas
					blurhashString={backdropHash}
					width={300}
					height={150}
					canvasProps={{
						style: {
							display: "block",
							width: "100vw",
							height: "100vh",
							margin: "0 auto",
							filter: "brightness(0.8) contrast(1.6) saturate(1.6)",
						},
					}}
				/>
			</motion.div>
		</AnimatePresence>
	);
}

================================================
FILE: src/components/blurhash-canvas/index.tsx
================================================
import * as blurhash from "blurhash-wasm";
import React, { useEffect } from "react";

type BlurhashCanvasProps = {
	canvasProps?: React.CanvasHTMLAttributes<HTMLCanvasElement>;
	blurhashString: string;
	width?: number;
	height?: number;
	// punch?: number;
	onLoad?: () => void;
	onError?: (error: Error) => void;
};

const BlurhashCanvas = ({
	canvasProps,
	blurhashString,
	width,
	height,
	// punch,
	onLoad,
	onError,
}: BlurhashCanvasProps) => {
	const canvasRef = React.useRef<HTMLCanvasElement>(null);
	useEffect(() => {
		const canvas = canvasRef.current;
		if (!canvas) return;
		const ctx = canvas.getContext("2d");
		if (!ctx) return;
		const drawBlurhash = async () => {
			try {
				const imageDataBuffer = blurhash.decode(
					blurhashString,
					width || 32,
					height || 32,
					// punch || 1,
				);
				// canvas.width = width || 32;
				// canvas.height = height || 32;
				if (!imageDataBuffer) {
					throw new Error("Failed to decode blurhash");
				}
				const imageData = new ImageData(
					new Uint8ClampedArray(imageDataBuffer),
					width || 32,
					height || 32,
				);
				// imageData.data.set(imageDataBuffer);
				ctx.putImageData(imageData, 0, 0);
				if (onLoad) onLoad();
			} catch (error) {
				if (onError) onError(error as Error);
				else console.error("Error decoding blurhash:", error);
			}
		};
		drawBlurhash();
	}, [blurhash, width, height, onLoad, onError]);
	return <canvas ref={canvasRef} {...canvasProps} />;
};

export default BlurhashCanvas;


================================================
FILE: src/components/buttons/backButton.tsx
================================================
import { IconButton } from "@mui/material";
import { useRouter } from "@tanstack/react-router";
import React from "react";

export default function BackButton() {
	const { history } = useRouter();
	const handleClick = () => {
		history.back();
	};

	return (
		<IconButton onClick={handleClick} disabled={history.length === 0}>
			<span className="material-symbols-rounded">arrow_back</span>
		</IconButton>
	);
}

================================================
FILE: src/components/buttons/likeButton.tsx
================================================
import type { UserItemDataDto } from "@jellyfin/sdk/lib/generated-client";
import { getUserLibraryApi } from "@jellyfin/sdk/lib/utils/api/user-library-api";
import { pink } from "@mui/material/colors";
import IconButton from "@mui/material/IconButton";
import { useMutation, useQueryClient } from "@tanstack/react-query";
import { useSnackbar } from "notistack";
import React from "react";
import { useApiInContext } from "@/utils/store/api";

export default function LikeButton({
	itemId,
	isFavorite,
	queryKey,
	userId,
	itemName,
}: {
	itemId: string | undefined;
	isFavorite: boolean | undefined;
	queryKey: string[] | undefined;
	userId: string | undefined;
	itemName?: string | null;
}) {
	const api = useApiInContext((s) => s.api);
	const queryClient = useQueryClient();
	const { enqueueSnackbar } = useSnackbar();

	const handleLiking = async () => {
		let result: UserItemDataDto = null!;
		if (!api) return;
		if (!userId) return;
		if (!itemId) return;
		if (!itemName) return;
		if (isFavorite) {
			result = (
				await getUserLibraryApi(api).unmarkFavoriteItem({
					userId: userId,
					itemId: itemId,
				})
			).data;
		} else if (!isFavorite) {
			result = (
				await getUserLibraryApi(api).markFavoriteItem({
					userId: userId,
					itemId: itemId,
				})
			).data;
		}
		return result; // We need to return the result so that the onSettled function can invalidate the query
	};
	const mutation = useMutation({
		mutationFn: handleLiking,
		onError: (error) => {
			enqueueSnackbar(`An error occured while updating "${itemName}"`, {
				variant: "error",
			});
			console.error(error);
		},
		onSettled: async () => {
			return await queryClient.invalidateQueries({
				queryKey,
			});
		},
		mutationKey: ["likeButton", itemId],
	});

	return (
		<IconButton
			onClick={(e) => {
				if (!mutation.isPending) {
					mutation.mutate();
					e.stopPropagation();
				}
			}}
			style={{
				opacity: mutation.isPending ? 0.5 : 1,
				transition: "opacity 250ms",
			}}
		>
			<span
				className="material-symbols-rounded"
				style={
					isFavorite
						? {
								//@ts-expect-error
								"--fill": mutation.isPending ? 0 : 1,
								color: mutation.isPending ? "white" : pink.A700,
							}
						: {
								//@ts-expect-error
								"--fill": mutation.isPending ? 1 : 0,
								color: mutation.isPending ? pink.A700 : "white",
							}
				}
			>
				favorite
			</span>
		</IconButton>
	);
}


================================================
FILE: src/components/buttons/markPlayedButton.tsx
================================================
import React from "react";

import IconButton from "@mui/material/IconButton";

import { green } from "@mui/material/colors";
import { useMutation, useQueryClient } from "@tanstack/react-query";

import { useApiInContext } from "@/utils/store/api";
import { getPlaystateApi } from "@jellyfin/sdk/lib/utils/api/playstate-api";
import { useSnackbar } from "notistack";

export default function MarkPlayedButton({
	itemId,
	isPlayed,
	queryKey,
	userId,
	itemName,
}: {
	itemId?: string;
	isPlayed?: boolean;
	queryKey?: string[];
	userId?: string;
	itemName?: string | null;
}) {
	const api = useApiInContext((s) => s.api);

	const queryClient = useQueryClient();
	const { enqueueSnackbar } = useSnackbar();

	const handleMarking = async () => {
		let result = null;
		if (!api) return;
		if (!api) return;
		if (!userId) return;
		if (!itemId) return;
		if (!itemName) return;

		if (!isPlayed) {
			result = await getPlaystateApi(api).markPlayedItem({
				userId: userId,
				itemId: itemId,
			});
		} else if (isPlayed) {
			result = await getPlaystateApi(api).markUnplayedItem({
				userId: userId,
				itemId: itemId,
			});
		}
		return result; // We need to return the result so that the onSettled function can invalidate the query
	};
	const mutation = useMutation({
		mutationFn: handleMarking,
		onError: (error) => {
			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 (
		<IconButton
			onClick={(e) => {
				if (!mutation.isPending) {
					mutation.mutate();
					e.stopPropagation();
				}
			}}
			style={{
				opacity: mutation.isPending ? 0.5 : 1,
				transition: "opacity 250ms",
			}}
		>
			<div
				className="material-symbols-rounded"
				style={{
					color: isPlayed
						? mutation.isPending
							? "white"
							: green.A700
						: mutation.isPending
							? green.A700
							: "white",
				}}
			>
				done
			</div>
		</IconButton>
	);
}


================================================
FILE: src/components/buttons/playButton.tsx
================================================
import {
	type BaseItemDto,
	BaseItemKind,
} from "@jellyfin/sdk/lib/generated-client";
import { getTvShowsApi } from "@jellyfin/sdk/lib/utils/api/tv-shows-api";
import type { SxProps } from "@mui/material";
import Button, { type ButtonProps } from "@mui/material/Button";
import Fab from "@mui/material/Fab";
import LinearProgress from "@mui/material/LinearProgress";
import Typography from "@mui/material/Typography";
import { useMutation, useQuery } from "@tanstack/react-query";
import { useNavigate } from "@tanstack/react-router";
import { useSnackbar } from "notistack";
import React, { type MouseEvent, memo } from "react"; // Import memo
import type PlayResult from "@//utils/types/playResult";
import { getRuntimeCompact } from "@/utils/date/time";
import { getNextEpisode, getPlaybackInfo } from "@/utils/methods/playback";
import { useApiInContext } from "@/utils/store/api";
import { generateAudioStreamUrl, playAudio } from "@/utils/store/audioPlayback";
import { usePhotosPlayback } from "@/utils/store/photosPlayback";
import { initializePlayback } from "@/utils/store/playback";
import { setQueue } from "@/utils/store/queue";

type PlayButtonProps = {
	item: BaseItemDto;
	userId: string | undefined;
	itemType: BaseItemKind;
	currentAudioTrack?: number | "auto";
	currentVideoTrack?: number;
	currentSubTrack?: number | "nosub";
	className?: string;
	sx?: SxProps;
	buttonProps?: ButtonProps;
	iconOnly?: boolean;
	audio?: boolean;
	size?: "small" | "large" | "medium";
	playlistItem?: boolean;
	playlistItemId?: string;
	trackIndex?: number;
};

// Memoized LinearProgress component
const MemoizedLinearProgress = memo(({ value }: { value: number }) => (
	<LinearProgress
		variant="determinate"
		value={value}
		sx={{
			position: "absolute",
			top: 0,
			left: 0,
			right: 0,
			bottom: 0,
			height: "100%",
			background: "transparent",
			opacity: 0.2,
			zIndex: 0,
			mixBlendMode: "difference",
		}}
		//@ts-expect-error
		color="white"
	/>
));

const PlayButton = ({
	item,
	userId,
	itemType,
	currentAudioTrack,
	currentSubTrack,
	// currentVideoTrack,
	className,
	sx,
	buttonProps,
	iconOnly,
	audio = false,
	size = "large",
	playlistItem,
	playlistItemId = "",
}: PlayButtonProps) => {
	const api = useApiInContext((s) => s.api);
	const navigate = useNavigate();
	// const setPlaybackDataLoading = usePlaybackDataLoadStore(
	// 	(state) => state.setisPending,
	// );
	const playPhotos = usePhotosPlayback((s) => s.playPhotos);

	const { enqueueSnackbar } = useSnackbar();

	const itemQuery = useMutation({
		mutationKey: ["playButton", item?.Id, userId],
		mutationFn: async (currentEpisodeId?: string) => {
			if (!api) {
				throw new Error("API is not available");
			}
			if (!userId) {
				throw new Error("User ID is not available");
			}
			if (!item.Id) {
				throw new Error("Item ID is not available");
			}

			return await getPlaybackInfo(api, userId, item, {
				currentAudioTrack,
				currentSubTrack,
				currentEpisodeId,
				playlistItem,
				playlistItemId,
			});
		},
		onSuccess: async (result: PlayResult | null) => {
			if (!api) {
				console.error("API is not available");
				enqueueSnackbar("API is not available", { variant: "error" });
				return;
			}
			if (!userId) {
				console.error("User ID is not available");
				enqueueSnackbar("User ID is not available", { variant: "error" });
				return;
			}
			if (!result?.item?.Items?.length) {
				console.error("No items found");
				enqueueSnackbar("No items found", { variant: "error" });
				return;
			}
			if (!result?.item?.Items?.[0]?.Id) {
				console.error("No item ID found");
				enqueueSnackbar("No item ID found", { variant: "error" });
				return;
			}

			if (audio) {
				// Album/Individual audio track playback
				const playbackUrl = generateAudioStreamUrl(
					result?.item?.Items?.[0].Id,
					userId,
					api?.deviceInfo.id,
					api.basePath,
					api.accessToken,
				);
				playAudio(playbackUrl, result?.item?.Items?.[0], undefined);
				setQueue(result?.item?.Items ?? [], 0);
			} else if (item.Type === "Photo") {
				const index = result?.item?.Items?.map((i) => i.Id).indexOf(item.Id);
				if (result?.item?.Items && index) {
					playPhotos(result?.item?.Items, index);
					navigate({ to: "/player/photos" });
				}
			} else {
				if (!result?.mediaSource?.MediaSources?.[0]?.Id) {
					console.error("No media source ID found");
					enqueueSnackbar("No media source ID found", { variant: "error" });
					return;
				}
				const episodeIndex = result.episodeIndex;
				const queue = result?.item?.Items ?? [];

				let playItemValue = queue[episodeIndex];
				if (itemType === BaseItemKind.Movie) {
					playItemValue = queue[0];
				}

				if (!playItemValue) {
					console.error("No item to play found");
					return;
				}

				const startPosition = playItemValue.UserData?.PlaybackPositionTicks;

				initializePlayback({
					api,
					userId,
					item: playItemValue,
					mediaSource: result.mediaSource,
					mediaSegments: result.mediaSegments,
					queueItems: queue,
					queueIndex: episodeIndex,
					startPositionTicks: startPosition,
					audioStreamIndex:
						currentAudioTrack === "auto" ? undefined : currentAudioTrack,
					subtitleStreamIndex:
						currentSubTrack === "nosub" ? -1 : currentSubTrack,
				});
				navigate({ to: "/player" });
			}
		},
		onSettled: () => {
			// setPlaybackDataLoading(false);
		},
		onError: (error) => {
			console.error(error);
			enqueueSnackbar(`${error}`, {
				variant: "error",
			});
		},
	});
	const handleClick = (
		e: MouseEvent<HTMLAnchorElement | MouseEvent>,
		currentEpisodeId?: string | undefined,
	) => {
		e.stopPropagation();
		itemQuery.mutate(currentEpisodeId);
	};
	const currentEpisode = useQuery({
		queryKey: ["playButton", "currentEpisode", item?.Id],
		queryFn: async () => {
			if (!api) {
				throw new Error("API is not available");
			}
			if (!userId) {
				throw new Error("User ID is not available");
			}
			if (!item.Id) {
				throw new Error("Item ID is not available");
			}
			const seasons = await getTvShowsApi(api).getSeasons({
				seriesId: item.Id,
				userId: userId,
				enableUserData: true,
			});

			const currentSeason = seasons.data.Items?.find((season) => {
				return season.UserData?.Played !== true;
			});

			const episode = await getNextEpisode(
				api,
				userId,
				item.Id,
				currentSeason?.IndexNumber ?? 0,
			);
			if (episode) {
				return { Items: [episode] };
			}
			return { Items: [] };
		},
		enabled: itemType === BaseItemKind.Series,
	});

	if (iconOnly) {
		return (
			//@ts-expect-error
			<Fab
				color="primary"
				aria-label="Play"
				className={className}
				onClick={(e) => {
					if (item.Type === "Episode") {
						handleClick(e, item.Id);
					} else if (itemType === BaseItemKind.Series) {
						handleClick(e, currentEpisode.data?.Items?.[0]?.Id);
					} else {
						handleClick(e);
					}
				}}
				sx={sx}
				size={size}
				disabled={
					itemType === BaseItemKind.Series &&
					(!currentEpisode.data ||
						!currentEpisode.data.Items ||
						currentEpisode.data.Items.length === 0)
				}
				{...buttonProps}
			>
				<span
					className="material-symbols-rounded em-4 fill"
					style={{
						fontSize: "3em",
					}}
				>
					play_arrow
				</span>
			</Fab>
		);
	}

	if (itemType === BaseItemKind.Series) {
		return (
			<div
				className="play-button"
				style={{
					width: "auto",
					position: "relative",
				}}
			>
				<Button
					loading={currentEpisode.isPending}
					className={className ?? "play-button"}
					variant="contained"
					onClick={(e) => {
						const episodeId = currentEpisode.data?.Items?.[0]?.Id;
						if (episodeId) {
							handleClick(e, episodeId);
						}
					}}
					startIcon={
						<span
							className="material-symbols-rounded fill"
							style={{
								zIndex: 1,
								fontSize: "2em",
							}}
						>
							play_arrow
						</span>
					}
					{...buttonProps}
					sx={{
						position: "relative",
						overflow: "hidden",
					}}
					//@ts-expect-error - white color is a custom color in the theme which mui's types don't know about
					color="white"
					size={size}
					disabled={
						currentEpisode.isPending ||
						!currentEpisode.data ||
						!currentEpisode.data.Items ||
						currentEpisode.data.Items.length === 0 ||
						!currentEpisode.data.Items[0].Id
					}
				>
					{currentEpisode.isPending ? (
						"Loading..."
					) : !currentEpisode.data ||
						!currentEpisode.data.Items ||
						currentEpisode.data.Items.length === 0 ? (
						"No episodes to watch found"
					) : (
						<>
							Watch S{currentEpisode.data.Items[0].ParentIndexNumber ?? 1}E
							{currentEpisode.data.Items[0]?.IndexNumber ?? 1}
							<MemoizedLinearProgress
								//@ts-expect-error
								value={
									100 >
										(currentEpisode.data.Items[0].UserData?.PlayedPercentage ??
											100) &&
									(currentEpisode.data.Items[0].UserData?.PlayedPercentage ??
										0) > 0
										? currentEpisode.data.Items[0].UserData?.PlayedPercentage
										: 0
								}
							/>
						</>
					)}
				</Button>
				{(currentEpisode.data?.Items?.[0]?.UserData?.PlaybackPositionTicks ??
					0) > 0 && (
					<Typography
						sx={{
							opacity: 0.8,
							position: "absolute",
							bottom: "-1.8em",
							left: "50%",
							transform: "translate(-50%)",
						}}
						variant="caption"
					>
						{getRuntimeCompact(
							(currentEpisode.data?.Items?.[0]?.RunTimeTicks ?? 0) -
								(currentEpisode.data?.Items?.[0]?.UserData
									?.PlaybackPositionTicks ?? 0),
						)}{" "}
						left
					</Typography>
				)}
			</div>
		);
	}
	return (
		<div
			className="play-button"
			style={{
				width: "auto",
				position: "relative",
			}}
		>
			<Button
				className={className ?? "play-button"}
				variant="contained"
				onClick={(e) =>
					item.Type === "Episode" ? handleClick(e, item.Id) : handleClick(e)
				}
				startIcon={
					<span
						className="material-symbols-rounded fill"
						style={{
							zIndex: 1,
							fontSize: "2em",
						}}
					>
						play_arrow
					</span>
				}
				{...buttonProps}
				sx={{
					position: "relative",
					overflow: "hidden",
				}}
				//@ts-expect-error - white color is a custom color in the theme which mui's types don't know about
				color="white"
				size={size}
			>
				{item.UserData?.PlaybackPositionTicks
					? "Continue Watching"
					: item?.Type === "MusicAlbum" ||
							item?.Type === "Audio" ||
							item?.Type === "AudioBook" ||
							item?.Type === "Playlist" ||
							audio
						? "Play Now"
						: "Watch Now"}
				<MemoizedLinearProgress
					//@ts-expect-error
					value={
						100 > (item.UserData?.PlayedPercentage ?? 100) &&
						(item.UserData?.PlayedPercentage ?? 0) > 0
							? item.UserData?.PlayedPercentage
							: 0
					}
				/>
			</Button>
			{(item.UserData?.PlaybackPositionTicks ?? 0) > 0 && (
				<Typography
					sx={{
						opacity: 0.8,
						position: "absolute",
						bottom: "-1.8em",
						left: "50%",
						transform: "translate(-50%)",
					}}
					variant="caption"
				>
					{getRuntimeCompact(
						(item.RunTimeTicks ?? 0) -
							(item.UserData?.PlaybackPositionTicks ?? 0),
					)}{" "}
					left
				</Typography>
			)}
		</div>
	);
};

export default PlayButton;


================================================
FILE: src/components/buttons/playNextButton.tsx
================================================
import { useApiInContext } from "@/utils/store/api";
import { playItemFromQueue } from "@/utils/store/playback";
import useQueue from "@/utils/store/queue";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import { IconButton } from "@mui/material";
import { useMutation, useQuery } from "@tanstack/react-query";
import React from "react";

const PlayNextButton = () => {
	const api = useApiInContext((s) => s.api);

	const user = useQuery({
		queryKey: ["user"],
		queryFn: async () => {
			if (!api) return;
			const result = await getUserApi(api).getCurrentUser();
			return result.data;
		},
	});
	const handlePlayNext = useMutation({
		mutationKey: ["playNextButton"],
		mutationFn: () => playItemFromQueue("next", user.data?.Id, api),
		onError: (error) => console.error(error),
	});
	const [queueItems, currentItemIndex] = useQueue((state) => [
		state.tracks,
		state.currentItemIndex,
	]);
	return (
		<IconButton
			disabled={queueItems?.length === currentItemIndex + 1}
			onClick={() => handlePlayNext.mutate()}
		>
			<span className="material-symbols-rounded">skip_next</span>
		</IconButton>
	);
};

export default PlayNextButton;

================================================
FILE: src/components/buttons/playPreviousButtom.tsx
================================================
import { useApiInContext } from "@/utils/store/api";
import { playItemFromQueue } from "@/utils/store/playback";
import useQueue from "@/utils/store/queue";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import { IconButton } from "@mui/material";
import { useMutation, useQuery } from "@tanstack/react-query";
import React from "react";

const PlayPreviousButton = () => {
	const api = useApiInContext((s) => s.api);
	const user = useQuery({
		queryKey: ["user"],
		queryFn: async () => {
			if (!api) return;
			const result = await getUserApi(api).getCurrentUser();
			return result.data;
		},
	});
	const handlePlayNext = useMutation({
		mutationKey: ["playPreviousButton"],
		mutationFn: () => playItemFromQueue("previous", user.data?.Id, api),
		onError: (error) => [console.error(error)],
	});
	const [currentItemIndex] = useQueue((state) => [state.currentItemIndex]);
	return (
		<IconButton
			disabled={currentItemIndex === 0}
			onClick={() => handlePlayNext.mutate()}
		>
			<span className="material-symbols-rounded">skip_previous</span>
		</IconButton>
	);
};

export default PlayPreviousButton;

================================================
FILE: src/components/buttons/queueButton.scss
================================================
.queue{
    &-item{
        --image-size: 5em;
        &.episode {
                --image-size: 8em !important;
            }
        width: 32em;
        padding: 1em;
        display: grid !important;
        opacity: 1 !important;
        gap: 1em;
        height: 5em;
        grid-template-columns: 3em var(--image-size) 1fr;
        justify-items: center;
        align-items: center;
        &-image{
            max-height: 100%;
            max-width: 100%;
            object-fit: cover;
            border-radius: $border-radius_04;
            overflow: hidden;
            &-container {
                aspect-ratio: 1;
                overflow: hidden;
                height: 100%;
                display: flex;
                justify-content: center;
                align-items: center;    
                position: relative;
                width: var(--image-size);
            }
            &-icon {
                width: 100%;
                height: 100%;
                display: grid;
                place-items: center;
                background: rgb(255 255 255 / 0.2);
                border-radius: 10px;
                .material-symbols-rounded {
                    font-size: 2em;
                }
                
            }
        }
        &-info{
            display: flex;
            flex-direction: column;
            gap: 0.2em;
            width: 100%;
            overflow: hidden;
        }
    }
    &-item.Mui-disabled {
        .queue-item-image,.queue-item-image-icon{
            opacity: 0.5 !important;
        }
    }
    
}

================================================
FILE: src/components/buttons/queueButton.tsx
================================================
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import {
	Box,
	Drawer,
	IconButton,
	List,
	Tooltip,
	Typography,
} from "@mui/material";
import { useQuery } from "@tanstack/react-query";
import React, { useMemo, useState } from "react";
import { playItemFromQueue } from "@/utils/store/playback";
import useQueue, {
	clearUpcoming,
	removeFromQueue,
	reorderQueue,
	shuffleUpcoming,
} from "@/utils/store/queue";
import "./queueButton.scss";
import {
	closestCenter,
	DndContext,
	type DragEndEvent,
	KeyboardSensor,
	PointerSensor,
	useSensor,
	useSensors,
} from "@dnd-kit/core";
import { restrictToVerticalAxis } from "@dnd-kit/modifiers";
import {
	arrayMove,
	SortableContext,
	sortableKeyboardCoordinates,
	useSortable,
	verticalListSortingStrategy,
} from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client";
import { useApiInContext } from "@/utils/store/api";
import QueueListItem from "../queueListItem";

function SortableQueueItem({
	item,
	onDelete,
	onPlay,
	index,
}: {
	item: BaseItemDto;
	onDelete: () => void;
	onPlay: () => void;
	index: number;
}) {
	const {
		attributes,
		listeners,
		setNodeRef,
		transform,
		transition,
		isDragging,
	} = useSortable({ id: item.Id || "" });

	const style = {
		transform: CSS.Transform.toString(transform),
		transition,
		opacity: isDragging ? 0.5 : 1,
		position: "relative" as const,
		zIndex: isDragging ? 2 : 1,
	};

	return (
		<div ref={setNodeRef} style={style}>
			<QueueListItem
				queueItem={item}
				onDelete={onDelete}
				onPlay={onPlay}
				dragHandleProps={{ ...attributes, ...listeners }}
				isEpisode={item.Type === "Episode"}
				index={index}
			/>
		</div>
	);
}

const QueueButton = () => {
    const api = useApiInContext((s) => s.api);

    const [queueItems, currentItemIndex] = useQueue((state) => [
					state.tracks,
					state.currentItemIndex,
				]);

    const [open, setOpen] = useState(false);

	const user = useQuery({
		queryKey: ["currentUser"],
		queryFn: async () => {
			if (!api) throw new Error("API not available");
			return (await getUserApi(api).getCurrentUser()).data;
		},
		enabled: !!api,
	});

    const sensors = useSensors(
					useSensor(PointerSensor),
					useSensor(KeyboardSensor, {
						coordinateGetter: sortableKeyboardCoordinates,
					}),
				);

				const upcomingItems = useMemo(() => {
					return queueItems ? queueItems.slice(currentItemIndex + 1) : [];
				}, [queueItems, currentItemIndex]);

				const upcomingIds = useMemo(() => {
					return upcomingItems.map((item) => item.Id || "");
				}, [upcomingItems]);

				const handleDragEnd = (event: DragEndEvent) => {
					const { active, over } = event;

					if (active.id !== over?.id && queueItems) {
						const oldIndex = upcomingItems.findIndex(
							(item) => item.Id === active.id,
						);
						const newIndex = upcomingItems.findIndex(
							(item) => item.Id === over?.id,
						);

						if (oldIndex !== -1 && newIndex !== -1) {
							const newUpcoming = arrayMove(upcomingItems, oldIndex, newIndex);
							const newQueue = [
								...queueItems.slice(0, currentItemIndex + 1),
								...newUpcoming,
							];
							reorderQueue(newQueue);
						}
					}
				};

				const handleDelete = (index: number) => {
					removeFromQueue(index);
				};

				const handlePlay = (index: number) => {
					playItemFromQueue(index, user.data?.Id, api);
				};

				const handleClear = () => {
					clearUpcoming();
				};

				const handleShuffle = () => {
					shuffleUpcoming();
				};

    return (
					<>
						<Drawer
							anchor="right"
							open={open}
							onClose={() => setOpen(false)}
							PaperProps={{
								className: "glass",
								sx: {
									width: 450,
									maxWidth: "100%",
									display: "flex",
									flexDirection: "column",
									borderLeft: "1px solid rgba(255, 255, 255, 0.08)",
								},
							}}
							ModalProps={{
								BackdropProps: {
									sx: {
										backgroundColor: "rgba(0, 0, 0, 0.2)",
										backdropFilter: "blur(4px)",
									},
								},
							}}
						>
							<Box
								p={3}
								display="flex"
								justifyContent="space-between"
								alignItems="center"
								sx={{
									position: "sticky",
									top: 0,
									zIndex: 20,
									borderBottom: "1px solid",
									borderColor: "rgba(255, 255, 255, 0.08)",
									backgroundColor: "rgba(20, 20, 30, 0.4)",
									backdropFilter: "blur(12px)",
								}}
							>
								<Box display="flex" alignItems="center" gap={1}>
									<Typography variant="h5" fontWeight="bold">
										Play Queue
									</Typography>
									<Typography
										variant="caption"
										color="text.secondary"
										sx={{
											ml: 1,
											fontWeight: 600,
											bgcolor: "rgba(255, 255, 255, 0.08)",
											px: 1,
											py: 0.5,
											borderRadius: 2,
										}}
									>
										{queueItems?.length || 0}
									</Typography>
								</Box>
								<Box display="flex" gap={0.5}>
									<Tooltip title="Shuffle Upcoming">
										<span>
											<IconButton
												onClick={handleShuffle}
												size="small"
												disabled={upcomingItems.length < 2}
											>
												<span className="material-symbols-rounded">
													shuffle
												</span>
											</IconButton>
										</span>
									</Tooltip>
									<Tooltip title="Clear Upcoming">
										<span>
											<IconButton
												onClick={handleClear}
												size="small"
												disabled={upcomingItems.length === 0}
											>
												<span className="material-symbols-rounded">
													clear_all
												</span>
											</IconButton>
										</span>
									</Tooltip>
									<IconButton onClick={() => setOpen(false)} size="small">
										<span className="material-symbols-rounded">close</span>
									</IconButton>
								</Box>
							</Box>

							<Box
								sx={{
									overflowY: "auto",
									flex: 1,
									p: 2,
									"&::-webkit-scrollbar": { width: 8 },
									"&::-webkit-scrollbar-track": { background: "transparent" },
									"&::-webkit-scrollbar-thumb": {
										background: "rgba(128,128,128,0.2)",
										borderRadius: 4,
									},
									"&::-webkit-scrollbar-thumb:hover": {
										background: "rgba(128,128,128,0.3)",
									},
								}}
							>
								{queueItems && queueItems.length > 0 ? (
									<List disablePadding>
										{/* Current Item */}
										{queueItems[currentItemIndex] && (
											<Box sx={{ mb: 4 }}>
												<Typography
													variant="overline"
													sx={{
														display: "block",
														opacity: 0.6,
														mb: 1,
														fontWeight: 600,
														letterSpacing: 1.2,
													}}
												>
													NOW PLAYING
												</Typography>
												<Box
													sx={{
														bgcolor: "background.paper",
														borderRadius: 3,
														overflow: "hidden",
														boxShadow: 4,
														border: "1px solid",
														borderColor: "divider",
													}}
												>
													<QueueListItem
														queueItem={queueItems[currentItemIndex]}
														active={true}
														isEpisode={
															queueItems[currentItemIndex].Type === "Episode"
														}
														index={currentItemIndex + 1}
													/>
												</Box>
											</Box>
										)}

										{/* Upcoming Items */}
										{upcomingItems.length > 0 && (
											<>
												<Typography
													variant="overline"
													sx={{
														display: "block",
														opacity: 0.6,
														mb: 1,
														fontWeight: 600,
														letterSpacing: 1.2,
													}}
												>
													NEXT UP
												</Typography>
												<DndContext
													sensors={sensors}
													collisionDetection={closestCenter}
													onDragEnd={handleDragEnd}
													modifiers={[restrictToVerticalAxis]}
												>
													<SortableContext
														items={upcomingIds}
														strategy={verticalListSortingStrategy}
													>
														<Box
															sx={{
																display: "flex",
																flexDirection: "column",
																gap: 1,
															}}
														>
															{upcomingItems.map((item, index) => (
																<SortableQueueItem
																	key={item.Id || index}
																	item={item}
																	onDelete={() =>
																		handleDelete(currentItemIndex + 1 + index)
																	}
																	onPlay={() =>
																		handlePlay(currentItemIndex + 1 + index)
																	}
																	index={currentItemIndex + 1 + index + 1}
																/>
															))}
														</Box>
													</SortableContext>
												</DndContext>
											</>
										)}
									</List>
								) : (
									<Box
										p={4}
										textAlign="center"
										display="flex"
										flexDirection="column"
										alignItems="center"
										gap={2}
										sx={{ opacity: 0.5 }}
									>
										<span
											className="material-symbols-rounded"
											style={{ fontSize: 48 }}
										>
											queue_music
										</span>
										<Typography>Your queue is empty</Typography>
									</Box>
								)}
							</Box>
						</Drawer>
						<IconButton onClick={() => setOpen(true)}>
							<span className="material-symbols-rounded">playlist_play</span>
						</IconButton>
					</>
				);
};

export default QueueButton;

================================================
FILE: src/components/buttons/quickConnectButton.tsx
================================================
import { getQuickConnectApi } from "@jellyfin/sdk/lib/utils/api/quick-connect-api";
import { getUserApi } from "@jellyfin/sdk/lib/utils/api/user-api";
import { LoadingButton, type LoadingButtonProps } from "@mui/lab";
import {
	Button,
	Checkbox,
	Dialog,
	DialogActions,
	DialogContent,
	DialogContentText,
	FormControlLabel,
	Slide,
	Tooltip,
	Typography,
} from "@mui/material";
import type { TransitionProps } from "@mui/material/transitions";
import { skipToken, useMutation, useQuery } from "@tanstack/react-query";
import { useNavigate } from "@tanstack/react-router";
import { writeText } from "@tauri-apps/plugin-clipboard-manager";
import { useSnackbar } from "notistack";
import React, { useCallback, useState } from "react";
import useInterval from "@/utils/hooks/useInterval";
import { saveUser } from "@/utils/storage/user";
import { useApiInContext } from "@/utils/store/api";

const Transition = React.forwardRef(function Transition(
	props: TransitionProps & {
		children: React.ReactElement<any, any>;
	},
	ref: React.Ref<unknown>,
) {
	return (
		<Slide
			direction="up"
			mountOnEnter
			unmountOnExit
			ref={ref}
			timeout={{ enter: 500, exit: 1500 }}
			{...props}
		/>
	);
});

const QuickConnectButton = (props: LoadingButtonProps) => {
	const api = useApiInContext((s) => s.api);
	const createApi = useApiInContext((s) => s.createApi);
	// if (!api) {
	// 	console.error(
	// 		"Unable to display quick connect button, api is not available",
	// 	);
	// 	return null;
	// }

	const headers = {
		"X-Emby-Authorization": `MediaBrowser Client="${api?.clientInfo.name}", Device="${api?.deviceInfo.name}", DeviceId="${api?.deviceInfo.id}", Version="${api?.clientInfo.version}"`,
	};

	const navigate = useNavigate();

	const quickConnectEnabled = useQuery({
		queryKey: ["quick-connect-button", "check-quick-connect-enabled"],
		queryFn: api
			? async () => await getQuickConnectApi(api).getQuickConnectEnabled()
			: skipToken,
		enabled: Boolean(api),
	});

	const { enqueueSnackbar } = useSnackbar();
	const [quickConnectCode, setQuickConnectCode] = useState<string | null>();
	const [quickConnectSecret, setQuickConnectSecret] = useState<string | null>();
	const [checkForQuickConnect, setCheckForQuickConnect] = useState(false);
	const [rememberUser, setRememberUser] = useState(true);
	const authenticateUser = useMutation({
		mutationKey: ["quick-connect-button", "authenticate-user"],
		mutationFn: async () => {
			if (api && quickConnectSecret) {
				return await getUserApi(api).authenticateWithQuickConnect(
					{ quickConnectDto: { Secret: quickConnectSecret } },
					{ headers },
				);
			}
		},
		onSuccess: (result) => {
			if (api && result?.data?.AccessToken && result.data.User?.Name) {
				setCheckForQuickConnect(false);
				// saveUser({ username, password, rememberMe: rememberUser });
				enqueueSnackbar(`Logged in as ${result.data.User?.Name}!`, {
					variant: "success",
				});
				createApi(api.basePath, result.data.AccessToken);
				if (rememberUser) {
					saveUser(result.data.User?.Name, result.data.AccessToken);
				}
				navigate({ to: "/home", replace: true });
			}
		},
		onError: (error) => {
			enqueueSnackbar("Error authenticating user.", { variant: "error" });
			console.error(error);
		},
	});
	const checkQuickConnectStatus = useMutation({
		mutationKey: ["quick-connect-button", "check-quick-connect-status"],
		mutationFn: async (secret: string) =>
			api &&
			(
				await getQuickConnectApi(api).getQuickConnectState(
					{ secret },
					{ headers },
				)
			).data,
		onSuccess: (result) => {
			if (result?.Authenticated) {
				setQuickConnectCode(null);
				initQuickConnect.reset();
				checkQuickConnectStatus.reset();
				authenticateUser.mutate();
			}
		},
	});
	const initQuickConnect = useMutation({
		mutationKey: ["quick-connect-button", "initiate-connection"],
		mutationFn: async () => {
			if (!quickConnectEnabled.data?.data) {
				enqueueSnackbar("Quick Connect is not enabled on server.", {
					variant: "error",
				});
			}
			if (api) {
				return await getQuickConnectApi(api).initiateQuickConnect({ headers });
			}
		},
		onSuccess: (result) => {
			setQuickConnectCode(result?.data.Code);
			setQuickConnectSecret(result?.data.Secret);
			setCheckForQuickConnect(true);
		},
		onError: (error) => {
			enqueueSnackbar("Error initiating Quick Connect.", { variant: "error" });
			console.error(error);
		},
	});

	const handleQuickConnectClose = useCallback(() => {
		setQuickConnectCode(null);
		setCheckForQuickConnect(false);
		initQuickConnect.reset();
		checkQuickConnectStatus.reset();
	}, []);

	useInterval(
		() => {
			if (quickConnectSecret) {
				console.log(checkForQuickConnect);
				checkQuickConnectStatus.mutate(quickConnectSecret);
			}
		},
		checkForQuickConnect ? 1500 : null,
	);

	return (
		<div style={{ marginLeft: "auto" }}>
			{/* @ts-ignore */}
			<LoadingButton
				{...props}
				disabled={
					quickConnectEnabled.isPending ||
					Boolean(!quickConnectEnabled.data?.data)
				}
				loading={Boolean(
					initQuickConnect.isPending ||
						checkQuickConnectStatus.isPending ||
						(quickConnectCode && !checkQuickConnectStatus.data?.Authenticated),
				)}
				variant={props.variant ?? "contained"}
				onClick={initQuickConnect.mutate}
			>
				{quickConnectEnabled.data?.data
					? "Use Quick Connect"
					: "Quick Connect Disabled"}
			</LoadingButton>
			<Dialog
				open={Boolean(quickConnectCode)}
				onClose={handleQuickConnectClose}
				fullWidth
				maxWidth="xs"
				TransitionComponent={Transition}
				PaperProps={{ className: "glass", sx: { borderRadius: "24px" } }}
			>
				<DialogContent
					style={{
						display: "flex",
						flexDirection: "column",
						alignItems: "center",
					}}
				>
					<Typography
						variant="h5"
						mb={2}
						style={{
							width: "100%",
						}}
					>
						Quick Connect Code:
					</Typography>
					<DialogContentText>
						Use this code in the Quick Connect tab in your server to login.
					</DialogContentText>
					<div
						className="flex flex-row"
						style={{ gap: "1em", alignItems: "center", marginTop: "1em" }}
					>
						<Tooltip title="Click to copy" arrow placement="top">
							<Typography
								variant="h3"
								color="textPrimary"
								textAlign="center"
								sx={{
									background: "rgb(255 255 255 / 0.1)",
									width: "fit-content",
									padding: "0.4em",
									borderRadius: "10px",
									cursor: "pointer",
								}}
								onClick={async () => {
									quickConnectCode && (await writeText(quickConnectCode));
									enqueueSnackbar("Quick Connect Code copied!", {
										variant: "info",
										key: "copiedText",
									});
								}}
							>
								{quickConnectCode}
							</Typography>
						</Tooltip>
					</div>
				</DialogContent>
				<DialogActions
					className="flex flex-row"
					sx={{
						padding: "0em 1em 1em 1em",
						justifyContent: "space-between",
					}}
				>
					<FormControlLabel
						control={
							<Checkbox
								checked={rememberUser}
								onChange={(e) => setRememberUser(e.target.checked)}
							/>
						}
						label="Remember device"
					/>
					<Button variant="contained" onClick={handleQuickConnectClose}>
						Close
					</Button>
				</DialogActions>
			</Dialog>
		</div>
	);
};

export default QuickConnectButton;

================================================
FILE: src/components/buttons/trailerButton.tsx
================================================
import type { MediaUrl } from "@jellyfin/sdk/lib/generated-client";
import { Dialog, IconButton } from "@mui/material";
import React, { useState } from "react";
import ReactPlayer from "react-player";

type TrailerButtonType = {
	trailerItem: MediaUrl[];
	disabled: boolean;
};

const TrailerButton = (props: TrailerButtonType) => {
	const [dialog, setDialog] = useState(false);
	return (
		<div>
			<IconButton
				disabled={props.disabled ?? false}
				onClick={() => setDialog(true)}
			>
				<span className="material-symbols-rounded">theaters</span>
			</IconButton>
			<Dialog
				maxWidth="md"
				fullWidth
				open={dialog}
				PaperProps={{
					className: "glass",
					style: {
						overflow: "hidden",
					},
				}}
				onClose={() => setDialog(false)}
			>
				{props.trailerItem[0]?.Url && (
					<ReactPlayer
						playing={false}
						url={props.trailerItem[0]?.Url}
						width="100%"
						height="auto"
						style={{
							aspectRatio: "16/9",
						}}
						controls
					/>
				)}
			</Dialog>
		</div>
	);
};

export default TrailerButton;


================================================
FILE: src/components/card/card.scss
================================================
.card {
	height: 100%;
	overflow: visible !important;
	align-items: flex-start;
	background: transparent !important;
	margin-right: 1.5em;
	margin-bottom: .8em;
	&-box {
		display: flex;
		width: 100%;
		height: 100%;
		position: relative;
		overflow: visible;
		flex-direction: column;
		justify-content: center;
	}
	&-image {
		width: 100%;
		height: 100%;
		object-fit: cover;
		transition: all $transition-time-fast;
		position: absolute;
		z-index: 1;
		top: 0;
		left: 0;
		&-container {
			position: relative;
			width: 100%;
			box-shadow: 0 4px 8px rgb(0 0 0 / 0.2);
			border-radius: $border-radius-default;
			overflow: hidden;
			height: auto;
			z-index: 0;

			&.thumb{
				aspect-ratio: 1.777777;
			}
			&.portrait{
				aspect-ratio: 0.666666;
			}
			&.square {
				aspect-ratio: 1;
			}
		}

		&-icon {
			font-size: 5.4em !important;
			&-container {
				background: linear-gradient(45deg, rgb(255 255 255 / 0.05), rgb(255 255 255 / 0.15));
				height: 100%;
				width: 100%;
				position: absolute;
				z-index: 0;
				top: 0;
				left: 0;
				transition: filter $transition-time-default;
				.material-symbols-rounded {
					position: absolute;
					top: 50%;
					left: 50%;
					transform: translate(-50%, -50%);
					color: rgb(255 255 255 / 0.5);
					font-size: 4em !important;
				}
			}
		}
		&-blurhash {
			position: absolute;
			z-index: 1;
			top: 0;
			left: 0;
			width: 100% !important;
			height: 100% !important;
			overflow: hidden;
		}
	}
	&-overlay {
		position: absolute;
		width: 100%;
		height: 100%;
		left: 0;
		top: 0;
		z-index: 10;
		opacity: 0;
		transition: all $transition-time-default;
		display: flex;
		align-items: flex-end;
		justify-content: flex-end;
		padding: 0.5em;
		background: rgba(20, 20, 30, 0.6);
		backdrop-filter: blur(12px);
	}
	&:hover,
	&:focus,
	&:focus-within {
		.card-overlay {
			opacity: 1;
		}
	}
	&:hover {
		cursor: pointer;
	}

	&:focus {
		outline: none;
	}
	&-play-button {
		position: absolute !important;
		top: 50%;
		left: 50%;
		transform: translate(-50%, -50%);
		z-index: 1;
	}
	&-indicator {
		position: absolute;
		top: 0.4em;
		right: 0.4em;
		z-index: 2;
		padding: 0.2em 0.75em;
		background: rgb(20 20 20 / 0.5);
		display: flex;
		align-items: center;
		justify-content: center;
		backdrop-filter: blur(5px);
		transition: opacity 250ms;
		border-radius: 100px;
		box-shadow: 0 0 5px rgb(0 0 0 / 0.2);
	}
	&-episode {
		.card-box {
			height: unset !important;
		}
	}

	&-actor {
		transition: all $transition-time-default;
		border-radius: 10px;
		// padding: 1em !important;
		&:hover {
			background: rgb(255 255 255 / 0.1) !important;
		}
		.card-image-container {
			border-radius: 100% !important;
		}
	}

	&-progress{
		// width: attr('data-progress');
		height: 100%;
		background: white;
		transition: width $transition-time-default ease-in-out;
		&-container{
			$padding: 12px;
			position: absolute;
			bottom: $padding;
			left: $padding;
			right: $padding;
			height: 4.5px;
			background: rgb(255 255 255 / 0.5);
			backdrop-filter: blur(10px);
			box-shadow: 0 0 10px rgb(20 20 20 / 0.5);
			z-index: 1;
			overflow: hidden;
			box-sizing: content-box;
			border-radius: 10px;
		}
	}

	&-text-container {
		display: flex !important;
		flex-direction: column;
	}
}


================================================
FILE: src/components/card/card.tsx
================================================
/** @format */

import {
	type BaseItemDto,
	BaseItemKind,
	type ImageType,
} from "@jellyfin/sdk/lib/generated-client";
import { useNavigate } from "@tanstack/react-router";
import React, { memo, type Ref, useCallback, useState } from "react";
import { ErrorBoundary } from "react-error-boundary";
import { useInView } from "react-intersection-observer";
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
import { useApiInContext } from "@/utils/store/api";
import LikeButton from "../buttons/likeButton";
import MarkPlayedButton from "../buttons/markPlayedButton";
import PlayButton from "../buttons/playButton";
import { getTypeIcon } from "../utils/iconsCollection";
import "./card.scss";

interface CardProps {
	item: BaseItemDto;
	cardTitle: string | undefined | null;
	cardCaption?: string | null | number;
	imageType?: ImageType;
	cardType: "square" | "thumb" | "portrait";
	queryKey?: string[];
	userId?: string;
	seriesId?: string | null;
	hideText?: boolean;
	onClick?: () => void;
	disableOverlay?: boolean;
	overrideIcon?: any;
	skipInView?: boolean;
}

const CardContent = ({
	item,
	cardTitle,
	cardCaption,
	imageType = "Primary",
	cardType = "square",
	queryKey,
	userId,
	seriesId,
	hideText = false,
	onClick,
	disableOverlay = false,
	overrideIcon,
	inView,
	forwardedRef,
}: CardProps & {
	inView: boolean;
	forwardedRef?: Ref<HTMLDivElement>;
}) => {
	const api = useApiInContext((s) => s.api);
	const navigate = useNavigate();

	const defaultOnClick = useCallback(() => {
		if (item?.Id) {
			switch (item?.Type) {
				case BaseItemKind.BoxSet:
					navigate({ to: "/boxset/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Episode:
					navigate({ to: "/episode/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.MusicAlbum:
					navigate({ to: "/album/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.MusicArtist:
					navigate({ to: "/artist/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Person:
					navigate({ to: "/person/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Series:
					navigate({ to: "/series/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Playlist:
					navigate({ to: "/playlist/$id", params: { id: item.Id } });
					break;
				default:
					navigate({ to: "/item/$id", params: { id: item.Id } });
					break;
			}
		}
	}, [item?.Id, item?.Type, navigate]);

	return (
		<div
			className="card"
			ref={forwardedRef}
			onClick={onClick || defaultOnClick}
		>
			<div className={`card-image-container ${cardType}`}>
				<ErrorBoundary fallback={<></>}>
					<div
						className="card-indicator check"
						style={{
							opacity: item.UserData?.Played ? 1 : 0,
						}}
					>
						<div className="material-symbols-rounded">done</div>
					</div>
					<div
						className={"card-indicator text"}
						style={{
							opacity: item.UserData?.UnplayedItemCount ? 1 : 0,
						}}
					>
						<span
							style={{
								padding: "0.1em 0.4em",
								fontWeight: 400,
								fontSize: "0.875rem",
								lineHeight: 1.57,
								fontFamily: "inherit",
							}}
						>
							{item.UserData?.UnplayedItemCount}
						</span>
					</div>
				</ErrorBoundary>
				<div className="card-image-icon-container">
					{overrideIcon
						? getTypeIcon(overrideIcon)
						: getTypeIcon(item.Type ?? "universal")}
				</div>
				{inView && (
					<img
						alt={item.Name ?? "blink"}
						src={
							api
								? overrideIcon === "User"
									? `${api?.basePath}/Users/${item.Id}/Images/Primary`
									: getImageUrlsApi(api).getItemImageUrlById(
											(seriesId ? item.SeriesId : (item.AlbumId ?? item.Id)) ??
												"",
											imageType,
											{
												quality: 90,
												fillWidth: cardType === "thumb" ? 560 : 320,
											},
										)
								: ""
						}
						style={{
							height: "100%",
							width: "100%",
							opacity: 0,
							display: "block",
							transition: "opacity 0.3s ease-in-out",
						}}
						loading="lazy"
						onLoad={(e) => {
							e.currentTarget.style.opacity = "1";
						}}
						className="card-image"
					/>
				)}
				{inView && !disableOverlay && (
					<div className="card-overlay">
						<PlayButton
							item={item}
							userId={userId}
							itemType={item.Type ?? "Movie"}
							className="card-play-button"
							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 ?? -1) > 0 && (
					<div className="card-progress-container">
						<div
							className="card-progress"
							style={{
								width: `${item.UserData?.PlayedPercentage}%`,
							}}
						/>
					</div>
				)}
			</div>
			<div
				className="card-text-container"
				style={{ display: hideText ? "none" : "block", marginLeft: "0.2em" }}
			>
				<div
					style={{
						marginTop: "8px",
						opacity: 0.9,
						fontSize: "0.875rem",
						fontWeight: 500,
						whiteSpace: "nowrap",
						overflow: "hidden",
						textOverflow: "ellipsis",
					}}
				>
					{cardTitle}
				</div>
				<div
					style={{
						opacity: 0.6,
						fontSize: "0.75rem",
						whiteSpace: "nowrap",
						overflow: "hidden",
						textOverflow: "ellipsis",
					}}
				>
					{cardCaption}
				</div>
			</div>
		</div>
	);
};

const CardWithInView = (props: CardProps) => {
	const { ref, inView } = useInView({
		threshold: 0.1,
	});

	return <CardContent {...props} inView={inView} forwardedRef={ref} />;
};

const CardComponent = (props: CardProps) => {
	if (props.skipInView) {
		return <CardContent {...props} inView={true} />;
	}
	return <CardWithInView {...props} />;
};

export const Card = memo(CardComponent);

================================================
FILE: src/components/cardScroller/cardScroller.scss
================================================
@use "@/styles/variables.scss" as *;

.card-scroller-container {
    margin-bottom: 2.5em;
    position: relative;
    
    // Ensure the container handles overflow if needed, but usually Carousel handles it
}

.card-scroller {
    // Override carousel default outline
    &:focus {
        outline: none;
    }

	&-slide {
		padding-right: 0.5em; // Gap between cards (handled by slide padding instead of gap for carousel)
        // With react-multi-carousel, better to rely on their gap logic or item class
	}
    
    &-item {
        padding-right: 0.6em; // Consistent gap
    }

	&-header-container {
		display: flex;
		width: 100%;
		justify-content: space-between;
		align-items: center;
        margin-bottom: 1em;
        min-height: 40px;
	}

	&-heading {
		display: flex;
		align-items: center;
		justify-content: flex-start;
		gap: 0.5em;
		position: relative;
        font-weight: 600 !important;
        
		&-decoration {
			width: 4px;
			height: 24px;
			background: $clr-accent-default;
            border-radius: 4px;
		}
	}

    &-controls {
        display: flex;
        gap: 0.5em;

        .scroller-nav-btn {
            background-color: rgba(255, 255, 255, 0.05);
            border: 1px solid rgba(255, 255, 255, 0.05);
            color: rgba(255, 255, 255, 0.7);
            transition: all 0.2s ease;
            width: 36px;
            height: 36px;

            &:hover {
                background-color: rgba(255, 255, 255, 0.1);
                color: #fff;
                border-color: rgba(255, 255, 255, 0.2);
            }

            // Disabled state
            &.Mui-disabled {
                background-color: transparent;
                border-color: transparent;
                color: rgba(255, 255, 255, 0.1);
            }

            .material-symbols-rounded {
                font-size: 1.5em;
            }
        }
    }
}

.hidden-decoration {
	.card-scroller-heading-decoration {
		display: none;
	}
}


================================================
FILE: src/components/cardScroller/cardScroller.tsx
================================================
import React, { type ReactNode, useRef, useState } from "react";
import Carousel from "react-multi-carousel";
import "react-multi-carousel/lib/styles.css";

import IconButton from "@mui/material/IconButton";
import Typography from "@mui/material/Typography";

import "./cardScroller.scss";

// Custom Header + Button Group component
const ScrollerHeader = ({
	onNext,
	onPrevious,
	title,
	headingProps,
	disableDecoration,
	currentSlide = 0,
	isNextDisabled = false,
}: any) => {
	// Basic disable logic for visual feedback
	const isFirst = currentSlide === 0;

	return (
		<div
			className={`card-scroller-header-container ${disableDecoration ? "hidden-decoration" : ""}`}
		>
			<Typography
				variant="h5"
				color="textPrimary"
				className="card-scroller-heading"
				{...headingProps}
			>
				<div className="card-scroller-heading-decoration" />
				{title}
			</Typography>

			<div className="card-scroller-controls">
				<IconButton
					onClick={onPrevious}
					disabled={isFirst}
					size="small"
					className="scroller-nav-btn"
				>
					<span className="material-symbols-rounded">chevron_left</span>
				</IconButton>
				<IconButton
					onClick={onNext}
					disabled={isNextDisabled}
					size="small"
					className="scroller-nav-btn"
				>
					<span className="material-symbols-rounded">chevron_right</span>
				</IconButton>
			</div>
		</div>
	);
};

type CardScrollerProps = {
	children: ReactNode;
	displayCards: number;
	title: string;
	headingProps?: object;
	disableDecoration?: boolean;
	boxProps?: object;
};

export default function CardScroller({
	children,
	displayCards,
	title,
	headingProps,
	disableDecoration = false,
	boxProps,
}: CardScrollerProps) {
	const carouselRef = useRef<any>(null);
	const [currentSlide, setCurrentSlide] = useState(0);
	const [slidesToShow, setSlidesToShow] = useState(displayCards);
	const totalItems = React.Children.count(children);

	const responsive = {
		superLargeDesktop: {
			breakpoint: { max: 4000, min: 3000 },
			items: displayCards + 1,
			slidesToSlide: displayCards + 1,
			partialVisibilityGutter: 40,
		},
		desktop: {
			breakpoint: { max: 3000, min: 925 },
			items: displayCards,
			slidesToSlide: displayCards,
			partialVisibilityGutter: 30,
		},
		tablet: {
			breakpoint: { max: 925, min: 600 },
			items: displayCards - 3,
			slidesToSlide: displayCards - 3,
			partialVisibilityGutter: 20,
		},
		mobile: {
			breakpoint: { max: 600, min: 424 },
			items: displayCards - 5,
			slidesToSlide: displayCards - 5,
			partialVisibilityGutter: 10,
		},
		smallScreen: {
			breakpoint: { max: 424, min: 0 },
			items: 1,
			slidesToSlide: 1,
			partialVisibilityGutter: 10,
		},
	};

	const handleNext = () => {
		if (carouselRef.current) {
			carouselRef.current.next();
		}
	};

	const handlePrevious = () => {
		if (carouselRef.current) {
			carouselRef.current.previous();
		}
	};

	return (
		<div {...boxProps} className="card-scroller-container">
			<ScrollerHeader
				title={title}
				headingProps={headingProps}
				disableDecoration={disableDecoration}
				onNext={handleNext}
				onPrevious={handlePrevious}
				currentSlide={currentSlide}
				isNextDisabled={currentSlide + slidesToShow >= totalItems}
			/>
			<Carousel
				ref={carouselRef}
				swipeable
				draggable
				responsive={responsive}
				arrows={false}
				className="card-scroller"
				customTransition="transform 400ms ease-in-out"
				transitionDuration={400}
				containerClass="card-scroller-track"
				itemClass="card-scroller-item"
				beforeChange={(nextSlide, state) => {
					setCurrentSlide(nextSlide);
					setSlidesToShow(state.slidesToShow);
				}}
			>
				{children}
			</Carousel>
		</div>
	);
}


================================================
FILE: src/components/carousel/carousel.scss
================================================
.carousel {
	position: relative;
	overflow: visible;
	height: 65vh;
	margin-bottom: 3em;
	display: grid;
	grid-template-areas: "main sidebar";
	grid-template-columns: 1fr 340px;
	gap: 1.5em;

	&-sidebar {
		overflow-y: auto;
		height: 100%;
		position: relative;
		@include glass-effect($bg-color: rgba(10, 10, 14, 0.4));
		border-radius: 24px;
		grid-area: sidebar;
		display: flex;
		flex-direction: column;
		padding: 12px;
		gap: 8px;
		
		// Ensure programmatic scroll respects padding
		scroll-padding-block: 24px;

		// Hide scrollbar but keep functionality
		scrollbar-width: none; 
		-ms-overflow-style: none; 
		&::-webkit-scrollbar {
			width: 0;
			height: 0;
			display: none; 
		}
	}
	
	&-button {
		position: absolute !important;
		top: 50%;
		transform: translateY(-50%);
		z-index: 100;
		
		&.right {
			right: 0.5em;
		}
		
		&.left {
			left: 0.5em;
		}
	}
	
	&-ticker{
		overflow: hidden;
		height: 72px;
		display: flex;
		padding: 8px;
		align-items: center;
		gap: 12px;
		transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
		position: relative;
		border-radius: 12px; // Slightly smaller radius to work with the bar
		background: transparent;
		border: 1px solid transparent;

		&:hover {
			background: rgba(255, 255, 255, 0.05);
			cursor: pointer;
		}

		&.active {
			background: rgba(255, 255, 255, 0.08); // Subtle background
			
			// Vertical Progress Bar
			&::after {
				content: '';
				position: absolute;
				left: 0;
				bottom: 0;
				width: 4px;
				background-color: var(--mui-palette-primary-main, #fff);
				height: 0%;
				animation: ticker-v-progress 8s linear;
			}
		}

		&-image {
			height: 56px;
			width: 100px;
			flex-shrink: 0;
			border-radius: 8px;
			object-fit: cover;
			box-shadow: 0 2px 8px rgba(0,0,0,0.2);

			&.placeholder {
				display: flex;
				align-items: center;
				justify-content: center;
				background: rgb(100 100 100 / 0.1);
				color: rgb(200 200 200 / 0.7);
				font-size: 2rem;
			}
		}
		
		& > div {
			display: flex;
			flex-direction: column;
			justify-content: center;
			min-width: 0; // flexible text truncation
			padding-left: 4px; // compensate for visual weight of potential bar
			
			.carousel-ticker-title {
				white-space: nowrap;
				overflow: hidden;
				text-overflow: ellipsis;
				font-weight: 500; // Slightly lighter
				font-size: 0.95rem;
				line-height: 1.2;
				margin-bottom: 2px;
				opacity: 0.9;
			}
			.carousel-ticker-year {
				font-size: 0.8rem;
				opacity: 0.6;
			}
		}
	}
	
	// Pause progress when carousel is paused
	&.paused {
		.carousel-ticker.active::after {
			animation-play-state: paused;
		}
	}

	@keyframes ticker-v-progress {
		from { height: 0%; }
		to { height: 100%; }
	}
	
	&-indicator {
		aspect-ratio: 1.77777;
		overflow: hidden;
		border-radius: 2px;
		padding: 2px;
		transition: opacity $transition-time-fast;
		opacity: 0.5;
		width: auto;
		&:hover {
			cursor: pointer;
			opacity: 0.8;
		}
		
		&-container {
			display: flex;
			gap: 1em;
			align-items: center;
			justify-content: center;
		}
		&-image {
			width: 100%;
			height: 100%;
			object-fit: cover;
			border-radius: 4px;
		}
		
		&-icon {
			display: flex;
			align-items: center;
			justify-content: center;
			width: 100%;
			height: 100%;
			background: rgb(155 155 155 / 0.4);
			border-radius: 4px;
		}
		&.active {
			opacity: 1;
			
			.material-symbols-rounded {
				
				--fill: 1;
			}
		}
	}
}
.carousel-ticker-wrapper {
scroll-margin-block: 24px;
}



================================================
FILE: src/components/carousel/index.tsx
================================================
import { AnimatePresence } from "motion/react";
import React, { useCallback, useEffect, useState } from "react";

import { useCarouselStore } from "../../utils/store/carousel";
import "./carousel.scss";
import {
	type BaseItemDto,
	BaseItemKind,
} from "@jellyfin/sdk/lib/generated-client";
import getImageUrlsApi from "@/utils/methods/getImageUrlsApi";
import { useApiInContext } from "@/utils/store/api";
import CarouselSlide from "../carouselSlide";
import CarouselTickers from "./tickers";

// Memoize CarouselSlide to prevent unnecessary re-renders
const MemoizedCarouselSlide = React.memo(CarouselSlide);

const Carousel = ({
	content,
	onChange,
}: {
	content: BaseItemDto[];
	onChange: (currentSlide: number) => void;
}) => {
	const [currentSlide, setCurrentSlide] = useState(0);
	const [isPaused, setIsPaused] = useState(false);
	const sidebarRef = React.useRef<HTMLDivElement>(null);
	const tickerRefs = React.useRef<(HTMLDivElement | null)[]>([]);
	const currentSlideRef = React.useRef(currentSlide);

	const [setDirection] = useCarouselStore((state) => [state.setDirection]);

	useEffect(() => {
		currentSlideRef.current = currentSlide;
	}, [currentSlide]);

	useEffect(() => {
		onChange(currentSlide);

		// Auto-scroll sidebar to keep active item in view
		const activeTicker = tickerRefs.current[currentSlide];
		const sidebar = sidebarRef.current;

		if (activeTicker && sidebar) {
			const sidebarTop = sidebar.scrollTop;
			const sidebarBottom = sidebarTop + sidebar.clientHeight;
			const activeTickerTop = activeTicker.offsetTop;
			const activeTickerBottom =
				activeTicker.offsetTop + activeTicker.offsetHeight;

			// If element is below the visible area
			if (activeTickerBottom > sidebarBottom) {
				sidebar.scrollTo({
					top: activeTickerBottom - sidebar.clientHeight + 24, // 24px padding
					behavior: "smooth",
				});
			}
			// If element is above the visible area
			else if (activeTickerTop < sidebarTop) {
				sidebar.scrollTo({
					top: activeTickerTop - 24, // 24px padding
					behavior: "smooth",
				});
			}
		}
	}, [currentSlide, content, onChange]);

	// Autoplay functionality
	useEffect(() => {
		if (isPaused || content.length === 0) return;

		const timer = setInterval(() => {
			setDirection("right");
			setCurrentSlide((prev) => (prev + 1) % content.length);
		}, 8000);

		return () => clearInterval(timer);
	}, [isPaused, content.length, setDirection, currentSlide]);

	const api = useApiInContext((s) => s.api);

	const handleTickerClick = useCallback(
		(index: number) => {
			if (index === currentSlideRef.current) return;
			setDirection(index > currentSlideRef.current ? "right" : "left");
			setCurrentSlide(index);
		},
		[setDirection],
	);

	if (!api) return null;

	return (
		<div
			className={`carousel ${isPaused ? "paused" : ""}`}
			onMouseEnter={() => setIsPaused(true)}
			onMouseLeave={() => setIsPaused(false)}
		>
			<AnimatePresence mode="sync">
				<MemoizedCarouselSlide
					item={content[currentSlide]}
					key={content[currentSlide].Id}
				/>
			</AnimatePresence>
			<div className="carousel-sidebar" ref={sidebarRef}>
				{content.map((item, index) => (
					<div
						key={item.Id}
						ref={(el) => {
							tickerRefs.current[index] = el;
						}}
						className="carousel-ticker-wrapper"
					>
						<CarouselTickers
							imageUrl={
								item.ImageTags?.Thumb
									? getImageUrlsApi(api).getItemImageUrlById(
											item.Id ?? "",
											"Thumb",
											{
												quality: 90,
												fillHeight: 360,
											},
										)
									: undefined
							}
							isActive={index === currentSlide}
							itemName={item.Name ?? "Unknown"}
							itemYear={
								item.Type === BaseItemKind.Series && item.EndDate
									? `${item.ProductionYear ?? ""} - ${new Date(item.EndDate).getFullYear().toString()}`
									: (item.ProductionYear?.toString() ?? "")
							}
							onTickerClick={handleTickerClick}
							index={index}
							itemType={item.Type as BaseItemKind}
						/>
					</div>
				))}
			</div>
		</div>
	);
};

export default React.memo(Carousel);


================================================
FILE: src/components/carousel/tickers.tsx
================================================
import type { BaseItemKind } from "@jellyfin/sdk/lib/generated-client";
import { Typography } from "@mui/material";
import React from "react";
import { getTypeIcon } from "../utils/iconsCollection";

type CarouselTickersProps = {
	imageUrl?: string | undefined | null;
	itemName: string;
	itemYear: string;
	onTickerClick: (index: number) => void;
	index: number;
	isActive: boolean;
	itemType: BaseItemKind;
};

const CarouselTickers = React.memo(
	({
		imageUrl,
		itemName,
		itemYear,
		onTickerClick,
		index,
		isActive,
		itemType,
	}: CarouselTickersProps) => {
		const handleClick = React.useCallback(() => {
			onTickerClick(index);
		}, [index, onTickerClick]);

		return (
			<div
				className={`carousel-ticker${isActive ? " active" : ""}`}
				onClick={handleClick}
			>
				{imageUrl ? (
					<img
						src={imageUrl}
						alt={itemName}
						className="carousel-ticker-image"
					/>
				) : (
					<div className="carousel-ticker-image placeholder material-symbols-rounded">
						{" "}
						{getTypeIcon(itemType)}
					</div>
				)}
				<div>
					<Typography variant="subtitle1" className="carousel-ticker-title">
						{itemName}
					</Typography>
					<Typography variant="caption" className="carousel-ticker-year">
						{itemYear}
					</Typography>
				</div>
			</div>
		);
	},
);
export default CarouselTickers;


================================================
FILE: src/components/carouselSlide/index.tsx
================================================
import {
	type BaseItemDto,
	BaseItemKind,
} from "@jellyfin/sdk/lib/generated-client";
import Button from "@mui/material/Button";
import Chip from "@mui/material/Chip";
import { green, red, yellow } from "@mui/material/colors";
import Stack from "@mui/material/Stack";
import Typography from "@mui/material/Typography";
import { useNavigate } from "@tanstack/react-router";
import { motion } from "motion/react";
import React from "react";
import { endsAt, getRuntime } from "@/utils/date/time";

import { useApiInContext } from "@/utils/store/api";
import { useCarouselStore } from "@/utils/store/carousel";
import { useCentralStore } from "@/utils/store/central";
import LikeButton from "../buttons/likeButton";
import MarkPlayedButton from "../buttons/markPlayedButton";
import PlayButton from "../buttons/playButton";
import { getTypeIcon } from "../utils/iconsCollection";

const textVariants = {
	initial: (direction: string) => ({
		x: direction === "right" ? 40 : -40,
		opacity: 0,
	}),
	animate: {
		x: 0,
		opacity: 1,
		transition: {
			duration: 0.35,
			ease: [0.2, 0, 0, 1],
		},
	},
	exit: (direction: string) => ({
		x: direction === "right" ? -40 : 40,
		opacity: 0,
		transition: {
			duration: 0.2,
			ease: "easeInOut",
		},
	}),
};

const CarouselSlide = ({ item }: { item: BaseItemDto }) => {
	const api = useApiInContext((s) => s.api);
	const navigate = useNavigate();

	const user = useCentralStore((s) => s.currentUser);

	const handleMoreInfo = () => {
		if (item.Id) {
			switch (item.Type) {
				case BaseItemKind.BoxSet:
					navigate({ to: "/boxset/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Episode:
					navigate({ to: "/episode/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.MusicAlbum:
					navigate({ to: "/album/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.MusicArtist:
					navigate({ to: "/artist/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Person:
					navigate({ to: "/person/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Series:
					navigate({ to: "/series/$id", params: { id: item.Id } });
					break;
				case BaseItemKind.Playlist:
					navigate({ to: "/playlist/$id", params: { id: item.Id } });
					break;
				default:
					navigate({ to: "/item/$id", params: { id: item.Id } });
					break;
			}
		}
	};

	const [animationDirection] = useCarouselStore((state) => [state.direction]);

	return (
		<div className="hero-carousel-slide">
			<motion.div
				className="hero-carousel-background-container"
				initial={{ opacity: 0 }}
				animate={{ opacity: 1 }}
				exit={{ opacity: 0 }}
				transition={{ duration: 0.4, ease: "easeInOut" }}
			>
				{item.BackdropImageTags?.length ? (
					<img
						alt={item.Name ?? "item"}
						className="hero-carousel-background-image"
						src={
							item.ParentBackdropItemId
								? `${api?.basePath}/Items/${item.ParentBackdropItemId}/Images/Backdrop?quality=80`
								: `${api?.basePath}/Items/${item.Id}/Images/Backdrop?quality=80&fillHeight=1400`
						}
						style={{
							opacity: 0,
						}}
						onLoad={(e) => {
							e.currentTarget.style.opacity = "1";
						}}
						loading="eager"
					/>
				) : (
					<div className="hero-carousel-background-icon-container">
						{getTypeIcon(item.Type ?? "Movie")}
					</div>
				)}
			</motion.div>
			<motion.div
				className="hero-carousel-detail"
				initial="initial"
				animate="animate"
				exit="exit"
				variants={{
					animate: {
						transition: {
							staggerChildren: 0.05,
							delayChildren: 0.05,
						},
					},
					exit: {
						transition: {
							staggerChildren: 0.02,
							staggerDirection: -1,
						},
					},
				}}
			>
				{/* @ts-ignore */}
				<Typography
					component={motion.div}
					custom={animationDirection}
					variants={textVariants}
					key={item.Id}
					variant="h2"
					className="hero-carousel-text"
					sx={{
						mb: "5px",
					}}
					fontWeight={600}
					overflow="visible"
				>
					{!item.ImageTags?.Logo ? (
						item.Name
					) : (
						<img
							alt={item.Name ?? "Item"}
							className="hero-carousel-text-logo"
							src={`${api?.basePath}/Items/${item.Id}/Images/Logo?quality=90&tag=${item.ImageTags.Logo}`}
							style={{
								opacity: 0,
								transition: "opacity 0.2s",
								objectFit: "contain",
							}}
							onLoad={(e) => {
								e.currentTarget.style.opacity = "1";
							}}
						/>
					)}
				</Typography>
				{/* @ts-ignore */}
				<Stack
					component={motion.div}
					custom={animationDirection}
					variants={textVariants}
					direction="row"
					gap={2}
					className="hero-carousel-info"
					mt={1}
					justifyItems="flex-start"
					alignItems="center"
				>
					{item.PremiereDate && (
						<Typography style={{ opacity: "0.8" }} variant="subtitle2">
							{item.ProductionYear ?? ""}
						</Typography>
					)}
					{item.OfficialRating && (
						<Chip variant="filled" size="small" label={item.OfficialRating} />
					)}

					{item.CommunityRating && (
						<div
							style={{
								display: "flex",
								gap: "0.25em",
								alignItems: "center",
							}}
							className="hero-carousel-info-rating"
						>
							<div
								className="material-symbols-rounded fill"
								style={{
									// fontSize: "2.2em",
									color: yellow[400],
								}}
							>
								star
							</div>
							<Typography
								style={{
									opacity: "0.8",
								}}
								variant="subtitle2"
							>
								{Math.round(item.CommunityRating * 10) / 10}
							</Typography>
						</div>
					)}
					{item.CriticRating && (
						<div
							style={{
								display: "flex",
								gap: "0.25em",
								alignItems: "center",
							}}
							className="hero-carousel-info-rating"
						>
							<div
								className="material-symbols-rounded fill"
								style={{
									color: item.CriticRating > 50 ? green[400] : red[400],
								}}
							>
								{item.CriticRating > 50 ? "thumb_up" : "thumb_down"}
							</div>
							<Typography
								style={{
									opacity: "0.8",
								}}
								variant="subtitle2"
							>
								{item.CriticRating}
							</Typography>
						</div>
					)}

					{item.RunTimeTicks && (
						<Typography style={{ opacity: "0.8" }} variant="subtitle2">
							{getRuntime(item.RunTimeTicks)}
						</Typography>
					)}
					{item.RunTimeTicks && (
						<Typography style={{ opacity: "0.8" }} variant="subtitle2">
							{endsAt(
								item.RunTimeTicks - (item.UserData?.PlaybackPositionTicks ?? 0),
							)}
						</Typography>
					)}
					<Typography variant="subtitle2" style={{ opacity: 0.8 }}>
						{item.Genres?.slice(0, 4).join(" / ")}
					</Typography>
				</Stack>
				{/* @ts-ignore */}
				<Typography
					component={motion.div}
					custom={animationDirection}
					variants={textVariants}
					className="hero-carousel-overview"
					variant="body1"
					fontWeight={400}
				>
					{item.Overview}
				</Typography>

				{/* @ts-ignore */}
				<Stack
					direction="row"
					gap={2}
					width="100%"
					className="hero-carousel-button-container"
					alignItems="center"
					component={motion.div}
					custom={animationDirection}
					variants={textVariants}
				>
					<PlayButton
						item={item}
						userId={user?.Id}
						itemType={item.Type ?? "Movie"}
						buttonProps={{
							size: "large",
						}}
						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"
						//@ts-expect-error
						color="white"
						variant="outlined"
						endIcon={
							<div
								className="material-symbols-rounded"
								style={{
									fontSize: "2em",
								}}
							>
								chevron_right
							</div>
						}
						onClick={handleMoreInfo}
					>
						More info
					</Button>
					<Stack direction="row" gap={1}>
						<LikeButton
							itemId={item.Id}
							queryKey={["home", "latestMedia"]}
							userId={user?.Id}
							isFavorite={item.UserData?.IsFavorite}
							itemName={item.Name}
						/>
						<MarkPlayedButton
							itemId={item.Id}
							queryKey={["home", "latestMedia"]}
							userId={user?.Id}
							isPlayed={item.UserData?.Played}
							itemName={item.Name}
						/>
					</Stack>
				</Stack>
			</motion.div>
		</div>
	);
};

export default CarouselSlide;


================================================
FILE: src/components/circularPageLoadingAnimation/index.tsx
================================================
// Write a react component that included an MUI circluar progress element utilizing NProgrss

import { CircularProgress } from "@mui/material";
import { useNProgress } from "@tanem/react-nprogress";
import React from "react";

const CircularPageLoadingAnimation = () => {
	const { progress } = useNProgress({
		isAnimating: true,
	});

	return (
		<div
			style={{
				pointerEvents: "none",
				position: "absolute",
				top: "50%",
				left: "50%",
				transform: "translate(-50%, -50%)",
				zIndex: "10001",
			}}
		>
			<CircularProgress
				// variant="indeterminate"
				sx={{
					transitionDuration: "0.3s",
					transform: `scale(${progress})`,
				}}
			/>
		</div>
	);
};

export default CircularPageLoadingAnimation;


================================================
FILE: src/components/filtersDialog/index.tsx
================================================
import { getGenresApi } from "@jellyfin/sdk/lib/utils/api/genres-api";
import { getMusicGenresApi } from "@jellyfin/sdk/lib/utils/api/music-genres-api";
import {
	Accordion,
	AccordionDetails,
	AccordionSummary,
	Button,
	Checkbox,
	Dialog,
	DialogActions,
	DialogContent,
	DialogTitle,
	FormControlLabel,
	FormGroup,
	IconButton,
	Stack,
	Tooltip,
	Typography,
} from "@mui/material";
import { useQuery, useSuspenseQuery } from "@tanstack/react-query";
import { getRouteApi } from "@tanstack/react-router";
import React, { useMemo, useRef, useState } from "react";
import { useShallow } from "zustand/shallow";
import type { FILTERS } from "@/utils/constants/library";
import { getLibraryQueryOptions } from "@/utils/queries/library";
import { useLibraryStateStore } from "@/utils/store/libraryState";

const route = getRouteApi("/_api/library/$id");

const FILTER_LABELS: Record<FILTERS, string> = {
	isPlayed: "Played",
	isUnPlayed: "Unplayed",
	isResumable: "Resumable",
	isFavorite: "Favorite",
	hasSubtitles: "Has Subtitles",
	hasTrailer: "Has Trailer",
	hasSpecialFeature: "Special Feature",
	hasThemeSong: "Theme Song",
	hasThemeVideo: "Theme Video",
	isSD: "SD",
	isHD: "HD",
	is4K: "4K",
	is3D: "3D",
};

interface FiltersDialogProps {
	open: boolean;
	onClose: () => void;
}

export const FiltersDialog: React.FC<FiltersDialogProps> = React.memo(
	({ open, onClose }) => {
		const { id: currentLibraryId } = route.useParams();
		const { api, user } = route.useRouteContext();
		const { routeFilters, routeVideoTypes, routeGenreIds } =
			useLibraryStateStore(
				useShallow((s) => {
					const slice = s.libraries[currentLibraryId || ""];
					return {
						routeFilters: slice?.filters,
						routeVideoTypes: slice?.videoTypesState,
						routeGenreIds: slice?.genreIds,
					};
				}),
			);
		const updateLibrary = useLibraryStateStore((s) => s.updateLibrary);
		const initial = useMemo(
			() => ({ ...(routeFilters || {}) }),
			[routeFilters],
		);
		const [localFilters, setLocalFilters] =
			useState<Record<string, boolean | undefined>>(initial);
		const initialVideo = useMemo(
			() => ({ ...(routeVideoTypes || {}) }),
			[routeVideoTypes],
		);
		const [localVideoTypes, setLocalVideoTypes] =
			useState<Record<string, boolean>>(initialVideo);
		const initialGenres = useMemo(
			() => [...(routeGenreIds || [])] as string[],
			[routeGenreIds],
		);
		const [localGenreIds, setLocalGenreIds] = useState<string[]>(initialGenres);
		const dirty = useMemo(
			() =>
				JSON.stringify(initial) !== JSON.stringify(localFilters) ||
				JSON.stringify(initialVideo) !== JSON.stringify(localVideoTypes) ||
				JSON.stringify(initialGenres) !== JSON.stringify(localGenreIds),
			[
				initial,
				localFilters,
				initialVideo,
				localVideoTypes,
				initialGenres,
				localGenreIds,
			],
		);
		const debounceRef = useRef<number | null>(null);
		const currentLibrary = useSuspenseQuery(
			getLibraryQueryOptions(api, user?.Id, currentLibraryId),
		);
		const collectionType = currentLibrary.data.CollectionType;
		const isVideoCollection = ["movies", "tvshows", "boxsets"].includes(
			String(collectionType || "").toLowerCase(),
		);

		// Fetch genres for this library (music uses music-genres API)
		const { data: genresData } = useQuery({
			queryKey: ["library", "genres", currentLibraryId, collectionType],
			queryFn: async () => {
				if (!api || !user?.Id || !currentLibraryId) return { Items: [] } as any;
				if (String(collectionType || "").toLowerCase() === "music") {
					const res = await getMusicGenresApi(api).getMusicGenres({
						parentId: currentLibraryId,
						userId: user.Id,
					});
					return res.data;
				}
				const res = await getGenresApi(api).getGenres({
					parentId: currentLibraryId,
					userId: user.Id,
				});
				return res.data;
			},
			staleTime: 10 * 60 * 1000,
			enabled: !!open && !!api && !!user?.Id && !!currentLibraryId,
		});

		const handleToggle = (key: FILTERS) => {
			setLocalFilters((prev) => {
				const next = { ...prev };
				// isHD special: undefined if unchecked instead of false
				if (key === "isHD") {
					if (next[key]) delete next[key];
					else next[key] = true;
				} else {
					next[key] = !next[key];
				}
				return next;
			});
		};

		const apply = () => {
			if (!currentLibraryId) return;
			if (debounceRef.current) window.clearTimeout(debounceRef.current);
			debounceRef.current = window.setTimeout(() => {
				updateLibrary(currentLibraryId, {
					filters: localFilters as any,
					videoTypesState: localVideoTypes as any,
					genreIds: localGenreIds as any,
				});
				onClose();
			}, 40);
		};

		const clearAll = () => {
			setLocalFilters({});
			setLocalVideoTypes({});
			setLocalGenreIds([]);
		};

		const restore = () => setLocalFilters(initial);
		const restoreVideo = () => setLocalVideoTypes(initialVideo);
		const restoreGenres = () => setLocalGenreIds(initialGenres);

		return (
			<Dialog
				open={open}
				onClose={onClose}
				fullWidth
				maxWidth="sm"
				keepMounted
				PaperProps={{ className: "glass-dialog-paper" }}
			>
				<DialogTitle>Filters</DialogTitle>
				<DialogContent
					dividers
					sx={{ borderColor: "rgba(255, 255, 255, 0.1)" }}
				>
					<Stack spacing={1.25}>
						<Accordion
							disableGutters
							sx={{
								backgroundColor: "transparent",
								boxShadow: "none",
								m: 0,
								"&:before": { display: "none" },
								"&:not(:last-of-type)": {
									borderBottom: "1px solid rgba(255,255,255,0.12)",
								},
							}}
						>
							<AccordionSummary
								sx={{
									minHeight: 40,
									"& .MuiAccordionSummary-content": { my: 0 },
								}}
								expandIcon={
									<span className="material-symbols-rounded">expand_more</span>
								}
							>
								<Typography variant="subtitle2">General</Typography>
							</AccordionSummary>
							<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
								<FormGroup>
									{(
										[
											"isPlayed",
											"isUnPlayed",
											"isResumable",
											"isFavorite",
										] as FILTERS[]
									).map((k) => (
										<FormControlLabel
											key={k}
											control={
												<Checkbox
													checked={!!localFilters[k]}
													onChange={() => handleToggle(k)}
													size="small"
												/>
											}
											label={FILTER_LABELS[k]}
										/>
									))}
								</FormGroup>
							</AccordionDetails>
						</Accordion>

						{isVideoCollection && (
							<Accordion
								disableGutters
								sx={{
									backgroundColor: "transparent",
									boxShadow: "none",
									m: 0,
									"&:before": { display: "none" },
									"&:not(:last-of-type)": {
										borderBottom: "1px solid rgba(255,255,255,0.12)",
									},
								}}
							>
								<AccordionSummary
									sx={{
										minHeight: 40,
										"& .MuiAccordionSummary-content": { my: 0 },
									}}
									expandIcon={
										<span className="material-symbols-rounded">
											expand_more
										</span>
									}
								>
									<Typography variant="subtitle2">Video features</Typography>
								</AccordionSummary>
								<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
									<FormGroup>
										{(
											[
												"hasSubtitles",
												"hasTrailer",
												"hasSpecialFeature",
												"hasThemeSong",
												"hasThemeVideo",
											] as FILTERS[]
										).map((k) => (
											<FormControlLabel
												key={k}
												control={
													<Checkbox
														checked={!!localFilters[k]}
														onChange={() => handleToggle(k)}
														size="small"
													/>
												}
												label={FILTER_LABELS[k]}
											/>
										))}
									</FormGroup>
								</AccordionDetails>
							</Accordion>
						)}

						{isVideoCollection && (
							<Accordion
								disableGutters
								sx={{
									backgroundColor: "transparent",
									boxShadow: "none",
									m: 0,
									"&:before": { display: "none" },
									"&:not(:last-of-type)": {
										borderBottom: "1px solid rgba(255,255,255,0.12)",
									},
								}}
							>
								<AccordionSummary
									sx={{
										minHeight: 40,
										"& .MuiAccordionSummary-content": { my: 0 },
									}}
									expandIcon={
										<span className="material-symbols-rounded">
											expand_more
										</span>
									}
								>
									<Typography variant="subtitle2">Resolution</Typography>
								</AccordionSummary>
								<AccordionDetails sx={{ px: 1.5, py: 1.25 }}>
									<FormGroup>
										{(["isSD", "isHD", "is4K", "is3D"] as FILTERS[]).map(
											(k) => (
												<FormControlLabel
													key={k}
													control={
														<Checkbox
															checked={!!localFilters[k]}
															onChange={() => handleToggle(k)}
															size="sma
Download .txt
gitextract_zji3jkza/

├── .babelrc
├── .github/
│   ├── FUNDING.yml
│   ├── ISSUE_TEMPLATE/
│   │   ├── bug_report.md
│   │   └── feature_request.md
│   ├── release.yaml
│   └── workflows/
│       ├── continuous-integration.yml
│       ├── release.yml
│       └── winget-releaser.yml
├── .gitignore
├── .vscode/
│   ├── extensions.json
│   ├── launch.json
│   ├── settings.json
│   └── tasks.json
├── CHANGELOG.md
├── LICENSE
├── README.md
├── biome.json
├── index.html
├── latest.json
├── package.json
├── pnpm-workspace.yaml
├── renovate.json
├── src/
│   ├── components/
│   │   ├── Slider/
│   │   │   ├── index.tsx
│   │   │   └── style.scss
│   │   ├── addServerDialog/
│   │   │   └── index.tsx
│   │   ├── albumMusicTrack/
│   │   │   ├── albumMusicTrack.scss
│   │   │   └── index.tsx
│   │   ├── alphaSelector/
│   │   │   ├── alphaSelector.scss
│   │   │   └── index.tsx
│   │   ├── appBar/
│   │   │   ├── appBar.scss
│   │   │   ├── appBar.tsx
│   │   │   ├── backOnly.tsx
│   │   │   └── navigationDrawer.tsx
│   │   ├── avatar/
│   │   │   ├── avatar.module.scss
│   │   │   └── avatar.tsx
│   │   ├── backdrop/
│   │   │   └── index.tsx
│   │   ├── blurhash-canvas/
│   │   │   └── index.tsx
│   │   ├── buttons/
│   │   │   ├── backButton.tsx
│   │   │   ├── likeButton.tsx
│   │   │   ├── markPlayedButton.tsx
│   │   │   ├── playButton.tsx
│   │   │   ├── playNextButton.tsx
│   │   │   ├── playPreviousButtom.tsx
│   │   │   ├── queueButton.scss
│   │   │   ├── queueButton.tsx
│   │   │   ├── quickConnectButton.tsx
│   │   │   └── trailerButton.tsx
│   │   ├── card/
│   │   │   ├── card.scss
│   │   │   └── card.tsx
│   │   ├── cardScroller/
│   │   │   ├── cardScroller.scss
│   │   │   └── cardScroller.tsx
│   │   ├── carousel/
│   │   │   ├── carousel.scss
│   │   │   ├── index.tsx
│   │   │   └── tickers.tsx
│   │   ├── carouselSlide/
│   │   │   └── index.tsx
│   │   ├── circularPageLoadingAnimation/
│   │   │   └── index.tsx
│   │   ├── filtersDialog/
│   │   │   └── index.tsx
│   │   ├── iconLink/
│   │   │   └── index.tsx
│   │   ├── itemBackdrop/
│   │   │   └── index.tsx
│   │   ├── itemHeader/
│   │   │   ├── index.tsx
│   │   │   └── itemHeader.scss
│   │   ├── layouts/
│   │   │   ├── artist/
│   │   │   │   ├── albumArtist.scss
│   │   │   │   └── artistAlbum.tsx
│   │   │   └── homeSection/
│   │   │       └── latestMediaSection.tsx
│   │   ├── libraryHeader/
│   │   │   ├── index.tsx
│   │   │   └── libraryHeader.scss
│   │   ├── libraryItemsGrid/
│   │   │   ├── index.tsx
│   │   │   └── libraryItemsGrid.scss
│   │   ├── listItemLink/
│   │   │   └── index.tsx
│   │   ├── musicTrack/
│   │   │   ├── index.tsx
│   │   │   └── musicTrack.scss
│   │   ├── nProgress/
│   │   │   └── index.tsx
│   │   ├── notices/
│   │   │   ├── emptyNotice/
│   │   │   │   └── emptyNotice.tsx
│   │   │   └── errorNotice/
│   │   │       └── errorNotice.tsx
│   │   ├── outroCard/
│   │   │   ├── index.tsx
│   │   │   └── outroCard.scss
│   │   ├── playback/
│   │   │   ├── audioPlayer/
│   │   │   │   ├── audioPlayer.scss
│   │   │   │   ├── components/
│   │   │   │   │   ├── LyricsPanel.tsx
│   │   │   │   │   ├── PlayerActions.tsx
│   │   │   │   │   ├── PlayerControls.tsx
│   │   │   │   │   ├── PlayerInfo.tsx
│   │   │   │   │   ├── PlayerProgress.tsx
│   │   │   │   │   ├── PlayerVolume.tsx
│   │   │   │   │   ├── QueuePanel.tsx
│   │   │   │   │   └── StatsPanel.tsx
│   │   │   │   └── index.tsx
│   │   │   └── videoPlayer/
│   │   │       ├── EndsAtDisplay.tsx
│   │   │       ├── ErrorDisplay.tsx
│   │   │       ├── LoadingIndicator.tsx
│   │   │       ├── ProgressDisplay.tsx
│   │   │       ├── StatsForNerds.tsx
│   │   │       ├── VolumeChangeOverlay.tsx
│   │   │       ├── bubbleSlider/
│   │   │       │   └── index.tsx
│   │   │       ├── buttons/
│   │   │       │   ├── CaptionsButton.tsx
│   │   │       │   ├── ChaptersListButton.tsx
│   │   │       │   ├── ForwardButton.tsx
│   │   │       │   ├── FullscreenButton.tsx
│   │   │       │   ├── NextChapterButton.tsx
│   │   │       │   ├── PlayPauseButton.tsx
│   │   │       │   ├── PrevChapterButton.tsx
│   │   │       │   ├── RewindButton.tsx
│   │   │       │   └── SkipSegmentButton.tsx
│   │   │       ├── controls.scss
│   │   │       ├── controls.tsx
│   │   │       ├── settingsMenu.tsx
│   │   │       ├── upNextFlyout.scss
│   │   │       └── upNextFlyout.tsx
│   │   ├── queueListItem/
│   │   │   └── index.tsx
│   │   ├── queueTrack/
│   │   │   └── index.tsx
│   │   ├── routerLoading/
│   │   │   └── index.tsx
│   │   ├── search/
│   │   │   ├── index.tsx
│   │   │   └── item.tsx
│   │   ├── settingOption/
│   │   │   └── index.tsx
│   │   ├── settingOptionSelect/
│   │   │   └── index.tsx
│   │   ├── showMoreText/
│   │   │   └── index.tsx
│   │   ├── skeleton/
│   │   │   ├── cards.tsx
│   │   │   ├── carousel.tsx
│   │   │   ├── episode.tsx
│   │   │   ├── item.tsx
│   │   │   ├── libraryItems.tsx
│   │   │   └── seasonSelector.tsx
│   │   ├── tagChip/
│   │   │   ├── index.tsx
│   │   │   └── tagChip.scss
│   │   ├── updater/
│   │   │   └── index.tsx
│   │   ├── userAvatarMenu/
│   │   │   └── index.tsx
│   │   └── utils/
│   │       ├── easterEgg.tsx
│   │       └── iconsCollection.tsx
│   ├── global.d.ts
│   ├── main.tsx
│   ├── palette.module.scss
│   ├── routeTree.gen.ts
│   ├── routes/
│   │   ├── __root.tsx
│   │   ├── _api/
│   │   │   ├── album/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── album.scss
│   │   │   ├── artist/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── artist.scss
│   │   │   ├── boxset/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── boxset.scss
│   │   │   ├── episode/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── episode.scss
│   │   │   ├── favorite/
│   │   │   │   ├── favorite.scss
│   │   │   │   └── index.tsx
│   │   │   ├── home/
│   │   │   │   ├── home.scss
│   │   │   │   └── index.tsx
│   │   │   ├── item/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── item.scss
│   │   │   ├── library/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── library.scss
│   │   │   ├── login/
│   │   │   │   ├── $userId.$userName.tsx
│   │   │   │   ├── list.tsx
│   │   │   │   ├── login.scss
│   │   │   │   └── manual.tsx
│   │   │   ├── login.tsx
│   │   │   ├── person/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── person.scss
│   │   │   ├── player/
│   │   │   │   ├── audio.scss
│   │   │   │   ├── audio.tsx
│   │   │   │   ├── index.tsx
│   │   │   │   ├── photos.scss
│   │   │   │   ├── photos.tsx
│   │   │   │   └── videoPlayer.scss
│   │   │   ├── playlist/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── playlist.scss
│   │   │   ├── search/
│   │   │   │   ├── index.tsx
│   │   │   │   └── search.scss
│   │   │   ├── series/
│   │   │   │   ├── $id.tsx
│   │   │   │   └── series.scss
│   │   │   ├── settings/
│   │   │   │   ├── about.scss
│   │   │   │   ├── about.tsx
│   │   │   │   ├── changeServer/
│   │   │   │   │   └── index.tsx
│   │   │   │   └── preferences.tsx
│   │   │   ├── settings.scss
│   │   │   └── settings.tsx
│   │   ├── _api.tsx
│   │   ├── error/
│   │   │   └── $code.tsx
│   │   ├── index.tsx
│   │   └── setup/
│   │       ├── server.add.tsx
│   │       ├── server.error.scss
│   │       ├── server.error.tsx
│   │       ├── server.list.tsx
│   │       ├── server.scss
│   │       └── serverList.scss
│   ├── styles/
│   │   ├── global.scss
│   │   └── variables.scss
│   ├── theme.ts
│   └── utils/
│       ├── browser-detection.ts
│       ├── constants/
│       │   └── library.ts
│       ├── date/
│       │   ├── formateDate.ts
│       │   └── time.ts
│       ├── hooks/
│       │   ├── useDebounce.ts
│       │   ├── useDefaultSeason.ts
│       │   ├── useInterval.tsx
│       │   ├── useKeyPress.tsx
│       │   └── useParallax.tsx
│       ├── methods/
│       │   ├── getImageUrlsApi.ts
│       │   ├── getSubtitles.ts
│       │   ├── playback.ts
│       │   └── ticksDisplay.ts
│       ├── misc/
│       │   ├── debug.ts
│       │   ├── konami.ts
│       │   └── relaunch.ts
│       ├── navigation.ts
│       ├── playback-profiles/
│       │   ├── README.md
│       │   ├── directplay-profile.ts
│       │   ├── helpers/
│       │   │   ├── audio-formats.ts
│       │   │   ├── codec-profiles.ts
│       │   │   ├── fmp4-audio-formats.ts
│       │   │   ├── fmp4-video-formats.ts
│       │   │   ├── hls-formats.ts
│       │   │   ├── mp4-audio-formats.ts
│       │   │   ├── mp4-video-formats.ts
│       │   │   ├── transcoding-formats.ts
│       │   │   ├── ts-audio-formats.ts
│       │   │   ├── ts-video-formats.ts
│       │   │   ├── webm-audio-formats.ts
│       │   │   └── webm-video-formats.ts
│       │   ├── index.ts
│       │   ├── response-profile.ts
│       │   ├── subtitle-profile.ts
│       │   └── transcoding-profile.ts
│       ├── queries/
│       │   ├── about.ts
│       │   ├── items.ts
│       │   ├── library.ts
│       │   └── libraryItems.ts
│       ├── reducers/
│       │   └── videoPlayerReducer.ts
│       ├── schema/
│       │   └── librarySearch.ts
│       ├── storage/
│       │   ├── player.ts
│       │   ├── servers.ts
│       │   ├── settings.ts
│       │   └── user.ts
│       ├── store/
│       │   ├── api.tsx
│       │   ├── audioPlayback.ts
│       │   ├── backdrop.tsx
│       │   ├── carousel.ts
│       │   ├── central.tsx
│       │   ├── drawer.ts
│       │   ├── header.ts
│       │   ├── libraryDraft.ts
│       │   ├── libraryState.ts
│       │   ├── photosPlayback.ts
│       │   ├── playback.ts
│       │   ├── queue.ts
│       │   ├── search.tsx
│       │   └── settings.tsx
│       ├── types/
│       │   ├── audioPlaybackInfo.ts
│       │   ├── introMediaInfo.ts
│       │   ├── mediaQualityInfo.ts
│       │   ├── playResult.ts
│       │   ├── seriesBackdrop.ts
│       │   └── subtitlePlaybackInfo.ts
│       └── workers/
│           └── backdrop.worker.ts
├── src-tauri/
│   ├── .gitignore
│   ├── Cargo.toml
│   ├── build.rs
│   ├── capabilities/
│   │   ├── desktop.json
│   │   ├── main.json
│   │   └── migrated.json
│   ├── gen/
│   │   └── schemas/
│   │       ├── acl-manifests.json
│   │       ├── capabilities.json
│   │       ├── desktop-schema.json
│   │       └── windows-schema.json
│   ├── icons/
│   │   └── icon.icns
│   ├── src/
│   │   └── main.rs
│   └── tauri.conf.json
├── tsconfig.json
└── vite.config.ts
Download .txt
SYMBOL INDEX (210 symbols across 119 files)

FILE: src-tauri/build.rs
  function main (line 1) | fn main() {

FILE: src-tauri/src/main.rs
  function main (line 5) | fn main() {

FILE: src/components/addServerDialog/index.tsx
  type AddServerDialogProps (line 16) | type AddServerDialogProps = {
  function AddServerDialog (line 23) | function AddServerDialog(props: AddServerDialogProps) {

FILE: src/components/albumMusicTrack/index.tsx
  type AlbumMusicTrackProps (line 23) | type AlbumMusicTrackProps = {
  function AlbumMusicTrack (line 32) | function AlbumMusicTrack(props: AlbumMusicTrackProps) {

FILE: src/components/appBar/appBar.tsx
  constant HIDDEN_PATHS (line 21) | const HIDDEN_PATHS = [

FILE: src/components/appBar/backOnly.tsx
  function AppBarBackOnly (line 8) | function AppBarBackOnly() {

FILE: src/components/appBar/navigationDrawer.tsx
  type NavigationDrawerProps (line 10) | interface NavigationDrawerProps {

FILE: src/components/backdrop/index.tsx
  function Backdrop (line 7) | function Backdrop() {

FILE: src/components/blurhash-canvas/index.tsx
  type BlurhashCanvasProps (line 4) | type BlurhashCanvasProps = {

FILE: src/components/buttons/backButton.tsx
  function BackButton (line 5) | function BackButton() {

FILE: src/components/buttons/likeButton.tsx
  function LikeButton (line 10) | function LikeButton({

FILE: src/components/buttons/markPlayedButton.tsx
  function MarkPlayedButton (line 12) | function MarkPlayedButton({

FILE: src/components/buttons/playButton.tsx
  type PlayButtonProps (line 24) | type PlayButtonProps = {

FILE: src/components/buttons/queueButton.tsx
  function SortableQueueItem (line 42) | function SortableQueueItem({

FILE: src/components/buttons/trailerButton.tsx
  type TrailerButtonType (line 6) | type TrailerButtonType = {

FILE: src/components/card/card.tsx
  type CardProps (line 20) | interface CardProps {

FILE: src/components/cardScroller/cardScroller.tsx
  type CardScrollerProps (line 59) | type CardScrollerProps = {
  function CardScroller (line 68) | function CardScroller({

FILE: src/components/carousel/tickers.tsx
  type CarouselTickersProps (line 6) | type CarouselTickersProps = {

FILE: src/components/filtersDialog/index.tsx
  constant FILTER_LABELS (line 30) | const FILTER_LABELS: Record<FILTERS, string> = {
  type FiltersDialogProps (line 46) | interface FiltersDialogProps {

FILE: src/components/itemBackdrop/index.tsx
  type ItemBackdropProps (line 10) | interface ItemBackdropProps {
  function ItemBackdrop (line 73) | function ItemBackdrop({

FILE: src/components/itemHeader/index.tsx
  type ItemHeaderProps (line 32) | interface ItemHeaderProps {

FILE: src/components/layouts/artist/artistAlbum.tsx
  type ArtistAlbumProps (line 21) | type ArtistAlbumProps = {

FILE: src/components/listItemLink/index.tsx
  type MUIListItemLinkProps (line 10) | interface MUIListItemLinkProps extends ListItemProps<"a"> {

FILE: src/components/nProgress/index.tsx
  function NProgress (line 8) | function NProgress() {

FILE: src/components/playback/audioPlayer/components/LyricsPanel.tsx
  type LyricsPanelProps (line 9) | interface LyricsPanelProps {

FILE: src/components/playback/audioPlayer/components/PlayerActions.tsx
  type PlayerActionsProps (line 6) | interface PlayerActionsProps {

FILE: src/components/playback/audioPlayer/components/PlayerControls.tsx
  type PlayerControlsProps (line 7) | interface PlayerControlsProps {

FILE: src/components/playback/audioPlayer/components/PlayerInfo.tsx
  type PlayerInfoProps (line 7) | interface PlayerInfoProps {

FILE: src/components/playback/audioPlayer/components/PlayerProgress.tsx
  type PlayerProgressProps (line 6) | interface PlayerProgressProps {

FILE: src/components/playback/audioPlayer/components/PlayerVolume.tsx
  type PlayerVolumeProps (line 5) | interface PlayerVolumeProps {

FILE: src/components/playback/audioPlayer/components/QueuePanel.tsx
  type QueuePanelProps (line 45) | interface QueuePanelProps {
  function SortableQueueItem (line 60) | function SortableQueueItem({

FILE: src/components/playback/audioPlayer/components/StatsPanel.tsx
  type StatsPanelProps (line 5) | interface StatsPanelProps {

FILE: src/components/playback/videoPlayer/ErrorDisplay.tsx
  type ErrorDisplayProps (line 4) | interface ErrorDisplayProps {

FILE: src/components/playback/videoPlayer/StatsForNerds.tsx
  type StatsForNerdsProps (line 6) | interface StatsForNerdsProps {

FILE: src/components/playback/videoPlayer/controls.tsx
  constant VOLUME_SCROLL_INTERVAL (line 39) | const VOLUME_SCROLL_INTERVAL = 0.02;
  type VideoPlayerControlsProps (line 41) | type VideoPlayerControlsProps = {

FILE: src/components/playback/videoPlayer/settingsMenu.tsx
  type VideoPlayerSettingsMenuProps (line 23) | type VideoPlayerSettingsMenuProps = {

FILE: src/components/queueListItem/index.tsx
  type QueueListItemProps (line 14) | type QueueListItemProps = {

FILE: src/components/queueTrack/index.tsx
  type Props (line 9) | type Props = {

FILE: src/components/routerLoading/index.tsx
  function RouterLoading (line 5) | function RouterLoading() {

FILE: src/components/search/index.tsx
  function registerglobalShortcut (line 138) | async function registerglobalShortcut() {

FILE: src/components/search/item.tsx
  type SearchItemProps (line 9) | type SearchItemProps = {

FILE: src/components/updater/index.tsx
  function Updater (line 18) | function Updater() {

FILE: src/main.tsx
  type Register (line 53) | interface Register {
  function ProviderWrapper (line 58) | function ProviderWrapper() {

FILE: src/routeTree.gen.ts
  type FileRoutesByFullPath (line 188) | interface FileRoutesByFullPath {
  type FileRoutesByTo (line 218) | interface FileRoutesByTo {
  type FileRoutesById (line 248) | interface FileRoutesById {
  type FileRouteTypes (line 280) | interface FileRouteTypes {
  type RootRouteChildren (line 374) | interface RootRouteChildren {
  type FileRoutesByPath (line 384) | interface FileRoutesByPath {
  type ApiLoginRouteChildren (line 591) | interface ApiLoginRouteChildren {
  type ApiSettingsRouteChildren (line 607) | interface ApiSettingsRouteChildren {
  type ApiRouteChildren (line 623) | interface ApiRouteChildren {

FILE: src/routes/__root.tsx
  type ApiContext (line 35) | type ApiContext = {

FILE: src/routes/_api/album/$id.tsx
  function MusicAlbumTitlePage (line 34) | function MusicAlbumTitlePage() {

FILE: src/routes/_api/artist/$id.tsx
  type TabPanelProp (line 40) | type TabPanelProp = {
  function TabPanel (line 46) | function TabPanel(props: TabPanelProp) {
  function ArtistTitlePage (line 67) | function ArtistTitlePage() {

FILE: src/routes/_api/boxset/$id.tsx
  function BoxSetTitlePage (line 34) | function BoxSetTitlePage() {

FILE: src/routes/_api/episode/$id.tsx
  function EpisodeTitlePage (line 39) | function EpisodeTitlePage() {

FILE: src/routes/_api/favorite/index.tsx
  function FavoritePage (line 22) | function FavoritePage() {

FILE: src/routes/_api/home/index.tsx
  function Home (line 41) | function Home() {
  function HomeContent (line 52) | function HomeContent({ api, user }: { api: Api; user: UserDto }) {

FILE: src/routes/_api/item/$id.tsx
  function ItemDetail (line 58) | function ItemDetail() {

FILE: src/routes/_api/library/$id.tsx
  function Library (line 57) | function Library() {

FILE: src/routes/_api/login/$userId.$userName.tsx
  type PasswordState (line 34) | type PasswordState = {
  function LoginUser (line 39) | function LoginUser() {

FILE: src/routes/_api/login/list.tsx
  function LoginPublicUsersList (line 91) | function LoginPublicUsersList() {

FILE: src/routes/_api/login/manual.tsx
  function UserLoginManual (line 37) | function UserLoginManual() {

FILE: src/routes/_api/person/$id.tsx
  type TabPanelProps (line 31) | type TabPanelProps = {
  function TabPanel (line 37) | function TabPanel(props: TabPanelProps) {
  function PersonTitlePage (line 58) | function PersonTitlePage() {

FILE: src/routes/_api/player/audio.tsx
  constant SEEK_AMOUNT (line 28) | const SEEK_AMOUNT = 10;
  function AudioPlayerRoute (line 81) | function AudioPlayerRoute() {

FILE: src/routes/_api/player/index.tsx
  function addSubtitleTrackToReactPlayer (line 45) | function addSubtitleTrackToReactPlayer(
  function VideoPlayer (line 88) | function VideoPlayer() {

FILE: src/routes/_api/player/photos.tsx
  function PhotosPlayer (line 28) | function PhotosPlayer() {

FILE: src/routes/_api/playlist/$id.tsx
  function PlaylistTitlePage (line 35) | function PlaylistTitlePage() {

FILE: src/routes/_api/search/index.tsx
  constant CATEGORIES (line 42) | const CATEGORIES = [
  function SearchPage (line 52) | function SearchPage() {
  type SearchAppBarProps (line 147) | interface SearchAppBarProps {
  function SearchAppBar (line 155) | function SearchAppBar({
  function SearchResultsList (line 356) | function SearchResultsList({ categories, query, api, user }: any) {
  function NoResultsDetector (line 412) | function NoResultsDetector({ categories, resultsStatus }: any) {
  function CategorySection (line 434) | function CategorySection({ category, query, api, user, onResult }: any) {
  function CategorySkeleton (line 537) | function CategorySkeleton() {

FILE: src/routes/_api/series/$id.tsx
  function SeriesTitlePage (line 48) | function SeriesTitlePage() {

FILE: src/routes/_api/settings.tsx
  function SettingsRoute (line 17) | function SettingsRoute() {

FILE: src/routes/_api/settings/about.tsx
  function RouteComponent (line 23) | function RouteComponent() {

FILE: src/routes/_api/settings/changeServer/index.tsx
  function ChangeServerRoute (line 32) | function ChangeServerRoute() {

FILE: src/routes/_api/settings/preferences.tsx
  function RouteComponent (line 28) | function RouteComponent() {

FILE: src/routes/error/$code.tsx
  function ErrorRoute (line 10) | function ErrorRoute() {

FILE: src/routes/setup/server.add.tsx
  function ServerSetup (line 22) | function ServerSetup() {

FILE: src/routes/setup/server.list.tsx
  function ServerList (line 32) | function ServerList() {

FILE: src/utils/browser-detection.ts
  function supportsMediaSource (line 19) | function supportsMediaSource(): boolean {
  function userAgentContains (line 35) | function userAgentContains(key: string): boolean {
  function isFirefox (line 48) | function isFirefox(): boolean {
  function isEdge (line 58) | function isEdge(): boolean {
  function isChromiumBased (line 67) | function isChromiumBased(): boolean {
  function isChrome (line 76) | function isChrome(): boolean {
  function isApple (line 94) | function isApple(): boolean {
  function safariVersion (line 103) | function safariVersion(): number | undefined {
  function isTizen (line 143) | function isTizen(): boolean {
  function isTizen2 (line 152) | function isTizen2(): boolean {
  function isTizen3 (line 162) | function isTizen3(): boolean {
  function isTizen4 (line 172) | function isTizen4(): boolean {
  function isTizen5 (line 182) | function isTizen5(): boolean {
  function isTizen55 (line 192) | function isTizen55(): boolean {
  function isWebOS (line 202) | function isWebOS(): boolean {
  function isWebOS1 (line 209) | function isWebOS1(): boolean {
  function isWebOS2 (line 220) | function isWebOS2(): boolean {
  function isWebOS3 (line 231) | function isWebOS3(): boolean {
  function isWebOS4 (line 238) | function isWebOS4(): boolean {
  function isWebOS5 (line 245) | function isWebOS5(): boolean {
  function isAndroid (line 254) | function isAndroid(): boolean {
  function isMobile (line 263) | function isMobile(): boolean {
  function isTv (line 294) | function isTv(): boolean {
  function isPs4 (line 303) | function isPs4(): boolean {
  function isXbox (line 312) | function isXbox(): boolean {

FILE: src/utils/constants/library.ts
  constant AVAILABLE_VIEWS (line 7) | const AVAILABLE_VIEWS: Array<{
  constant SORT_BY_OPTIONS (line 78) | const SORT_BY_OPTIONS: Array<{
  type FILTERS (line 257) | type FILTERS =

FILE: src/utils/hooks/useDebounce.ts
  function useDebounce (line 5) | function useDebounce(value: string, delay: number) {

FILE: src/utils/hooks/useDefaultSeason.ts
  function useDefaultSeason (line 15) | function useDefaultSeason(

FILE: src/utils/hooks/useInterval.tsx
  function useInterval (line 3) | function useInterval(

FILE: src/utils/hooks/useKeyPress.tsx
  function downHandler (line 7) | function downHandler({ key }: KeyboardEvent) {

FILE: src/utils/hooks/useParallax.tsx
  function useParallax (line 3) | function useParallax(

FILE: src/utils/methods/getSubtitles.ts
  function getSubtitle (line 4) | function getSubtitle(

FILE: src/utils/methods/playback.ts
  function getNextEpisode (line 18) | async function getNextEpisode(
  type PlaybackInfoOptions (line 54) | interface PlaybackInfoOptions {
  function getPlaybackInfo (line 62) | async function getPlaybackInfo(

FILE: src/utils/misc/debug.ts
  function getVideoDebugInfo (line 1) | function getVideoDebugInfo(videoElement: HTMLVideoElement) {

FILE: src/utils/playback-profiles/directplay-profile.ts
  function getDirectPlayProfiles (line 22) | function getDirectPlayProfiles(

FILE: src/utils/playback-profiles/helpers/audio-formats.ts
  function getSupportedAudioCodecs (line 10) | function getSupportedAudioCodecs(format: string): boolean {

FILE: src/utils/playback-profiles/helpers/codec-profiles.ts
  function getGlobalMaxVideoBitrate (line 30) | function getGlobalMaxVideoBitrate(): number | undefined {
  function createProfileCondition (line 73) | function createProfileCondition(
  function getAacCodecProfileConditions (line 93) | function getAacCodecProfileConditions(
  function getCodecProfiles (line 135) | function getCodecProfiles(

FILE: src/utils/playback-profiles/helpers/fmp4-audio-formats.ts
  function getSupportedFmp4AudioCodecs (line 21) | function getSupportedFmp4AudioCodecs(

FILE: src/utils/playback-profiles/helpers/fmp4-video-formats.ts
  function getSupportedFmp4VideoCodecs (line 21) | function getSupportedFmp4VideoCodecs(

FILE: src/utils/playback-profiles/helpers/hls-formats.ts
  function supportsAc3InHls (line 16) | function supportsAc3InHls(
  function getHlsVideoCodecs (line 45) | function getHlsVideoCodecs(
  function getHlsAudioCodecs (line 67) | function getHlsAudioCodecs(

FILE: src/utils/playback-profiles/helpers/mp4-audio-formats.ts
  function hasAc3Support (line 22) | function hasAc3Support(videoTestElement: HTMLVideoElement): boolean {
  function hasAc3InHlsSupport (line 37) | function hasAc3InHlsSupport(
  function hasEac3Support (line 66) | function hasEac3Support(videoTestElement: HTMLVideoElement): boolean {
  function hasAacSupport (line 82) | function hasAacSupport(videoTestElement: HTMLVideoElement): boolean {
  function hasMp2AudioSupport (line 93) | function hasMp2AudioSupport(): boolean {
  function hasMp3AudioSupport (line 103) | function hasMp3AudioSupport(
  function hasDtsSupport (line 125) | function hasDtsSupport(
  function getSupportedMP4AudioCodecs (line 148) | function getSupportedMP4AudioCodecs(

FILE: src/utils/playback-profiles/helpers/mp4-video-formats.ts
  function hasH264Support (line 19) | function hasH264Support(videoTestElement: HTMLVideoElement): boolean {
  function hasH265Support (line 31) | function hasH265Support(videoTestElement: HTMLVideoElement): boolean {
  function hasHevcSupport (line 59) | function hasHevcSupport(videoTestElement: HTMLVideoElement): boolean {
  function hasAv1Support (line 87) | function hasAv1Support(videoTestElement: HTMLVideoElement): boolean {
  function hasVc1Support (line 106) | function hasVc1Support(videoTestElement: HTMLVideoElement): boolean {
  function hasVp8Support (line 119) | function hasVp8Support(videoTestElement: HTMLVideoElement): boolean {
  function hasVp9Support (line 131) | function hasVp9Support(videoTestElement: HTMLVideoElement): boolean {
  function getSupportedMP4VideoCodecs (line 143) | function getSupportedMP4VideoCodecs(

FILE: src/utils/playback-profiles/helpers/transcoding-formats.ts
  function canPlayNativeHls (line 18) | function canPlayNativeHls(videoTestElement: HTMLVideoElement): boolean {
  function canPlayHlsWithMSE (line 34) | function canPlayHlsWithMSE(): boolean {
  function hasMkvSupport (line 41) | function hasMkvSupport(videoTestElement: HTMLVideoElement): boolean {

FILE: src/utils/playback-profiles/helpers/ts-audio-formats.ts
  function getSupportedTsAudioCodecs (line 16) | function getSupportedTsAudioCodecs(

FILE: src/utils/playback-profiles/helpers/ts-video-formats.ts
  function getSupportedTsVideoCodecs (line 10) | function getSupportedTsVideoCodecs(

FILE: src/utils/playback-profiles/helpers/webm-audio-formats.ts
  function getSupportedWebMAudioCodecs (line 10) | function getSupportedWebMAudioCodecs(

FILE: src/utils/playback-profiles/helpers/webm-video-formats.ts
  function getSupportedWebMVideoCodecs (line 14) | function getSupportedWebMVideoCodecs(

FILE: src/utils/playback-profiles/index.ts
  function getDeviceProfile (line 40) | function getDeviceProfile(videoTestElement: HTMLVideoElement): DevicePro...

FILE: src/utils/playback-profiles/response-profile.ts
  function getResponseProfiles (line 15) | function getResponseProfiles(): ResponseProfile[] {

FILE: src/utils/playback-profiles/subtitle-profile.ts
  function getSubtitleProfiles (line 15) | function getSubtitleProfiles(): SubtitleProfile[] {

FILE: src/utils/playback-profiles/transcoding-profile.ts
  function getTranscodingProfiles (line 38) | function getTranscodingProfiles(

FILE: src/utils/queries/libraryItems.ts
  type LibraryItemsParams (line 18) | interface LibraryItemsParams {

FILE: src/utils/reducers/videoPlayerReducer.ts
  type VideoPlayerState (line 4) | type VideoPlayerState = {
  type VideoPlayerActionKind (line 25) | enum VideoPlayerActionKind {
  type VideoPlayerAction (line 43) | interface VideoPlayerAction {

FILE: src/utils/storage/servers.ts
  type ServerInfo (line 4) | interface ServerInfo extends RecommendedServerInfo {
  type ServerStore (line 8) | interface ServerStore {

FILE: src/utils/storage/user.ts
  type UserStore (line 3) | interface UserStore {

FILE: src/utils/store/api.tsx
  type ApiStore (line 14) | type ApiStore = {
  function useApiInContext (line 91) | function useApiInContext<T>(selector?: (state: ApiStore) => T) {

FILE: src/utils/store/audioPlayback.ts
  type AudioPlaybackStore (line 14) | type AudioPlaybackStore = {

FILE: src/utils/store/backdrop.tsx
  type BackdropStore (line 3) | type BackdropStore = {

FILE: src/utils/store/carousel.ts
  type CarouselStore (line 4) | type CarouselStore = {

FILE: src/utils/store/central.tsx
  type CentralStore (line 22) | type CentralStore = {
  function useCentralStore (line 82) | function useCentralStore<T>(selector?: (state: CentralStore) => T) {

FILE: src/utils/store/drawer.ts
  type DrawerStore (line 4) | type DrawerStore = {

FILE: src/utils/store/header.ts
  type HeaderStoreType (line 3) | type HeaderStoreType = {

FILE: src/utils/store/libraryState.ts
  type VideoTypesState (line 5) | type VideoTypesState = {
  type FiltersState (line 12) | type FiltersState = Record<string, boolean | undefined>;
  type LibraryStateSlice (line 14) | interface LibraryStateSlice {
  type LibraryStateStore (line 26) | interface LibraryStateStore {

FILE: src/utils/store/photosPlayback.ts
  type PhotosPlaybackStore (line 6) | type PhotosPlaybackStore = {

FILE: src/utils/store/playback.ts
  type PlaybackStoreState (line 32) | type PlaybackStoreState = {
  type PlaybackStoreActions (line 136) | type PlaybackStoreActions = {
  type PlaybackDataLoadState (line 968) | interface PlaybackDataLoadState {

FILE: src/utils/store/queue.ts
  type QueueStore (line 5) | interface QueueStore {

FILE: src/utils/store/search.tsx
  type SearchStore (line 3) | type SearchStore = {

FILE: src/utils/types/audioPlaybackInfo.ts
  type audioPlaybackInfo (line 3) | type audioPlaybackInfo = {

FILE: src/utils/types/introMediaInfo.ts
  type introSkipperResult (line 1) | type introSkipperResult = {
  type IntroMediaInfo (line 10) | type IntroMediaInfo = {

FILE: src/utils/types/mediaQualityInfo.ts
  type MediaQualityInfo (line 1) | type MediaQualityInfo = {

FILE: src/utils/types/playResult.ts
  type PlayResult (line 8) | interface PlayResult {

FILE: src/utils/types/seriesBackdrop.ts
  type SeriesBackdropImage (line 1) | type SeriesBackdropImage = {

FILE: src/utils/types/subtitlePlaybackInfo.ts
  type subtitlePlaybackInfo (line 3) | interface subtitlePlaybackInfo {
Condensed preview — 266 files, each showing path, character count, and a content snippet. Download the .json file or copy for the full structured content (1,502K chars).
[
  {
    "path": ".babelrc",
    "chars": 2,
    "preview": "{}"
  },
  {
    "path": ".github/FUNDING.yml",
    "chars": 932,
    "preview": "# These are supported funding model platforms\n\ngithub: [prayag17] # Replace with up to 4 GitHub Sponsors-enabled usernam"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/bug_report.md",
    "chars": 675,
    "preview": "---\nname: Bug report\nabout: Create a report to help us improve\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Describe the b"
  },
  {
    "path": ".github/ISSUE_TEMPLATE/feature_request.md",
    "chars": 595,
    "preview": "---\nname: Feature request\nabout: Suggest an idea for this project\ntitle: ''\nlabels: ''\nassignees: ''\n\n---\n\n**Is your fea"
  },
  {
    "path": ".github/release.yaml",
    "chars": 198,
    "preview": "changelog:\n  categories:\n    - title: 🏕 Features\n      labels:\n        - '*'\n      exclude:\n        labels:\n          - "
  },
  {
    "path": ".github/workflows/continuous-integration.yml",
    "chars": 6839,
    "preview": "# @format\n\nname: Continuous Integration\non:\n     push:\n          branches:\n               - main\n     pull_request:\n    "
  },
  {
    "path": ".github/workflows/release.yml",
    "chars": 3629,
    "preview": "# @format\n\nname: Release\non:\n     push:\n          tags:\n               - \"v*\"\n     workflow_dispatch:\n\njobs:\n     releas"
  },
  {
    "path": ".github/workflows/winget-releaser.yml",
    "chars": 790,
    "preview": "name: Publish Releases to WinGet\non:\n  release:\n    types: [published]\njobs:\n  publish-alpha:\n    runs-on: ubuntu-latest"
  },
  {
    "path": ".gitignore",
    "chars": 656,
    "preview": "*dist\n*build\n__pycache__\n*.mkv\n*.mp4\n*mpv*\nsh-agent*\n.pytest_cache\n\n### react ###\n.DS_*\n*.log\nlogs\n**/*.backup.*\n**/*.ba"
  },
  {
    "path": ".vscode/extensions.json",
    "chars": 234,
    "preview": "{\n    \"recommendations\": [\n        \"biomejs.biome\",\n        \"github.vscode-github-actions\",\n        \"swellaby.rust-pack\""
  },
  {
    "path": ".vscode/launch.json",
    "chars": 1013,
    "preview": "{\n    \"version\": \"0.2.0\",\n    \"configurations\": [\n        {\n            \"type\": \"lldb\",\n            \"request\": \"launch\","
  },
  {
    "path": ".vscode/settings.json",
    "chars": 866,
    "preview": "{\n\t\"editor.defaultFormatter\": \"biomejs.biome\",\n\t\"editor.codeActionsOnSave\": {\n\t\t\"quickfix.biome\": \"always\",\n\t\t\"source.or"
  },
  {
    "path": ".vscode/tasks.json",
    "chars": 904,
    "preview": "{\n    // See https://go.microsoft.com/fwlink/?LinkId=733558\n    // for the documentation about the tasks.json format\n   "
  },
  {
    "path": "CHANGELOG.md",
    "chars": 11927,
    "preview": "- # Alpha 3 (11/12/2024)\n    - refactor: prepare for alpha 3\n    - refactor: cleanup\n    - refactor: remove unused impor"
  },
  {
    "path": "LICENSE",
    "chars": 35149,
    "preview": "                    GNU GENERAL PUBLIC LICENSE\n                       Version 3, 29 June 2007\n\n Copyright (C) 2007 Free "
  },
  {
    "path": "README.md",
    "chars": 4477,
    "preview": "![Banner](https://github.com/user-attachments/assets/cf3ffbe3-3b48-4fab-bd7e-f011928286fa)\r\n<div align=\"center\">\r\n<img a"
  },
  {
    "path": "biome.json",
    "chars": 1139,
    "preview": "{\n\t\"$schema\": \"https://biomejs.dev/schemas/2.3.13/schema.json\",\n\t\"assist\": { \"actions\": { \"source\": { \"organizeImports\":"
  },
  {
    "path": "index.html",
    "chars": 1698,
    "preview": "<!DOCTYPE html>\n<html lang=\"en\">\n\n<head>\n  <meta charset=\"UTF-8\" />\n  <meta name=\"viewport\" content=\"width=device-width,"
  },
  {
    "path": "latest.json",
    "chars": 3680,
    "preview": "{\n\t\"version\": \"0.0.7-dev\",\n\t\"notes\": \"![Banner](https://i.imgur.com/rnhjwsl.png)\\n- chore(deps): update dependencies\\n- "
  },
  {
    "path": "package.json",
    "chars": 3157,
    "preview": "{\n\t\"name\": \"blink\",\n\t\"private\": true,\n\t\"version\": \"1.0.0-alpha.4\",\n\t\"type\": \"module\",\n\t\"scripts\": {\n\t\t\"dev\": \"vite --for"
  },
  {
    "path": "pnpm-workspace.yaml",
    "chars": 69,
    "preview": "onlyBuiltDependencies:\n  - '@parcel/watcher'\n  - core-js\n  - esbuild\n"
  },
  {
    "path": "renovate.json",
    "chars": 157,
    "preview": "{\n\t\"$schema\": \"https://docs.renovatebot.com/renovate-schema.json\",\n\t\"extends\": [\"config:base\", \":disableDependencyDashbo"
  },
  {
    "path": "src/components/Slider/index.tsx",
    "chars": 4677,
    "preview": "import React, {\n\ttype ReactNode,\n\tuseCallback,\n\tuseEffect,\n\tuseRef,\n\tuseState,\n} from \"react\";\n\nimport { useSpring } fro"
  },
  {
    "path": "src/components/Slider/style.scss",
    "chars": 629,
    "preview": ".slider {\n    position: relative;\n\n    &-track {\n        overflow-y: hidden;\n        overflow-x: auto;\n        white-spa"
  },
  {
    "path": "src/components/addServerDialog/index.tsx",
    "chars": 4196,
    "preview": "import { LoadingButton } from \"@mui/lab\";\nimport {\n\tBox,\n\tButton,\n\tDialog,\n\tInputBase,\n\tStack,\n\tTypography,\n} from \"@mui"
  },
  {
    "path": "src/components/albumMusicTrack/albumMusicTrack.scss",
    "chars": 1794,
    "preview": ".item-info-track{\n    display: grid;\n        grid-template-columns: 3em 60% 6em 1fr;\n        gap: 1em;\n        padding: "
  },
  {
    "path": "src/components/albumMusicTrack/index.tsx",
    "chars": 2972,
    "preview": "import {\n\tgenerateAudioStreamUrl,\n\tplayAudio,\n\tuseAudioPlayback,\n} from \"@/utils/store/audioPlayback\";\nimport type {\n\tBa"
  },
  {
    "path": "src/components/alphaSelector/alphaSelector.scss",
    "chars": 549,
    "preview": ".alpha-selector {\n  position: sticky;\n  top: 80px;\n  right: 0;\n  display: flex;\n  flex-direction: column;\n  align-items:"
  },
  {
    "path": "src/components/alphaSelector/index.tsx",
    "chars": 1412,
    "preview": "import { getRouteApi } from \"@tanstack/react-router\";\nimport React, { useMemo } from \"react\";\nimport { useShallow } from"
  },
  {
    "path": "src/components/appBar/appBar.scss",
    "chars": 4296,
    "preview": "\n.appBar {\n\t// Limit transitions to cheaper properties; avoid animating box-shadow directly\n\ttransition: background-colo"
  },
  {
    "path": "src/components/appBar/appBar.tsx",
    "chars": 3443,
    "preview": "import MuiAppBar from \"@mui/material/AppBar\";\nimport IconButton from \"@mui/material/IconButton\";\nimport useScrollTrigger"
  },
  {
    "path": "src/components/appBar/backOnly.tsx",
    "chars": 1132,
    "preview": "import AppBar from \"@mui/material/AppBar\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Toolbar from \"@mui/"
  },
  {
    "path": "src/components/appBar/navigationDrawer.tsx",
    "chars": 3748,
    "preview": "import { getUserViewsApi } from \"@jellyfin/sdk/lib/utils/api/user-views-api\";\nimport { Divider, Drawer, List, ListItem, "
  },
  {
    "path": "src/components/avatar/avatar.module.scss",
    "chars": 395,
    "preview": "\n.avatar-image {\n\taspect-ratio: 1;\n\theight: 100%;\n\tposition: absolute;\n\tinset: 0;\n\tbackground-size: cover;\n\tbackground-p"
  },
  {
    "path": "src/components/avatar/avatar.tsx",
    "chars": 615,
    "preview": "import React from \"react\";\n\nimport \"./avatar.module.scss\";\nimport { useApiInContext } from \"@/utils/store/api\";\n\nexport "
  },
  {
    "path": "src/components/backdrop/index.tsx",
    "chars": 1129,
    "preview": "import { AnimatePresence, motion } from \"motion/react\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/s"
  },
  {
    "path": "src/components/blurhash-canvas/index.tsx",
    "chars": 1501,
    "preview": "import * as blurhash from \"blurhash-wasm\";\nimport React, { useEffect } from \"react\";\n\ntype BlurhashCanvasProps = {\n\tcanv"
  },
  {
    "path": "src/components/buttons/backButton.tsx",
    "chars": 413,
    "preview": "import { IconButton } from \"@mui/material\";\nimport { useRouter } from \"@tanstack/react-router\";\nimport React from \"react"
  },
  {
    "path": "src/components/buttons/likeButton.tsx",
    "chars": 2433,
    "preview": "import type { UserItemDataDto } from \"@jellyfin/sdk/lib/generated-client\";\nimport { getUserLibraryApi } from \"@jellyfin/"
  },
  {
    "path": "src/components/buttons/markPlayedButton.tsx",
    "chars": 2180,
    "preview": "import React from \"react\";\n\nimport IconButton from \"@mui/material/IconButton\";\n\nimport { green } from \"@mui/material/col"
  },
  {
    "path": "src/components/buttons/playButton.tsx",
    "chars": 11341,
    "preview": "import {\n\ttype BaseItemDto,\n\tBaseItemKind,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport { getTvShowsApi } from \"@"
  },
  {
    "path": "src/components/buttons/playNextButton.tsx",
    "chars": 1163,
    "preview": "import { useApiInContext } from \"@/utils/store/api\";\nimport { playItemFromQueue } from \"@/utils/store/playback\";\nimport "
  },
  {
    "path": "src/components/buttons/playPreviousButtom.tsx",
    "chars": 1129,
    "preview": "import { useApiInContext } from \"@/utils/store/api\";\nimport { playItemFromQueue } from \"@/utils/store/playback\";\nimport "
  },
  {
    "path": "src/components/buttons/queueButton.scss",
    "chars": 1588,
    "preview": ".queue{\n    &-item{\n        --image-size: 5em;\n        &.episode {\n                --image-size: 8em !important;\n       "
  },
  {
    "path": "src/components/buttons/queueButton.tsx",
    "chars": 9723,
    "preview": "import { getUserApi } from \"@jellyfin/sdk/lib/utils/api/user-api\";\nimport {\n\tBox,\n\tDrawer,\n\tIconButton,\n\tList,\n\tTooltip,"
  },
  {
    "path": "src/components/buttons/quickConnectButton.tsx",
    "chars": 7366,
    "preview": "import { getQuickConnectApi } from \"@jellyfin/sdk/lib/utils/api/quick-connect-api\";\nimport { getUserApi } from \"@jellyfi"
  },
  {
    "path": "src/components/buttons/trailerButton.tsx",
    "chars": 1068,
    "preview": "import type { MediaUrl } from \"@jellyfin/sdk/lib/generated-client\";\nimport { Dialog, IconButton } from \"@mui/material\";\n"
  },
  {
    "path": "src/components/card/card.scss",
    "chars": 3279,
    "preview": ".card {\n\theight: 100%;\n\toverflow: visible !important;\n\talign-items: flex-start;\n\tbackground: transparent !important;\n\tma"
  },
  {
    "path": "src/components/card/card.tsx",
    "chars": 6354,
    "preview": "/** @format */\n\nimport {\n\ttype BaseItemDto,\n\tBaseItemKind,\n\ttype ImageType,\n} from \"@jellyfin/sdk/lib/generated-client\";"
  },
  {
    "path": "src/components/cardScroller/cardScroller.scss",
    "chars": 1967,
    "preview": "@use \"@/styles/variables.scss\" as *;\n\n.card-scroller-container {\n    margin-bottom: 2.5em;\n    position: relative;\n    \n"
  },
  {
    "path": "src/components/cardScroller/cardScroller.tsx",
    "chars": 3687,
    "preview": "import React, { type ReactNode, useRef, useState } from \"react\";\nimport Carousel from \"react-multi-carousel\";\nimport \"re"
  },
  {
    "path": "src/components/carousel/carousel.scss",
    "chars": 3476,
    "preview": ".carousel {\n\tposition: relative;\n\toverflow: visible;\n\theight: 65vh;\n\tmargin-bottom: 3em;\n\tdisplay: grid;\n\tgrid-template-"
  },
  {
    "path": "src/components/carousel/index.tsx",
    "chars": 4101,
    "preview": "import { AnimatePresence } from \"motion/react\";\nimport React, { useCallback, useEffect, useState } from \"react\";\n\nimport"
  },
  {
    "path": "src/components/carousel/tickers.tsx",
    "chars": 1345,
    "preview": "import type { BaseItemKind } from \"@jellyfin/sdk/lib/generated-client\";\nimport { Typography } from \"@mui/material\";\nimpo"
  },
  {
    "path": "src/components/carouselSlide/index.tsx",
    "chars": 8587,
    "preview": "import {\n\ttype BaseItemDto,\n\tBaseItemKind,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport Button from \"@mui/materia"
  },
  {
    "path": "src/components/circularPageLoadingAnimation/index.tsx",
    "chars": 730,
    "preview": "// Write a react component that included an MUI circluar progress element utilizing NProgrss\n\nimport { CircularProgress "
  },
  {
    "path": "src/components/filtersDialog/index.tsx",
    "chars": 14132,
    "preview": "import { getGenresApi } from \"@jellyfin/sdk/lib/utils/api/genres-api\";\nimport { getMusicGenresApi } from \"@jellyfin/sdk/"
  },
  {
    "path": "src/components/iconLink/index.tsx",
    "chars": 2054,
    "preview": "import { Link, Typography } from \"@mui/material\";\nimport React, { memo } from \"react\";\n\nimport anidbIcon from \"../../ass"
  },
  {
    "path": "src/components/itemBackdrop/index.tsx",
    "chars": 2990,
    "preview": "import {\n\tAnimatePresence,\n\ttype HTMLMotionProps,\n\tmotion,\n\tuseScroll,\n\tuseTransform,\n} from \"motion/react\";\nimport Reac"
  },
  {
    "path": "src/components/itemHeader/index.tsx",
    "chars": 9621,
    "preview": "import type { Api } from \"@jellyfin/sdk\";\nimport type { BaseItemDto } from \"@jellyfin/sdk/lib/generated-client\";\nimport "
  },
  {
    "path": "src/components/itemHeader/itemHeader.scss",
    "chars": 2622,
    "preview": "@import \"../../styles/variables.scss\";\n\n$cardWidth: 18%;\n\n.item-hero {\n    height: 60vh;\n    gap: 2em;\n    row-gap: 1.2e"
  },
  {
    "path": "src/components/layouts/artist/albumArtist.scss",
    "chars": 555,
    "preview": "\n.album {\n\t&-image {\n\t\taspect-ratio: 1;\n\t\tborder-radius: 20px;\n\t\toverflow: hidden;\n\t\twidth: 16em;\n\t\theight: 16em;\n\t\tbox-"
  },
  {
    "path": "src/components/layouts/artist/artistAlbum.tsx",
    "chars": 4002,
    "preview": "import React from \"react\";\n\nimport Typography from \"@mui/material/Typography\";\n\nimport { getItemsApi } from \"@jellyfin/s"
  },
  {
    "path": "src/components/layouts/homeSection/latestMediaSection.tsx",
    "chars": 2499,
    "preview": "import { useQuery } from \"@tanstack/react-query\";\nimport React from \"react\";\nimport { Card } from \"../../card/card\";\nimp"
  },
  {
    "path": "src/components/libraryHeader/index.tsx",
    "chars": 11559,
    "preview": "import type { BaseItemKind } from \"@jellyfin/sdk/lib/generated-client\";\nimport { ItemSortBy, SortOrder } from \"@jellyfin"
  },
  {
    "path": "src/components/libraryHeader/libraryHeader.scss",
    "chars": 703,
    "preview": ".library-header {\n    display: flex;\n    align-items: center;\n    justify-content: space-between;\n    inset: 1em 2em aut"
  },
  {
    "path": "src/components/libraryItemsGrid/index.tsx",
    "chars": 10019,
    "preview": "import {\n\ttype BaseItemDto,\n\tBaseItemKind,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport { useSuspenseQuery } from"
  },
  {
    "path": "src/components/libraryItemsGrid/libraryItemsGrid.scss",
    "chars": 1069,
    "preview": "// Overrides for virtualized library items layout to prevent horizontal overflow\n.library-items-container.virtualized {\n"
  },
  {
    "path": "src/components/listItemLink/index.tsx",
    "chars": 1390,
    "preview": "import {\n\tListItem,\n\tListItemButton,\n\ttype ListItemProps,\n\tListItemText,\n} from \"@mui/material\";\nimport { createLink, Li"
  },
  {
    "path": "src/components/musicTrack/index.tsx",
    "chars": 3731,
    "preview": "import Typography from \"@mui/material/Typography\";\nimport React from \"react\";\nimport { getRuntimeMusic } from \"../../uti"
  },
  {
    "path": "src/components/musicTrack/musicTrack.scss",
    "chars": 1012,
    "preview": "\n.music-track {\n\tdisplay: grid;\n\tgrid-template-columns: 4.5em 80% 1fr 1fr;\n\tgap: 0.5em;\n\talign-items: center;\n\tjustify-i"
  },
  {
    "path": "src/components/nProgress/index.tsx",
    "chars": 1190,
    "preview": "import { LinearProgress } from \"@mui/material\";\nimport { useNProgress } from \"@tanem/react-nprogress\";\nimport { useIsFet"
  },
  {
    "path": "src/components/notices/emptyNotice/emptyNotice.tsx",
    "chars": 902,
    "preview": "\nimport Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport { yellow } from \"@mui/ma"
  },
  {
    "path": "src/components/notices/errorNotice/errorNotice.tsx",
    "chars": 1282,
    "preview": "import Box from \"@mui/material/Box\";\nimport Typography from \"@mui/material/Typography\";\nimport { red } from \"@mui/materi"
  },
  {
    "path": "src/components/outroCard/index.tsx",
    "chars": 2455,
    "preview": "import { useApiInContext } from \"@/utils/store/api\";\nimport { playItemFromQueue } from \"@/utils/store/playback\";\nimport "
  },
  {
    "path": "src/components/outroCard/outroCard.scss",
    "chars": 1139,
    "preview": ".outro-card {\n    position: absolute;\n    bottom: 0;\n    left: 0;\n    right: 0;\n    z-index: 1000;\n    display: flex;\n  "
  },
  {
    "path": "src/components/playback/audioPlayer/audioPlayer.scss",
    "chars": 2802,
    "preview": "$image-size: 4em;\n\n.audio-player {\n\tposition: fixed;\n\tbottom: 1rem;\n\tleft: 50%;\n\ttransform: translateX(-50%);\n\twidth: 95"
  },
  {
    "path": "src/components/playback/audioPlayer/components/LyricsPanel.tsx",
    "chars": 2807,
    "preview": "import type { Api } from \"@jellyfin/sdk\";\nimport type { BaseItemDto } from \"@jellyfin/sdk/lib/generated-client\";\nimport "
  },
  {
    "path": "src/components/playback/audioPlayer/components/PlayerActions.tsx",
    "chars": 790,
    "preview": "import IconButton from \"@mui/material/IconButton\";\nimport type { ReactNode } from \"react\";\nimport React from \"react\";\nim"
  },
  {
    "path": "src/components/playback/audioPlayer/components/PlayerControls.tsx",
    "chars": 1425,
    "preview": "import Fab from \"@mui/material/Fab\";\nimport IconButton from \"@mui/material/IconButton\";\nimport React from \"react\";\nimpor"
  },
  {
    "path": "src/components/playback/audioPlayer/components/PlayerInfo.tsx",
    "chars": 1403,
    "preview": "import type { Api } from \"@jellyfin/sdk\";\nimport type { BaseItemDto } from \"@jellyfin/sdk/lib/generated-client\";\nimport "
  },
  {
    "path": "src/components/playback/audioPlayer/components/PlayerProgress.tsx",
    "chars": 1915,
    "preview": "import Slider from \"@mui/material/Slider\";\nimport Typography from \"@mui/material/Typography\";\nimport React, { useEffect,"
  },
  {
    "path": "src/components/playback/audioPlayer/components/PlayerVolume.tsx",
    "chars": 1695,
    "preview": "import IconButton from \"@mui/material/IconButton\";\nimport Slider from \"@mui/material/Slider\";\nimport React from \"react\";"
  },
  {
    "path": "src/components/playback/audioPlayer/components/QueuePanel.tsx",
    "chars": 7023,
    "preview": "import {\n\tclosestCenter,\n\tDndContext,\n\ttype DragEndEvent,\n\tDragOverlay,\n\ttype DragStartEvent,\n\ttype DropAnimation,\n\tdefa"
  },
  {
    "path": "src/components/playback/audioPlayer/components/StatsPanel.tsx",
    "chars": 3529,
    "preview": "import type { BaseItemDto } from \"@jellyfin/sdk/lib/generated-client\";\nimport { Box, Paper, Typography } from \"@mui/mate"
  },
  {
    "path": "src/components/playback/audioPlayer/index.tsx",
    "chars": 6836,
    "preview": "import { useLocation, useNavigate } from \"@tanstack/react-router\";\nimport { AnimatePresence, motion } from \"motion/react"
  },
  {
    "path": "src/components/playback/videoPlayer/EndsAtDisplay.tsx",
    "chars": 738,
    "preview": "import { Typography } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow\";\nimp"
  },
  {
    "path": "src/components/playback/videoPlayer/ErrorDisplay.tsx",
    "chars": 1144,
    "preview": "import { Button, Typography } from \"@mui/material\";\nimport React from \"react\";\n\ninterface ErrorDisplayProps {\n\terror: an"
  },
  {
    "path": "src/components/playback/videoPlayer/LoadingIndicator.tsx",
    "chars": 706,
    "preview": "import { CircularProgress } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow"
  },
  {
    "path": "src/components/playback/videoPlayer/ProgressDisplay.tsx",
    "chars": 913,
    "preview": "import { Typography } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow\";\nimp"
  },
  {
    "path": "src/components/playback/videoPlayer/StatsForNerds.tsx",
    "chars": 4516,
    "preview": "import { IconButton, Paper, Typography } from \"@mui/material\";\nimport React, { type RefObject, useEffect, useState } fro"
  },
  {
    "path": "src/components/playback/videoPlayer/VolumeChangeOverlay.tsx",
    "chars": 1016,
    "preview": "import { LinearProgress } from \"@mui/material\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport React fro"
  },
  {
    "path": "src/components/playback/videoPlayer/bubbleSlider/index.tsx",
    "chars": 9316,
    "preview": "import type { TrickplayInfo } from \"@jellyfin/sdk/lib/generated-client\";\nimport { Slider, Tooltip, Typography } from \"@m"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/CaptionsButton.tsx",
    "chars": 774,
    "preview": "import { IconButton } from \"@mui/material\";\nimport React, { useTransition } from \"react\";\nimport { useShallow } from \"zu"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/ChaptersListButton.tsx",
    "chars": 1512,
    "preview": "import { IconButton, Menu, MenuItem } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zusta"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/ForwardButton.tsx",
    "chars": 768,
    "preview": "import { IconButton } from \"@mui/material\";\nimport React, { useEffect } from \"react\";\nimport { useShallow } from \"zustan"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/FullscreenButton.tsx",
    "chars": 687,
    "preview": "import { IconButton } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow\";\nimp"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/NextChapterButton.tsx",
    "chars": 532,
    "preview": "import { IconButton } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow\";\nimp"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/PlayPauseButton.tsx",
    "chars": 626,
    "preview": "import { IconButton } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow\";\nimp"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/PrevChapterButton.tsx",
    "chars": 526,
    "preview": "import { IconButton } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow\";\nimp"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/RewindButton.tsx",
    "chars": 782,
    "preview": "import { IconButton } from \"@mui/material\";\nimport React from \"react\";\nimport { useShallow } from \"zustand/shallow\";\nimp"
  },
  {
    "path": "src/components/playback/videoPlayer/buttons/SkipSegmentButton.tsx",
    "chars": 2599,
    "preview": "import { Box, Button } from \"@mui/material\";\nimport { AnimatePresence, motion } from \"motion/react\";\nimport React from \""
  },
  {
    "path": "src/components/playback/videoPlayer/controls.scss",
    "chars": 1996,
    "preview": ".video-player {\n    background: black;\n    position: absolute;\n    width: 100vw;\n    height: 100vh;\n    top: 0;\n    left"
  },
  {
    "path": "src/components/playback/videoPlayer/controls.tsx",
    "chars": 9377,
    "preview": "import { getPlaystateApi } from \"@jellyfin/sdk/lib/utils/api/playstate-api\";\nimport { IconButton, Slider, Typography } f"
  },
  {
    "path": "src/components/playback/videoPlayer/settingsMenu.tsx",
    "chars": 3573,
    "preview": "import {\n\tMenuItem,\n\tPopover,\n\tSwitch,\n\tTextField,\n\tTypography,\n} from \"@mui/material\";\nimport { toNumber } from \"lodash"
  },
  {
    "path": "src/components/playback/videoPlayer/upNextFlyout.scss",
    "chars": 910,
    "preview": ".video-player-up_next_flyout {\n    position: absolute;\n    bottom: 2em;\n    right: 2em;\n    width: 42em;\n    height: fit"
  },
  {
    "path": "src/components/playback/videoPlayer/upNextFlyout.tsx",
    "chars": 5247,
    "preview": "import { Box, Button, IconButton, Typography } from \"@mui/material\";\nimport { AnimatePresence, motion } from \"motion/rea"
  },
  {
    "path": "src/components/queueListItem/index.tsx",
    "chars": 5458,
    "preview": "import type { BaseItemDto } from \"@jellyfin/sdk/lib/generated-client\";\nimport {\n\tBox,\n\tIconButton,\n\tListItem,\n\tListItemA"
  },
  {
    "path": "src/components/queueTrack/index.tsx",
    "chars": 1813,
    "preview": "import { useSortable } from \"@dnd-kit/sortable\";\nimport { CSS } from \"@dnd-kit/utilities\";\nimport type { BaseItemDto } f"
  },
  {
    "path": "src/components/routerLoading/index.tsx",
    "chars": 558,
    "preview": "import { CircularProgress } from \"@mui/material\";\nimport { useRouterState } from \"@tanstack/react-router\";\nimport React "
  },
  {
    "path": "src/components/search/index.tsx",
    "chars": 9911,
    "preview": "import { ItemSortBy } from \"@jellyfin/sdk/lib/generated-client\";\nimport { getItemsApi } from \"@jellyfin/sdk/lib/utils/ap"
  },
  {
    "path": "src/components/search/item.tsx",
    "chars": 3251,
    "preview": "import { BaseItemKind } from \"@jellyfin/sdk/lib/generated-client\";\nimport { Box, Button, Stack, Typography } from \"@mui/"
  },
  {
    "path": "src/components/settingOption/index.tsx",
    "chars": 1298,
    "preview": "import { getSetting, setSetting } from \"@/utils/storage/settings\";\nimport { FormControlLabel, Switch, Typography } from "
  },
  {
    "path": "src/components/settingOptionSelect/index.tsx",
    "chars": 1337,
    "preview": "import type { CultureDto } from \"@jellyfin/sdk/lib/generated-client\";\nimport {\n\tFormControlLabel,\n\tMenuItem,\n\tTextField,"
  },
  {
    "path": "src/components/showMoreText/index.tsx",
    "chars": 1573,
    "preview": "import Button from \"@mui/material/Button\";\nimport Typography from \"@mui/material/Typography\";\nimport React from \"react\";"
  },
  {
    "path": "src/components/skeleton/cards.tsx",
    "chars": 820,
    "preview": "import Skeleton from \"@mui/material/Skeleton\";\nimport Typography from \"@mui/material/Typography\";\nimport React from \"rea"
  },
  {
    "path": "src/components/skeleton/carousel.tsx",
    "chars": 1178,
    "preview": "import Skeleton from \"@mui/material/Skeleton\";\nimport Typography from \"@mui/material/Typography\";\nimport React from \"rea"
  },
  {
    "path": "src/components/skeleton/episode.tsx",
    "chars": 2546,
    "preview": "import { Divider, Skeleton, Typography } from \"@mui/material\";\nimport React from \"react\";\n\nconst EpisodeSkeleton = () =>"
  },
  {
    "path": "src/components/skeleton/item.tsx",
    "chars": 2385,
    "preview": "import React from \"react\";\n\nimport { Skeleton } from \"@mui/material\";\nimport { motion } from \"motion/react\";\n\nconst Item"
  },
  {
    "path": "src/components/skeleton/libraryItems.tsx",
    "chars": 706,
    "preview": "import { Skeleton } from \"@mui/material\";\nimport React from \"react\";\n\nconst LibraryItemsSkeleton = () => {\n\treturn (\n\t\t<"
  },
  {
    "path": "src/components/skeleton/seasonSelector.tsx",
    "chars": 1076,
    "preview": "import Divider from \"@mui/material/Divider\";\nimport Grid2 from \"@mui/material/Grid\";\nimport Skeleton from \"@mui/material"
  },
  {
    "path": "src/components/tagChip/index.tsx",
    "chars": 462,
    "preview": "import { Typography } from \"@mui/material\";\nimport { Link, type LinkProps } from \"@tanstack/react-router\";\nimport React "
  },
  {
    "path": "src/components/tagChip/tagChip.scss",
    "chars": 435,
    "preview": ".tag {\n    display: flex;\n    padding: 0.4em 0.8em;\n    color: white;\n    text-decoration: none;\n    gap: 0.2em;\n    bor"
  },
  {
    "path": "src/components/updater/index.tsx",
    "chars": 7542,
    "preview": "import { LoadingButton } from \"@mui/lab\";\nimport {\n\tBox,\n\tButton,\n\tCircularProgress,\n\tDialog,\n\tDialogActions,\n\tDialogCon"
  },
  {
    "path": "src/components/userAvatarMenu/index.tsx",
    "chars": 3272,
    "preview": "import {\n\tAvatar,\n\tDivider,\n\tIconButton,\n\tListItemIcon,\n\tMenu,\n\tMenuItem,\n} from \"@mui/material\";\nimport { useQueryClien"
  },
  {
    "path": "src/components/utils/easterEgg.tsx",
    "chars": 1337,
    "preview": "import React, { useCallback, useMemo } from \"react\";\n\nimport { Dialog, Slide } from \"@mui/material\";\n// import { useKona"
  },
  {
    "path": "src/components/utils/iconsCollection.tsx",
    "chars": 3030,
    "preview": "import {\n\tBaseItemKind,\n\ttype CollectionType,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport React from \"react\";\n\ne"
  },
  {
    "path": "src/global.d.ts",
    "chars": 209,
    "preview": "// Fix image imports\ndeclare module \"*.png\" {\n\tconst value: any;\n\texport = value;\n}\ndeclare module \"*.svg\" {\n\tconst valu"
  },
  {
    "path": "src/main.tsx",
    "chars": 2688,
    "preview": "import { QueryClient, QueryClientProvider } from \"@tanstack/react-query\";\nimport { createRouter, RouterProvider } from \""
  },
  {
    "path": "src/palette.module.scss",
    "chars": 383,
    "preview": "\n@use \"./styles/variables.scss\" as *;\n\n:export {\n\tclrAccentDefault: $clr-accent-default;\n\tclrSecondaryDefault: $clr-seco"
  },
  {
    "path": "src/routeTree.gen.ts",
    "chars": 22912,
    "preview": "/* eslint-disable */\n\n// @ts-nocheck\n\n// noinspection JSUnusedGlobalSymbols\n\n// This file was automatically generated by"
  },
  {
    "path": "src/routes/__root.tsx",
    "chars": 2396,
    "preview": "// import { EasterEgg } from \"@/components/utils/easterEgg\";\nimport { CssBaseline } from \"@mui/material\";\nimport { Theme"
  },
  {
    "path": "src/routes/_api/album/$id.tsx",
    "chars": 10215,
    "preview": "import { BaseItemKind, SortOrder } from \"@jellyfin/sdk/lib/generated-client\";\nimport { getItemsApi } from \"@jellyfin/sdk"
  },
  {
    "path": "src/routes/_api/album/album.scss",
    "chars": 4418,
    "preview": "$border-radius: 20px;\n.item-album {\n\twidth: 70vw;\n\tpadding-right: 2.2em;\n\t.item-info {\n\t\tdisplay: flex;\n\t\tflex-direction"
  },
  {
    "path": "src/routes/_api/artist/$id.tsx",
    "chars": 10476,
    "preview": "import {\n\tBaseItemKind,\n\tItemFields,\n\tSortOrder,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport { getItemsApi } fro"
  },
  {
    "path": "src/routes/_api/artist/artist.scss",
    "chars": 1561,
    "preview": "$cardWidth: 22%;\n\n.item-artist.item {\n\tgap: 1em;\n\n\t.item-detail {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 35%;\n\t\tj"
  },
  {
    "path": "src/routes/_api/boxset/$id.tsx",
    "chars": 7351,
    "preview": "import {\n\tBaseItemKind,\n\tItemFields,\n\tLocationType,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport { getItemsApi } "
  },
  {
    "path": "src/routes/_api/boxset/boxset.scss",
    "chars": 1299,
    "preview": "$cardWidth: 18%;\t\n.item-boxset.item {\n\tgap: 1em;\n\n\t.item-detail {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 35%;\n\t\tj"
  },
  {
    "path": "src/routes/_api/episode/$id.tsx",
    "chars": 19403,
    "preview": "import {\n\tBaseItemKind,\n\tMediaStreamType,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport { getUserLibraryApi } from"
  },
  {
    "path": "src/routes/_api/episode/episode.scss",
    "chars": 1302,
    "preview": "$cardWidth: 30%;\n.item-episode.item {\n\tgap: 1em;\n\t\n\t.item-detail {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 35%;\n\t\t"
  },
  {
    "path": "src/routes/_api/favorite/favorite.scss",
    "chars": 3901,
    "preview": "@use \"@/styles/variables.scss\" as *;\n\n.favorite-page {\n    display: flex;\n    flex-direction: column;\n    height: 100%;\n"
  },
  {
    "path": "src/routes/_api/favorite/index.tsx",
    "chars": 8380,
    "preview": "import { useQuery } from \"@tanstack/react-query\";\nimport React, { type SyntheticEvent, useEffect, useState } from \"react"
  },
  {
    "path": "src/routes/_api/home/home.scss",
    "chars": 2916,
    "preview": "\n.hero-carousel {\n\tposition: relative;\n\toverflow: visible;\n\tisolation: isolate;\n\theight: 100%;\n\twidth: 100%;\n\n\t&-slide {"
  },
  {
    "path": "src/routes/_api/home/index.tsx",
    "chars": 9876,
    "preview": "import { useSuspenseQuery } from \"@tanstack/react-query\";\nimport React, { useCallback, useMemo } from \"react\";\n\nimport \""
  },
  {
    "path": "src/routes/_api/item/$id.tsx",
    "chars": 20115,
    "preview": "import {\n\tBaseItemKind,\n\tMediaStreamType,\n} from \"@jellyfin/sdk/lib/generated-client\";\nimport { getLibraryApi } from \"@j"
  },
  {
    "path": "src/routes/_api/item/item.scss",
    "chars": 1875,
    "preview": "$cardWidth: 18%;\n\n.item-default.item {\n\t\n\t.item-detail {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 35%;\n\t\tjustify-it"
  },
  {
    "path": "src/routes/_api/library/$id.tsx",
    "chars": 3877,
    "preview": "import { BaseItemKind, ItemSortBy } from \"@jellyfin/sdk/lib/generated-client\";\nimport { useSuspenseQuery } from \"@tansta"
  },
  {
    "path": "src/routes/_api/library/library.scss",
    "chars": 3272,
    "preview": ".library-list {\n\t&-image {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t\theight: 100%;\n\t\tz-index: 1;\n\t\tobject-fit: cover;\n\t\t&-c"
  },
  {
    "path": "src/routes/_api/login/$userId.$userName.tsx",
    "chars": 6119,
    "preview": "import LoadingButton from \"@mui/lab/LoadingButton\";\nimport { Paper, TextField, Typography } from \"@mui/material\";\nimport"
  },
  {
    "path": "src/routes/_api/login/list.tsx",
    "chars": 4796,
    "preview": "import { getUserApi } from \"@jellyfin/sdk/lib/utils/api/user-api\";\nimport { Box, Chip, Typography } from \"@mui/material\""
  },
  {
    "path": "src/routes/_api/login/login.scss",
    "chars": 1466,
    "preview": "\n.user {\n\t&-list {\n\t\t&-container {\n\t\t\tdisplay: flex;\n\t\t\tflex-flow: row wrap;\n\t\t\tgap: 1em;\n\t\t\tjustify-content: center;\n\t\t"
  },
  {
    "path": "src/routes/_api/login/manual.tsx",
    "chars": 7765,
    "preview": "import { getBrandingApi } from \"@jellyfin/sdk/lib/utils/api/branding-api\";\nimport LoadingButton from \"@mui/lab/LoadingBu"
  },
  {
    "path": "src/routes/_api/login.tsx",
    "chars": 829,
    "preview": "import AppBarBackOnly from \"@/components/appBar/backOnly\";\nimport { getUserApi } from \"@jellyfin/sdk/lib/utils/api/user-"
  },
  {
    "path": "src/routes/_api/person/$id.tsx",
    "chars": 11365,
    "preview": "import { BaseItemKind, LocationType } from \"@jellyfin/sdk/lib/generated-client\";\nimport { getItemsApi } from \"@jellyfin/"
  },
  {
    "path": "src/routes/_api/person/person.scss",
    "chars": 1592,
    "preview": "$cardWidth: 18%;\n.item-detail-person {\n\t&-container {\n\t\tposition: relative;\n\t\twidth: 100%;\n\t}\n\t&-header {\n\t\twidth: 100%;"
  },
  {
    "path": "src/routes/_api/player/audio.scss",
    "chars": 6398,
    "preview": ".audio {\n    &-background {\n        position: fixed;\n        top: 0;\n        left: 0;\n        width: 100%;\n        heigh"
  },
  {
    "path": "src/routes/_api/player/audio.tsx",
    "chars": 6503,
    "preview": "import { Box, Tab, Tabs, Typography } from \"@mui/material\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nim"
  },
  {
    "path": "src/routes/_api/player/index.tsx",
    "chars": 18463,
    "preview": "import { getPlaystateApi } from \"@jellyfin/sdk/lib/utils/api/playstate-api\";\nimport CircularProgress from \"@mui/material"
  },
  {
    "path": "src/routes/_api/player/photos.scss",
    "chars": 1579,
    "preview": ".photos {\n    background: black;\n    overflow: hidden;\n    height: 100vh;\n    &-currentPhoto {\n        width: 100vw;\n   "
  },
  {
    "path": "src/routes/_api/player/photos.tsx",
    "chars": 4345,
    "preview": "import { useApiInContext } from \"@/utils/store/api\";\nimport { usePhotosPlayback } from \"@/utils/store/photosPlayback\";\ni"
  },
  {
    "path": "src/routes/_api/player/videoPlayer.scss",
    "chars": 1164,
    "preview": ".video {\n\t&-osd {\n\t\topacity: 0;\n\t\ttransition: opacity 0.1s linear;\n\t\twidth: 100vw;\n\t\tcursor: none;\n\t\t&-name {\n\t\t\tdisplay"
  },
  {
    "path": "src/routes/_api/playlist/$id.tsx",
    "chars": 7222,
    "preview": "import React, { useEffect } from \"react\";\n\nimport Box from \"@mui/material/Box\";\nimport CircularProgress from \"@mui/mater"
  },
  {
    "path": "src/routes/_api/playlist/playlist.scss",
    "chars": 2558,
    "preview": "$border-radius: 20px;\n.item-playlist {\n\twidth: 70vw;\n\tpadding-right: 2.2em;\n\t.item-info {\n\t\tdisplay: flex;\n\t\tflex-direct"
  },
  {
    "path": "src/routes/_api/search/index.tsx",
    "chars": 15216,
    "preview": "import { BaseItemKind } from \"@jellyfin/sdk/lib/generated-client\";\nimport { getItemsApi } from \"@jellyfin/sdk/lib/utils/"
  },
  {
    "path": "src/routes/_api/search/search.scss",
    "chars": 5020,
    "preview": "\n.search-page {\n    position: relative;\n    min-height: 100vh;\n    display: flex;\n    flex-direction: column;\n    \n    /"
  },
  {
    "path": "src/routes/_api/series/$id.tsx",
    "chars": 26654,
    "preview": "import { BaseItemKind, ItemFields } from \"@jellyfin/sdk/lib/generated-client\";\nimport { getLibraryApi } from \"@jellyfin/"
  },
  {
    "path": "src/routes/_api/series/series.scss",
    "chars": 4245,
    "preview": "$cardWidth: 18%;\n\n.item-series.item {\n\tgap: 1em;\n\t\n\t.item-detail {\n\t\tdisplay: grid;\n\t\tgrid-template-columns: 1fr 35%;\n\t\t"
  },
  {
    "path": "src/routes/_api/settings/about.scss",
    "chars": 1005,
    "preview": ".settings-about {\n    &-container {\n        display: flex;\n        flex-direction: column;\n        align-items: center;\n"
  },
  {
    "path": "src/routes/_api/settings/about.tsx",
    "chars": 2733,
    "preview": "import { Fab, Link, Typography } from \"@mui/material\";\nimport { createFileRoute } from \"@tanstack/react-router\";\nimport "
  },
  {
    "path": "src/routes/_api/settings/changeServer/index.tsx",
    "chars": 10189,
    "preview": "import {\n\talpha,\n\tButton,\n\tCard,\n\tCardActions,\n\tCardContent,\n\tChip,\n\tGrid,\n\tIconButton,\n\tTypography,\n\tuseTheme,\n} from \""
  },
  {
    "path": "src/routes/_api/settings/preferences.tsx",
    "chars": 7761,
    "preview": "import {\n\tButton,\n\tFormControlLabel,\n\tMenuItem,\n\tSwitch,\n\tTextField,\n\tTypography,\n} from \"@mui/material\";\nimport { creat"
  },
  {
    "path": "src/routes/_api/settings.scss",
    "chars": 4890,
    "preview": "@use \"../../styles/variables.scss\" as *;\n\n.settings {\n    &-page {\n        &-container {\n            display: grid;\n    "
  },
  {
    "path": "src/routes/_api/settings.tsx",
    "chars": 3034,
    "preview": "import { createFileRoute, Outlet, useNavigate } from \"@tanstack/react-router\";\nimport React, { useCallback, useEffect } "
  },
  {
    "path": "src/routes/_api.tsx",
    "chars": 2247,
    "preview": "import { getDefaultServer, getServer } from \"@/utils/storage/servers\";\nimport { getUser } from \"@/utils/storage/user\";\ni"
  },
  {
    "path": "src/routes/error/$code.tsx",
    "chars": 1371,
    "preview": "import { Button, Typography } from \"@mui/material\";\nimport { Link, createFileRoute } from \"@tanstack/react-router\";\nimpo"
  },
  {
    "path": "src/routes/index.tsx",
    "chars": 522,
    "preview": "import { getDefaultServer } from \"@/utils/storage/servers\";\nimport { getUser } from \"@/utils/storage/user\";\nimport { cre"
  },
  {
    "path": "src/routes/setup/server.add.tsx",
    "chars": 4289,
    "preview": "import LoadingButton from \"@mui/lab/LoadingButton\";\nimport { yellow } from \"@mui/material/colors\";\nimport Grid from \"@mu"
  },
  {
    "path": "src/routes/setup/server.error.scss",
    "chars": 307,
    "preview": ".server-error {\n    &-container {\n        display: flex;\n        align-items: center;\n        justify-content: center;\n "
  },
  {
    "path": "src/routes/setup/server.error.tsx",
    "chars": 971,
    "preview": "import { createFileRoute, useNavigate } from \"@tanstack/react-router\";\nimport React from \"react\";\n\nimport \"./server.erro"
  },
  {
    "path": "src/routes/setup/server.list.tsx",
    "chars": 6235,
    "preview": "import Chip from \"@mui/material/Chip\";\nimport IconButton from \"@mui/material/IconButton\";\nimport Paper from \"@mui/materi"
  },
  {
    "path": "src/routes/setup/server.scss",
    "chars": 300,
    "preview": ".logo {\n\twidth: min(60vw, 45em);\n\theight: auto;\n\tmargin-bottom: 2em;\n}\n\n.serverContainer {\n\tdisplay: flex;\n\tflex-directi"
  },
  {
    "path": "src/routes/setup/serverList.scss",
    "chars": 936,
    "preview": "\n.server-list {\n\tposition: absolute;\n\twidth: 100vw;\n\theight: 100vh;\n\toverflow: hidden;\n\tdisplay: flex;\n\talign-items: cen"
  },
  {
    "path": "src/styles/global.scss",
    "chars": 5652,
    "preview": "::-webkit-scrollbar {\n\twidth: 14px;\n\tbackground: $clr-background-dark;\n}\n\ndiv::-webkit-scrollbar {\n\twidth: 14px;\n\tbackgr"
  },
  {
    "path": "src/styles/variables.scss",
    "chars": 1356,
    "preview": "\n$clr-accent-default: hsl(337, 96%, 56%);\n$clr-accent-light: hsl(337, 96%, 90%);\n$clr-accent-dark: hsl(337, 96%, 20%);\n$"
  },
  {
    "path": "src/theme.ts",
    "chars": 2535,
    "preview": "import { createTheme } from \"@mui/material/styles\";\nimport {\n\tclrAccentDefault,\n\tclrBackgroundDark,\n\tclrBackgroundDefaul"
  },
  {
    "path": "src/utils/browser-detection.ts",
    "chars": 7856,
    "preview": "/**\n * Utilities to detect the browser and get information on the current environment\n * Based on https://github.com/goo"
  },
  {
    "path": "src/utils/constants/library.ts",
    "chars": 5952,
    "preview": "import {\n\tBaseItemKind,\n\tCollectionType,\n\tItemSortBy,\n} from \"@jellyfin/sdk/lib/generated-client\";\n\nexport const AVAILAB"
  },
  {
    "path": "src/utils/date/formateDate.ts",
    "chars": 284,
    "preview": "/**\n * @format\n * @param {string} date - Date from server\n * @returns {string} Formated Date\n */\n\nexport const formateDa"
  },
  {
    "path": "src/utils/date/time.ts",
    "chars": 3717,
    "preview": "/**\n * @format\n * @param {number} ticks - C# ticks of a particular item\n * @return {number} Converted ticks to Milliseco"
  },
  {
    "path": "src/utils/hooks/useDebounce.ts",
    "chars": 852,
    "preview": "import { useEffect, useState } from \"react\";\n\n// see https://github.com/tannerlinsley/react-query/issues/293\n// see http"
  },
  {
    "path": "src/utils/hooks/useDefaultSeason.ts",
    "chars": 6607,
    "preview": "import type { BaseItemDtoQueryResult } from \"@jellyfin/sdk/lib/generated-client\";\nimport type { UseQueryResult, useQuery"
  },
  {
    "path": "src/utils/hooks/useInterval.tsx",
    "chars": 599,
    "preview": "import { useEffect, useRef } from \"react\";\n\nexport default function useInterval(\n\tcallback: () => void,\n\tdelay: number |"
  },
  {
    "path": "src/utils/hooks/useKeyPress.tsx",
    "chars": 957,
    "preview": "import { useEffect, useState } from \"react\";\n\nconst useKeyPress = (targetKey: string) => {\n\t// State for keeping track o"
  },
  {
    "path": "src/utils/hooks/useParallax.tsx",
    "chars": 215,
    "preview": "import { type MotionValue, useTransform } from \"motion/react\";\n\nexport default function useParallax(\n\tvalue: MotionValue"
  },
  {
    "path": "src/utils/methods/getImageUrlsApi.ts",
    "chars": 225,
    "preview": "import type { Api } from \"@jellyfin/sdk\";\nimport { ImageUrlsApi } from \"@jellyfin/sdk/lib/utils/api/image-urls-api\";\n\nco"
  },
  {
    "path": "src/utils/methods/getSubtitles.ts",
    "chars": 874,
    "preview": "import type { MediaStream } from \"@jellyfin/sdk/lib/generated-client\";\nimport type subtitlePlaybackInfo from \"../types/s"
  },
  {
    "path": "src/utils/methods/playback.ts",
    "chars": 6519,
    "preview": "import type { Api } from \"@jellyfin/sdk\";\nimport {\n\ttype BaseItemDto,\n\tBaseItemKind,\n\tItemFields,\n\tItemFilter,\n\tLocation"
  },
  {
    "path": "src/utils/methods/ticksDisplay.ts",
    "chars": 873,
    "preview": "/**\n * Formats a given ticks value into a human-readable time string.\n * @param ticks - The ticks value to be formatted,"
  },
  {
    "path": "src/utils/misc/debug.ts",
    "chars": 681,
    "preview": "function getVideoDebugInfo(videoElement: HTMLVideoElement) {\n\tconst quality = videoElement.getVideoPlaybackQuality();\n\n\t"
  },
  {
    "path": "src/utils/misc/konami.ts",
    "chars": 459,
    "preview": "import { useState } from \"react\";\nimport useKonami from \"react-use-konami\";\n\nexport const useKonamiEasterEgg = () => {\n\t"
  }
]

// ... and 66 more files (download for full content)

About this extraction

This page contains the full source code of the prayag17/JellyPlayer GitHub repository, extracted and formatted as plain text for AI agents and large language models (LLMs). The extraction includes 266 files (1.2 MB), approximately 335.0k tokens, and a symbol index with 210 extracted functions, classes, methods, constants, and types. Use this with OpenClaw, Claude, ChatGPT, Cursor, Windsurf, or any other AI tool that accepts text input. You can copy the full output to your clipboard or download it as a .txt file.

Extracted by GitExtract — free GitHub repo to text converter for AI. Built by Nikandr Surkov.

Copied to clipboard!