mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-15 08:52:59 +01:00
Compare commits
24 Commits
renovate/r
...
fix/downlo
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
c9b1f5e47b | ||
|
|
c4a5c05949 | ||
|
|
9b07d39d4d | ||
|
|
04cb88347a | ||
|
|
6ddcc7be40 | ||
|
|
95b5dab293 | ||
|
|
2df160adb7 | ||
|
|
8d54d65b63 | ||
|
|
95f4d15e98 | ||
|
|
77156630d6 | ||
|
|
680f930a47 | ||
|
|
ed8744389b | ||
|
|
b879026745 | ||
|
|
28a75a2b8c | ||
|
|
aa0eb0a655 | ||
|
|
286a3cad47 | ||
|
|
97b6a912e0 | ||
|
|
cc0007926d | ||
|
|
9e29305e28 | ||
|
|
ae9c05637b | ||
|
|
f820bedf6e | ||
|
|
47c5d61f28 | ||
|
|
517bc7bbb5 | ||
|
|
b256e99fc8 |
2
.github/copilot-instructions.md
vendored
2
.github/copilot-instructions.md
vendored
@@ -42,7 +42,7 @@ and provides seamless media streaming with offline capabilities and Chromecast s
|
|||||||
|
|
||||||
## Coding Standards
|
## Coding Standards
|
||||||
|
|
||||||
- Use TypeScript for ALL files (no .js files)
|
- Use TypeScript for ALL files (no .js files). Tooling-required exceptions: `babel.config.js`, `metro.config.js`, `react-native.config.js`, `tailwind.config.js` (their loaders cannot parse TypeScript)
|
||||||
- Use descriptive English names for variables, functions, and components
|
- Use descriptive English names for variables, functions, and components
|
||||||
- Prefer functional React components with hooks
|
- Prefer functional React components with hooks
|
||||||
- Use Jotai atoms for global state management
|
- Use Jotai atoms for global state management
|
||||||
|
|||||||
390
.github/workflows/build-apps.yml
vendored
390
.github/workflows/build-apps.yml
vendored
@@ -11,7 +11,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [develop, master]
|
branches: [develop, master]
|
||||||
|
|
||||||
# Exposed to `expo prebuild` (app.config.js → extra.build) so Settings can show the
|
# Exposed to `expo prebuild` (app.config.ts → extra.build) so Settings can show the
|
||||||
# branch + commit + Actions run a CI build was made from. EAS cloud builds use
|
# branch + commit + Actions run a CI build was made from. EAS cloud builds use
|
||||||
# EAS_BUILD_* instead. The run number maps a sideloaded build back to its Actions
|
# EAS_BUILD_* instead. The run number maps a sideloaded build back to its Actions
|
||||||
# run (artifacts + logs) without needing Expo access.
|
# run (artifacts + logs) without needing Expo access.
|
||||||
@@ -30,69 +30,71 @@ jobs:
|
|||||||
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 🗑️ Free Disk Space
|
- parallel:
|
||||||
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
- name: 🗑️ Free Disk Space
|
||||||
with:
|
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
||||||
tool-cache: false
|
with:
|
||||||
mandb: true
|
tool-cache: false
|
||||||
android: false
|
mandb: true
|
||||||
dotnet: true
|
android: false
|
||||||
haskell: true
|
dotnet: true
|
||||||
large-packages: false
|
haskell: true
|
||||||
docker-images: true
|
large-packages: false
|
||||||
swap-storage: false
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- name: 📥 Checkout code
|
- name: 📥 Checkout code
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: ☕ Set up JDK 17
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
# ubuntu-26.04 defaults to JDK 25, which breaks the RN/AGP native build
|
||||||
with:
|
# (Kotlin falls back to JVM_23, the foojay toolchain + CMake configure
|
||||||
path: ~/.bun/install/cache
|
# fail). Pin Temurin 17 for a deterministic Android build.
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
|
||||||
restore-keys: |
|
with:
|
||||||
${{ runner.os }}-${{ runner.arch }}-bun-
|
distribution: temurin
|
||||||
|
java-version: "17"
|
||||||
|
|
||||||
|
- parallel:
|
||||||
|
- name: 💾 Cache Bun dependencies
|
||||||
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
|
with:
|
||||||
|
path: ~/.bun/install/cache
|
||||||
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ runner.arch }}-bun-
|
||||||
|
|
||||||
|
- name: 💾 Cache Gradle global
|
||||||
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches/modules-2
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: ${{ runner.os }}-${{ runner.arch }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ runner.arch }}-gradle-
|
||||||
|
|
||||||
- name: 📦 Install dependencies and reload submodules
|
- name: 📦 Install dependencies and reload submodules
|
||||||
run: |
|
run: |
|
||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
bun run submodule-reload
|
bun run submodule-reload
|
||||||
|
|
||||||
- name: ☕ Set up JDK 17
|
|
||||||
# ubuntu-26.04 defaults to JDK 25, which breaks the RN/AGP native build
|
|
||||||
# (Kotlin falls back to JVM_23, the foojay toolchain + CMake configure
|
|
||||||
# fail). Pin Temurin 17 for a deterministic Android build.
|
|
||||||
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
|
|
||||||
- name: 💾 Cache Gradle global
|
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches/modules-2
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ runner.arch }}-gradle-
|
|
||||||
|
|
||||||
- name: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild
|
run: bun run prebuild
|
||||||
|
|
||||||
- name: 💾 Cache project Gradle (.gradle)
|
- name: 💾 Cache project Gradle (.gradle)
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: android/.gradle
|
path: android/.gradle
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-android-gradle-develop-${{ hashFiles('android/**/build.gradle', 'android/gradle/wrapper/gradle-wrapper.properties') }}
|
key: ${{ runner.os }}-${{ runner.arch }}-android-gradle-develop-${{ hashFiles('android/**/build.gradle', 'android/gradle/wrapper/gradle-wrapper.properties') }}
|
||||||
@@ -130,69 +132,71 @@ jobs:
|
|||||||
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 🗑️ Free Disk Space
|
- parallel:
|
||||||
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
- name: 🗑️ Free Disk Space
|
||||||
with:
|
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
||||||
tool-cache: false
|
with:
|
||||||
mandb: true
|
tool-cache: false
|
||||||
android: false
|
mandb: true
|
||||||
dotnet: true
|
android: false
|
||||||
haskell: true
|
dotnet: true
|
||||||
large-packages: false
|
haskell: true
|
||||||
docker-images: true
|
large-packages: false
|
||||||
swap-storage: false
|
docker-images: true
|
||||||
|
swap-storage: false
|
||||||
|
|
||||||
- name: 📥 Checkout code
|
- name: 📥 Checkout code
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
show-progress: false
|
show-progress: false
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: ☕ Set up JDK 17
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
# ubuntu-26.04 defaults to JDK 25, which breaks the RN/AGP native build
|
||||||
with:
|
# (Kotlin falls back to JVM_23, the foojay toolchain + CMake configure
|
||||||
path: ~/.bun/install/cache
|
# fail). Pin Temurin 17 for a deterministic Android build.
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
|
||||||
restore-keys: |
|
with:
|
||||||
${{ runner.os }}-${{ runner.arch }}-bun-
|
distribution: temurin
|
||||||
|
java-version: "17"
|
||||||
|
|
||||||
|
- parallel:
|
||||||
|
- name: 💾 Cache Bun dependencies
|
||||||
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
|
with:
|
||||||
|
path: ~/.bun/install/cache
|
||||||
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ runner.arch }}-bun-
|
||||||
|
|
||||||
|
- name: 💾 Cache Gradle global
|
||||||
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches/modules-2
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: ${{ runner.os }}-${{ runner.arch }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ runner.arch }}-gradle-
|
||||||
|
|
||||||
- name: 📦 Install dependencies and reload submodules
|
- name: 📦 Install dependencies and reload submodules
|
||||||
run: |
|
run: |
|
||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
bun run submodule-reload
|
bun run submodule-reload
|
||||||
|
|
||||||
- name: ☕ Set up JDK 17
|
|
||||||
# ubuntu-26.04 defaults to JDK 25, which breaks the RN/AGP native build
|
|
||||||
# (Kotlin falls back to JVM_23, the foojay toolchain + CMake configure
|
|
||||||
# fail). Pin Temurin 17 for a deterministic Android build.
|
|
||||||
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
|
|
||||||
with:
|
|
||||||
distribution: temurin
|
|
||||||
java-version: "17"
|
|
||||||
|
|
||||||
- name: 💾 Cache Gradle global
|
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/.gradle/caches/modules-2
|
|
||||||
~/.gradle/wrapper
|
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
|
|
||||||
restore-keys: |
|
|
||||||
${{ runner.os }}-${{ runner.arch }}-gradle-
|
|
||||||
|
|
||||||
- name: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild:tv
|
run: bun run prebuild:tv
|
||||||
|
|
||||||
- name: 💾 Cache project Gradle (.gradle)
|
- name: 💾 Cache project Gradle (.gradle)
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: android/.gradle
|
path: android/.gradle
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-android-gradle-develop-${{ hashFiles('android/**/build.gradle', 'android/gradle/wrapper/gradle-wrapper.properties') }}
|
key: ${{ runner.os }}-${{ runner.arch }}-android-gradle-develop-${{ hashFiles('android/**/build.gradle', 'android/gradle/wrapper/gradle-wrapper.properties') }}
|
||||||
@@ -229,22 +233,36 @@ jobs:
|
|||||||
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout code
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout code
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
with:
|
||||||
fetch-depth: 0
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
fetch-depth: 0
|
||||||
show-progress: false
|
submodules: recursive
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
|
- name: 🔧 Setup Xcode
|
||||||
|
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
||||||
|
with:
|
||||||
|
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
||||||
|
xcode-version: "26.6"
|
||||||
|
|
||||||
|
- name: 🏗️ Setup EAS
|
||||||
|
uses: expo/expo-github-action@eab7a230208c952974db8c3245cfd78402c7b385 # main
|
||||||
|
with:
|
||||||
|
eas-version: latest
|
||||||
|
token: ${{ secrets.EXPO_TOKEN }}
|
||||||
|
eas-cache: true
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
@@ -259,19 +277,6 @@ jobs:
|
|||||||
- name: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild
|
run: bun run prebuild
|
||||||
|
|
||||||
- name: 🔧 Setup Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
|
||||||
with:
|
|
||||||
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
|
||||||
xcode-version: "26.5"
|
|
||||||
|
|
||||||
- name: 🏗️ Setup EAS
|
|
||||||
uses: expo/expo-github-action@eab7a230208c952974db8c3245cfd78402c7b385 # main
|
|
||||||
with:
|
|
||||||
eas-version: latest
|
|
||||||
token: ${{ secrets.EXPO_TOKEN }}
|
|
||||||
eas-cache: true
|
|
||||||
|
|
||||||
- name: 🚀 Build iOS app
|
- name: 🚀 Build iOS app
|
||||||
env:
|
env:
|
||||||
EXPO_TV: 0
|
EXPO_TV: 0
|
||||||
@@ -301,22 +306,29 @@ jobs:
|
|||||||
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout code
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout code
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
with:
|
||||||
fetch-depth: 0
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
fetch-depth: 0
|
||||||
show-progress: false
|
submodules: recursive
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
|
- name: 🔧 Setup Xcode
|
||||||
|
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
||||||
|
with:
|
||||||
|
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
||||||
|
xcode-version: "26.6"
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
@@ -331,12 +343,6 @@ jobs:
|
|||||||
- name: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild
|
run: bun run prebuild
|
||||||
|
|
||||||
- name: 🔧 Setup Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
|
||||||
with:
|
|
||||||
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
|
||||||
xcode-version: "26.5"
|
|
||||||
|
|
||||||
- name: 🚀 Build iOS app
|
- name: 🚀 Build iOS app
|
||||||
env:
|
env:
|
||||||
EXPO_TV: 0
|
EXPO_TV: 0
|
||||||
@@ -368,22 +374,36 @@ jobs:
|
|||||||
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout code
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout code
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
with:
|
||||||
fetch-depth: 0
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
fetch-depth: 0
|
||||||
show-progress: false
|
submodules: recursive
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
|
- name: 🔧 Setup Xcode
|
||||||
|
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
||||||
|
with:
|
||||||
|
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
||||||
|
xcode-version: "26.6"
|
||||||
|
|
||||||
|
- name: 🏗️ Setup EAS
|
||||||
|
uses: expo/expo-github-action@eab7a230208c952974db8c3245cfd78402c7b385 # main
|
||||||
|
with:
|
||||||
|
eas-version: latest
|
||||||
|
token: ${{ secrets.EXPO_TOKEN }}
|
||||||
|
eas-cache: true
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
@@ -398,19 +418,6 @@ jobs:
|
|||||||
- name: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild:tv
|
run: bun run prebuild:tv
|
||||||
|
|
||||||
- name: 🔧 Setup Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
|
||||||
with:
|
|
||||||
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
|
||||||
xcode-version: "26.5"
|
|
||||||
|
|
||||||
- name: 🏗️ Setup EAS
|
|
||||||
uses: expo/expo-github-action@eab7a230208c952974db8c3245cfd78402c7b385 # main
|
|
||||||
with:
|
|
||||||
eas-version: latest
|
|
||||||
token: ${{ secrets.EXPO_TOKEN }}
|
|
||||||
eas-cache: true
|
|
||||||
|
|
||||||
- name: 🚀 Build iOS app
|
- name: 🚀 Build iOS app
|
||||||
env:
|
env:
|
||||||
EXPO_TV: 1
|
EXPO_TV: 1
|
||||||
@@ -438,22 +445,29 @@ jobs:
|
|||||||
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
actions: write # dispatch artifact-comment.yml to refresh the PR comment
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout code
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout code
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
with:
|
||||||
fetch-depth: 0
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
fetch-depth: 0
|
||||||
show-progress: false
|
submodules: recursive
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
|
- name: 🔧 Setup Xcode
|
||||||
|
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
||||||
|
with:
|
||||||
|
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
||||||
|
xcode-version: "26.6"
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
@@ -468,12 +482,6 @@ jobs:
|
|||||||
- name: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild:tv
|
run: bun run prebuild:tv
|
||||||
|
|
||||||
- name: 🔧 Setup Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
|
||||||
with:
|
|
||||||
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
|
||||||
xcode-version: "26.5"
|
|
||||||
|
|
||||||
- name: 🚀 Build iOS app
|
- name: 🚀 Build iOS app
|
||||||
env:
|
env:
|
||||||
EXPO_TV: 1
|
EXPO_TV: 1
|
||||||
|
|||||||
26
.github/workflows/check-lockfile.yml
vendored
26
.github/workflows/check-lockfile.yml
vendored
@@ -18,22 +18,22 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout repository
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout repository
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
with:
|
||||||
show-progress: false
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
submodules: recursive
|
show-progress: false
|
||||||
fetch-depth: 0
|
submodules: recursive
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: |
|
path: |
|
||||||
~/.bun/install/cache
|
~/.bun/install/cache
|
||||||
|
|||||||
17
.github/workflows/detect-duplicate.yml
vendored
17
.github/workflows/detect-duplicate.yml
vendored
@@ -20,17 +20,18 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout repository
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout repository
|
||||||
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: 🔍 Detect duplicate issues
|
- name: 🔍 Detect duplicate issues
|
||||||
run: bun scripts/detect-duplicate-issue.mjs
|
run: bun scripts/detect-duplicate-issue.ts
|
||||||
env:
|
env:
|
||||||
GH_TOKEN: ${{ github.token }}
|
GH_TOKEN: ${{ github.token }}
|
||||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||||
|
|||||||
98
.github/workflows/linting.yml
vendored
98
.github/workflows/linting.yml
vendored
@@ -2,7 +2,7 @@ name: 🚦 Security & Quality Gate
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, edited, synchronize, reopened]
|
types: [opened, synchronize, reopened]
|
||||||
branches: [develop, master]
|
branches: [develop, master]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
@@ -11,39 +11,11 @@ on:
|
|||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate_pr_title:
|
|
||||||
name: "📝 Validate PR Title"
|
|
||||||
if: github.event_name == 'pull_request'
|
|
||||||
runs-on: ubuntu-26.04
|
|
||||||
permissions:
|
|
||||||
pull-requests: write
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
|
||||||
id: lint_pr_title
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
|
|
||||||
- uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
|
|
||||||
if: always() && (steps.lint_pr_title.outputs.error_message != null)
|
|
||||||
with:
|
|
||||||
header: pr-title-lint-error
|
|
||||||
message: |
|
|
||||||
Hey there and thank you for opening this pull request! 👋🏼
|
|
||||||
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
|
|
||||||
|
|
||||||
**Error details:**
|
|
||||||
```
|
|
||||||
${{ steps.lint_pr_title.outputs.error_message }}
|
|
||||||
```
|
|
||||||
|
|
||||||
- if: ${{ steps.lint_pr_title.outputs.error_message == null }}
|
|
||||||
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
|
|
||||||
with:
|
|
||||||
header: pr-title-lint-error
|
|
||||||
delete: true
|
|
||||||
|
|
||||||
dependency-review:
|
dependency-review:
|
||||||
name: 🔍 Vulnerable Dependencies
|
name: 🔍 Vulnerable Dependencies
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-26.04
|
||||||
@@ -67,18 +39,26 @@ jobs:
|
|||||||
name: 🚑 Expo Doctor Check
|
name: 🚑 Expo Doctor Check
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-26.04
|
||||||
steps:
|
steps:
|
||||||
- name: 🛒 Checkout repository
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 🛒 Checkout repository
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
with:
|
||||||
submodules: recursive
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
fetch-depth: 0
|
submodules: recursive
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
|
with:
|
||||||
|
# renovate: datasource=npm depName=bun
|
||||||
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
|
- name: 💾 Cache Bun dependencies
|
||||||
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
path: ~/.bun/install/cache
|
||||||
bun-version: "1.3.14"
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ runner.arch }}-bun-
|
||||||
|
|
||||||
- name: 📦 Install dependencies (bun)
|
- name: 📦 Install dependencies (bun)
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
@@ -103,24 +83,26 @@ jobs:
|
|||||||
- "i18n:check"
|
- "i18n:check"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "📥 Checkout PR code"
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: "📥 Checkout PR code"
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
with:
|
||||||
submodules: recursive
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
fetch-depth: 0
|
submodules: recursive
|
||||||
|
|
||||||
- name: "🟢 Setup Node.js"
|
- name: "🍞 Setup Bun"
|
||||||
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=node-version depName=node versioning=node
|
# renovate: datasource=npm depName=bun
|
||||||
node-version: "24.17.0"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: "🍞 Setup Bun"
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
path: ~/.bun/install/cache
|
||||||
bun-version: "1.3.14"
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-${{ runner.arch }}-bun-
|
||||||
|
|
||||||
- name: "📦 Install dependencies"
|
- name: "📦 Install dependencies"
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|||||||
81
.github/workflows/pr-title-comment.yml
vendored
Normal file
81
.github/workflows/pr-title-comment.yml
vendored
Normal file
@@ -0,0 +1,81 @@
|
|||||||
|
name: 📝 PR Title Comment
|
||||||
|
|
||||||
|
# Posts / updates / deletes the PR-title lint sticky comment with a write token,
|
||||||
|
# so it works on FORK PRs too (the pull_request-triggered pr-title.yml only has a
|
||||||
|
# read-only token on forks). workflow_run runs from the base branch with the base
|
||||||
|
# repo's token. This is comment-only — the required check stays pr-title.yml.
|
||||||
|
on:
|
||||||
|
workflow_run:
|
||||||
|
workflows: ["📝 PR Title"]
|
||||||
|
types: [completed]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
actions: read # download the artifact from the triggering run
|
||||||
|
pull-requests: write # post/update/delete the sticky comment
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: pr-title-comment-${{ github.event.workflow_run.id }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
comment:
|
||||||
|
# Only run when the lint run actually produced a result artifact: a run
|
||||||
|
# cancelled by concurrency (rapid pushes to the same PR) completes with
|
||||||
|
# conclusion "cancelled" before uploading it, and would fail the download.
|
||||||
|
if: >
|
||||||
|
github.event.workflow_run.event == 'pull_request' &&
|
||||||
|
contains(fromJSON('["success", "failure"]'), github.event.workflow_run.conclusion)
|
||||||
|
runs-on: ubuntu-26.04
|
||||||
|
steps:
|
||||||
|
- name: ⬇️ Download lint result
|
||||||
|
env:
|
||||||
|
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
run: |
|
||||||
|
gh run download "${{ github.event.workflow_run.id }}" \
|
||||||
|
--repo "${{ github.repository }}" \
|
||||||
|
--name pr-title-result \
|
||||||
|
--dir result
|
||||||
|
|
||||||
|
- name: 🔎 Read result
|
||||||
|
id: result
|
||||||
|
run: |
|
||||||
|
echo "number=$(cat result/number)" >> "$GITHUB_OUTPUT"
|
||||||
|
if [ -s result/error ]; then
|
||||||
|
echo "has_error=true" >> "$GITHUB_OUTPUT"
|
||||||
|
else
|
||||||
|
echo "has_error=false" >> "$GITHUB_OUTPUT"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: 📥 Load error message
|
||||||
|
if: steps.result.outputs.has_error == 'true'
|
||||||
|
run: |
|
||||||
|
{
|
||||||
|
echo "LINT_ERROR<<PR_TITLE_ERR_EOF"
|
||||||
|
cat result/error
|
||||||
|
echo
|
||||||
|
echo "PR_TITLE_ERR_EOF"
|
||||||
|
} >> "$GITHUB_ENV"
|
||||||
|
|
||||||
|
- name: 💬 Post title error
|
||||||
|
if: steps.result.outputs.has_error == 'true'
|
||||||
|
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
|
||||||
|
with:
|
||||||
|
number: ${{ steps.result.outputs.number }}
|
||||||
|
header: pr-title-lint-error
|
||||||
|
message: |
|
||||||
|
Hey there and thank you for opening this pull request! 👋🏼
|
||||||
|
We require pull request titles to follow the [Conventional Commits specification](https://www.conventionalcommits.org/en/v1.0.0/).
|
||||||
|
|
||||||
|
**Error details:**
|
||||||
|
```
|
||||||
|
${{ env.LINT_ERROR }}
|
||||||
|
```
|
||||||
|
|
||||||
|
- name: 🧹 Clear title error
|
||||||
|
if: steps.result.outputs.has_error == 'false'
|
||||||
|
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
|
||||||
|
with:
|
||||||
|
number: ${{ steps.result.outputs.number }}
|
||||||
|
header: pr-title-lint-error
|
||||||
|
delete: true
|
||||||
42
.github/workflows/pr-title.yml
vendored
Normal file
42
.github/workflows/pr-title.yml
vendored
Normal file
@@ -0,0 +1,42 @@
|
|||||||
|
name: 📝 PR Title
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, edited, synchronize, reopened]
|
||||||
|
branches: [develop, master]
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
validate_pr_title:
|
||||||
|
name: "📝 Validate PR Title"
|
||||||
|
runs-on: ubuntu-26.04
|
||||||
|
steps:
|
||||||
|
- uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
||||||
|
id: lint_pr_title
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
# Fork PRs only get a read-only GITHUB_TOKEN here, so the sticky comment
|
||||||
|
# is posted from the privileged pr-title-comment.yml (workflow_run). Hand
|
||||||
|
# off the result (PR number + lint error) as an artifact for it to read.
|
||||||
|
- if: always()
|
||||||
|
env:
|
||||||
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
LINT_ERROR: ${{ steps.lint_pr_title.outputs.error_message }}
|
||||||
|
run: |
|
||||||
|
mkdir -p pr-title-result
|
||||||
|
printf '%s' "$PR_NUMBER" > pr-title-result/number
|
||||||
|
printf '%s' "$LINT_ERROR" > pr-title-result/error
|
||||||
|
|
||||||
|
- if: always()
|
||||||
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
||||||
|
with:
|
||||||
|
name: pr-title-result
|
||||||
|
path: pr-title-result/
|
||||||
|
retention-days: 1
|
||||||
41
.github/workflows/release.yml
vendored
41
.github/workflows/release.yml
vendored
@@ -13,6 +13,8 @@ name: 🚀 Release (EAS build + submit)
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: release-${{ github.ref }}
|
group: release-${{ github.ref }}
|
||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
# Queue successive releases in order instead of dropping the extra pending run.
|
||||||
|
queue: max
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@@ -63,21 +65,29 @@ jobs:
|
|||||||
artifact_name: streamyfin-android-tv-apk
|
artifact_name: streamyfin-android-tv-apk
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout code
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout code
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
fetch-depth: 0
|
with:
|
||||||
submodules: recursive
|
fetch-depth: 0
|
||||||
show-progress: false
|
submodules: recursive
|
||||||
|
show-progress: false
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
|
- name: 🏗️ Setup EAS
|
||||||
|
uses: expo/expo-github-action@eab7a230208c952974db8c3245cfd78402c7b385 # main
|
||||||
|
with:
|
||||||
|
eas-version: latest
|
||||||
|
token: ${{ secrets.EXPO_TOKEN }}
|
||||||
|
eas-cache: true
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
with:
|
with:
|
||||||
path: ~/.bun/install/cache
|
path: ~/.bun/install/cache
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
@@ -89,13 +99,6 @@ jobs:
|
|||||||
bun install --frozen-lockfile
|
bun install --frozen-lockfile
|
||||||
bun run submodule-reload
|
bun run submodule-reload
|
||||||
|
|
||||||
- name: 🏗️ Setup EAS
|
|
||||||
uses: expo/expo-github-action@eab7a230208c952974db8c3245cfd78402c7b385 # main
|
|
||||||
with:
|
|
||||||
eas-version: latest
|
|
||||||
token: ${{ secrets.EXPO_TOKEN }}
|
|
||||||
eas-cache: true
|
|
||||||
|
|
||||||
# tvOS uses credentialsSource: local — restore the gitignored
|
# tvOS uses credentialsSource: local — restore the gitignored
|
||||||
# credentials.json + cert + provisioning profiles from secrets.
|
# credentials.json + cert + provisioning profiles from secrets.
|
||||||
- name: 🔐 Restore tvOS signing credentials
|
- name: 🔐 Restore tvOS signing credentials
|
||||||
|
|||||||
25
.github/workflows/update-issue-form.yml
vendored
25
.github/workflows/update-issue-form.yml
vendored
@@ -25,19 +25,20 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: 📥 Checkout repository
|
- parallel:
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
- name: 📥 Checkout repository
|
||||||
with:
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
# On `release` events GITHUB_SHA is the tagged commit — without this the
|
with:
|
||||||
# script would regenerate the form from the tag's (stale) copy and the bot
|
# On `release` events GITHUB_SHA is the tagged commit — without this the
|
||||||
# PR would revert any form edits made on develop since that release.
|
# script would regenerate the form from the tag's (stale) copy and the bot
|
||||||
ref: develop
|
# PR would revert any form edits made on develop since that release.
|
||||||
|
ref: develop
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
- name: 🍞 Setup Bun
|
||||||
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
with:
|
with:
|
||||||
# renovate: datasource=npm depName=bun
|
# renovate: datasource=npm depName=bun
|
||||||
bun-version: "1.3.14"
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: 🔢 Populate version dropdown from GitHub releases
|
- name: 🔢 Populate version dropdown from GitHub releases
|
||||||
id: populate
|
id: populate
|
||||||
|
|||||||
4
.gitignore
vendored
4
.gitignore
vendored
@@ -12,10 +12,6 @@ web-build/
|
|||||||
# Platform-specific Build Directories
|
# Platform-specific Build Directories
|
||||||
/ios
|
/ios
|
||||||
/android
|
/android
|
||||||
/iostv
|
|
||||||
/iosmobile
|
|
||||||
/androidmobile
|
|
||||||
/androidtv
|
|
||||||
|
|
||||||
# Gradle caches (top-level + per-module native projects)
|
# Gradle caches (top-level + per-module native projects)
|
||||||
**/.gradle/
|
**/.gradle/
|
||||||
|
|||||||
@@ -152,7 +152,7 @@ import { apiAtom } from "@/providers/JellyfinProvider";
|
|||||||
|
|
||||||
## Coding Standards
|
## Coding Standards
|
||||||
|
|
||||||
- Use TypeScript for all files (no .js)
|
- Use TypeScript for all files (no .js). Tooling-required exceptions: `babel.config.js`, `metro.config.js`, `react-native.config.js`, `tailwind.config.js` (their loaders cannot parse TypeScript)
|
||||||
- Use functional React components with hooks
|
- Use functional React components with hooks
|
||||||
- Use Jotai atoms for global state, React Query for server state
|
- Use Jotai atoms for global state, React Query for server state
|
||||||
- Follow BiomeJS formatting rules (2-space indent, semicolons, LF line endings)
|
- Follow BiomeJS formatting rules (2-space indent, semicolons, LF line endings)
|
||||||
|
|||||||
@@ -73,7 +73,7 @@ Thanks to [@Alexk2309](https://github.com/Alexk2309) for the hard work building
|
|||||||
|
|
||||||
## 🛣️ Roadmap
|
## 🛣️ Roadmap
|
||||||
|
|
||||||
Check out our [Roadmap](https://github.com/users/fredrikburmester/projects/5) To see what we're working on next, we are always open to feedback and suggestions. Please let us know if you have any ideas or feature requests.
|
Check out our [Roadmap](https://github.com/orgs/streamyfin/projects/3/views/1) to see what we're working on next, we are always open to feedback and suggestions. Please let us know if you have any ideas or feature requests.
|
||||||
|
|
||||||
## 📥 Download Streamyfin
|
## 📥 Download Streamyfin
|
||||||
|
|
||||||
|
|||||||
@@ -1,9 +1,13 @@
|
|||||||
const { execFileSync } = require("node:child_process");
|
// Registers the tsx require hook so the TypeScript config plugins referenced
|
||||||
|
// from app.json ("./plugins/*.ts") can be loaded by Node during config evaluation.
|
||||||
|
import "tsx/cjs";
|
||||||
|
import { execFileSync } from "node:child_process";
|
||||||
|
import type { ConfigContext, ExpoConfig } from "expo/config";
|
||||||
|
|
||||||
// Build metadata, injected into `extra.build` and read at runtime via
|
// Build metadata, injected into `extra.build` and read at runtime via
|
||||||
// expo-constants (see utils/version.ts). Sources in priority order:
|
// expo-constants (see utils/version.ts). Sources in priority order:
|
||||||
// EAS cloud build → GitHub Actions → explicit EXPO_PUBLIC_* → local git → null.
|
// EAS cloud build → GitHub Actions → explicit EXPO_PUBLIC_* → local git → null.
|
||||||
const git = (args) => {
|
const git = (args: string[]): string | null => {
|
||||||
try {
|
try {
|
||||||
return execFileSync("git", args, { stdio: ["ignore", "pipe", "ignore"] })
|
return execFileSync("git", args, { stdio: ["ignore", "pipe", "ignore"] })
|
||||||
.toString()
|
.toString()
|
||||||
@@ -42,16 +46,16 @@ const buildMeta = {
|
|||||||
builtAt: new Date().toISOString(),
|
builtAt: new Date().toISOString(),
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = ({ config }) => {
|
export default ({ config }: ConfigContext): ExpoConfig => {
|
||||||
if (process.env.EXPO_TV !== "1") {
|
if (process.env.EXPO_TV !== "1") {
|
||||||
config.plugins.push("expo-background-task");
|
config.plugins?.push("expo-background-task");
|
||||||
|
|
||||||
config.plugins.push([
|
config.plugins?.push([
|
||||||
"react-native-google-cast",
|
"react-native-google-cast",
|
||||||
{ useDefaultExpandedMediaControls: true },
|
{ useDefaultExpandedMediaControls: true },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
config.plugins.push([
|
config.plugins?.push([
|
||||||
"expo-camera",
|
"expo-camera",
|
||||||
{
|
{
|
||||||
cameraPermission:
|
cameraPermission:
|
||||||
@@ -61,7 +65,7 @@ module.exports = ({ config }) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only override googleServicesFile if env var is set
|
// Only override googleServicesFile if env var is set
|
||||||
const androidConfig = {};
|
const androidConfig: { googleServicesFile?: string } = {};
|
||||||
if (process.env.GOOGLE_SERVICES_JSON) {
|
if (process.env.GOOGLE_SERVICES_JSON) {
|
||||||
androidConfig.googleServicesFile = process.env.GOOGLE_SERVICES_JSON;
|
androidConfig.googleServicesFile = process.env.GOOGLE_SERVICES_JSON;
|
||||||
}
|
}
|
||||||
@@ -71,5 +75,5 @@ module.exports = ({ config }) => {
|
|||||||
return {
|
return {
|
||||||
...(Object.keys(androidConfig).length > 0 && { android: androidConfig }),
|
...(Object.keys(androidConfig).length > 0 && { android: androidConfig }),
|
||||||
...config,
|
...config,
|
||||||
};
|
} as ExpoConfig;
|
||||||
};
|
};
|
||||||
24
app.json
24
app.json
@@ -71,8 +71,8 @@
|
|||||||
],
|
],
|
||||||
"expo-router",
|
"expo-router",
|
||||||
"expo-font",
|
"expo-font",
|
||||||
"./plugins/withExcludeMedia3Dash.js",
|
"./plugins/withExcludeMedia3Dash.ts",
|
||||||
"./plugins/withTVUserManagement.js",
|
"./plugins/withTVUserManagement.ts",
|
||||||
[
|
[
|
||||||
"expo-build-properties",
|
"expo-build-properties",
|
||||||
{
|
{
|
||||||
@@ -134,17 +134,17 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"expo-web-browser",
|
"expo-web-browser",
|
||||||
["./plugins/with-runtime-framework-headers.js"],
|
["./plugins/with-runtime-framework-headers.ts"],
|
||||||
["./plugins/withChangeNativeAndroidTextToWhite.js"],
|
["./plugins/withChangeNativeAndroidTextToWhite.ts"],
|
||||||
["./plugins/withAndroidAlertColors.js"],
|
["./plugins/withAndroidAlertColors.ts"],
|
||||||
["./plugins/withAndroidManifest.js"],
|
["./plugins/withAndroidManifest.ts"],
|
||||||
["./plugins/withTrustLocalCerts.js"],
|
["./plugins/withTrustLocalCerts.ts"],
|
||||||
["./plugins/withGradleProperties.js"],
|
["./plugins/withGradleProperties.ts"],
|
||||||
["./plugins/withTVOSAppIcon.js"],
|
["./plugins/withTVOSAppIcon.ts"],
|
||||||
["./plugins/withTVOSTopShelf.js"],
|
["./plugins/withTVOSTopShelf.ts"],
|
||||||
["./plugins/withTVXcodeEnv.js"],
|
["./plugins/withTVXcodeEnv.ts"],
|
||||||
[
|
[
|
||||||
"./plugins/withGitPod.js",
|
"./plugins/withGitPod.ts",
|
||||||
{
|
{
|
||||||
"podName": "MPVKit",
|
"podName": "MPVKit",
|
||||||
"podspecUrl": "https://raw.githubusercontent.com/mpv-ios/MPVKit/0.41.0-av/MPVKit.podspec"
|
"podspecUrl": "https://raw.githubusercontent.com/mpv-ios/MPVKit/0.41.0-av/MPVKit.podspec"
|
||||||
|
|||||||
@@ -12,11 +12,16 @@ import {
|
|||||||
import { FlashList } from "@shopify/flash-list";
|
import { FlashList } from "@shopify/flash-list";
|
||||||
import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
|
import { useInfiniteQuery, useQuery } from "@tanstack/react-query";
|
||||||
import { Image } from "expo-image";
|
import { Image } from "expo-image";
|
||||||
import { useLocalSearchParams, useNavigation } from "expo-router";
|
import {
|
||||||
|
useFocusEffect,
|
||||||
|
useLocalSearchParams,
|
||||||
|
useNavigation,
|
||||||
|
} from "expo-router";
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import React, { useCallback, useEffect, useMemo } from "react";
|
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
|
BackHandler,
|
||||||
FlatList,
|
FlatList,
|
||||||
Platform,
|
Platform,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
@@ -80,8 +85,9 @@ const Page = () => {
|
|||||||
sortBy?: string;
|
sortBy?: string;
|
||||||
sortOrder?: string;
|
sortOrder?: string;
|
||||||
filterBy?: string;
|
filterBy?: string;
|
||||||
|
fromSeeAll?: string;
|
||||||
};
|
};
|
||||||
const { libraryId } = searchParams;
|
const { libraryId, fromSeeAll } = searchParams;
|
||||||
|
|
||||||
const typography = useScaledTVTypography();
|
const typography = useScaledTVTypography();
|
||||||
const posterSizes = useScaledTVPosterSizes();
|
const posterSizes = useScaledTVPosterSizes();
|
||||||
@@ -112,6 +118,22 @@ const Page = () => {
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { showOptions } = useTVOptionModal();
|
const { showOptions } = useTVOptionModal();
|
||||||
|
|
||||||
|
// When this library detail was opened from the home "See All" button, its
|
||||||
|
// libraries stack is just [detail], so the default TV Back would exit to home.
|
||||||
|
// Intercept Back (scoped to while this screen is focused via useFocusEffect) and
|
||||||
|
// route to the library list instead, so the user can switch libraries. Normal
|
||||||
|
// entries from the list keep their native pop-to-list behavior.
|
||||||
|
useFocusEffect(
|
||||||
|
useCallback(() => {
|
||||||
|
if (!Platform.isTV || fromSeeAll !== "true") return;
|
||||||
|
const sub = BackHandler.addEventListener("hardwareBackPress", () => {
|
||||||
|
router.replace("/(auth)/(tabs)/(libraries)");
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
return () => sub.remove();
|
||||||
|
}, [fromSeeAll, router]),
|
||||||
|
);
|
||||||
const { showItemActions } = useTVItemActionModal();
|
const { showItemActions } = useTVItemActionModal();
|
||||||
|
|
||||||
// TV Filter queries
|
// TV Filter queries
|
||||||
@@ -269,6 +291,23 @@ const Page = () => {
|
|||||||
});
|
});
|
||||||
}, [library]);
|
}, [library]);
|
||||||
|
|
||||||
|
// If this See-All detail was deep-linked on top of the libraries index, collapse
|
||||||
|
// the libraries stack to just this screen. Otherwise the stack is [index, detail],
|
||||||
|
// which the native bottom tab reliably auto-pops back to the index (the detail
|
||||||
|
// "bounces" to the library list ~0.5s after opening). With [detail] alone it stays
|
||||||
|
// put, and Back is handled explicitly by the fromSeeAll interceptor above.
|
||||||
|
const didCollapseRef = useRef(false);
|
||||||
|
useEffect(() => {
|
||||||
|
if (!Platform.isTV || fromSeeAll !== "true" || didCollapseRef.current)
|
||||||
|
return;
|
||||||
|
const state = navigation.getState();
|
||||||
|
if (state?.routes && state.routes.length > 1) {
|
||||||
|
didCollapseRef.current = true;
|
||||||
|
const top = state.routes[state.routes.length - 1];
|
||||||
|
navigation.reset({ index: 0, routes: [top] } as any);
|
||||||
|
}
|
||||||
|
}, [navigation, fromSeeAll]);
|
||||||
|
|
||||||
const fetchItems = useCallback(
|
const fetchItems = useCallback(
|
||||||
async ({
|
async ({
|
||||||
pageParam,
|
pageParam,
|
||||||
|
|||||||
@@ -305,6 +305,8 @@ export default function SearchPage() {
|
|||||||
},
|
},
|
||||||
hideWhenScrolling: false,
|
hideWhenScrolling: false,
|
||||||
autoFocus: false,
|
autoFocus: false,
|
||||||
|
// Android: color of the user-typed text (was dark and unreadable on the dark header)
|
||||||
|
textColor: "#fff",
|
||||||
// Android: placeholder and icon color
|
// Android: placeholder and icon color
|
||||||
hintTextColor: "#fff",
|
hintTextColor: "#fff",
|
||||||
headerIconColor: "#fff",
|
headerIconColor: "#fff",
|
||||||
|
|||||||
@@ -3,16 +3,24 @@ import {
|
|||||||
type NativeBottomTabNavigationEventMap,
|
type NativeBottomTabNavigationEventMap,
|
||||||
type NativeBottomTabNavigationOptions,
|
type NativeBottomTabNavigationOptions,
|
||||||
} from "@bottom-tabs/react-navigation";
|
} from "@bottom-tabs/react-navigation";
|
||||||
import { withLayoutContext } from "expo-router";
|
import { Stack, useSegments, withLayoutContext } from "expo-router";
|
||||||
import type {
|
import type {
|
||||||
ParamListBase,
|
ParamListBase,
|
||||||
TabNavigationState,
|
TabNavigationState,
|
||||||
} from "expo-router/react-navigation";
|
} from "expo-router/react-navigation";
|
||||||
|
import { useCallback, useEffect, useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Platform, View } from "react-native";
|
import { Platform, View } from "react-native";
|
||||||
import { SystemBars } from "react-native-edge-to-edge";
|
import { SystemBars } from "react-native-edge-to-edge";
|
||||||
|
import type { TVNavBarTab } from "@/components/tv/TVNavBar";
|
||||||
|
import { TVNavBar } from "@/components/tv/TVNavBar";
|
||||||
import { Colors } from "@/constants/Colors";
|
import { Colors } from "@/constants/Colors";
|
||||||
import { useTVHomeBackHandler } from "@/hooks/useTVBackHandler";
|
import useRouter from "@/hooks/useAppRouter";
|
||||||
|
import {
|
||||||
|
isTabRoute,
|
||||||
|
useTVHomeBackHandler,
|
||||||
|
useTVTabRootBackHandler,
|
||||||
|
} from "@/hooks/useTVBackHandler";
|
||||||
import { useSettings } from "@/utils/atoms/settings";
|
import { useSettings } from "@/utils/atoms/settings";
|
||||||
import { eventBus } from "@/utils/eventBus";
|
import { eventBus } from "@/utils/eventBus";
|
||||||
|
|
||||||
@@ -33,13 +41,108 @@ export const NativeTabs = withLayoutContext<
|
|||||||
NativeBottomTabNavigationEventMap
|
NativeBottomTabNavigationEventMap
|
||||||
>(Navigator);
|
>(Navigator);
|
||||||
|
|
||||||
|
const IS_ANDROID_TV = Platform.isTV && Platform.OS === "android";
|
||||||
|
|
||||||
|
function TVTabLayout() {
|
||||||
|
const { settings } = useSettings();
|
||||||
|
const { t } = useTranslation();
|
||||||
|
const segments = useSegments();
|
||||||
|
const router = useRouter();
|
||||||
|
|
||||||
|
const currentTab = segments.find(isTabRoute);
|
||||||
|
const lastSegment = segments[segments.length - 1] ?? "";
|
||||||
|
const atTabRoot = isTabRoute(lastSegment) || lastSegment === "index";
|
||||||
|
|
||||||
|
const tabs: TVNavBarTab[] = useMemo(
|
||||||
|
() =>
|
||||||
|
[
|
||||||
|
{ key: "(home)", label: t("tabs.home") },
|
||||||
|
{ key: "(search)", label: t("tabs.search") },
|
||||||
|
{ key: "(favorites)", label: t("tabs.favorites") },
|
||||||
|
!settings?.streamyStatsServerUrl || settings?.hideWatchlistsTab
|
||||||
|
? null
|
||||||
|
: { key: "(watchlists)", label: t("watchlists.title") },
|
||||||
|
{ key: "(libraries)", label: t("tabs.library") },
|
||||||
|
!settings?.showCustomMenuLinks
|
||||||
|
? null
|
||||||
|
: { key: "(custom-links)", label: t("tabs.custom_links") },
|
||||||
|
{ key: "(settings)", label: t("tabs.settings") },
|
||||||
|
].filter((tab): tab is TVNavBarTab => tab !== null),
|
||||||
|
[
|
||||||
|
settings?.streamyStatsServerUrl,
|
||||||
|
settings?.hideWatchlistsTab,
|
||||||
|
settings?.showCustomMenuLinks,
|
||||||
|
t,
|
||||||
|
],
|
||||||
|
);
|
||||||
|
|
||||||
|
const activeTabKey = currentTab ?? "(home)";
|
||||||
|
|
||||||
|
const visibleKeys = useMemo(
|
||||||
|
() => new Set(tabs.map((tab) => tab.key)),
|
||||||
|
[tabs],
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleTabChange = useCallback(
|
||||||
|
(key: string) => {
|
||||||
|
if (key === currentTab) return;
|
||||||
|
|
||||||
|
if (key === "(home)") eventBus.emit("scrollToTop");
|
||||||
|
if (key === "(search)") eventBus.emit("searchTabPressed");
|
||||||
|
|
||||||
|
router.replace(`/(auth)/(tabs)/${key}`);
|
||||||
|
},
|
||||||
|
[currentTab, router],
|
||||||
|
);
|
||||||
|
|
||||||
|
const navigateHome = useCallback(() => {
|
||||||
|
router.replace("/(auth)/(tabs)/(home)");
|
||||||
|
}, [router]);
|
||||||
|
useTVTabRootBackHandler(navigateHome, atTabRoot, currentTab);
|
||||||
|
|
||||||
|
// If current tab is no longer visible (setting changed), navigate to home
|
||||||
|
useEffect(() => {
|
||||||
|
if (!visibleKeys.has(activeTabKey) && activeTabKey !== "(home)") {
|
||||||
|
router.replace("/(auth)/(tabs)/(home)");
|
||||||
|
}
|
||||||
|
}, [visibleKeys, activeTabKey, router]);
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={{ flex: 1 }}>
|
||||||
|
<SystemBars hidden={false} style='light' />
|
||||||
|
<Stack
|
||||||
|
screenOptions={{ headerShown: false, animation: "none" }}
|
||||||
|
initialRouteName='(home)'
|
||||||
|
>
|
||||||
|
<Stack.Screen name='index' redirect />
|
||||||
|
</Stack>
|
||||||
|
<TVNavBar
|
||||||
|
tabs={tabs}
|
||||||
|
activeTabKey={activeTabKey}
|
||||||
|
onTabChange={handleTabChange}
|
||||||
|
style={{
|
||||||
|
position: "absolute",
|
||||||
|
top: 0,
|
||||||
|
left: 0,
|
||||||
|
right: 0,
|
||||||
|
zIndex: 1000,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
export default function TabLayout() {
|
export default function TabLayout() {
|
||||||
const { settings } = useSettings();
|
const { settings } = useSettings();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
// Handle TV back button - prevent app exit when at root
|
// Must be called before any conditional return (rules of hooks)
|
||||||
useTVHomeBackHandler();
|
useTVHomeBackHandler();
|
||||||
|
|
||||||
|
if (IS_ANDROID_TV) {
|
||||||
|
return <TVTabLayout />;
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<View style={{ flex: 1 }}>
|
<View style={{ flex: 1 }}>
|
||||||
<SystemBars hidden={false} style='light' />
|
<SystemBars hidden={false} style='light' />
|
||||||
|
|||||||
@@ -456,10 +456,23 @@ export default function DirectPlayerPage() {
|
|||||||
});
|
});
|
||||||
reportPlaybackStopped();
|
reportPlaybackStopped();
|
||||||
setIsPlaybackStopped(true);
|
setIsPlaybackStopped(true);
|
||||||
videoRef.current?.pause();
|
// Synchronously destroy the mpv instance + decoder + surface buffers
|
||||||
|
// BEFORE the screen unmounts. Otherwise the next screen (or the next
|
||||||
|
// episode's player) mounts while the old 4K decoder is still alive,
|
||||||
|
// causing OOM on low-RAM devices. Native stop() is idempotent so the
|
||||||
|
// later React unmount cleanup is still safe.
|
||||||
|
videoRef.current?.destroy().catch(() => {});
|
||||||
|
// Pre-libmpv-1.0 used `stop()`:
|
||||||
|
// videoRef.current?.stop();
|
||||||
revalidateProgressCache();
|
revalidateProgressCache();
|
||||||
// Resume inactivity timer when leaving player (TV only)
|
// Resume inactivity timer when leaving player (TV only)
|
||||||
resumeInactivityTimer();
|
resumeInactivityTimer();
|
||||||
|
// Release the keep-awake wakelock acquired during playback so it
|
||||||
|
// doesn't follow us back to the home screen and block the TV
|
||||||
|
// screensaver. activateKeepAwakeAsync() is tag-scoped to this module
|
||||||
|
// and only released on the "paused" event; without this, navigating
|
||||||
|
// away mid-play leaves FLAG_KEEP_SCREEN_ON set on the window.
|
||||||
|
deactivateKeepAwake();
|
||||||
}, [videoRef, reportPlaybackStopped, progress, resumeInactivityTimer]);
|
}, [videoRef, reportPlaybackStopped, progress, resumeInactivityTimer]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -880,6 +893,27 @@ export default function DirectPlayerPage() {
|
|||||||
// Check if we're transcoding
|
// Check if we're transcoding
|
||||||
const isTranscoding = Boolean(stream?.mediaSource?.TranscodingUrl);
|
const isTranscoding = Boolean(stream?.mediaSource?.TranscodingUrl);
|
||||||
|
|
||||||
|
// A transcoded stream only carries the audio track the server encoded
|
||||||
|
// into it — switching requires re-negotiating the stream with the new
|
||||||
|
// index (like the mobile menu's replacePlayer), not an mpv aid change.
|
||||||
|
if (isTranscoding) {
|
||||||
|
const queryParams = new URLSearchParams({
|
||||||
|
itemId: item?.Id ?? "",
|
||||||
|
audioIndex: String(index),
|
||||||
|
subtitleIndex: String(currentSubtitleIndex),
|
||||||
|
mediaSourceId: stream?.mediaSource?.Id ?? "",
|
||||||
|
bitrateValue: bitrateValue?.toString() ?? "",
|
||||||
|
playbackPosition: msToTicks(progress.get()).toString(),
|
||||||
|
}).toString();
|
||||||
|
// Destroy the current mpv instance BEFORE navigating, same rationale as
|
||||||
|
// goToNextItem/goToPreviousItem: Expo Router briefly holds two players
|
||||||
|
// during the transition, and two simultaneous decoders OOM-kill low-RAM
|
||||||
|
// devices. Resume is preserved via the playbackPosition param.
|
||||||
|
videoRef.current?.destroy().catch(() => {});
|
||||||
|
router.replace(`player/direct-player?${queryParams}` as any);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Convert Jellyfin index to MPV track ID
|
// Convert Jellyfin index to MPV track ID
|
||||||
const mpvTrackId = getMpvAudioId(
|
const mpvTrackId = getMpvAudioId(
|
||||||
stream?.mediaSource,
|
stream?.mediaSource,
|
||||||
@@ -891,7 +925,14 @@ export default function DirectPlayerPage() {
|
|||||||
await videoRef.current?.setAudioTrack?.(mpvTrackId);
|
await videoRef.current?.setAudioTrack?.(mpvTrackId);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[stream?.mediaSource],
|
[
|
||||||
|
stream?.mediaSource,
|
||||||
|
item?.Id,
|
||||||
|
currentSubtitleIndex,
|
||||||
|
bitrateValue,
|
||||||
|
router,
|
||||||
|
progress,
|
||||||
|
],
|
||||||
);
|
);
|
||||||
|
|
||||||
// TV subtitle track change handler
|
// TV subtitle track change handler
|
||||||
@@ -1105,6 +1146,15 @@ export default function DirectPlayerPage() {
|
|||||||
nextItem.UserData?.PlaybackPositionTicks?.toString() ?? "",
|
nextItem.UserData?.PlaybackPositionTicks?.toString() ?? "",
|
||||||
}).toString();
|
}).toString();
|
||||||
|
|
||||||
|
// Destroy the current mpv instance BEFORE navigating so the old 4K
|
||||||
|
// decoder + surface buffers are freed before the new player screen
|
||||||
|
// mounts. Without this, Expo Router briefly holds two simultaneous
|
||||||
|
// mpv instances during the transition (~768 MB of surface buffers
|
||||||
|
// for two 4K HDR10+ decoders) and OOM-kills the app on low-RAM
|
||||||
|
// devices. Native stop() is idempotent so the subsequent React
|
||||||
|
// unmount cleanup is still safe.
|
||||||
|
videoRef.current?.destroy().catch(() => {});
|
||||||
|
|
||||||
router.replace(`player/direct-player?${queryParams}` as any);
|
router.replace(`player/direct-player?${queryParams}` as any);
|
||||||
}, [
|
}, [
|
||||||
nextItem,
|
nextItem,
|
||||||
@@ -1115,6 +1165,7 @@ export default function DirectPlayerPage() {
|
|||||||
bitrateValue,
|
bitrateValue,
|
||||||
router,
|
router,
|
||||||
isPlaybackStopped,
|
isPlaybackStopped,
|
||||||
|
videoRef,
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// Apply subtitle settings when video loads
|
// Apply subtitle settings when video loads
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from "react";
|
|||||||
import {
|
import {
|
||||||
Animated,
|
Animated,
|
||||||
Easing,
|
Easing,
|
||||||
|
InteractionManager,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
StyleSheet,
|
StyleSheet,
|
||||||
TVFocusGuideView,
|
TVFocusGuideView,
|
||||||
@@ -75,6 +76,20 @@ export default function TVOptionModal() {
|
|||||||
}, [isReady]);
|
}, [isReady]);
|
||||||
|
|
||||||
const handleSelect = (value: any) => {
|
const handleSelect = (value: any) => {
|
||||||
|
if (modalState?.deferApplyUntilDismissed) {
|
||||||
|
// onSelect navigates (the transcode audio switch replacing the player);
|
||||||
|
// a router.replace fired while this modal is the active route would be
|
||||||
|
// swallowed. Close FIRST, apply after dismissal.
|
||||||
|
const onSelect = modalState.onSelect;
|
||||||
|
store.set(tvOptionModalAtom, null);
|
||||||
|
router.back();
|
||||||
|
InteractionManager.runAfterInteractions(() => onSelect?.(value));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// State-only callers (detail page, library filters, settings): run before
|
||||||
|
// closing so the re-render happens while the modal is up. Deferring it until
|
||||||
|
// after dismissal re-renders the page after focus returns and yanks TV
|
||||||
|
// focus, leaving navigation stuck.
|
||||||
modalState?.onSelect(value);
|
modalState?.onSelect(value);
|
||||||
store.set(tvOptionModalAtom, null);
|
store.set(tvOptionModalAtom, null);
|
||||||
router.back();
|
router.back();
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { onlineManager, QueryClient } from "@tanstack/react-query";
|
|||||||
import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client";
|
import { PersistQueryClientProvider } from "@tanstack/react-query-persist-client";
|
||||||
import * as BackgroundTask from "expo-background-task";
|
import * as BackgroundTask from "expo-background-task";
|
||||||
import * as Device from "expo-device";
|
import * as Device from "expo-device";
|
||||||
|
import { Image } from "expo-image";
|
||||||
import { DarkTheme, ThemeProvider } from "expo-router/react-navigation";
|
import { DarkTheme, ThemeProvider } from "expo-router/react-navigation";
|
||||||
import { Platform } from "react-native";
|
import { Platform } from "react-native";
|
||||||
import { GlobalModal } from "@/components/GlobalModal";
|
import { GlobalModal } from "@/components/GlobalModal";
|
||||||
@@ -100,6 +101,22 @@ SplashScreen.setOptions({
|
|||||||
fade: true,
|
fade: true,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Cap expo-image's in-memory cache. Default is unbounded (maxMemoryCost=0),
|
||||||
|
// which on a 2GB Android TV box leads to ~200MB of decoded backdrops/posters
|
||||||
|
// pinned in RAM after browsing. Caps are intentionally tighter on TV (which
|
||||||
|
// has less RAM and runs alongside libmpv/MediaCodec) than on mobile.
|
||||||
|
// Cost is measured in bytes of decoded bitmap (ARGB8888 = 4 bytes/pixel).
|
||||||
|
try {
|
||||||
|
Image.configureCache({
|
||||||
|
maxMemoryCost: Platform.isTV
|
||||||
|
? 8 * 1024 * 1024 // ~8 MB on TV
|
||||||
|
: 128 * 1024 * 1024, // ~128 MB on mobile
|
||||||
|
maxDiskSize: 200 * 1024 * 1024, // 200 MB disk cache on all platforms
|
||||||
|
});
|
||||||
|
} catch {
|
||||||
|
// configureCache is a no-op on some platforms/versions; safe to ignore.
|
||||||
|
}
|
||||||
|
|
||||||
function useNotificationObserver() {
|
function useNotificationObserver() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
|||||||
65
bun.lock
65
bun.lock
@@ -109,10 +109,11 @@
|
|||||||
"@types/react": "~19.2.10",
|
"@types/react": "~19.2.10",
|
||||||
"@types/react-test-renderer": "19.1.0",
|
"@types/react-test-renderer": "19.1.0",
|
||||||
"cross-env": "10.1.0",
|
"cross-env": "10.1.0",
|
||||||
"expo-doctor": "1.19.9",
|
"expo-doctor": "1.20.0",
|
||||||
"husky": "9.1.7",
|
"husky": "9.1.7",
|
||||||
"lint-staged": "17.0.7",
|
"lint-staged": "17.0.8",
|
||||||
"react-test-renderer": "19.2.3",
|
"react-test-renderer": "19.2.3",
|
||||||
|
"tsx": "^4.22.4",
|
||||||
"typescript": "6.0.3",
|
"typescript": "6.0.3",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@@ -294,6 +295,58 @@
|
|||||||
|
|
||||||
"@epic-web/invariant": ["@epic-web/invariant@1.0.0", "", {}, "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA=="],
|
"@epic-web/invariant": ["@epic-web/invariant@1.0.0", "", {}, "sha512-lrTPqgvfFQtR/eY/qkIzp98OGdNJu0m5ji3q/nJI8v3SXkRKEnWiOxMmbvcSoAIzv/cGiuvRy57k4suKQSAdwA=="],
|
||||||
|
|
||||||
|
"@esbuild/aix-ppc64": ["@esbuild/aix-ppc64@0.28.1", "", { "os": "aix", "cpu": "ppc64" }, "sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ=="],
|
||||||
|
|
||||||
|
"@esbuild/android-arm": ["@esbuild/android-arm@0.28.1", "", { "os": "android", "cpu": "arm" }, "sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ=="],
|
||||||
|
|
||||||
|
"@esbuild/android-arm64": ["@esbuild/android-arm64@0.28.1", "", { "os": "android", "cpu": "arm64" }, "sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg=="],
|
||||||
|
|
||||||
|
"@esbuild/android-x64": ["@esbuild/android-x64@0.28.1", "", { "os": "android", "cpu": "x64" }, "sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng=="],
|
||||||
|
|
||||||
|
"@esbuild/darwin-arm64": ["@esbuild/darwin-arm64@0.28.1", "", { "os": "darwin", "cpu": "arm64" }, "sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q=="],
|
||||||
|
|
||||||
|
"@esbuild/darwin-x64": ["@esbuild/darwin-x64@0.28.1", "", { "os": "darwin", "cpu": "x64" }, "sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ=="],
|
||||||
|
|
||||||
|
"@esbuild/freebsd-arm64": ["@esbuild/freebsd-arm64@0.28.1", "", { "os": "freebsd", "cpu": "arm64" }, "sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw=="],
|
||||||
|
|
||||||
|
"@esbuild/freebsd-x64": ["@esbuild/freebsd-x64@0.28.1", "", { "os": "freebsd", "cpu": "x64" }, "sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-arm": ["@esbuild/linux-arm@0.28.1", "", { "os": "linux", "cpu": "arm" }, "sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-arm64": ["@esbuild/linux-arm64@0.28.1", "", { "os": "linux", "cpu": "arm64" }, "sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-ia32": ["@esbuild/linux-ia32@0.28.1", "", { "os": "linux", "cpu": "ia32" }, "sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-loong64": ["@esbuild/linux-loong64@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-mips64el": ["@esbuild/linux-mips64el@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-ppc64": ["@esbuild/linux-ppc64@0.28.1", "", { "os": "linux", "cpu": "ppc64" }, "sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-riscv64": ["@esbuild/linux-riscv64@0.28.1", "", { "os": "linux", "cpu": "none" }, "sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-s390x": ["@esbuild/linux-s390x@0.28.1", "", { "os": "linux", "cpu": "s390x" }, "sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag=="],
|
||||||
|
|
||||||
|
"@esbuild/linux-x64": ["@esbuild/linux-x64@0.28.1", "", { "os": "linux", "cpu": "x64" }, "sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA=="],
|
||||||
|
|
||||||
|
"@esbuild/netbsd-arm64": ["@esbuild/netbsd-arm64@0.28.1", "", { "os": "none", "cpu": "arm64" }, "sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw=="],
|
||||||
|
|
||||||
|
"@esbuild/netbsd-x64": ["@esbuild/netbsd-x64@0.28.1", "", { "os": "none", "cpu": "x64" }, "sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg=="],
|
||||||
|
|
||||||
|
"@esbuild/openbsd-arm64": ["@esbuild/openbsd-arm64@0.28.1", "", { "os": "openbsd", "cpu": "arm64" }, "sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q=="],
|
||||||
|
|
||||||
|
"@esbuild/openbsd-x64": ["@esbuild/openbsd-x64@0.28.1", "", { "os": "openbsd", "cpu": "x64" }, "sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw=="],
|
||||||
|
|
||||||
|
"@esbuild/openharmony-arm64": ["@esbuild/openharmony-arm64@0.28.1", "", { "os": "none", "cpu": "arm64" }, "sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg=="],
|
||||||
|
|
||||||
|
"@esbuild/sunos-x64": ["@esbuild/sunos-x64@0.28.1", "", { "os": "sunos", "cpu": "x64" }, "sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ=="],
|
||||||
|
|
||||||
|
"@esbuild/win32-arm64": ["@esbuild/win32-arm64@0.28.1", "", { "os": "win32", "cpu": "arm64" }, "sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA=="],
|
||||||
|
|
||||||
|
"@esbuild/win32-ia32": ["@esbuild/win32-ia32@0.28.1", "", { "os": "win32", "cpu": "ia32" }, "sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg=="],
|
||||||
|
|
||||||
|
"@esbuild/win32-x64": ["@esbuild/win32-x64@0.28.1", "", { "os": "win32", "cpu": "x64" }, "sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A=="],
|
||||||
|
|
||||||
"@expo-google-fonts/material-symbols": ["@expo-google-fonts/material-symbols@0.4.38", "", {}, "sha512-IJkBtN1o8u9BW5fvSii1MyHPQ7Q0HxbWcVBvOrOzgMLpVtZw7R2w94wBTVR7kZwv3w1JNTESMmLA5Sqn1+Z36A=="],
|
"@expo-google-fonts/material-symbols": ["@expo-google-fonts/material-symbols@0.4.38", "", {}, "sha512-IJkBtN1o8u9BW5fvSii1MyHPQ7Q0HxbWcVBvOrOzgMLpVtZw7R2w94wBTVR7kZwv3w1JNTESMmLA5Sqn1+Z36A=="],
|
||||||
|
|
||||||
"@expo/cli": ["@expo/cli@56.1.16", "", { "dependencies": { "@expo/code-signing-certificates": "^0.0.6", "@expo/config": "~56.0.9", "@expo/config-plugins": "~56.0.9", "@expo/devcert": "^1.2.1", "@expo/env": "~2.3.0", "@expo/image-utils": "^0.10.1", "@expo/inline-modules": "^0.0.12", "@expo/json-file": "^10.2.0", "@expo/log-box": "^56.0.13", "@expo/metro": "~56.0.0", "@expo/metro-config": "~56.0.14", "@expo/metro-file-map": "^56.0.3", "@expo/osascript": "^2.6.0", "@expo/package-manager": "^1.12.1", "@expo/plist": "^0.7.0", "@expo/prebuild-config": "^56.0.16", "@expo/require-utils": "^56.1.3", "@expo/router-server": "^56.0.14", "@expo/schema-utils": "^56.0.0", "@expo/spawn-async": "^1.8.0", "@expo/ws-tunnel": "^2.0.0", "@expo/xcpretty": "^4.4.4", "@react-native/dev-middleware": "0.85.3", "accepts": "^1.3.8", "arg": "^5.0.2", "bplist-creator": "0.1.0", "bplist-parser": "^0.3.1", "chalk": "^4.0.0", "ci-info": "^3.3.0", "compression": "^1.7.4", "connect": "^3.7.0", "debug": "^4.3.4", "dnssd-advertise": "^1.1.4", "expo-server": "^56.0.5", "fetch-nodeshim": "^0.4.10", "getenv": "^2.0.0", "glob": "^13.0.0", "lan-network": "^0.2.1", "multitars": "^1.0.0", "node-forge": "^1.3.3", "npm-package-arg": "^11.0.0", "ora": "^3.4.0", "picomatch": "^4.0.4", "pretty-format": "^29.7.0", "progress": "^2.0.3", "prompts": "^2.3.2", "resolve-from": "^5.0.0", "semver": "^7.6.0", "send": "^0.19.0", "slugify": "^1.3.4", "stacktrace-parser": "^0.1.10", "structured-headers": "^0.4.1", "terminal-link": "^2.1.1", "toqr": "^0.1.1", "wrap-ansi": "^7.0.0", "ws": "^8.12.1", "zod": "^3.25.76" }, "peerDependencies": { "expo": "*", "expo-router": "*", "react-native": "*" }, "optionalPeers": ["expo-router", "react-native"], "bin": { "expo-internal": "main.js" } }, "sha512-VBQn0mqAwc67b9Cn0RVXyeodghomAx5xGRhA/bXaQzuxDjMQk0zIOb6pXMZX7yiIwJW66UZt/zQiJNSv6aWJYw=="],
|
"@expo/cli": ["@expo/cli@56.1.16", "", { "dependencies": { "@expo/code-signing-certificates": "^0.0.6", "@expo/config": "~56.0.9", "@expo/config-plugins": "~56.0.9", "@expo/devcert": "^1.2.1", "@expo/env": "~2.3.0", "@expo/image-utils": "^0.10.1", "@expo/inline-modules": "^0.0.12", "@expo/json-file": "^10.2.0", "@expo/log-box": "^56.0.13", "@expo/metro": "~56.0.0", "@expo/metro-config": "~56.0.14", "@expo/metro-file-map": "^56.0.3", "@expo/osascript": "^2.6.0", "@expo/package-manager": "^1.12.1", "@expo/plist": "^0.7.0", "@expo/prebuild-config": "^56.0.16", "@expo/require-utils": "^56.1.3", "@expo/router-server": "^56.0.14", "@expo/schema-utils": "^56.0.0", "@expo/spawn-async": "^1.8.0", "@expo/ws-tunnel": "^2.0.0", "@expo/xcpretty": "^4.4.4", "@react-native/dev-middleware": "0.85.3", "accepts": "^1.3.8", "arg": "^5.0.2", "bplist-creator": "0.1.0", "bplist-parser": "^0.3.1", "chalk": "^4.0.0", "ci-info": "^3.3.0", "compression": "^1.7.4", "connect": "^3.7.0", "debug": "^4.3.4", "dnssd-advertise": "^1.1.4", "expo-server": "^56.0.5", "fetch-nodeshim": "^0.4.10", "getenv": "^2.0.0", "glob": "^13.0.0", "lan-network": "^0.2.1", "multitars": "^1.0.0", "node-forge": "^1.3.3", "npm-package-arg": "^11.0.0", "ora": "^3.4.0", "picomatch": "^4.0.4", "pretty-format": "^29.7.0", "progress": "^2.0.3", "prompts": "^2.3.2", "resolve-from": "^5.0.0", "semver": "^7.6.0", "send": "^0.19.0", "slugify": "^1.3.4", "stacktrace-parser": "^0.1.10", "structured-headers": "^0.4.1", "terminal-link": "^2.1.1", "toqr": "^0.1.1", "wrap-ansi": "^7.0.0", "ws": "^8.12.1", "zod": "^3.25.76" }, "peerDependencies": { "expo": "*", "expo-router": "*", "react-native": "*" }, "optionalPeers": ["expo-router", "react-native"], "bin": { "expo-internal": "main.js" } }, "sha512-VBQn0mqAwc67b9Cn0RVXyeodghomAx5xGRhA/bXaQzuxDjMQk0zIOb6pXMZX7yiIwJW66UZt/zQiJNSv6aWJYw=="],
|
||||||
@@ -908,6 +961,8 @@
|
|||||||
|
|
||||||
"es-set-tostringtag": ["es-set-tostringtag@2.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA=="],
|
"es-set-tostringtag": ["es-set-tostringtag@2.1.0", "", { "dependencies": { "es-errors": "^1.3.0", "get-intrinsic": "^1.2.6", "has-tostringtag": "^1.0.2", "hasown": "^2.0.2" } }, "sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA=="],
|
||||||
|
|
||||||
|
"esbuild": ["esbuild@0.28.1", "", { "optionalDependencies": { "@esbuild/aix-ppc64": "0.28.1", "@esbuild/android-arm": "0.28.1", "@esbuild/android-arm64": "0.28.1", "@esbuild/android-x64": "0.28.1", "@esbuild/darwin-arm64": "0.28.1", "@esbuild/darwin-x64": "0.28.1", "@esbuild/freebsd-arm64": "0.28.1", "@esbuild/freebsd-x64": "0.28.1", "@esbuild/linux-arm": "0.28.1", "@esbuild/linux-arm64": "0.28.1", "@esbuild/linux-ia32": "0.28.1", "@esbuild/linux-loong64": "0.28.1", "@esbuild/linux-mips64el": "0.28.1", "@esbuild/linux-ppc64": "0.28.1", "@esbuild/linux-riscv64": "0.28.1", "@esbuild/linux-s390x": "0.28.1", "@esbuild/linux-x64": "0.28.1", "@esbuild/netbsd-arm64": "0.28.1", "@esbuild/netbsd-x64": "0.28.1", "@esbuild/openbsd-arm64": "0.28.1", "@esbuild/openbsd-x64": "0.28.1", "@esbuild/openharmony-arm64": "0.28.1", "@esbuild/sunos-x64": "0.28.1", "@esbuild/win32-arm64": "0.28.1", "@esbuild/win32-ia32": "0.28.1", "@esbuild/win32-x64": "0.28.1" }, "bin": { "esbuild": "bin/esbuild" } }, "sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw=="],
|
||||||
|
|
||||||
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
"escalade": ["escalade@3.2.0", "", {}, "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA=="],
|
||||||
|
|
||||||
"escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="],
|
"escape-html": ["escape-html@1.0.3", "", {}, "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow=="],
|
||||||
@@ -960,7 +1015,7 @@
|
|||||||
|
|
||||||
"expo-device": ["expo-device@56.0.4", "", { "dependencies": { "ua-parser-js": "^0.7.33" }, "peerDependencies": { "expo": "*" } }, "sha512-ucVcGPkvBrl2QHuy7XcYex2Y6BETvJ6TREutZrwLGUDnlvbpKS8KfQoNZOpvkyo5Nmm9RrasYQ0CrXmBHho2mg=="],
|
"expo-device": ["expo-device@56.0.4", "", { "dependencies": { "ua-parser-js": "^0.7.33" }, "peerDependencies": { "expo": "*" } }, "sha512-ucVcGPkvBrl2QHuy7XcYex2Y6BETvJ6TREutZrwLGUDnlvbpKS8KfQoNZOpvkyo5Nmm9RrasYQ0CrXmBHho2mg=="],
|
||||||
|
|
||||||
"expo-doctor": ["expo-doctor@1.19.9", "", { "bin": { "expo-doctor": "bin/expo-doctor.js" } }, "sha512-SJW5HxEDQ9f5QdFvrUwfbdJZ4HI0EAAxsrJqrHBFjKBum+uSOcEIZPLRibwNQLTHOwTO1TWNLiMlF9sDUBWeYw=="],
|
"expo-doctor": ["expo-doctor@1.20.0", "", { "bin": { "expo-doctor": "bin/expo-doctor.js" } }, "sha512-YL0uGQGZ65tWOCOiDH6BFzBkx/9N46MyBUdRfa4t6iuG4tbLg/phRrhmuaNm99QJVMqYtt3ksRbFCzuYOuX20Q=="],
|
||||||
|
|
||||||
"expo-file-system": ["expo-file-system@56.0.8", "", { "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-NrH41/8snGIBSbYicwVLB4txPdgCATd7ZYhMAGS3YJZ9GbnduhlAoV4/YCbGayjrbpE9bJb/6wegPL/zmvRMnQ=="],
|
"expo-file-system": ["expo-file-system@56.0.8", "", { "peerDependencies": { "expo": "*", "react-native": "*" } }, "sha512-NrH41/8snGIBSbYicwVLB4txPdgCATd7ZYhMAGS3YJZ9GbnduhlAoV4/YCbGayjrbpE9bJb/6wegPL/zmvRMnQ=="],
|
||||||
|
|
||||||
@@ -1270,7 +1325,7 @@
|
|||||||
|
|
||||||
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
"lines-and-columns": ["lines-and-columns@1.2.4", "", {}, "sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg=="],
|
||||||
|
|
||||||
"lint-staged": ["lint-staged@17.0.7", "", { "dependencies": { "listr2": "^10.2.1", "picomatch": "^4.0.4", "string-argv": "^0.3.2", "tinyexec": "^1.2.4" }, "optionalDependencies": { "yaml": "^2.9.0" }, "bin": { "lint-staged": "bin/lint-staged.js" } }, "sha512-JrSobt+tW3rH8IOMi8tDZd3foorM5yPEkLD/V2NxobgHrFfHWGee4MOLVuZeScgxftEwbHrPHIFA/ZL+nUJeuA=="],
|
"lint-staged": ["lint-staged@17.0.8", "", { "dependencies": { "listr2": "^10.2.1", "picomatch": "^4.0.4", "string-argv": "^0.3.2", "tinyexec": "^1.2.4" }, "optionalDependencies": { "yaml": "^2.9.0" }, "bin": { "lint-staged": "bin/lint-staged.js" } }, "sha512-B2P/d+jVW0UXOQ0MVMLrB/9ydA1P+zz6jYfdrbbEd9ur3S2rcbduFWKiUCC02Sm5hbC8nrm7y24WuYMG54HfxA=="],
|
||||||
|
|
||||||
"listr2": ["listr2@10.2.1", "", { "dependencies": { "cli-truncate": "^5.2.0", "eventemitter3": "^5.0.4", "log-update": "^6.1.0", "rfdc": "^1.4.1", "wrap-ansi": "^10.0.0" } }, "sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q=="],
|
"listr2": ["listr2@10.2.1", "", { "dependencies": { "cli-truncate": "^5.2.0", "eventemitter3": "^5.0.4", "log-update": "^6.1.0", "rfdc": "^1.4.1", "wrap-ansi": "^10.0.0" } }, "sha512-7I5knELsJKTUjXG+A6BkKAiGkW1i25fNa/xlUl9hFtk15WbE9jndA89xu5FzQKrY5llajE1hfZZFMILXkDHk/Q=="],
|
||||||
|
|
||||||
@@ -1808,6 +1863,8 @@
|
|||||||
|
|
||||||
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"tsx": ["tsx@4.22.4", "", { "dependencies": { "esbuild": "~0.28.0" }, "optionalDependencies": { "fsevents": "~2.3.3" }, "bin": { "tsx": "dist/cli.mjs" } }, "sha512-X8EX+XV4QR5xCsrgxaED954zTDfY8KqlDtskKEL0cHhyS/P8b4IFOvGDQpsC9Q1XnLq915wEfwwY/zzskCtmhg=="],
|
||||||
|
|
||||||
"type-fest": ["type-fest@0.7.1", "", {}, "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg=="],
|
"type-fest": ["type-fest@0.7.1", "", {}, "sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg=="],
|
||||||
|
|
||||||
"type-is": ["type-is@2.1.0", "", { "dependencies": { "content-type": "^2.0.0", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA=="],
|
"type-is": ["type-is@2.1.0", "", { "dependencies": { "content-type": "^2.0.0", "media-typer": "^1.1.0", "mime-types": "^3.0.0" } }, "sha512-faYHw0anBbc/kWF3zFTEnxSFOAGUX9GFbOBthvDdLsIlEoWOFOtS0zgCiQYwIskL9iGXZL3kAXD8OoZ4GmMATA=="],
|
||||||
|
|||||||
@@ -1,99 +0,0 @@
|
|||||||
import type { MediaSourceInfo } from "@jellyfin/sdk/lib/generated-client/models";
|
|
||||||
import { useMemo, useState } from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import { Platform, TouchableOpacity, View } from "react-native";
|
|
||||||
import { Text } from "./common/Text";
|
|
||||||
import { FilterSheet } from "./filters/FilterSheet";
|
|
||||||
|
|
||||||
interface Props extends React.ComponentProps<typeof View> {
|
|
||||||
source?: MediaSourceInfo;
|
|
||||||
onChange: (value: number) => void;
|
|
||||||
selected?: number | undefined;
|
|
||||||
streamType?: string;
|
|
||||||
title: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export const TrackSheet: React.FC<Props> = ({
|
|
||||||
source,
|
|
||||||
onChange,
|
|
||||||
selected,
|
|
||||||
streamType,
|
|
||||||
title,
|
|
||||||
...props
|
|
||||||
}) => {
|
|
||||||
const isTv = Platform.isTV;
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
const streams = useMemo(
|
|
||||||
() => source?.MediaStreams?.filter((x) => x.Type === streamType),
|
|
||||||
[source, streamType],
|
|
||||||
);
|
|
||||||
|
|
||||||
const selectedSteam = useMemo(
|
|
||||||
() => streams?.find((x) => x.Index === selected),
|
|
||||||
[streams, selected],
|
|
||||||
);
|
|
||||||
|
|
||||||
const noneOption = useMemo(
|
|
||||||
() => ({ Index: -1, DisplayTitle: t("common.none") }),
|
|
||||||
[t],
|
|
||||||
);
|
|
||||||
|
|
||||||
// Creates a modified data array that includes a "None" option for subtitles
|
|
||||||
// We might want to possibly do this for other places, like audio?
|
|
||||||
const addNoneToSubtitles = useMemo(() => {
|
|
||||||
if (streamType === "Subtitle") {
|
|
||||||
const result = streams ? [noneOption, ...streams] : [noneOption];
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
return streams;
|
|
||||||
}, [streams, streamType, noneOption]);
|
|
||||||
const [open, setOpen] = useState(false);
|
|
||||||
|
|
||||||
if (isTv || (streams && streams.length === 0)) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<View className='flex shrink' style={{ minWidth: 60 }} {...props}>
|
|
||||||
<View className='flex flex-col'>
|
|
||||||
<Text className='opacity-50 mb-1 text-xs'>{title}</Text>
|
|
||||||
<TouchableOpacity
|
|
||||||
className='bg-neutral-900 h-10 rounded-xl border-neutral-800 border px-3 py-2 flex flex-row items-center justify-between'
|
|
||||||
onPress={() => setOpen(true)}
|
|
||||||
>
|
|
||||||
<Text numberOfLines={1}>
|
|
||||||
{selected === -1 && streamType === "Subtitle"
|
|
||||||
? t("common.none")
|
|
||||||
: selectedSteam?.DisplayTitle || t("common.select")}
|
|
||||||
</Text>
|
|
||||||
</TouchableOpacity>
|
|
||||||
</View>
|
|
||||||
<FilterSheet
|
|
||||||
open={open}
|
|
||||||
setOpen={setOpen}
|
|
||||||
title={title}
|
|
||||||
data={addNoneToSubtitles || []}
|
|
||||||
values={
|
|
||||||
selected === -1 && streamType === "Subtitle"
|
|
||||||
? [{ Index: -1, DisplayTitle: t("common.none") }]
|
|
||||||
: selectedSteam
|
|
||||||
? [selectedSteam]
|
|
||||||
: []
|
|
||||||
}
|
|
||||||
multiple={false}
|
|
||||||
searchFilter={(item, query) => {
|
|
||||||
const label = (item as any).DisplayTitle || "";
|
|
||||||
return label.toLowerCase().includes(query.toLowerCase());
|
|
||||||
}}
|
|
||||||
renderItemLabel={(item) => (
|
|
||||||
<Text>{(item as any).DisplayTitle || ""}</Text>
|
|
||||||
)}
|
|
||||||
set={(vals) => {
|
|
||||||
const chosen = vals[0] as any;
|
|
||||||
if (chosen && chosen.Index !== null && chosen.Index !== undefined) {
|
|
||||||
onChange(chosen.Index);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
@@ -1,43 +1,119 @@
|
|||||||
import { Ionicons } from "@expo/vector-icons";
|
import { Ionicons } from "@expo/vector-icons";
|
||||||
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
import type { BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||||
import type React from "react";
|
import React from "react";
|
||||||
import { Platform, View } from "react-native";
|
import { Platform, View, type ViewStyle } from "react-native";
|
||||||
|
import { Text } from "@/components/common/Text";
|
||||||
|
import { scaleSize } from "@/utils/scaleSize";
|
||||||
|
|
||||||
export const WatchedIndicator: React.FC<{ item: BaseItemDto }> = ({ item }) => {
|
const isAggregateType = (item: BaseItemDto) =>
|
||||||
if (Platform.isTV) {
|
item.Type === "Series" || item.Type === "BoxSet";
|
||||||
// TV: Show white checkmark when watched
|
|
||||||
if (
|
// TV sizes are scaled relative to a 1920×1080 reference (see scaleSize).
|
||||||
item.UserData?.Played &&
|
const tvBadgeBase: ViewStyle = {
|
||||||
(item.Type === "Movie" || item.Type === "Episode")
|
position: "absolute",
|
||||||
) {
|
top: scaleSize(8),
|
||||||
|
right: scaleSize(8),
|
||||||
|
height: scaleSize(28),
|
||||||
|
borderRadius: scaleSize(14),
|
||||||
|
backgroundColor: "rgba(255,255,255,0.92)",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
};
|
||||||
|
|
||||||
|
// Mobile uses raw dp — no scaling.
|
||||||
|
const mobileBadgeBase: ViewStyle = {
|
||||||
|
position: "absolute",
|
||||||
|
top: 4,
|
||||||
|
right: 4,
|
||||||
|
height: 20,
|
||||||
|
borderRadius: 10,
|
||||||
|
backgroundColor: "#9333ea",
|
||||||
|
alignItems: "center",
|
||||||
|
justifyContent: "center",
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Renders the unplayed-episode count badge for Series/BoxSet items that still
|
||||||
|
* have episodes left to watch. Returns null for non-aggregate types, fully
|
||||||
|
* watched items, or items with no unplayed count, so it is safe to mount
|
||||||
|
* unconditionally as an overlay (e.g. on top of the tvOS glass poster, where
|
||||||
|
* the watched checkmark is drawn natively and only the count needs RN).
|
||||||
|
*/
|
||||||
|
export const UnplayedCountBadge: React.FC<{ item: BaseItemDto }> = React.memo(
|
||||||
|
({ item }) => {
|
||||||
|
if (!isAggregateType(item)) return null;
|
||||||
|
if (item.UserData?.Played) return null;
|
||||||
|
const unplayed = item.UserData?.UnplayedItemCount ?? 0;
|
||||||
|
if (unplayed <= 0) return null;
|
||||||
|
// Cap at 1k+ to keep the badge compact (jellyfin-web caps at 99+).
|
||||||
|
const label = unplayed >= 1000 ? "1k+" : String(unplayed);
|
||||||
|
|
||||||
|
if (Platform.isTV) {
|
||||||
return (
|
return (
|
||||||
<View
|
<View
|
||||||
style={{
|
style={[
|
||||||
position: "absolute",
|
tvBadgeBase,
|
||||||
top: 8,
|
{ minWidth: scaleSize(28), paddingHorizontal: scaleSize(7) },
|
||||||
right: 8,
|
]}
|
||||||
backgroundColor: "rgba(255,255,255,0.9)",
|
|
||||||
borderRadius: 14,
|
|
||||||
width: 28,
|
|
||||||
height: 28,
|
|
||||||
alignItems: "center",
|
|
||||||
justifyContent: "center",
|
|
||||||
}}
|
|
||||||
>
|
>
|
||||||
<Ionicons name='checkmark' size={18} color='black' />
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: scaleSize(15),
|
||||||
|
fontWeight: "700",
|
||||||
|
color: "black",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
return null;
|
|
||||||
|
return (
|
||||||
|
<View style={[mobileBadgeBase, { minWidth: 20, paddingHorizontal: 5 }]}>
|
||||||
|
<Text style={{ fontSize: 12, fontWeight: "700", color: "white" }}>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
},
|
||||||
|
);
|
||||||
|
|
||||||
|
export const WatchedIndicator: React.FC<{ item: BaseItemDto }> = ({ item }) => {
|
||||||
|
const isMovieOrEpisode = item.Type === "Movie" || item.Type === "Episode";
|
||||||
|
const isAggregate = isAggregateType(item);
|
||||||
|
const isPlayed = item.UserData?.Played === true;
|
||||||
|
|
||||||
|
if (Platform.isTV) {
|
||||||
|
// Fully watched → white checkmark badge (top-right)
|
||||||
|
if (isPlayed && (isMovieOrEpisode || isAggregate)) {
|
||||||
|
return (
|
||||||
|
<View style={[tvBadgeBase, { width: scaleSize(28) }]}>
|
||||||
|
<Ionicons name='checkmark' size={scaleSize(18)} color='black' />
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
// Series/BoxSet with remaining episodes → count badge
|
||||||
|
return <UnplayedCountBadge item={item} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mobile: Show purple triangle for unwatched
|
// Mobile: purple corner ribbon for unwatched Movie/Episode (existing behavior)
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
{item.UserData?.Played === false &&
|
{/* Strict === false: items without UserData (unknown state) get no ribbon */}
|
||||||
(item.Type === "Movie" || item.Type === "Episode") && (
|
{isMovieOrEpisode && item.UserData?.Played === false && (
|
||||||
<View className='bg-purple-600 w-8 h-8 absolute -top-4 -right-4 rotate-45' />
|
<View className='bg-purple-600 w-8 h-8 absolute -top-4 -right-4 rotate-45' />
|
||||||
)}
|
)}
|
||||||
|
|
||||||
|
{/* Fully watched Series/BoxSet → small purple checkmark */}
|
||||||
|
{isAggregate && isPlayed && (
|
||||||
|
<View style={[mobileBadgeBase, { width: 20 }]}>
|
||||||
|
<Ionicons name='checkmark' size={13} color='white' />
|
||||||
|
</View>
|
||||||
|
)}
|
||||||
|
|
||||||
|
{/* Series/BoxSet with remaining episodes → count badge */}
|
||||||
|
<UnplayedCountBadge item={item} />
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -16,9 +16,12 @@ export const SeriesCard: React.FC<{ items: BaseItemDto[] }> = ({ items }) => {
|
|||||||
const { showActionSheetWithOptions } = useActionSheet();
|
const { showActionSheetWithOptions } = useActionSheet();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
||||||
|
// Keyed on SeriesId so recycled FlashList cells re-read the correct poster
|
||||||
|
// instead of freezing the first-rendered series' image (empty deps bug).
|
||||||
const base64Image = useMemo(() => {
|
const base64Image = useMemo(() => {
|
||||||
return storage.getString(items[0].SeriesId!);
|
const seriesId = items[0]?.SeriesId;
|
||||||
}, []);
|
return seriesId ? storage.getString(seriesId) : undefined;
|
||||||
|
}, [items[0]?.SeriesId]);
|
||||||
|
|
||||||
const deleteSeries = useCallback(
|
const deleteSeries = useCallback(
|
||||||
async () =>
|
async () =>
|
||||||
|
|||||||
@@ -140,9 +140,11 @@ export const Home = () => {
|
|||||||
let isCancelled = false;
|
let isCancelled = false;
|
||||||
|
|
||||||
const performCrossfade = async () => {
|
const performCrossfade = async () => {
|
||||||
// Prefetch the image before starting the crossfade
|
// Prefetch to disk only - the full-size 1920x1080 backdrop (~8MB
|
||||||
|
// decoded ARGB) is too large to pin in the memory cache on every
|
||||||
|
// focus change. Disk cache is fast enough for a 500ms crossfade.
|
||||||
try {
|
try {
|
||||||
await Image.prefetch(backdropUrl);
|
await Image.prefetch(backdropUrl, "disk");
|
||||||
} catch {
|
} catch {
|
||||||
// Continue even if prefetch fails
|
// Continue even if prefetch fails
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -201,12 +201,18 @@ export const InfiniteScrollingCollectionList: React.FC<Props> = ({
|
|||||||
|
|
||||||
const handleSeeAllPress = useCallback(() => {
|
const handleSeeAllPress = useCallback(() => {
|
||||||
if (!parentId) return;
|
if (!parentId) return;
|
||||||
|
// Navigate into the library detail (lives in the libraries tab) sorted by most
|
||||||
|
// recently added. The `fromSeeAll` flag tells the detail page to (a) collapse
|
||||||
|
// the libraries stack so the native tab can't auto-pop it back to the list, and
|
||||||
|
// (b) intercept Back to route to the library list so the user can switch
|
||||||
|
// libraries. See app/(auth)/(tabs)/(libraries)/[libraryId].tsx.
|
||||||
router.push({
|
router.push({
|
||||||
pathname: "/(auth)/(tabs)/(libraries)/[libraryId]",
|
pathname: "/[libraryId]",
|
||||||
params: {
|
params: {
|
||||||
libraryId: parentId,
|
libraryId: parentId,
|
||||||
sortBy: SortByOption.DateCreated,
|
sortBy: SortByOption.DateCreated,
|
||||||
sortOrder: SortOrderOption.Descending,
|
sortOrder: SortOrderOption.Descending,
|
||||||
|
fromSeeAll: "true",
|
||||||
},
|
},
|
||||||
} as any);
|
} as any);
|
||||||
}, [router, parentId]);
|
}, [router, parentId]);
|
||||||
@@ -326,9 +332,9 @@ export const InfiniteScrollingCollectionList: React.FC<Props> = ({
|
|||||||
showsHorizontalScrollIndicator={false}
|
showsHorizontalScrollIndicator={false}
|
||||||
onEndReached={handleEndReached}
|
onEndReached={handleEndReached}
|
||||||
onEndReachedThreshold={0.5}
|
onEndReachedThreshold={0.5}
|
||||||
initialNumToRender={5}
|
initialNumToRender={4}
|
||||||
maxToRenderPerBatch={3}
|
maxToRenderPerBatch={2}
|
||||||
windowSize={5}
|
windowSize={3}
|
||||||
removeClippedSubviews={false}
|
removeClippedSubviews={false}
|
||||||
maintainVisibleContentPosition={{ minIndexForVisible: 0 }}
|
maintainVisibleContentPosition={{ minIndexForVisible: 0 }}
|
||||||
style={{ overflow: "visible" }}
|
style={{ overflow: "visible" }}
|
||||||
@@ -348,11 +354,14 @@ export const InfiniteScrollingCollectionList: React.FC<Props> = ({
|
|||||||
// contentOffset={{ x: -sizes.padding.horizontal, y: 0 }}
|
// contentOffset={{ x: -sizes.padding.horizontal, y: 0 }}
|
||||||
// contentContainerStyle={{ paddingVertical: SCALE_PADDING }}
|
// contentContainerStyle={{ paddingVertical: SCALE_PADDING }}
|
||||||
ListFooterComponent={
|
ListFooterComponent={
|
||||||
|
// No fixed width: the footer must size to the "See All" card so the
|
||||||
|
// FlatList's scrollable content extends to fully reveal it. A fixed
|
||||||
|
// (narrow) width clipped the card at the right edge. Trailing space is
|
||||||
|
// provided by contentContainerStyle.paddingRight.
|
||||||
<View
|
<View
|
||||||
style={{
|
style={{
|
||||||
flexDirection: "row",
|
flexDirection: "row",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
width: sizes.padding.horizontal,
|
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{isFetchingNextPage && (
|
{isFetchingNextPage && (
|
||||||
|
|||||||
@@ -256,8 +256,11 @@ export const TVHeroCarousel: React.FC<TVHeroCarouselProps> = ({
|
|||||||
let isCancelled = false;
|
let isCancelled = false;
|
||||||
|
|
||||||
const performCrossfade = async () => {
|
const performCrossfade = async () => {
|
||||||
|
// Disk-only prefetch: backdrops are ~8MB decoded ARGB; keeping them
|
||||||
|
// out of the memory cache avoids bloat when the user cycles through
|
||||||
|
// hero items quickly.
|
||||||
try {
|
try {
|
||||||
await Image.prefetch(backdropUrl);
|
await Image.prefetch(backdropUrl, "disk");
|
||||||
} catch {
|
} catch {
|
||||||
// Continue even if prefetch fails
|
// Continue even if prefetch fails
|
||||||
}
|
}
|
||||||
@@ -379,7 +382,7 @@ export const TVHeroCarousel: React.FC<TVHeroCarouselProps> = ({
|
|||||||
if (items.length === 0) return null;
|
if (items.length === 0) return null;
|
||||||
|
|
||||||
// Extra top padding for tvOS to clear the menu bar
|
// Extra top padding for tvOS to clear the menu bar
|
||||||
const tvosTopPadding = Platform.OS === "ios" ? scaleSize(145) : 0;
|
const tvosTopPadding = scaleSize(145);
|
||||||
const heroHeight = SCREEN_HEIGHT * sizes.padding.heroHeight;
|
const heroHeight = SCREEN_HEIGHT * sizes.padding.heroHeight;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@@ -156,9 +156,9 @@ export const TVActorPage: React.FC<TVActorPageProps> = ({ personId }) => {
|
|||||||
let isCancelled = false;
|
let isCancelled = false;
|
||||||
|
|
||||||
const performCrossfade = async () => {
|
const performCrossfade = async () => {
|
||||||
// Prefetch the image before starting the crossfade
|
// Disk-only prefetch to avoid pinning large backdrops in memory cache.
|
||||||
try {
|
try {
|
||||||
await Image.prefetch(backdropUrl);
|
await Image.prefetch(backdropUrl, "disk");
|
||||||
} catch {
|
} catch {
|
||||||
// Continue even if prefetch fails
|
// Continue even if prefetch fails
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
import { type BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
import { type BaseItemDto } from "@jellyfin/sdk/lib/generated-client/models";
|
||||||
import { useState } from "react";
|
import { useState } from "react";
|
||||||
import { View, type ViewProps } from "react-native";
|
import { View, type ViewProps } from "react-native";
|
||||||
|
import { WatchedIndicator } from "@/components/WatchedIndicator";
|
||||||
import { ItemImage } from "../common/ItemImage";
|
import { ItemImage } from "../common/ItemImage";
|
||||||
import { WatchedIndicator } from "../WatchedIndicator";
|
|
||||||
|
|
||||||
interface Props extends ViewProps {
|
interface Props extends ViewProps {
|
||||||
item: BaseItemDto;
|
item: BaseItemDto;
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ import { Image } from "expo-image";
|
|||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { View } from "react-native";
|
import { View } from "react-native";
|
||||||
|
import { WatchedIndicator } from "@/components/WatchedIndicator";
|
||||||
import { apiAtom } from "@/providers/JellyfinProvider";
|
import { apiAtom } from "@/providers/JellyfinProvider";
|
||||||
import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl";
|
import { getPrimaryImageUrl } from "@/utils/jellyfin/image/getPrimaryImageUrl";
|
||||||
|
|
||||||
@@ -52,6 +53,7 @@ const SeriesPoster: React.FC<MoviePosterProps> = ({ item }) => {
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
|
<WatchedIndicator item={item} />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import { useQuery } from "@tanstack/react-query";
|
import { useQuery, useQueryClient } from "@tanstack/react-query";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Platform, View } from "react-native";
|
import { Alert, Platform, View } from "react-native";
|
||||||
import { toast } from "sonner-native";
|
import { toast } from "sonner-native";
|
||||||
import { Text } from "@/components/common/Text";
|
import { Text } from "@/components/common/Text";
|
||||||
import { Colors } from "@/constants/Colors";
|
import { Colors } from "@/constants/Colors";
|
||||||
@@ -12,6 +12,7 @@ import { ListItem } from "../list/ListItem";
|
|||||||
export const StorageSettings = () => {
|
export const StorageSettings = () => {
|
||||||
const { deleteAllFiles, appSizeUsage } = useDownload();
|
const { deleteAllFiles, appSizeUsage } = useDownload();
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
const queryClient = useQueryClient();
|
||||||
const successHapticFeedback = useHaptic("success");
|
const successHapticFeedback = useHaptic("success");
|
||||||
const errorHapticFeedback = useHaptic("error");
|
const errorHapticFeedback = useHaptic("error");
|
||||||
|
|
||||||
@@ -27,16 +28,38 @@ export const StorageSettings = () => {
|
|||||||
used: (app.total - app.remaining) / app.total,
|
used: (app.total - app.remaining) / app.total,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
// Keep the bar moving while a download is writing to disk.
|
||||||
|
refetchInterval: 10 * 1000,
|
||||||
});
|
});
|
||||||
|
|
||||||
const onDeleteClicked = async () => {
|
const onDeleteClicked = () => {
|
||||||
try {
|
Alert.alert(
|
||||||
await deleteAllFiles();
|
t("home.settings.storage.delete_all_downloaded_files_confirm"),
|
||||||
successHapticFeedback();
|
t("home.settings.storage.delete_all_downloaded_files_confirm_desc"),
|
||||||
} catch (_e) {
|
[
|
||||||
errorHapticFeedback();
|
{
|
||||||
toast.error(t("home.settings.toasts.error_deleting_files"));
|
text: t("common.cancel"),
|
||||||
}
|
style: "cancel",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
text: t("common.ok"),
|
||||||
|
style: "destructive",
|
||||||
|
onPress: async () => {
|
||||||
|
try {
|
||||||
|
await deleteAllFiles();
|
||||||
|
successHapticFeedback();
|
||||||
|
} catch (_e) {
|
||||||
|
errorHapticFeedback();
|
||||||
|
toast.error(t("home.settings.toasts.error_deleting_files"));
|
||||||
|
} finally {
|
||||||
|
// Reflect the freed space immediately instead of waiting for
|
||||||
|
// the next poll.
|
||||||
|
queryClient.invalidateQueries({ queryKey: ["appSize"] });
|
||||||
|
}
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const calculatePercentage = (value: number, total: number) => {
|
const calculatePercentage = (value: number, total: number) => {
|
||||||
|
|||||||
155
components/tv/TVNavBar.tsx
Normal file
155
components/tv/TVNavBar.tsx
Normal file
@@ -0,0 +1,155 @@
|
|||||||
|
import React from "react";
|
||||||
|
import {
|
||||||
|
Animated,
|
||||||
|
Pressable,
|
||||||
|
ScrollView,
|
||||||
|
StyleProp,
|
||||||
|
View,
|
||||||
|
ViewStyle,
|
||||||
|
} from "react-native";
|
||||||
|
import { useSafeAreaInsets } from "react-native-safe-area-context";
|
||||||
|
import { Text } from "@/components/common/Text";
|
||||||
|
import { useTVFocusAnimation } from "@/components/tv/hooks/useTVFocusAnimation";
|
||||||
|
import { TVPadding } from "@/constants/TVSizes";
|
||||||
|
import { useScaledTVTypography } from "@/constants/TVTypography";
|
||||||
|
import { scaleSize } from "@/utils/scaleSize";
|
||||||
|
|
||||||
|
export interface TVNavBarTab {
|
||||||
|
key: string;
|
||||||
|
label: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TVNavBarProps {
|
||||||
|
tabs: TVNavBarTab[];
|
||||||
|
activeTabKey: string;
|
||||||
|
onTabChange: (key: string) => void;
|
||||||
|
style?: StyleProp<ViewStyle>;
|
||||||
|
}
|
||||||
|
|
||||||
|
const TVNavBarTabItem: React.FC<{
|
||||||
|
label: string;
|
||||||
|
isActive: boolean;
|
||||||
|
onSelect: () => void;
|
||||||
|
onLayout: (e: {
|
||||||
|
nativeEvent: { layout: { x: number; width: number } };
|
||||||
|
}) => void;
|
||||||
|
hasTVPreferredFocus: boolean;
|
||||||
|
}> = ({ label, isActive, onSelect, onLayout, hasTVPreferredFocus }) => {
|
||||||
|
const typography = useScaledTVTypography();
|
||||||
|
const { focused, handleFocus, handleBlur, animatedStyle } =
|
||||||
|
useTVFocusAnimation({
|
||||||
|
scaleAmount: 1.05,
|
||||||
|
duration: 120,
|
||||||
|
});
|
||||||
|
|
||||||
|
const bg = focused
|
||||||
|
? "rgba(255, 255, 255, 0.95)"
|
||||||
|
: isActive
|
||||||
|
? "rgba(255, 255, 255, 0.15)"
|
||||||
|
: "transparent";
|
||||||
|
|
||||||
|
const textColor = focused
|
||||||
|
? "#000"
|
||||||
|
: isActive
|
||||||
|
? "#fff"
|
||||||
|
: "rgba(255, 255, 255, 0.7)";
|
||||||
|
|
||||||
|
return (
|
||||||
|
<Pressable
|
||||||
|
onPress={onSelect}
|
||||||
|
onFocus={handleFocus}
|
||||||
|
onBlur={handleBlur}
|
||||||
|
hasTVPreferredFocus={hasTVPreferredFocus}
|
||||||
|
onLayout={onLayout}
|
||||||
|
>
|
||||||
|
<Animated.View
|
||||||
|
style={[
|
||||||
|
animatedStyle,
|
||||||
|
{
|
||||||
|
backgroundColor: bg,
|
||||||
|
borderRadius: scaleSize(24),
|
||||||
|
borderWidth: isActive && !focused ? 1 : 0,
|
||||||
|
borderColor: "rgba(255, 255, 255, 0.3)",
|
||||||
|
paddingHorizontal: scaleSize(28),
|
||||||
|
paddingVertical: scaleSize(14),
|
||||||
|
},
|
||||||
|
]}
|
||||||
|
>
|
||||||
|
<Text
|
||||||
|
style={{
|
||||||
|
fontSize: typography.heading,
|
||||||
|
color: textColor,
|
||||||
|
fontWeight: isActive || focused ? "600" : "400",
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{label}
|
||||||
|
</Text>
|
||||||
|
</Animated.View>
|
||||||
|
</Pressable>
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
|
export const TVNavBar: React.FC<TVNavBarProps> = ({
|
||||||
|
tabs,
|
||||||
|
activeTabKey,
|
||||||
|
onTabChange,
|
||||||
|
style,
|
||||||
|
}) => {
|
||||||
|
const scrollRef = React.useRef<ScrollView>(null);
|
||||||
|
const tabLayouts = React.useRef<Record<string, { x: number; width: number }>>(
|
||||||
|
{},
|
||||||
|
);
|
||||||
|
const insets = useSafeAreaInsets();
|
||||||
|
|
||||||
|
const handleTabLayout = React.useCallback(
|
||||||
|
(key: string) =>
|
||||||
|
(e: { nativeEvent: { layout: { x: number; width: number } } }) => {
|
||||||
|
tabLayouts.current[key] = e.nativeEvent.layout;
|
||||||
|
},
|
||||||
|
[],
|
||||||
|
);
|
||||||
|
|
||||||
|
const handleTabChange = React.useCallback(
|
||||||
|
(key: string) => {
|
||||||
|
onTabChange(key);
|
||||||
|
|
||||||
|
const layout = tabLayouts.current[key];
|
||||||
|
if (layout && scrollRef.current) {
|
||||||
|
scrollRef.current.scrollTo({
|
||||||
|
x: Math.max(0, layout.x - TVPadding.horizontal / 2),
|
||||||
|
animated: true,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
[onTabChange],
|
||||||
|
);
|
||||||
|
|
||||||
|
if (tabs.length === 0) return null;
|
||||||
|
|
||||||
|
return (
|
||||||
|
<View style={[{ paddingTop: insets.top + 16, paddingBottom: 8 }, style]}>
|
||||||
|
<ScrollView
|
||||||
|
ref={scrollRef}
|
||||||
|
horizontal
|
||||||
|
showsHorizontalScrollIndicator={false}
|
||||||
|
keyboardShouldPersistTaps='handled'
|
||||||
|
contentContainerStyle={{
|
||||||
|
flexGrow: 1,
|
||||||
|
justifyContent: "center",
|
||||||
|
gap: scaleSize(12),
|
||||||
|
}}
|
||||||
|
>
|
||||||
|
{tabs.map((tab) => (
|
||||||
|
<TVNavBarTabItem
|
||||||
|
key={tab.key}
|
||||||
|
label={tab.label}
|
||||||
|
isActive={tab.key === activeTabKey}
|
||||||
|
onSelect={() => handleTabChange(tab.key)}
|
||||||
|
onLayout={handleTabLayout(tab.key)}
|
||||||
|
hasTVPreferredFocus={tab.key === activeTabKey}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</ScrollView>
|
||||||
|
</View>
|
||||||
|
);
|
||||||
|
};
|
||||||
@@ -12,7 +12,10 @@ import {
|
|||||||
} from "react-native";
|
} from "react-native";
|
||||||
import { ProgressBar } from "@/components/common/ProgressBar";
|
import { ProgressBar } from "@/components/common/ProgressBar";
|
||||||
import { Text } from "@/components/common/Text";
|
import { Text } from "@/components/common/Text";
|
||||||
import { WatchedIndicator } from "@/components/WatchedIndicator";
|
import {
|
||||||
|
UnplayedCountBadge,
|
||||||
|
WatchedIndicator,
|
||||||
|
} from "@/components/WatchedIndicator";
|
||||||
import { useScaledTVPosterSizes } from "@/constants/TVPosterSizes";
|
import { useScaledTVPosterSizes } from "@/constants/TVPosterSizes";
|
||||||
import { useScaledTVTypography } from "@/constants/TVTypography";
|
import { useScaledTVTypography } from "@/constants/TVTypography";
|
||||||
import {
|
import {
|
||||||
@@ -427,6 +430,12 @@ export const TVPosterCard: React.FC<TVPosterCardProps> = ({
|
|||||||
/>
|
/>
|
||||||
{PlayButtonOverlay}
|
{PlayButtonOverlay}
|
||||||
{NowPlayingBadge}
|
{NowPlayingBadge}
|
||||||
|
{/*
|
||||||
|
The glass view draws the watched checkmark natively but cannot show
|
||||||
|
an unplayed-episode count, so render it as an RN overlay on top.
|
||||||
|
Returns null when not applicable (non-series / fully watched).
|
||||||
|
*/}
|
||||||
|
{showWatchedIndicator && <UnplayedCountBadge item={item} />}
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -448,8 +457,8 @@ export const TVPosterCard: React.FC<TVPosterCardProps> = ({
|
|||||||
<Image
|
<Image
|
||||||
placeholder={{ blurhash }}
|
placeholder={{ blurhash }}
|
||||||
key={item.Id}
|
key={item.Id}
|
||||||
id={item.Id}
|
|
||||||
source={{ uri: imageUrl }}
|
source={{ uri: imageUrl }}
|
||||||
|
recyclingKey={item.Id}
|
||||||
cachePolicy='memory-disk'
|
cachePolicy='memory-disk'
|
||||||
contentFit='cover'
|
contentFit='cover'
|
||||||
style={{
|
style={{
|
||||||
@@ -459,7 +468,7 @@ export const TVPosterCard: React.FC<TVPosterCardProps> = ({
|
|||||||
/>
|
/>
|
||||||
{PlayButtonOverlay}
|
{PlayButtonOverlay}
|
||||||
{NowPlayingBadge}
|
{NowPlayingBadge}
|
||||||
<WatchedIndicator item={item} />
|
{showWatchedIndicator && <WatchedIndicator item={item} />}
|
||||||
<ProgressBar item={item} />
|
<ProgressBar item={item} />
|
||||||
</View>
|
</View>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -35,6 +35,8 @@ export type { TVLanguageCardProps } from "./TVLanguageCard";
|
|||||||
export { TVLanguageCard } from "./TVLanguageCard";
|
export { TVLanguageCard } from "./TVLanguageCard";
|
||||||
export type { TVMetadataBadgesProps } from "./TVMetadataBadges";
|
export type { TVMetadataBadgesProps } from "./TVMetadataBadges";
|
||||||
export { TVMetadataBadges } from "./TVMetadataBadges";
|
export { TVMetadataBadges } from "./TVMetadataBadges";
|
||||||
|
export type { TVNavBarProps, TVNavBarTab } from "./TVNavBar";
|
||||||
|
export { TVNavBar } from "./TVNavBar";
|
||||||
export type { TVNextEpisodeCountdownProps } from "./TVNextEpisodeCountdown";
|
export type { TVNextEpisodeCountdownProps } from "./TVNextEpisodeCountdown";
|
||||||
export { TVNextEpisodeCountdown } from "./TVNextEpisodeCountdown";
|
export { TVNextEpisodeCountdown } from "./TVNextEpisodeCountdown";
|
||||||
export type { TVOptionButtonProps } from "./TVOptionButton";
|
export type { TVOptionButtonProps } from "./TVOptionButton";
|
||||||
|
|||||||
@@ -564,6 +564,9 @@ export const Controls: FC<Props> = ({
|
|||||||
title: t("item_card.audio"),
|
title: t("item_card.audio"),
|
||||||
options: audioOptions,
|
options: audioOptions,
|
||||||
onSelect: handleAudioChange,
|
onSelect: handleAudioChange,
|
||||||
|
// In-player audio selection navigates (replacePlayer while transcoding);
|
||||||
|
// apply it after the modal is dismissed so it isn't swallowed.
|
||||||
|
deferApplyUntilDismissed: true,
|
||||||
});
|
});
|
||||||
controlsInteractionRef.current();
|
controlsInteractionRef.current();
|
||||||
}, [showOptions, t, audioOptions, handleAudioChange]);
|
}, [showOptions, t, audioOptions, handleAudioChange]);
|
||||||
|
|||||||
@@ -1,560 +0,0 @@
|
|||||||
import { Ionicons } from "@expo/vector-icons";
|
|
||||||
import type {
|
|
||||||
BaseItemDto,
|
|
||||||
MediaStream,
|
|
||||||
} from "@jellyfin/sdk/lib/generated-client";
|
|
||||||
import { BlurView } from "expo-blur";
|
|
||||||
import React, {
|
|
||||||
useCallback,
|
|
||||||
useEffect,
|
|
||||||
useMemo,
|
|
||||||
useRef,
|
|
||||||
useState,
|
|
||||||
} from "react";
|
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
import {
|
|
||||||
ActivityIndicator,
|
|
||||||
Animated,
|
|
||||||
Easing,
|
|
||||||
ScrollView,
|
|
||||||
StyleSheet,
|
|
||||||
TVFocusGuideView,
|
|
||||||
View,
|
|
||||||
} from "react-native";
|
|
||||||
import { Text } from "@/components/common/Text";
|
|
||||||
import {
|
|
||||||
TVCancelButton,
|
|
||||||
TVLanguageCard,
|
|
||||||
TVSubtitleResultCard,
|
|
||||||
TVTabButton,
|
|
||||||
TVTrackCard,
|
|
||||||
} from "@/components/tv";
|
|
||||||
import {
|
|
||||||
type SubtitleSearchResult,
|
|
||||||
useRemoteSubtitles,
|
|
||||||
} from "@/hooks/useRemoteSubtitles";
|
|
||||||
import { COMMON_SUBTITLE_LANGUAGES } from "@/utils/opensubtitles/api";
|
|
||||||
|
|
||||||
interface TVSubtitleSheetProps {
|
|
||||||
visible: boolean;
|
|
||||||
item: BaseItemDto;
|
|
||||||
mediaSourceId?: string | null;
|
|
||||||
subtitleTracks: MediaStream[];
|
|
||||||
currentSubtitleIndex: number;
|
|
||||||
onSubtitleIndexChange: (index: number) => void;
|
|
||||||
onClose: () => void;
|
|
||||||
onServerSubtitleDownloaded?: () => void;
|
|
||||||
onLocalSubtitleDownloaded?: (path: string) => void;
|
|
||||||
}
|
|
||||||
|
|
||||||
type TabType = "tracks" | "download";
|
|
||||||
|
|
||||||
export const TVSubtitleSheet: React.FC<TVSubtitleSheetProps> = ({
|
|
||||||
visible,
|
|
||||||
item,
|
|
||||||
mediaSourceId,
|
|
||||||
subtitleTracks,
|
|
||||||
currentSubtitleIndex,
|
|
||||||
onSubtitleIndexChange,
|
|
||||||
onClose,
|
|
||||||
onServerSubtitleDownloaded,
|
|
||||||
onLocalSubtitleDownloaded,
|
|
||||||
}) => {
|
|
||||||
const { t } = useTranslation();
|
|
||||||
|
|
||||||
console.log(
|
|
||||||
"[TVSubtitleSheet] visible:",
|
|
||||||
visible,
|
|
||||||
"tracks:",
|
|
||||||
subtitleTracks.length,
|
|
||||||
);
|
|
||||||
const [activeTab, setActiveTab] = useState<TabType>("tracks");
|
|
||||||
const [selectedLanguage, setSelectedLanguage] = useState("eng");
|
|
||||||
const [downloadingId, setDownloadingId] = useState<string | null>(null);
|
|
||||||
const [hasSearchedThisSession, setHasSearchedThisSession] = useState(false);
|
|
||||||
const [isReady, setIsReady] = useState(false);
|
|
||||||
const [isTabContentReady, setIsTabContentReady] = useState(false);
|
|
||||||
const firstTrackRef = useRef<View>(null);
|
|
||||||
|
|
||||||
const {
|
|
||||||
hasOpenSubtitlesApiKey,
|
|
||||||
isSearching,
|
|
||||||
searchError,
|
|
||||||
searchResults,
|
|
||||||
search,
|
|
||||||
downloadAsync,
|
|
||||||
reset,
|
|
||||||
} = useRemoteSubtitles({
|
|
||||||
itemId: item.Id ?? "",
|
|
||||||
item,
|
|
||||||
mediaSourceId,
|
|
||||||
});
|
|
||||||
|
|
||||||
const resetRef = useRef(reset);
|
|
||||||
resetRef.current = reset;
|
|
||||||
|
|
||||||
const overlayOpacity = useRef(new Animated.Value(0)).current;
|
|
||||||
const sheetTranslateY = useRef(new Animated.Value(300)).current;
|
|
||||||
|
|
||||||
const initialSelectedTrackIndex = useMemo(() => {
|
|
||||||
if (currentSubtitleIndex === -1) return 0;
|
|
||||||
const trackIdx = subtitleTracks.findIndex(
|
|
||||||
(t) => t.Index === currentSubtitleIndex,
|
|
||||||
);
|
|
||||||
return trackIdx >= 0 ? trackIdx + 1 : 0;
|
|
||||||
}, [subtitleTracks, currentSubtitleIndex]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (visible) {
|
|
||||||
overlayOpacity.setValue(0);
|
|
||||||
sheetTranslateY.setValue(300);
|
|
||||||
|
|
||||||
Animated.parallel([
|
|
||||||
Animated.timing(overlayOpacity, {
|
|
||||||
toValue: 1,
|
|
||||||
duration: 250,
|
|
||||||
easing: Easing.out(Easing.quad),
|
|
||||||
useNativeDriver: true,
|
|
||||||
}),
|
|
||||||
Animated.timing(sheetTranslateY, {
|
|
||||||
toValue: 0,
|
|
||||||
duration: 300,
|
|
||||||
easing: Easing.out(Easing.cubic),
|
|
||||||
useNativeDriver: true,
|
|
||||||
}),
|
|
||||||
]).start();
|
|
||||||
}
|
|
||||||
}, [visible, overlayOpacity, sheetTranslateY]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (!visible) {
|
|
||||||
setHasSearchedThisSession(false);
|
|
||||||
setActiveTab("tracks");
|
|
||||||
resetRef.current();
|
|
||||||
setIsReady(false);
|
|
||||||
}
|
|
||||||
}, [visible]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (visible) {
|
|
||||||
const timer = setTimeout(() => setIsReady(true), 100);
|
|
||||||
return () => clearTimeout(timer);
|
|
||||||
}
|
|
||||||
setIsReady(false);
|
|
||||||
}, [visible]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (visible && activeTab === "download" && !hasSearchedThisSession) {
|
|
||||||
search({ language: selectedLanguage });
|
|
||||||
setHasSearchedThisSession(true);
|
|
||||||
}
|
|
||||||
}, [visible, activeTab, hasSearchedThisSession, search, selectedLanguage]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (isReady) {
|
|
||||||
setIsTabContentReady(false);
|
|
||||||
const timer = setTimeout(() => setIsTabContentReady(true), 50);
|
|
||||||
return () => clearTimeout(timer);
|
|
||||||
}
|
|
||||||
setIsTabContentReady(false);
|
|
||||||
}, [activeTab, isReady]);
|
|
||||||
|
|
||||||
const handleLanguageSelect = useCallback(
|
|
||||||
(code: string) => {
|
|
||||||
setSelectedLanguage(code);
|
|
||||||
search({ language: code });
|
|
||||||
},
|
|
||||||
[search],
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleTrackSelect = useCallback(
|
|
||||||
(index: number) => {
|
|
||||||
onSubtitleIndexChange(index);
|
|
||||||
onClose();
|
|
||||||
},
|
|
||||||
[onSubtitleIndexChange, onClose],
|
|
||||||
);
|
|
||||||
|
|
||||||
const handleDownload = useCallback(
|
|
||||||
async (result: SubtitleSearchResult) => {
|
|
||||||
setDownloadingId(result.id);
|
|
||||||
|
|
||||||
try {
|
|
||||||
const downloadResult = await downloadAsync(result);
|
|
||||||
|
|
||||||
if (downloadResult.type === "server") {
|
|
||||||
onServerSubtitleDownloaded?.();
|
|
||||||
} else if (downloadResult.type === "local" && downloadResult.path) {
|
|
||||||
onLocalSubtitleDownloaded?.(downloadResult.path);
|
|
||||||
}
|
|
||||||
|
|
||||||
onClose();
|
|
||||||
} catch (error) {
|
|
||||||
console.error("Failed to download subtitle:", error);
|
|
||||||
} finally {
|
|
||||||
setDownloadingId(null);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
[
|
|
||||||
downloadAsync,
|
|
||||||
onServerSubtitleDownloaded,
|
|
||||||
onLocalSubtitleDownloaded,
|
|
||||||
onClose,
|
|
||||||
],
|
|
||||||
);
|
|
||||||
|
|
||||||
const displayLanguages = useMemo(
|
|
||||||
() => COMMON_SUBTITLE_LANGUAGES.slice(0, 16),
|
|
||||||
[],
|
|
||||||
);
|
|
||||||
|
|
||||||
const trackOptions = useMemo(() => {
|
|
||||||
const noneOption = {
|
|
||||||
label: t("item_card.subtitles.none"),
|
|
||||||
sublabel: undefined as string | undefined,
|
|
||||||
value: -1,
|
|
||||||
selected: currentSubtitleIndex === -1,
|
|
||||||
};
|
|
||||||
const options = subtitleTracks.map((track) => ({
|
|
||||||
label:
|
|
||||||
track.DisplayTitle || `${track.Language || "Unknown"} (${track.Codec})`,
|
|
||||||
sublabel: track.Codec?.toUpperCase(),
|
|
||||||
value: track.Index!,
|
|
||||||
selected: track.Index === currentSubtitleIndex,
|
|
||||||
}));
|
|
||||||
return [noneOption, ...options];
|
|
||||||
}, [subtitleTracks, currentSubtitleIndex, t]);
|
|
||||||
|
|
||||||
if (!visible) return null;
|
|
||||||
|
|
||||||
return (
|
|
||||||
<Animated.View style={[styles.overlay, { opacity: overlayOpacity }]}>
|
|
||||||
<Animated.View
|
|
||||||
style={[
|
|
||||||
styles.sheetContainer,
|
|
||||||
{ transform: [{ translateY: sheetTranslateY }] },
|
|
||||||
]}
|
|
||||||
>
|
|
||||||
<BlurView intensity={90} tint='dark' style={styles.blurContainer}>
|
|
||||||
<TVFocusGuideView
|
|
||||||
trapFocusUp
|
|
||||||
trapFocusDown
|
|
||||||
trapFocusLeft
|
|
||||||
trapFocusRight
|
|
||||||
style={styles.content}
|
|
||||||
>
|
|
||||||
{/* Header with tabs */}
|
|
||||||
<View style={styles.header}>
|
|
||||||
<Text style={styles.title}>
|
|
||||||
{t("item_card.subtitles.label") || "Subtitles"}
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
{/* Tab bar */}
|
|
||||||
<View style={styles.tabRow}>
|
|
||||||
<TVTabButton
|
|
||||||
label={t("item_card.subtitles.tracks") || "Tracks"}
|
|
||||||
active={activeTab === "tracks"}
|
|
||||||
onSelect={() => setActiveTab("tracks")}
|
|
||||||
/>
|
|
||||||
<TVTabButton
|
|
||||||
label={t("player.download") || "Download"}
|
|
||||||
active={activeTab === "download"}
|
|
||||||
onSelect={() => setActiveTab("download")}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* Tracks Tab Content */}
|
|
||||||
{activeTab === "tracks" && isTabContentReady && (
|
|
||||||
<View style={styles.section}>
|
|
||||||
<ScrollView
|
|
||||||
horizontal
|
|
||||||
showsHorizontalScrollIndicator={false}
|
|
||||||
style={styles.tracksScroll}
|
|
||||||
contentContainerStyle={styles.tracksScrollContent}
|
|
||||||
>
|
|
||||||
{trackOptions.map((option, index) => (
|
|
||||||
<TVTrackCard
|
|
||||||
key={option.value}
|
|
||||||
ref={
|
|
||||||
index === initialSelectedTrackIndex
|
|
||||||
? firstTrackRef
|
|
||||||
: undefined
|
|
||||||
}
|
|
||||||
label={option.label}
|
|
||||||
sublabel={option.sublabel}
|
|
||||||
selected={option.selected}
|
|
||||||
hasTVPreferredFocus={index === initialSelectedTrackIndex}
|
|
||||||
onPress={() => handleTrackSelect(option.value)}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</ScrollView>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Download Tab Content */}
|
|
||||||
{activeTab === "download" && isTabContentReady && (
|
|
||||||
<>
|
|
||||||
{/* Language Selector */}
|
|
||||||
<View style={styles.section}>
|
|
||||||
<Text style={styles.sectionTitle}>
|
|
||||||
{t("player.language") || "Language"}
|
|
||||||
</Text>
|
|
||||||
<ScrollView
|
|
||||||
horizontal
|
|
||||||
showsHorizontalScrollIndicator={false}
|
|
||||||
style={styles.languageScroll}
|
|
||||||
contentContainerStyle={styles.languageScrollContent}
|
|
||||||
>
|
|
||||||
{displayLanguages.map((lang, index) => (
|
|
||||||
<TVLanguageCard
|
|
||||||
key={lang.code}
|
|
||||||
code={lang.code}
|
|
||||||
name={lang.name}
|
|
||||||
selected={selectedLanguage === lang.code}
|
|
||||||
hasTVPreferredFocus={
|
|
||||||
index === 0 &&
|
|
||||||
(!searchResults || searchResults.length === 0)
|
|
||||||
}
|
|
||||||
onPress={() => handleLanguageSelect(lang.code)}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</ScrollView>
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* Results Section */}
|
|
||||||
<View style={styles.section}>
|
|
||||||
<Text style={styles.sectionTitle}>
|
|
||||||
{t("player.results") || "Results"}
|
|
||||||
{searchResults && ` (${searchResults.length})`}
|
|
||||||
</Text>
|
|
||||||
|
|
||||||
{/* Loading state */}
|
|
||||||
{isSearching && (
|
|
||||||
<View style={styles.loadingContainer}>
|
|
||||||
<ActivityIndicator size='large' color='#fff' />
|
|
||||||
<Text style={styles.loadingText}>
|
|
||||||
{t("player.searching") || "Searching..."}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Error state */}
|
|
||||||
{searchError && !isSearching && (
|
|
||||||
<View style={styles.errorContainer}>
|
|
||||||
<Ionicons
|
|
||||||
name='alert-circle-outline'
|
|
||||||
size={32}
|
|
||||||
color='rgba(255,100,100,0.8)'
|
|
||||||
/>
|
|
||||||
<Text style={styles.errorText}>
|
|
||||||
{t("player.search_failed") || "Search failed"}
|
|
||||||
</Text>
|
|
||||||
<Text style={styles.errorHint}>
|
|
||||||
{!hasOpenSubtitlesApiKey
|
|
||||||
? t("player.no_subtitle_provider") ||
|
|
||||||
"No subtitle provider configured on server"
|
|
||||||
: String(searchError)}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* No results */}
|
|
||||||
{searchResults &&
|
|
||||||
searchResults.length === 0 &&
|
|
||||||
!isSearching &&
|
|
||||||
!searchError && (
|
|
||||||
<View style={styles.emptyContainer}>
|
|
||||||
<Ionicons
|
|
||||||
name='document-text-outline'
|
|
||||||
size={32}
|
|
||||||
color='rgba(255,255,255,0.4)'
|
|
||||||
/>
|
|
||||||
<Text style={styles.emptyText}>
|
|
||||||
{t("player.no_subtitles_found") ||
|
|
||||||
"No subtitles found"}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Results list */}
|
|
||||||
{searchResults &&
|
|
||||||
searchResults.length > 0 &&
|
|
||||||
!isSearching && (
|
|
||||||
<ScrollView
|
|
||||||
horizontal
|
|
||||||
showsHorizontalScrollIndicator={false}
|
|
||||||
style={styles.resultsScroll}
|
|
||||||
contentContainerStyle={styles.resultsScrollContent}
|
|
||||||
>
|
|
||||||
{searchResults.map((result, index) => (
|
|
||||||
<TVSubtitleResultCard
|
|
||||||
key={result.id}
|
|
||||||
result={result}
|
|
||||||
hasTVPreferredFocus={index === 0}
|
|
||||||
isDownloading={downloadingId === result.id}
|
|
||||||
onPress={() => handleDownload(result)}
|
|
||||||
/>
|
|
||||||
))}
|
|
||||||
</ScrollView>
|
|
||||||
)}
|
|
||||||
</View>
|
|
||||||
|
|
||||||
{/* API Key hint if no fallback available */}
|
|
||||||
{!hasOpenSubtitlesApiKey && (
|
|
||||||
<View style={styles.apiKeyHint}>
|
|
||||||
<Ionicons
|
|
||||||
name='information-circle-outline'
|
|
||||||
size={16}
|
|
||||||
color='rgba(255,255,255,0.4)'
|
|
||||||
/>
|
|
||||||
<Text style={styles.apiKeyHintText}>
|
|
||||||
{t("player.add_opensubtitles_key_hint") ||
|
|
||||||
"Add OpenSubtitles API key in settings for client-side fallback"}
|
|
||||||
</Text>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{/* Cancel button */}
|
|
||||||
{isReady && (
|
|
||||||
<View style={styles.cancelButtonContainer}>
|
|
||||||
<TVCancelButton
|
|
||||||
onPress={onClose}
|
|
||||||
label={t("common.cancel") || "Cancel"}
|
|
||||||
/>
|
|
||||||
</View>
|
|
||||||
)}
|
|
||||||
</TVFocusGuideView>
|
|
||||||
</BlurView>
|
|
||||||
</Animated.View>
|
|
||||||
</Animated.View>
|
|
||||||
);
|
|
||||||
};
|
|
||||||
|
|
||||||
const styles = StyleSheet.create({
|
|
||||||
overlay: {
|
|
||||||
position: "absolute",
|
|
||||||
top: 0,
|
|
||||||
left: 0,
|
|
||||||
right: 0,
|
|
||||||
bottom: 0,
|
|
||||||
backgroundColor: "rgba(0, 0, 0, 0.6)",
|
|
||||||
justifyContent: "flex-end",
|
|
||||||
zIndex: 1000,
|
|
||||||
},
|
|
||||||
sheetContainer: {
|
|
||||||
maxHeight: "70%",
|
|
||||||
},
|
|
||||||
blurContainer: {
|
|
||||||
borderTopLeftRadius: 24,
|
|
||||||
borderTopRightRadius: 24,
|
|
||||||
overflow: "hidden",
|
|
||||||
},
|
|
||||||
content: {
|
|
||||||
paddingTop: 24,
|
|
||||||
paddingBottom: 48,
|
|
||||||
},
|
|
||||||
header: {
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
marginBottom: 20,
|
|
||||||
},
|
|
||||||
title: {
|
|
||||||
fontSize: 24,
|
|
||||||
fontWeight: "600",
|
|
||||||
color: "#fff",
|
|
||||||
marginBottom: 16,
|
|
||||||
},
|
|
||||||
tabRow: {
|
|
||||||
flexDirection: "row",
|
|
||||||
gap: 24,
|
|
||||||
},
|
|
||||||
section: {
|
|
||||||
marginBottom: 20,
|
|
||||||
},
|
|
||||||
sectionTitle: {
|
|
||||||
fontSize: 14,
|
|
||||||
fontWeight: "500",
|
|
||||||
color: "rgba(255,255,255,0.5)",
|
|
||||||
textTransform: "uppercase",
|
|
||||||
letterSpacing: 1,
|
|
||||||
marginBottom: 12,
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
},
|
|
||||||
tracksScroll: {
|
|
||||||
overflow: "visible",
|
|
||||||
},
|
|
||||||
tracksScrollContent: {
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
paddingVertical: 8,
|
|
||||||
gap: 12,
|
|
||||||
},
|
|
||||||
languageScroll: {
|
|
||||||
overflow: "visible",
|
|
||||||
},
|
|
||||||
languageScrollContent: {
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
paddingVertical: 8,
|
|
||||||
gap: 10,
|
|
||||||
},
|
|
||||||
resultsScroll: {
|
|
||||||
overflow: "visible",
|
|
||||||
},
|
|
||||||
resultsScrollContent: {
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
paddingVertical: 8,
|
|
||||||
gap: 12,
|
|
||||||
},
|
|
||||||
loadingContainer: {
|
|
||||||
paddingVertical: 40,
|
|
||||||
alignItems: "center",
|
|
||||||
},
|
|
||||||
loadingText: {
|
|
||||||
color: "rgba(255,255,255,0.6)",
|
|
||||||
marginTop: 12,
|
|
||||||
fontSize: 14,
|
|
||||||
},
|
|
||||||
errorContainer: {
|
|
||||||
paddingVertical: 40,
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
alignItems: "center",
|
|
||||||
},
|
|
||||||
errorText: {
|
|
||||||
color: "rgba(255,100,100,0.9)",
|
|
||||||
marginTop: 8,
|
|
||||||
fontSize: 16,
|
|
||||||
fontWeight: "500",
|
|
||||||
},
|
|
||||||
errorHint: {
|
|
||||||
color: "rgba(255,255,255,0.5)",
|
|
||||||
marginTop: 4,
|
|
||||||
fontSize: 13,
|
|
||||||
textAlign: "center",
|
|
||||||
},
|
|
||||||
emptyContainer: {
|
|
||||||
paddingVertical: 40,
|
|
||||||
alignItems: "center",
|
|
||||||
},
|
|
||||||
emptyText: {
|
|
||||||
color: "rgba(255,255,255,0.5)",
|
|
||||||
marginTop: 8,
|
|
||||||
fontSize: 14,
|
|
||||||
},
|
|
||||||
apiKeyHint: {
|
|
||||||
flexDirection: "row",
|
|
||||||
alignItems: "center",
|
|
||||||
gap: 8,
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
paddingTop: 8,
|
|
||||||
},
|
|
||||||
apiKeyHintText: {
|
|
||||||
color: "rgba(255,255,255,0.4)",
|
|
||||||
fontSize: 12,
|
|
||||||
},
|
|
||||||
cancelButtonContainer: {
|
|
||||||
paddingHorizontal: 48,
|
|
||||||
paddingTop: 20,
|
|
||||||
alignItems: "flex-start",
|
|
||||||
},
|
|
||||||
});
|
|
||||||
@@ -342,6 +342,12 @@ export const TechnicalInfoOverlay: FC<TechnicalInfoOverlayProps> = memo(
|
|||||||
{info?.cacheSeconds !== undefined && (
|
{info?.cacheSeconds !== undefined && (
|
||||||
<Text style={textStyle}>
|
<Text style={textStyle}>
|
||||||
Buffer: {info.cacheSeconds.toFixed(1)}s
|
Buffer: {info.cacheSeconds.toFixed(1)}s
|
||||||
|
{info?.demuxerMaxBytes !== undefined
|
||||||
|
? ` (cap ${info.demuxerMaxBytes}MB` +
|
||||||
|
`${info.demuxerMaxBackBytes !== undefined ? ` / ${info.demuxerMaxBackBytes}MB back` : ""}` +
|
||||||
|
`${info?.cacheSecsLimit !== undefined && info.cacheSecsLimit < 3600 ? ` · ${info.cacheSecsLimit.toFixed(0)}s` : ""}` +
|
||||||
|
")"
|
||||||
|
: ""}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
{info?.voDriver && (
|
{info?.voDriver && (
|
||||||
@@ -350,6 +356,12 @@ export const TechnicalInfoOverlay: FC<TechnicalInfoOverlayProps> = memo(
|
|||||||
{info.hwdec ? ` / ${info.hwdec}` : ""}
|
{info.hwdec ? ` / ${info.hwdec}` : ""}
|
||||||
</Text>
|
</Text>
|
||||||
)}
|
)}
|
||||||
|
{info?.estimatedVfFps !== undefined && (
|
||||||
|
<Text style={textStyle}>
|
||||||
|
Output FPS: {info.estimatedVfFps.toFixed(2)}
|
||||||
|
{info?.fps ? ` (container ${formatFps(info.fps)})` : ""}
|
||||||
|
</Text>
|
||||||
|
)}
|
||||||
{info?.droppedFrames !== undefined && info.droppedFrames > 0 && (
|
{info?.droppedFrames !== undefined && info.droppedFrames > 0 && (
|
||||||
<Text style={[textStyle, styles.warningText]}>
|
<Text style={[textStyle, styles.warningText]}>
|
||||||
Dropped: {info.droppedFrames} frames
|
Dropped: {info.droppedFrames} frames
|
||||||
|
|||||||
@@ -3,9 +3,13 @@
|
|||||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
*/
|
*/
|
||||||
export default {
|
const MediaTypes = {
|
||||||
Audio: "Audio",
|
Audio: "Audio",
|
||||||
Video: "Video",
|
Video: "Video",
|
||||||
Photo: "Photo",
|
Photo: "Photo",
|
||||||
Book: "Book",
|
Book: "Book",
|
||||||
};
|
} as const;
|
||||||
|
|
||||||
|
export type MediaType = (typeof MediaTypes)[keyof typeof MediaTypes];
|
||||||
|
|
||||||
|
export default MediaTypes;
|
||||||
@@ -28,7 +28,7 @@ Apple TV uses a Top Shelf extension target, not the main app process.
|
|||||||
|
|
||||||
Relevant files:
|
Relevant files:
|
||||||
|
|
||||||
- [plugins/withTVOSTopShelf.js](../plugins/withTVOSTopShelf.js)
|
- [plugins/withTVOSTopShelf.ts](../plugins/withTVOSTopShelf.ts)
|
||||||
- [targets/StreamyfinTopShelf/TopShelfProvider.swift](../targets/StreamyfinTopShelf/TopShelfProvider.swift)
|
- [targets/StreamyfinTopShelf/TopShelfProvider.swift](../targets/StreamyfinTopShelf/TopShelfProvider.swift)
|
||||||
- [modules/top-shelf-cache/ios/TopShelfCacheModule.swift](../modules/top-shelf-cache/ios/TopShelfCacheModule.swift)
|
- [modules/top-shelf-cache/ios/TopShelfCacheModule.swift](../modules/top-shelf-cache/ios/TopShelfCacheModule.swift)
|
||||||
- [utils/topshelf/cache.ts](../utils/topshelf/cache.ts)
|
- [utils/topshelf/cache.ts](../utils/topshelf/cache.ts)
|
||||||
|
|||||||
@@ -4,41 +4,42 @@ import { Platform } from "react-native";
|
|||||||
import {
|
import {
|
||||||
disableTVMenuKeyInterception,
|
disableTVMenuKeyInterception,
|
||||||
enableTVMenuKeyInterception,
|
enableTVMenuKeyInterception,
|
||||||
|
useTVBackPress,
|
||||||
} from "./useTVBackPress";
|
} from "./useTVBackPress";
|
||||||
|
|
||||||
export { enableTVMenuKeyInterception } from "./useTVBackPress";
|
export { enableTVMenuKeyInterception } from "./useTVBackPress";
|
||||||
|
|
||||||
|
/** All tab route names used in the bottom tab navigator. */
|
||||||
|
export const TAB_ROUTES = [
|
||||||
|
"(home)",
|
||||||
|
"(search)",
|
||||||
|
"(favorites)",
|
||||||
|
"(libraries)",
|
||||||
|
"(watchlists)",
|
||||||
|
"(custom-links)",
|
||||||
|
"(settings)",
|
||||||
|
] as const;
|
||||||
|
|
||||||
|
export type TabRoute = (typeof TAB_ROUTES)[number];
|
||||||
|
|
||||||
|
/** Check if a segment string is a tab route. */
|
||||||
|
export function isTabRoute(s: string): s is TabRoute {
|
||||||
|
return (TAB_ROUTES as readonly string[]).includes(s);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if we're at the root of a tab
|
* Check if we're at the root of a tab
|
||||||
*/
|
*/
|
||||||
function isAtTabRoot(segments: string[]): boolean {
|
function isAtTabRoot(segments: string[]): boolean {
|
||||||
const lastSegment = segments[segments.length - 1];
|
const lastSegment = segments[segments.length - 1];
|
||||||
const tabNames = [
|
return isTabRoute(lastSegment) || lastSegment === "index";
|
||||||
"(home)",
|
|
||||||
"(search)",
|
|
||||||
"(favorites)",
|
|
||||||
"(libraries)",
|
|
||||||
"(watchlists)",
|
|
||||||
"(settings)",
|
|
||||||
"(custom-links)",
|
|
||||||
];
|
|
||||||
return tabNames.includes(lastSegment) || lastSegment === "index";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the current tab name from segments
|
* Get the current tab name from segments
|
||||||
*/
|
*/
|
||||||
function getCurrentTab(segments: string[]): string | undefined {
|
function getCurrentTab(segments: string[]): TabRoute | undefined {
|
||||||
return segments.find(
|
return segments.find(isTabRoute);
|
||||||
(s) =>
|
|
||||||
s === "(home)" ||
|
|
||||||
s === "(search)" ||
|
|
||||||
s === "(favorites)" ||
|
|
||||||
s === "(libraries)" ||
|
|
||||||
s === "(watchlists)" ||
|
|
||||||
s === "(settings)" ||
|
|
||||||
s === "(custom-links)",
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -49,7 +50,6 @@ function getCurrentTab(segments: string[]): string | undefined {
|
|||||||
export function useTVHomeBackHandler() {
|
export function useTVHomeBackHandler() {
|
||||||
const segments = useSegments();
|
const segments = useSegments();
|
||||||
|
|
||||||
// Get current state
|
|
||||||
const currentTab = getCurrentTab(segments);
|
const currentTab = getCurrentTab(segments);
|
||||||
const atTabRoot = isAtTabRoot(segments);
|
const atTabRoot = isAtTabRoot(segments);
|
||||||
const isOnHomeRoot = atTabRoot && currentTab === "(home)";
|
const isOnHomeRoot = atTabRoot && currentTab === "(home)";
|
||||||
@@ -65,3 +65,24 @@ export function useTVHomeBackHandler() {
|
|||||||
enableTVMenuKeyInterception();
|
enableTVMenuKeyInterception();
|
||||||
}, [isOnHomeRoot]);
|
}, [isOnHomeRoot]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Handles back press at a non-Home tab root on Android TV by navigating to Home.
|
||||||
|
*
|
||||||
|
* Without NativeTabs, the Stack navigator used for the Android TV nav bar has no
|
||||||
|
* built-in tab-level back handling — pressing back at a tab root would pop the
|
||||||
|
* Stack entirely and exit the tab navigator. This hook intercepts that and routes
|
||||||
|
* to Home instead.
|
||||||
|
*/
|
||||||
|
export function useTVTabRootBackHandler(
|
||||||
|
onNavigateHome: () => void,
|
||||||
|
isAtTabRoot: boolean,
|
||||||
|
currentTab: string | undefined,
|
||||||
|
) {
|
||||||
|
useTVBackPress(() => {
|
||||||
|
if (!Platform.isTV || Platform.OS !== "android") return false;
|
||||||
|
if (!isAtTabRoot || currentTab === "(home)") return false;
|
||||||
|
onNavigateHome();
|
||||||
|
return true;
|
||||||
|
}, [isAtTabRoot, currentTab, onNavigateHome]);
|
||||||
|
}
|
||||||
|
|||||||
@@ -12,6 +12,7 @@ interface ShowOptionsParams<T> {
|
|||||||
onSelect: (value: T) => void;
|
onSelect: (value: T) => void;
|
||||||
cardWidth?: number;
|
cardWidth?: number;
|
||||||
cardHeight?: number;
|
cardHeight?: number;
|
||||||
|
deferApplyUntilDismissed?: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export const useTVOptionModal = () => {
|
export const useTVOptionModal = () => {
|
||||||
@@ -26,6 +27,7 @@ export const useTVOptionModal = () => {
|
|||||||
onSelect: params.onSelect,
|
onSelect: params.onSelect,
|
||||||
cardWidth: params.cardWidth,
|
cardWidth: params.cardWidth,
|
||||||
cardHeight: params.cardHeight,
|
cardHeight: params.cardHeight,
|
||||||
|
deferApplyUntilDismissed: params.deferApplyUntilDismissed,
|
||||||
});
|
});
|
||||||
router.push("/(auth)/tv-option-modal");
|
router.push("/(auth)/tv-option-modal");
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -53,5 +53,5 @@ android {
|
|||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
// libmpv from Maven Central
|
// libmpv from Maven Central
|
||||||
implementation 'dev.jdtech.mpv:libmpv:0.5.1'
|
implementation 'dev.jdtech.mpv:libmpv:1.0.0'
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
@@ -3,14 +3,14 @@ package expo.modules.mpvplayer
|
|||||||
import android.app.UiModeManager
|
import android.app.UiModeManager
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.content.res.Configuration
|
import android.content.res.Configuration
|
||||||
import android.content.res.AssetManager
|
|
||||||
import android.os.Build
|
import android.os.Build
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
|
import android.system.Os
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.Surface
|
import android.view.Surface
|
||||||
import java.io.File
|
import java.io.File
|
||||||
import java.io.FileOutputStream
|
import java.util.Locale
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MPV renderer that wraps libmpv for video playback.
|
* MPV renderer that wraps libmpv for video playback.
|
||||||
@@ -76,7 +76,14 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
|
|
||||||
private var surface: Surface? = null
|
private var surface: Surface? = null
|
||||||
private var isRunning = false
|
private var isRunning = false
|
||||||
private var isStopping = false
|
|
||||||
|
// This renderer's own mpv handle. Per-instance (not singleton) — each
|
||||||
|
// player screen gets a fresh mpv handle and drops the reference on stop.
|
||||||
|
// We intentionally do NOT call a destroy() equivalent: libmpv 1.0's
|
||||||
|
// nativeDestroy has an internal use-after-free we can't fix from Kotlin,
|
||||||
|
// so we mirror Findroid and let the JVM GC + native finalization path
|
||||||
|
// reclaim resources. Only one player is alive at a time in this app.
|
||||||
|
private var mpv: MPVLib? = null
|
||||||
|
|
||||||
// Cached state
|
// Cached state
|
||||||
private var cachedPosition: Double = 0.0
|
private var cachedPosition: Double = 0.0
|
||||||
@@ -139,103 +146,105 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
if (isRunning) return
|
if (isRunning) return
|
||||||
|
|
||||||
try {
|
try {
|
||||||
MPVLib.create(context)
|
// Per-instance handle — see class-level comment. Each player gets
|
||||||
MPVLib.addObserver(this)
|
// its own mpv; we drop the reference in stop().
|
||||||
|
val mpv = MPVLib.create(context)
|
||||||
|
this.mpv = mpv
|
||||||
|
mpv.addObserver(this)
|
||||||
|
|
||||||
/**
|
// Resolved once — TV gets the memory-pressure customizations
|
||||||
* Create mpv config directory and copy font files to ensure SubRip subtitles load properly on Android.
|
// (SCUDO_OPTIONS, hwdec/profile, demuxer-seekable-cache, larger
|
||||||
*
|
// audio-buffer) that would be counterproductive on higher-RAM
|
||||||
* Technical Background:
|
// mobile devices. Demuxer cache sizes are NOT included here —
|
||||||
* ====================
|
// those come from user settings via load().
|
||||||
* On Android, mpv requires access to a font file to render text-based subtitles, particularly SubRip (.srt)
|
val isTV = isTvDevice()
|
||||||
* format subtitles. Without an available font in the config directory, mpv will fail to display subtitles
|
|
||||||
* even when subtitle tracks are properly detected and loaded.
|
// mpv config directory — used by the config-dir option below and
|
||||||
*
|
// as XDG_CONFIG_HOME for fontconfig.
|
||||||
* Why This Is Necessary:
|
|
||||||
* =====================
|
|
||||||
* 1. Android's font system is isolated from native libraries like mpv. While Android has system fonts,
|
|
||||||
* mpv cannot access them directly due to sandboxing and library isolation.
|
|
||||||
*
|
|
||||||
* 2. SubRip subtitles require a font to render text overlay on video. When no font is available in the
|
|
||||||
* configured directory, mpv either:
|
|
||||||
* - Fails silently (subtitles don't appear)
|
|
||||||
* - Falls back to a default font that may not support the required character set
|
|
||||||
* - Crashes or produces rendering errors
|
|
||||||
*
|
|
||||||
* 3. By placing a font file (font.ttf) in mpv's config directory and setting that directory via
|
|
||||||
* MPVLib.setOptionString("config-dir", ...), we ensure mpv has a known, accessible font source.
|
|
||||||
*
|
|
||||||
* Reference:
|
|
||||||
* =========
|
|
||||||
* This workaround is documented in the mpv-android project:
|
|
||||||
* https://github.com/mpv-android/mpv-android/issues/96
|
|
||||||
*
|
|
||||||
* The issue discusses that without a font in the config directory, SubRip subtitles fail to load
|
|
||||||
* properly on Android, and the solution is to copy a font file to a known location that mpv can access.
|
|
||||||
*/
|
|
||||||
// Create mpv config directory and copy font files
|
|
||||||
val mpvDir = File(context.getExternalFilesDir(null) ?: context.filesDir, "mpv")
|
val mpvDir = File(context.getExternalFilesDir(null) ?: context.filesDir, "mpv")
|
||||||
//Log.i(TAG, "mpv config dir: $mpvDir")
|
|
||||||
if (!mpvDir.exists()) mpvDir.mkdirs()
|
if (!mpvDir.exists()) mpvDir.mkdirs()
|
||||||
// This needs to be named `subfont.ttf` else it won't work
|
|
||||||
arrayOf("subfont.ttf").forEach { fileName ->
|
// Point fontconfig (new in libmpv 1.0) at writable app dirs so it
|
||||||
val file = File(mpvDir, fileName)
|
// persists its font index across runs instead of re-walking
|
||||||
if (file.exists()) return@forEach
|
// /system/fonts on every subtitle/seek event. Each rebuild costs
|
||||||
context.assets
|
// ~1-2 s and ~10-30 MB of scudo:primary memory that scudo then
|
||||||
.open(fileName, AssetManager.ACCESS_STREAMING)
|
// holds onto. Without this we see "No usable fontconfig
|
||||||
.copyTo(FileOutputStream(file))
|
// configuration file found, using fallback" on every re-init.
|
||||||
|
try {
|
||||||
|
val cacheDir = context.cacheDir.absolutePath
|
||||||
|
val configDir = (context.getExternalFilesDir(null) ?: context.filesDir).absolutePath
|
||||||
|
Os.setenv("XDG_CACHE_HOME", cacheDir, true)
|
||||||
|
Os.setenv("XDG_CONFIG_HOME", configDir, true)
|
||||||
|
Os.setenv("HOME", configDir, true)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.w(TAG, "Could not set XDG/HOME env for fontconfig: ${e.message}")
|
||||||
}
|
}
|
||||||
MPVLib.setOptionString("config", "yes")
|
|
||||||
MPVLib.setOptionString("config-dir", mpvDir.path)
|
mpv?.setOptionString("config", "yes")
|
||||||
|
mpv?.setOptionString("config-dir", mpvDir.path)
|
||||||
|
|
||||||
// Configure mpv options before initialization (based on Findroid)
|
// Configure mpv options before initialization (based on Findroid)
|
||||||
this.voDriver = voDriver
|
this.voDriver = voDriver
|
||||||
MPVLib.setOptionString("vo", voDriver)
|
mpv?.setOptionString("vo", voDriver)
|
||||||
MPVLib.setOptionString("gpu-context", "android")
|
mpv?.setOptionString("gpu-context", "android")
|
||||||
MPVLib.setOptionString("opengl-es", "yes")
|
mpv?.setOptionString("opengl-es", "yes")
|
||||||
|
|
||||||
// Hardware decode path:
|
// Hardware decoder codecs (shared)
|
||||||
// - Real TV hardware: zero-copy `mediacodec` (fastest on low-power devices).
|
mpv?.setOptionString("hwdec-codecs", "h264,hevc,mpeg4,mpeg2video,vp8,vp9,av1")
|
||||||
|
|
||||||
|
// Pause on initial cache fill (shared default). The actual
|
||||||
|
// cache mode, cache-secs, and demuxer cache sizes come from
|
||||||
|
// user preferences and are applied per-load in load().
|
||||||
|
mpv?.setOptionString("cache-pause-initial", "yes")
|
||||||
|
|
||||||
|
// Hardware decode path + TV-only memory options. Demuxer cache
|
||||||
|
// sizes and cache-secs are NOT set here — they come from user
|
||||||
|
// preferences via load().
|
||||||
|
// - Emulator: software decode. Its MediaCodec can't bind an
|
||||||
|
// output surface (surface 0x0); HEVC then fails cleanly and
|
||||||
|
// mpv auto-falls-back to software, but H.264 "opens"
|
||||||
|
// deceptively and wedges the core with no fallback (black
|
||||||
|
// video, then any command — seek/pause — deadlocks the UI
|
||||||
|
// thread → ANR). hwdec=no makes every codec render via the
|
||||||
|
// gpu-next VO. Real devices unaffected.
|
||||||
|
// - Real TV hardware: zero-copy `mediacodec` (fastest on
|
||||||
|
// low-power devices) + fast profile.
|
||||||
// - Real phone: `mediacodec-copy` (broadest compatibility).
|
// - Real phone: `mediacodec-copy` (broadest compatibility).
|
||||||
// - Emulator: software decode. Its MediaCodec can't bind an output surface
|
|
||||||
// (surface 0x0); HEVC then fails cleanly and mpv auto-falls-back to software,
|
|
||||||
// but H.264 "opens" deceptively and wedges the core with no fallback (black
|
|
||||||
// video, then any command — seek/pause — deadlocks the UI thread → ANR).
|
|
||||||
// hwdec=no makes every codec render via the gpu-next VO. Real devices unaffected.
|
|
||||||
when {
|
when {
|
||||||
isEmulator() -> MPVLib.setOptionString("hwdec", "no")
|
isEmulator() -> mpv?.setOptionString("hwdec", "no")
|
||||||
isTvDevice() -> {
|
isTV -> {
|
||||||
MPVLib.setOptionString("hwdec", "mediacodec")
|
mpv?.setOptionString("hwdec", "mediacodec")
|
||||||
MPVLib.setOptionString("profile", "fast")
|
mpv?.setOptionString("profile", "fast")
|
||||||
|
// Don't retain already-played content for backward
|
||||||
|
// seeking over a network source — Jellyfin can re-fetch
|
||||||
|
// on demand. Saves up to ~30 MiB on long seeks and
|
||||||
|
// reduces swap pressure.
|
||||||
|
mpv?.setOptionString("demuxer-seekable-cache", "no")
|
||||||
|
// Larger audio buffer to absorb page-fault stalls
|
||||||
|
// (default ~0.2s). Cheap insurance against the audio
|
||||||
|
// underruns that happen when the kernel is swap-thrashing.
|
||||||
|
mpv?.setOptionString("audio-buffer", "0.5")
|
||||||
}
|
}
|
||||||
else -> MPVLib.setOptionString("hwdec", "mediacodec-copy")
|
else -> mpv?.setOptionString("hwdec", "mediacodec-copy")
|
||||||
}
|
}
|
||||||
MPVLib.setOptionString("hwdec-codecs", "h264,hevc,mpeg4,mpeg2video,vp8,vp9,av1")
|
|
||||||
|
|
||||||
// Cache settings for better network streaming
|
|
||||||
MPVLib.setOptionString("cache", "yes")
|
|
||||||
MPVLib.setOptionString("cache-pause-initial", "yes")
|
|
||||||
MPVLib.setOptionString("demuxer-max-bytes", "150MiB")
|
|
||||||
MPVLib.setOptionString("demuxer-max-back-bytes", "75MiB")
|
|
||||||
MPVLib.setOptionString("demuxer-readahead-secs", "20")
|
|
||||||
|
|
||||||
// Seeking optimization - faster seeking at the cost of less precision
|
// Seeking optimization - faster seeking at the cost of less precision
|
||||||
// Use keyframe seeking by default (much faster for network streams)
|
// Use keyframe seeking by default (much faster for network streams)
|
||||||
MPVLib.setOptionString("hr-seek", "no")
|
mpv?.setOptionString("hr-seek", "no")
|
||||||
// Drop frames during seeking for faster response
|
// Drop frames during seeking for faster response
|
||||||
MPVLib.setOptionString("hr-seek-framedrop", "yes")
|
mpv?.setOptionString("hr-seek-framedrop", "yes")
|
||||||
|
|
||||||
// Subtitle settings
|
// Subtitle settings
|
||||||
MPVLib.setOptionString("sub-scale-with-window", "no")
|
mpv?.setOptionString("sub-scale-with-window", "no")
|
||||||
MPVLib.setOptionString("sub-use-margins", "no")
|
mpv?.setOptionString("sub-use-margins", "no")
|
||||||
MPVLib.setOptionString("subs-match-os-language", "yes")
|
mpv?.setOptionString("subs-match-os-language", "yes")
|
||||||
MPVLib.setOptionString("subs-fallback", "yes")
|
mpv?.setOptionString("subs-fallback", "yes")
|
||||||
|
|
||||||
// Important: Start with force-window=no, will be set to yes when surface is attached
|
// Important: Start with force-window=no, will be set to yes when surface is attached
|
||||||
MPVLib.setOptionString("force-window", "no")
|
mpv?.setOptionString("force-window", "no")
|
||||||
MPVLib.setOptionString("keep-open", "always")
|
mpv?.setOptionString("keep-open", "always")
|
||||||
|
|
||||||
MPVLib.initialize()
|
mpv.initialize()
|
||||||
|
|
||||||
// Observe properties
|
// Observe properties
|
||||||
observeProperties()
|
observeProperties()
|
||||||
@@ -249,21 +258,68 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun stop() {
|
fun stop() {
|
||||||
if (isStopping) return
|
|
||||||
if (!isRunning) return
|
if (!isRunning) return
|
||||||
|
|
||||||
isStopping = true
|
|
||||||
isRunning = false
|
isRunning = false
|
||||||
|
|
||||||
try {
|
val m = mpv
|
||||||
MPVLib.removeObserver(this)
|
mpv = null
|
||||||
MPVLib.detachSurface()
|
|
||||||
MPVLib.destroy()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.e(TAG, "Error stopping MPV: ${e.message}")
|
|
||||||
}
|
|
||||||
|
|
||||||
isStopping = false
|
// Clear cached media state on the main thread so the next player
|
||||||
|
// screen doesn't observe stale position/duration values during the
|
||||||
|
// (async) teardown below.
|
||||||
|
currentUrl = null
|
||||||
|
currentHeaders = null
|
||||||
|
pendingExternalSubtitles = emptyList()
|
||||||
|
initialSubtitleId = null
|
||||||
|
initialAudioId = null
|
||||||
|
cachedPosition = 0.0
|
||||||
|
cachedDuration = 0.0
|
||||||
|
cachedCacheSeconds = 0.0
|
||||||
|
|
||||||
|
if (m == null) return
|
||||||
|
|
||||||
|
// Teardown runs on a background daemon thread. mpv's "stop" command
|
||||||
|
// flushes the demuxer queue and releases the MediaCodec hardware
|
||||||
|
// decoder — synchronous JNI work that can block for hundreds of ms
|
||||||
|
// on TV hardware. Running it on the main thread produced a visible
|
||||||
|
// delay/stutter between pressing "exit" and the confirm alert
|
||||||
|
// appearing. The local `m` keeps the MPVLib instance alive for the
|
||||||
|
// lifetime of this thread even though we've already nulled `mpv`.
|
||||||
|
Thread {
|
||||||
|
// Drop force-window BEFORE issuing stop. With keep-open=always +
|
||||||
|
// force-window=yes, mpv tears down the decoder at stop time but
|
||||||
|
// tries to keep the VO alive — which fires an internal
|
||||||
|
// video-reconfig. On libmpv 1.0's gpu-next/android backend that
|
||||||
|
// reconfig path crashes with "Missing surface pointer" because we
|
||||||
|
// detach the Surface below before mpv's worker reaches the
|
||||||
|
// reconfig step (command() is async). Setting force-window=no
|
||||||
|
// first makes mpv tear VO down cleanly instead of attempting a
|
||||||
|
// doomed re-init, eliminating the fatal VO error and the
|
||||||
|
// "playback won't restart" aftermath.
|
||||||
|
try {
|
||||||
|
m.setOptionString("force-window", "no")
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e(TAG, "Error clearing force-window: ${e.message}")
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
// Stop playback — flushes demuxer queue and signals MediaCodec
|
||||||
|
// to release its hardware decoders. This is the bulk of what
|
||||||
|
// we can reclaim without calling destroy().
|
||||||
|
m.command(arrayOf("stop"))
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e(TAG, "Error stopping mpv playback: ${e.message}")
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
m.removeObserver(this)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e(TAG, "Error removing mpv observer: ${e.message}")
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
m.detachSurface()
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e(TAG, "Error detaching mpv surface: ${e.message}")
|
||||||
|
}
|
||||||
|
}.also { it.isDaemon = true }.start()
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -278,10 +334,10 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
this.surface = surface
|
this.surface = surface
|
||||||
Log.i(TAG, "[PiP] attachSurface — isRunning=$isRunning, vo=$voDriver, surface=${surface.hashCode()}")
|
Log.i(TAG, "[PiP] attachSurface — isRunning=$isRunning, vo=$voDriver, surface=${surface.hashCode()}")
|
||||||
if (isRunning) {
|
if (isRunning) {
|
||||||
MPVLib.attachSurface(surface)
|
mpv?.attachSurface(surface)
|
||||||
MPVLib.setOptionString("force-window", "yes")
|
mpv?.setOptionString("force-window", "yes")
|
||||||
// Read back vo to confirm it's still active
|
// Read back vo to confirm it's still active
|
||||||
val activeVo = try { MPVLib.getPropertyString("vo") } catch (e: Exception) { null }
|
val activeVo = try { mpv?.getPropertyString("vo") } catch (e: Exception) { null }
|
||||||
Log.i(TAG, "[PiP] attachSurface — attached, activeVo=$activeVo")
|
Log.i(TAG, "[PiP] attachSurface — attached, activeVo=$activeVo")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -301,8 +357,8 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
this.surface = null
|
this.surface = null
|
||||||
Log.i(TAG, "[PiP] detachSurface — isRunning=$isRunning, vo=$voDriver")
|
Log.i(TAG, "[PiP] detachSurface — isRunning=$isRunning, vo=$voDriver")
|
||||||
if (isRunning) {
|
if (isRunning) {
|
||||||
MPVLib.detachSurface()
|
mpv?.detachSurface()
|
||||||
val activeVo = try { MPVLib.getPropertyString("vo") } catch (e: Exception) { null }
|
val activeVo = try { mpv?.getPropertyString("vo") } catch (e: Exception) { null }
|
||||||
Log.i(TAG, "[PiP] detachSurface — detached, activeVo=$activeVo (should still be $voDriver)")
|
Log.i(TAG, "[PiP] detachSurface — detached, activeVo=$activeVo (should still be $voDriver)")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -313,7 +369,7 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
*/
|
*/
|
||||||
fun updateSurfaceSize(width: Int, height: Int) {
|
fun updateSurfaceSize(width: Int, height: Int) {
|
||||||
if (isRunning) {
|
if (isRunning) {
|
||||||
MPVLib.setPropertyString("android-surface-size", "${width}x$height")
|
mpv?.setPropertyString("android-surface-size", "${width}x$height")
|
||||||
Log.i(TAG, "[PiP] updateSurfaceSize — ${width}x${height}")
|
Log.i(TAG, "[PiP] updateSurfaceSize — ${width}x${height}")
|
||||||
} else {
|
} else {
|
||||||
Log.w(TAG, "[PiP] updateSurfaceSize — called but renderer not running")
|
Log.w(TAG, "[PiP] updateSurfaceSize — called but renderer not running")
|
||||||
@@ -329,9 +385,9 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
if (!isRunning) return
|
if (!isRunning) return
|
||||||
val pos = cachedPosition
|
val pos = cachedPosition
|
||||||
Log.i(TAG, "[PiP] forceRedraw — stepping frame then seeking to $pos")
|
Log.i(TAG, "[PiP] forceRedraw — stepping frame then seeking to $pos")
|
||||||
MPVLib.command(arrayOf("frame-step"))
|
mpv?.command(arrayOf("frame-step"))
|
||||||
if (pos > 0) {
|
if (pos > 0) {
|
||||||
MPVLib.command(arrayOf("seek", pos.toString(), "absolute"))
|
mpv?.command(arrayOf("seek", pos.toString(), "absolute"))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -341,7 +397,11 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
startPosition: Double? = null,
|
startPosition: Double? = null,
|
||||||
externalSubtitles: List<String>? = null,
|
externalSubtitles: List<String>? = null,
|
||||||
initialSubtitleId: Int? = null,
|
initialSubtitleId: Int? = null,
|
||||||
initialAudioId: Int? = null
|
initialAudioId: Int? = null,
|
||||||
|
cacheEnabled: String? = null,
|
||||||
|
cacheSeconds: Int? = null,
|
||||||
|
demuxerMaxBytes: Int? = null,
|
||||||
|
demuxerMaxBackBytes: Int? = null
|
||||||
) {
|
) {
|
||||||
currentUrl = url
|
currentUrl = url
|
||||||
currentHeaders = headers
|
currentHeaders = headers
|
||||||
@@ -354,16 +414,26 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
mainHandler.post { delegate?.onLoadingChanged(true) }
|
mainHandler.post { delegate?.onLoadingChanged(true) }
|
||||||
|
|
||||||
// Stop previous playback
|
// Stop previous playback
|
||||||
MPVLib.command(arrayOf("stop"))
|
mpv?.command(arrayOf("stop"))
|
||||||
|
|
||||||
// Set HTTP headers if provided
|
// Set HTTP headers if provided
|
||||||
updateHttpHeaders(headers)
|
updateHttpHeaders(headers)
|
||||||
|
|
||||||
// Set start position
|
// Apply cache/buffer settings from user preferences (mirrors iOS).
|
||||||
|
// These override the conservative defaults applied in start() so the
|
||||||
|
// TV/mobile settings screen actually takes effect on Android.
|
||||||
|
cacheEnabled?.let { mpv?.setOptionString("cache", it) }
|
||||||
|
cacheSeconds?.let { mpv?.setOptionString("cache-secs", it.toString()) }
|
||||||
|
demuxerMaxBytes?.let { mpv?.setOptionString("demuxer-max-bytes", "${it}MiB") }
|
||||||
|
demuxerMaxBackBytes?.let { mpv?.setOptionString("demuxer-max-back-bytes", "${it}MiB") }
|
||||||
|
|
||||||
|
// Set start position. mpv's time parser requires '.' as the decimal
|
||||||
|
// separator; use Locale.US so devices with other default locales
|
||||||
|
// (e.g. ',' as decimal separator) don't break resume-from-position.
|
||||||
if (startPosition != null && startPosition > 0) {
|
if (startPosition != null && startPosition > 0) {
|
||||||
MPVLib.setPropertyString("start", String.format("%.2f", startPosition))
|
mpv?.setPropertyString("start", String.format(Locale.US, "%.2f", startPosition))
|
||||||
} else {
|
} else {
|
||||||
MPVLib.setPropertyString("start", "0")
|
mpv?.setPropertyString("start", "0")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Set initial audio track if specified
|
// Set initial audio track if specified
|
||||||
@@ -383,7 +453,7 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Load the file
|
// Load the file
|
||||||
MPVLib.command(arrayOf("loadfile", url, "replace"))
|
mpv?.command(arrayOf("loadfile", url, "replace"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun reloadCurrentItem() {
|
fun reloadCurrentItem() {
|
||||||
@@ -399,29 +469,29 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
}
|
}
|
||||||
|
|
||||||
val headerString = headers.entries.joinToString("\r\n") { "${it.key}: ${it.value}" }
|
val headerString = headers.entries.joinToString("\r\n") { "${it.key}: ${it.value}" }
|
||||||
MPVLib.setPropertyString("http-header-fields", headerString)
|
mpv?.setPropertyString("http-header-fields", headerString)
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun observeProperties() {
|
private fun observeProperties() {
|
||||||
MPVLib.observeProperty("duration", MPV_FORMAT_DOUBLE)
|
mpv?.observeProperty("duration", MPV_FORMAT_DOUBLE)
|
||||||
MPVLib.observeProperty("time-pos", MPV_FORMAT_DOUBLE)
|
mpv?.observeProperty("time-pos", MPV_FORMAT_DOUBLE)
|
||||||
MPVLib.observeProperty("pause", MPV_FORMAT_FLAG)
|
mpv?.observeProperty("pause", MPV_FORMAT_FLAG)
|
||||||
MPVLib.observeProperty("track-list/count", MPV_FORMAT_INT64)
|
mpv?.observeProperty("track-list/count", MPV_FORMAT_INT64)
|
||||||
MPVLib.observeProperty("paused-for-cache", MPV_FORMAT_FLAG)
|
mpv?.observeProperty("paused-for-cache", MPV_FORMAT_FLAG)
|
||||||
MPVLib.observeProperty("demuxer-cache-duration", MPV_FORMAT_DOUBLE)
|
mpv?.observeProperty("demuxer-cache-duration", MPV_FORMAT_DOUBLE)
|
||||||
// Video dimensions for PiP aspect ratio
|
// Video dimensions for PiP aspect ratio
|
||||||
MPVLib.observeProperty("video-params/w", MPV_FORMAT_INT64)
|
mpv?.observeProperty("video-params/w", MPV_FORMAT_INT64)
|
||||||
MPVLib.observeProperty("video-params/h", MPV_FORMAT_INT64)
|
mpv?.observeProperty("video-params/h", MPV_FORMAT_INT64)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Playback Controls
|
// MARK: - Playback Controls
|
||||||
|
|
||||||
fun play() {
|
fun play() {
|
||||||
MPVLib.setPropertyBoolean("pause", false)
|
mpv?.setPropertyBoolean("pause", false)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun pause() {
|
fun pause() {
|
||||||
MPVLib.setPropertyBoolean("pause", true)
|
mpv?.setPropertyBoolean("pause", true)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun togglePause() {
|
fun togglePause() {
|
||||||
@@ -431,22 +501,22 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
fun seekTo(seconds: Double) {
|
fun seekTo(seconds: Double) {
|
||||||
val clamped = maxOf(0.0, seconds)
|
val clamped = maxOf(0.0, seconds)
|
||||||
cachedPosition = clamped
|
cachedPosition = clamped
|
||||||
MPVLib.command(arrayOf("seek", clamped.toString(), "absolute"))
|
mpv?.command(arrayOf("seek", clamped.toString(), "absolute"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun seekBy(seconds: Double) {
|
fun seekBy(seconds: Double) {
|
||||||
val newPosition = maxOf(0.0, cachedPosition + seconds)
|
val newPosition = maxOf(0.0, cachedPosition + seconds)
|
||||||
cachedPosition = newPosition
|
cachedPosition = newPosition
|
||||||
MPVLib.command(arrayOf("seek", seconds.toString(), "relative"))
|
mpv?.command(arrayOf("seek", seconds.toString(), "relative"))
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSpeed(speed: Double) {
|
fun setSpeed(speed: Double) {
|
||||||
_playbackSpeed = speed
|
_playbackSpeed = speed
|
||||||
MPVLib.setPropertyDouble("speed", speed)
|
mpv?.setPropertyDouble("speed", speed)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getSpeed(): Double {
|
fun getSpeed(): Double {
|
||||||
return MPVLib.getPropertyDouble("speed") ?: _playbackSpeed
|
return mpv?.getPropertyDouble("speed") ?: _playbackSpeed
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Subtitle Controls
|
// MARK: - Subtitle Controls
|
||||||
@@ -454,19 +524,19 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
fun getSubtitleTracks(): List<Map<String, Any>> {
|
fun getSubtitleTracks(): List<Map<String, Any>> {
|
||||||
val tracks = mutableListOf<Map<String, Any>>()
|
val tracks = mutableListOf<Map<String, Any>>()
|
||||||
|
|
||||||
val trackCount = MPVLib.getPropertyInt("track-list/count") ?: 0
|
val trackCount = mpv?.getPropertyInt("track-list/count") ?: 0
|
||||||
|
|
||||||
for (i in 0 until trackCount) {
|
for (i in 0 until trackCount) {
|
||||||
val trackType = MPVLib.getPropertyString("track-list/$i/type") ?: continue
|
val trackType = mpv?.getPropertyString("track-list/$i/type") ?: continue
|
||||||
if (trackType != "sub") continue
|
if (trackType != "sub") continue
|
||||||
|
|
||||||
val trackId = MPVLib.getPropertyInt("track-list/$i/id") ?: continue
|
val trackId = mpv?.getPropertyInt("track-list/$i/id") ?: continue
|
||||||
val track = mutableMapOf<String, Any>("id" to trackId)
|
val track = mutableMapOf<String, Any>("id" to trackId)
|
||||||
|
|
||||||
MPVLib.getPropertyString("track-list/$i/title")?.let { track["title"] = it }
|
mpv?.getPropertyString("track-list/$i/title")?.let { track["title"] = it }
|
||||||
MPVLib.getPropertyString("track-list/$i/lang")?.let { track["lang"] = it }
|
mpv?.getPropertyString("track-list/$i/lang")?.let { track["lang"] = it }
|
||||||
|
|
||||||
val selected = MPVLib.getPropertyBoolean("track-list/$i/selected") ?: false
|
val selected = mpv?.getPropertyBoolean("track-list/$i/selected") ?: false
|
||||||
track["selected"] = selected
|
track["selected"] = selected
|
||||||
|
|
||||||
tracks.add(track)
|
tracks.add(track)
|
||||||
@@ -478,61 +548,61 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
fun setSubtitleTrack(trackId: Int) {
|
fun setSubtitleTrack(trackId: Int) {
|
||||||
Log.i(TAG, "setSubtitleTrack: setting sid to $trackId")
|
Log.i(TAG, "setSubtitleTrack: setting sid to $trackId")
|
||||||
if (trackId < 0) {
|
if (trackId < 0) {
|
||||||
MPVLib.setPropertyString("sid", "no")
|
mpv?.setPropertyString("sid", "no")
|
||||||
} else {
|
} else {
|
||||||
MPVLib.setPropertyInt("sid", trackId)
|
mpv?.setPropertyInt("sid", trackId)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun disableSubtitles() {
|
fun disableSubtitles() {
|
||||||
MPVLib.setPropertyString("sid", "no")
|
mpv?.setPropertyString("sid", "no")
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCurrentSubtitleTrack(): Int {
|
fun getCurrentSubtitleTrack(): Int {
|
||||||
return MPVLib.getPropertyInt("sid") ?: 0
|
return mpv?.getPropertyInt("sid") ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addSubtitleFile(url: String, select: Boolean = true) {
|
fun addSubtitleFile(url: String, select: Boolean = true) {
|
||||||
val flag = if (select) "select" else "cached"
|
val flag = if (select) "select" else "cached"
|
||||||
MPVLib.command(arrayOf("sub-add", url, flag))
|
mpv?.command(arrayOf("sub-add", url, flag))
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Subtitle Positioning
|
// MARK: - Subtitle Positioning
|
||||||
|
|
||||||
fun setSubtitlePosition(position: Int) {
|
fun setSubtitlePosition(position: Int) {
|
||||||
MPVLib.setPropertyInt("sub-pos", position)
|
mpv?.setPropertyInt("sub-pos", position)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleScale(scale: Double) {
|
fun setSubtitleScale(scale: Double) {
|
||||||
MPVLib.setPropertyDouble("sub-scale", scale)
|
mpv?.setPropertyDouble("sub-scale", scale)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleMarginY(margin: Int) {
|
fun setSubtitleMarginY(margin: Int) {
|
||||||
MPVLib.setPropertyInt("sub-margin-y", margin)
|
mpv?.setPropertyInt("sub-margin-y", margin)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleAlignX(alignment: String) {
|
fun setSubtitleAlignX(alignment: String) {
|
||||||
MPVLib.setPropertyString("sub-align-x", alignment)
|
mpv?.setPropertyString("sub-align-x", alignment)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleAlignY(alignment: String) {
|
fun setSubtitleAlignY(alignment: String) {
|
||||||
MPVLib.setPropertyString("sub-align-y", alignment)
|
mpv?.setPropertyString("sub-align-y", alignment)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleFontSize(size: Int) {
|
fun setSubtitleFontSize(size: Int) {
|
||||||
MPVLib.setPropertyInt("sub-font-size", size)
|
mpv?.setPropertyInt("sub-font-size", size)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleBorderStyle(style: String) {
|
fun setSubtitleBorderStyle(style: String) {
|
||||||
MPVLib.setPropertyString("sub-border-style", style)
|
mpv?.setPropertyString("sub-border-style", style)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleBackgroundColor(color: String) {
|
fun setSubtitleBackgroundColor(color: String) {
|
||||||
MPVLib.setPropertyString("sub-back-color", color)
|
mpv?.setPropertyString("sub-back-color", color)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setSubtitleAssOverride(mode: String) {
|
fun setSubtitleAssOverride(mode: String) {
|
||||||
MPVLib.setPropertyString("sub-ass-override", mode)
|
mpv?.setPropertyString("sub-ass-override", mode)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Audio Track Controls
|
// MARK: - Audio Track Controls
|
||||||
@@ -540,25 +610,25 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
fun getAudioTracks(): List<Map<String, Any>> {
|
fun getAudioTracks(): List<Map<String, Any>> {
|
||||||
val tracks = mutableListOf<Map<String, Any>>()
|
val tracks = mutableListOf<Map<String, Any>>()
|
||||||
|
|
||||||
val trackCount = MPVLib.getPropertyInt("track-list/count") ?: 0
|
val trackCount = mpv?.getPropertyInt("track-list/count") ?: 0
|
||||||
|
|
||||||
for (i in 0 until trackCount) {
|
for (i in 0 until trackCount) {
|
||||||
val trackType = MPVLib.getPropertyString("track-list/$i/type") ?: continue
|
val trackType = mpv?.getPropertyString("track-list/$i/type") ?: continue
|
||||||
if (trackType != "audio") continue
|
if (trackType != "audio") continue
|
||||||
|
|
||||||
val trackId = MPVLib.getPropertyInt("track-list/$i/id") ?: continue
|
val trackId = mpv?.getPropertyInt("track-list/$i/id") ?: continue
|
||||||
val track = mutableMapOf<String, Any>("id" to trackId)
|
val track = mutableMapOf<String, Any>("id" to trackId)
|
||||||
|
|
||||||
MPVLib.getPropertyString("track-list/$i/title")?.let { track["title"] = it }
|
mpv?.getPropertyString("track-list/$i/title")?.let { track["title"] = it }
|
||||||
MPVLib.getPropertyString("track-list/$i/lang")?.let { track["lang"] = it }
|
mpv?.getPropertyString("track-list/$i/lang")?.let { track["lang"] = it }
|
||||||
MPVLib.getPropertyString("track-list/$i/codec")?.let { track["codec"] = it }
|
mpv?.getPropertyString("track-list/$i/codec")?.let { track["codec"] = it }
|
||||||
|
|
||||||
val channels = MPVLib.getPropertyInt("track-list/$i/audio-channels")
|
val channels = mpv?.getPropertyInt("track-list/$i/audio-channels")
|
||||||
if (channels != null && channels > 0) {
|
if (channels != null && channels > 0) {
|
||||||
track["channels"] = channels
|
track["channels"] = channels
|
||||||
}
|
}
|
||||||
|
|
||||||
val selected = MPVLib.getPropertyBoolean("track-list/$i/selected") ?: false
|
val selected = mpv?.getPropertyBoolean("track-list/$i/selected") ?: false
|
||||||
track["selected"] = selected
|
track["selected"] = selected
|
||||||
|
|
||||||
tracks.add(track)
|
tracks.add(track)
|
||||||
@@ -569,11 +639,11 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
|
|
||||||
fun setAudioTrack(trackId: Int) {
|
fun setAudioTrack(trackId: Int) {
|
||||||
Log.i(TAG, "setAudioTrack: setting aid to $trackId")
|
Log.i(TAG, "setAudioTrack: setting aid to $trackId")
|
||||||
MPVLib.setPropertyInt("aid", trackId)
|
mpv?.setPropertyInt("aid", trackId)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getCurrentAudioTrack(): Int {
|
fun getCurrentAudioTrack(): Int {
|
||||||
return MPVLib.getPropertyInt("aid") ?: 0
|
return mpv?.getPropertyInt("aid") ?: 0
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Video Scaling
|
// MARK: - Video Scaling
|
||||||
@@ -582,7 +652,7 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
// panscan: 0.0 = fit (letterbox), 1.0 = fill (crop)
|
// panscan: 0.0 = fit (letterbox), 1.0 = fill (crop)
|
||||||
val panscanValue = if (zoomed) 1.0 else 0.0
|
val panscanValue = if (zoomed) 1.0 else 0.0
|
||||||
Log.i(TAG, "setZoomedToFill: setting panscan to $panscanValue")
|
Log.i(TAG, "setZoomedToFill: setting panscan to $panscanValue")
|
||||||
MPVLib.setPropertyDouble("panscan", panscanValue)
|
mpv?.setPropertyDouble("panscan", panscanValue)
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Technical Info
|
// MARK: - Technical Info
|
||||||
@@ -591,58 +661,79 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
val info = mutableMapOf<String, Any>()
|
val info = mutableMapOf<String, Any>()
|
||||||
|
|
||||||
// Video dimensions
|
// Video dimensions
|
||||||
MPVLib.getPropertyInt("video-params/w")?.takeIf { it > 0 }?.let {
|
mpv?.getPropertyInt("video-params/w")?.takeIf { it > 0 }?.let {
|
||||||
info["videoWidth"] = it
|
info["videoWidth"] = it
|
||||||
}
|
}
|
||||||
MPVLib.getPropertyInt("video-params/h")?.takeIf { it > 0 }?.let {
|
mpv?.getPropertyInt("video-params/h")?.takeIf { it > 0 }?.let {
|
||||||
info["videoHeight"] = it
|
info["videoHeight"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video codec
|
// Video codec
|
||||||
MPVLib.getPropertyString("video-format")?.let {
|
mpv?.getPropertyString("video-format")?.let {
|
||||||
info["videoCodec"] = it
|
info["videoCodec"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Audio codec
|
// Audio codec
|
||||||
MPVLib.getPropertyString("audio-codec-name")?.let {
|
mpv?.getPropertyString("audio-codec-name")?.let {
|
||||||
info["audioCodec"] = it
|
info["audioCodec"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// FPS (container fps)
|
// FPS (container fps)
|
||||||
MPVLib.getPropertyDouble("container-fps")?.takeIf { it > 0 }?.let {
|
mpv?.getPropertyDouble("container-fps")?.takeIf { it > 0 }?.let {
|
||||||
info["fps"] = it
|
info["fps"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Video bitrate (bits per second)
|
// Video bitrate (bits per second)
|
||||||
MPVLib.getPropertyInt("video-bitrate")?.takeIf { it > 0 }?.let {
|
mpv?.getPropertyInt("video-bitrate")?.takeIf { it > 0 }?.let {
|
||||||
info["videoBitrate"] = it
|
info["videoBitrate"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Audio bitrate (bits per second)
|
// Audio bitrate (bits per second)
|
||||||
MPVLib.getPropertyInt("audio-bitrate")?.takeIf { it > 0 }?.let {
|
mpv?.getPropertyInt("audio-bitrate")?.takeIf { it > 0 }?.let {
|
||||||
info["audioBitrate"] = it
|
info["audioBitrate"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Demuxer cache duration (seconds of video buffered)
|
// Demuxer cache duration (seconds of video buffered)
|
||||||
MPVLib.getPropertyDouble("demuxer-cache-duration")?.let {
|
mpv?.getPropertyDouble("demuxer-cache-duration")?.let {
|
||||||
info["cacheSeconds"] = it
|
info["cacheSeconds"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configured cache limits — read back from mpv to confirm user
|
||||||
|
// settings actually took effect. mpv stores byte sizes as int64
|
||||||
|
// (bytes); convert to MiB for display.
|
||||||
|
mpv?.getPropertyInt("demuxer-max-bytes")?.let { bytes ->
|
||||||
|
info["demuxerMaxBytes"] = bytes / (1024 * 1024)
|
||||||
|
}
|
||||||
|
mpv?.getPropertyInt("demuxer-max-back-bytes")?.let { bytes ->
|
||||||
|
info["demuxerMaxBackBytes"] = bytes / (1024 * 1024)
|
||||||
|
}
|
||||||
|
mpv?.getPropertyDouble("cache-secs")?.let { secs ->
|
||||||
|
info["cacheSecsLimit"] = secs
|
||||||
|
}
|
||||||
|
|
||||||
// Dropped frames
|
// Dropped frames
|
||||||
MPVLib.getPropertyInt("frame-drop-count")?.let {
|
mpv?.getPropertyInt("frame-drop-count")?.let {
|
||||||
info["droppedFrames"] = it
|
info["droppedFrames"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Active video output driver (read from MPV to confirm what's actually applied)
|
// Active video output driver (read from MPV to confirm what's actually applied)
|
||||||
MPVLib.getPropertyString("vo")?.let {
|
mpv?.getPropertyString("vo")?.let {
|
||||||
info["voDriver"] = it
|
info["voDriver"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
// Active hardware decoder
|
// Active hardware decoder.
|
||||||
MPVLib.getPropertyString("hwdec-active")?.let {
|
// hwdec-current yields e.g. "mediacodec",
|
||||||
|
// "mediacodec-copy", "auto-copy" or empty when SW decoding.
|
||||||
|
mpv?.getPropertyString("hwdec-current")?.let {
|
||||||
info["hwdec"] = it
|
info["hwdec"] = it
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Estimated video output fps (renderer-side, after filtering).
|
||||||
|
// Useful for diagnosing display/pipeline drops vs container fps.
|
||||||
|
mpv?.getPropertyDouble("estimated-vf-fps")?.takeIf { it > 0 }?.let {
|
||||||
|
info["estimatedVfFps"] = it
|
||||||
|
}
|
||||||
|
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -735,7 +826,7 @@ class MPVLayerRenderer(private val context: Context) : MPVLib.EventObserver {
|
|||||||
pendingExternalSubtitles.forEachIndexed { index, subUrl ->
|
pendingExternalSubtitles.forEachIndexed { index, subUrl ->
|
||||||
android.util.Log.d("MPVRenderer", "Adding external subtitle [$index]: $subUrl")
|
android.util.Log.d("MPVRenderer", "Adding external subtitle [$index]: $subUrl")
|
||||||
// "auto" flag = add without auto-selecting (order preserved, MPVLib.command is sync)
|
// "auto" flag = add without auto-selecting (order preserved, MPVLib.command is sync)
|
||||||
MPVLib.command(arrayOf("sub-add", subUrl, "auto"))
|
mpv?.command(arrayOf("sub-add", subUrl, "auto"))
|
||||||
}
|
}
|
||||||
pendingExternalSubtitles = emptyList()
|
pendingExternalSubtitles = emptyList()
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,20 +1,29 @@
|
|||||||
package expo.modules.mpvplayer
|
package expo.modules.mpvplayer
|
||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.util.Log
|
|
||||||
import android.view.Surface
|
|
||||||
import dev.jdtech.mpv.MPVLib as LibMPV
|
import dev.jdtech.mpv.MPVLib as LibMPV
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrapper around the dev.jdtech.mpv.MPVLib class.
|
* Per-instance wrapper around the dev.jdtech.mpv.MPVLib class.
|
||||||
* This provides a consistent interface for the rest of the app.
|
*
|
||||||
|
* libmpv 1.0 exposes an instance-based API: each `LibMPV.create(ctx)` returns
|
||||||
|
* a fresh, independent handle. Each player creates its own MPVLib instance
|
||||||
|
* (Findroid pattern) and on teardown we simply drop the reference. We do NOT
|
||||||
|
* call `LibMPV.destroy()` — its native implementation has an internal
|
||||||
|
* use-after-free on libmpv 1.0 that we cannot fix from Kotlin. Letting the
|
||||||
|
* GC reach the JVM-level finalizer (or never reaching it, since the native
|
||||||
|
* handle lives in process-global state until exit) is strictly safer than
|
||||||
|
* crashing.
|
||||||
|
*
|
||||||
|
* Trade-off: mpv's native footprint (decoder + demuxer cache) for one player
|
||||||
|
* stays allocated until the next player's allocation displaces it in scudo's
|
||||||
|
* arena. On a TV app where the player is the dominant memory consumer and
|
||||||
|
* only one player is alive at a time, this is acceptable.
|
||||||
*/
|
*/
|
||||||
object MPVLib {
|
class MPVLib private constructor(private val instance: LibMPV) {
|
||||||
private const val TAG = "MPVLib"
|
|
||||||
|
|
||||||
private var initialized = false
|
// Event observer interface — mirrors dev.jdtech.mpv.MPVLib.EventObserver
|
||||||
|
// so MPVLayerRenderer implements a stable, wrapper-owned signature.
|
||||||
// Event observer interface
|
|
||||||
interface EventObserver {
|
interface EventObserver {
|
||||||
fun eventProperty(property: String)
|
fun eventProperty(property: String)
|
||||||
fun eventProperty(property: String, value: Long)
|
fun eventProperty(property: String, value: Long)
|
||||||
@@ -26,195 +35,141 @@ object MPVLib {
|
|||||||
|
|
||||||
private val observers = mutableListOf<EventObserver>()
|
private val observers = mutableListOf<EventObserver>()
|
||||||
|
|
||||||
// Library event observer that forwards to our observers
|
// Library event observer that forwards LibMPV callbacks to our observers.
|
||||||
private val libObserver = object : LibMPV.EventObserver {
|
private val libObserver = object : LibMPV.EventObserver {
|
||||||
override fun eventProperty(property: String) {
|
override fun eventProperty(property: String) =
|
||||||
synchronized(observers) {
|
dispatch { it.eventProperty(property) }
|
||||||
for (observer in observers) {
|
|
||||||
observer.eventProperty(property)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun eventProperty(property: String, value: Long) {
|
override fun eventProperty(property: String, value: Long) =
|
||||||
synchronized(observers) {
|
dispatch { it.eventProperty(property, value) }
|
||||||
for (observer in observers) {
|
|
||||||
observer.eventProperty(property, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun eventProperty(property: String, value: Boolean) {
|
override fun eventProperty(property: String, value: Boolean) =
|
||||||
synchronized(observers) {
|
dispatch { it.eventProperty(property, value) }
|
||||||
for (observer in observers) {
|
|
||||||
observer.eventProperty(property, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun eventProperty(property: String, value: String) {
|
override fun eventProperty(property: String, value: String) =
|
||||||
synchronized(observers) {
|
dispatch { it.eventProperty(property, value) }
|
||||||
for (observer in observers) {
|
|
||||||
observer.eventProperty(property, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun eventProperty(property: String, value: Double) {
|
override fun eventProperty(property: String, value: Double) =
|
||||||
synchronized(observers) {
|
dispatch { it.eventProperty(property, value) }
|
||||||
for (observer in observers) {
|
|
||||||
observer.eventProperty(property, value)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun event(eventId: Int) {
|
override fun event(eventId: Int) =
|
||||||
|
dispatch { it.event(eventId) }
|
||||||
|
|
||||||
|
private inline fun dispatch(block: (EventObserver) -> Unit) {
|
||||||
synchronized(observers) {
|
synchronized(observers) {
|
||||||
for (observer in observers) {
|
observers.forEach(block)
|
||||||
observer.event(eventId)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun addObserver(observer: EventObserver) {
|
fun addObserver(observer: EventObserver) {
|
||||||
synchronized(observers) {
|
synchronized(observers) { observers.add(observer) }
|
||||||
observers.add(observer)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun removeObserver(observer: EventObserver) {
|
fun removeObserver(observer: EventObserver) {
|
||||||
synchronized(observers) {
|
synchronized(observers) { observers.remove(observer) }
|
||||||
observers.remove(observer)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// MPV Event IDs
|
|
||||||
const val MPV_EVENT_NONE = 0
|
|
||||||
const val MPV_EVENT_SHUTDOWN = 1
|
|
||||||
const val MPV_EVENT_LOG_MESSAGE = 2
|
|
||||||
const val MPV_EVENT_GET_PROPERTY_REPLY = 3
|
|
||||||
const val MPV_EVENT_SET_PROPERTY_REPLY = 4
|
|
||||||
const val MPV_EVENT_COMMAND_REPLY = 5
|
|
||||||
const val MPV_EVENT_START_FILE = 6
|
|
||||||
const val MPV_EVENT_END_FILE = 7
|
|
||||||
const val MPV_EVENT_FILE_LOADED = 8
|
|
||||||
const val MPV_EVENT_IDLE = 11
|
|
||||||
const val MPV_EVENT_TICK = 14
|
|
||||||
const val MPV_EVENT_CLIENT_MESSAGE = 16
|
|
||||||
const val MPV_EVENT_VIDEO_RECONFIG = 17
|
|
||||||
const val MPV_EVENT_AUDIO_RECONFIG = 18
|
|
||||||
const val MPV_EVENT_SEEK = 20
|
|
||||||
const val MPV_EVENT_PLAYBACK_RESTART = 21
|
|
||||||
const val MPV_EVENT_PROPERTY_CHANGE = 22
|
|
||||||
const val MPV_EVENT_QUEUE_OVERFLOW = 24
|
|
||||||
|
|
||||||
// End file reason
|
|
||||||
const val MPV_END_FILE_REASON_EOF = 0
|
|
||||||
const val MPV_END_FILE_REASON_STOP = 2
|
|
||||||
const val MPV_END_FILE_REASON_QUIT = 3
|
|
||||||
const val MPV_END_FILE_REASON_ERROR = 4
|
|
||||||
const val MPV_END_FILE_REASON_REDIRECT = 5
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Create and initialize the MPV library
|
|
||||||
*/
|
|
||||||
fun create(context: Context, configDir: String? = null) {
|
|
||||||
if (initialized) return
|
|
||||||
|
|
||||||
try {
|
|
||||||
LibMPV.create(context)
|
|
||||||
LibMPV.addObserver(libObserver)
|
|
||||||
initialized = true
|
|
||||||
Log.i(TAG, "libmpv created successfully")
|
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.e(TAG, "Failed to create libmpv: ${e.message}")
|
|
||||||
throw e
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun initialize() {
|
fun initialize() {
|
||||||
LibMPV.init()
|
instance.init()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun destroy() {
|
fun attachSurface(surface: android.view.Surface) {
|
||||||
if (!initialized) return
|
instance.attachSurface(surface)
|
||||||
try {
|
|
||||||
LibMPV.removeObserver(libObserver)
|
|
||||||
LibMPV.destroy()
|
|
||||||
} catch (e: Exception) {
|
|
||||||
Log.e(TAG, "Error destroying mpv: ${e.message}")
|
|
||||||
}
|
|
||||||
initialized = false
|
|
||||||
}
|
|
||||||
|
|
||||||
fun isInitialized(): Boolean = initialized
|
|
||||||
|
|
||||||
fun attachSurface(surface: Surface) {
|
|
||||||
LibMPV.attachSurface(surface)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun detachSurface() {
|
fun detachSurface() {
|
||||||
LibMPV.detachSurface()
|
instance.detachSurface()
|
||||||
}
|
}
|
||||||
|
|
||||||
fun command(cmd: Array<String?>) {
|
fun command(cmd: Array<String>) {
|
||||||
LibMPV.command(cmd)
|
instance.command(cmd)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setOptionString(name: String, value: String): Int {
|
fun setOptionString(name: String, value: String): Int {
|
||||||
return LibMPV.setOptionString(name, value)
|
return instance.setOptionString(name, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun getPropertyInt(name: String): Int? {
|
fun getPropertyInt(name: String): Int? = try {
|
||||||
return try {
|
instance.getPropertyInt(name)
|
||||||
LibMPV.getPropertyInt(name)
|
} catch (e: Exception) { null }
|
||||||
} catch (e: Exception) {
|
|
||||||
null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getPropertyDouble(name: String): Double? {
|
fun getPropertyDouble(name: String): Double? = try {
|
||||||
return try {
|
instance.getPropertyDouble(name)
|
||||||
LibMPV.getPropertyDouble(name)
|
} catch (e: Exception) { null }
|
||||||
} catch (e: Exception) {
|
|
||||||
null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getPropertyBoolean(name: String): Boolean? {
|
fun getPropertyBoolean(name: String): Boolean? = try {
|
||||||
return try {
|
instance.getPropertyBoolean(name)
|
||||||
LibMPV.getPropertyBoolean(name)
|
} catch (e: Exception) { null }
|
||||||
} catch (e: Exception) {
|
|
||||||
null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun getPropertyString(name: String): String? {
|
fun getPropertyString(name: String): String? = try {
|
||||||
return try {
|
instance.getPropertyString(name)
|
||||||
LibMPV.getPropertyString(name)
|
} catch (e: Exception) { null }
|
||||||
} catch (e: Exception) {
|
|
||||||
null
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun setPropertyInt(name: String, value: Int) {
|
fun setPropertyInt(name: String, value: Int) {
|
||||||
LibMPV.setPropertyInt(name, value)
|
instance.setPropertyInt(name, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setPropertyDouble(name: String, value: Double) {
|
fun setPropertyDouble(name: String, value: Double) {
|
||||||
LibMPV.setPropertyDouble(name, value)
|
instance.setPropertyDouble(name, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setPropertyBoolean(name: String, value: Boolean) {
|
fun setPropertyBoolean(name: String, value: Boolean) {
|
||||||
LibMPV.setPropertyBoolean(name, value)
|
instance.setPropertyBoolean(name, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun setPropertyString(name: String, value: String) {
|
fun setPropertyString(name: String, value: String) {
|
||||||
LibMPV.setPropertyString(name, value)
|
instance.setPropertyString(name, value)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun observeProperty(name: String, format: Int) {
|
fun observeProperty(name: String, format: Int) {
|
||||||
LibMPV.observeProperty(name, format)
|
instance.observeProperty(name, format)
|
||||||
|
}
|
||||||
|
|
||||||
|
companion object {
|
||||||
|
/**
|
||||||
|
* Create a fresh mpv handle. Each call returns an independent instance —
|
||||||
|
* do not share across players. Attach exactly one [EventObserver] per
|
||||||
|
* player via [addObserver].
|
||||||
|
*/
|
||||||
|
fun create(context: Context): MPVLib {
|
||||||
|
val lib = LibMPV.create(context)
|
||||||
|
?: throw IllegalStateException("LibMPV.create returned null")
|
||||||
|
val wrapper = MPVLib(lib)
|
||||||
|
// The libObserver is attached for the lifetime of this MPVLib
|
||||||
|
// instance and forwards every LibMPV callback to our observers
|
||||||
|
// list. Player-specific observers are added/removed via
|
||||||
|
// addObserver/removeObserver.
|
||||||
|
lib.addObserver(wrapper.libObserver)
|
||||||
|
return wrapper
|
||||||
|
}
|
||||||
|
|
||||||
|
// MPV Event IDs (kept here so observers can reference them without
|
||||||
|
// holding a reference to an instance).
|
||||||
|
const val MPV_EVENT_NONE = 0
|
||||||
|
const val MPV_EVENT_SHUTDOWN = 1
|
||||||
|
const val MPV_EVENT_LOG_MESSAGE = 2
|
||||||
|
const val MPV_EVENT_GET_PROPERTY_REPLY = 3
|
||||||
|
const val MPV_EVENT_SET_PROPERTY_REPLY = 4
|
||||||
|
const val MPV_EVENT_COMMAND_REPLY = 5
|
||||||
|
const val MPV_EVENT_START_FILE = 6
|
||||||
|
const val MPV_EVENT_END_FILE = 7
|
||||||
|
const val MPV_EVENT_FILE_LOADED = 8
|
||||||
|
const val MPV_EVENT_IDLE = 11
|
||||||
|
const val MPV_EVENT_TICK = 14
|
||||||
|
const val MPV_EVENT_CLIENT_MESSAGE = 16
|
||||||
|
const val MPV_EVENT_VIDEO_RECONFIG = 17
|
||||||
|
const val MPV_EVENT_AUDIO_RECONFIG = 18
|
||||||
|
const val MPV_EVENT_SEEK = 20
|
||||||
|
const val MPV_EVENT_PLAYBACK_RESTART = 21
|
||||||
|
const val MPV_EVENT_PROPERTY_CHANGE = 22
|
||||||
|
const val MPV_EVENT_QUEUE_OVERFLOW = 24
|
||||||
|
|
||||||
|
// End file reason
|
||||||
|
const val MPV_END_FILE_REASON_EOF = 0
|
||||||
|
const val MPV_END_FILE_REASON_STOP = 2
|
||||||
|
const val MPV_END_FILE_REASON_QUIT = 3
|
||||||
|
const val MPV_END_FILE_REASON_ERROR = 4
|
||||||
|
const val MPV_END_FILE_REASON_REDIRECT = 5
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -29,6 +29,10 @@ class MpvPlayerModule : Module() {
|
|||||||
|
|
||||||
val urlString = source["url"] as? String ?: return@Prop
|
val urlString = source["url"] as? String ?: return@Prop
|
||||||
|
|
||||||
|
// Parse cache config if provided (mirrors iOS)
|
||||||
|
@Suppress("UNCHECKED_CAST")
|
||||||
|
val cacheConfig = source["cacheConfig"] as? Map<String, Any?>
|
||||||
|
|
||||||
@Suppress("UNCHECKED_CAST")
|
@Suppress("UNCHECKED_CAST")
|
||||||
val config = VideoLoadConfig(
|
val config = VideoLoadConfig(
|
||||||
url = urlString,
|
url = urlString,
|
||||||
@@ -38,7 +42,11 @@ class MpvPlayerModule : Module() {
|
|||||||
autoplay = (source["autoplay"] as? Boolean) ?: true,
|
autoplay = (source["autoplay"] as? Boolean) ?: true,
|
||||||
initialSubtitleId = (source["initialSubtitleId"] as? Number)?.toInt(),
|
initialSubtitleId = (source["initialSubtitleId"] as? Number)?.toInt(),
|
||||||
initialAudioId = (source["initialAudioId"] as? Number)?.toInt(),
|
initialAudioId = (source["initialAudioId"] as? Number)?.toInt(),
|
||||||
voDriver = source["voDriver"] as? String
|
voDriver = source["voDriver"] as? String,
|
||||||
|
cacheEnabled = cacheConfig?.get("enabled") as? String,
|
||||||
|
cacheSeconds = (cacheConfig?.get("cacheSeconds") as? Number)?.toInt(),
|
||||||
|
demuxerMaxBytes = (cacheConfig?.get("maxBytes") as? Number)?.toInt(),
|
||||||
|
demuxerMaxBackBytes = (cacheConfig?.get("maxBackBytes") as? Number)?.toInt()
|
||||||
)
|
)
|
||||||
|
|
||||||
view.loadVideo(config)
|
view.loadVideo(config)
|
||||||
@@ -60,6 +68,15 @@ class MpvPlayerModule : Module() {
|
|||||||
view.pause()
|
view.pause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Stop playback and release the MediaCodec decoder + demuxer.
|
||||||
|
// Does not synchronously tear down the native mpv handle (see
|
||||||
|
// MPVLib / MpvPlayerView.destroy docs). Call before navigating
|
||||||
|
// away from the player screen to avoid OOM during screen
|
||||||
|
// transitions on low-RAM devices.
|
||||||
|
AsyncFunction("destroy") { view: MpvPlayerView ->
|
||||||
|
view.destroy()
|
||||||
|
}
|
||||||
|
|
||||||
// Async function to seek to position
|
// Async function to seek to position
|
||||||
AsyncFunction("seekTo") { view: MpvPlayerView, position: Double ->
|
AsyncFunction("seekTo") { view: MpvPlayerView, position: Double ->
|
||||||
view.seekTo(position)
|
view.seekTo(position)
|
||||||
|
|||||||
@@ -2,14 +2,12 @@ package expo.modules.mpvplayer
|
|||||||
|
|
||||||
import android.content.Context
|
import android.content.Context
|
||||||
import android.graphics.Color
|
import android.graphics.Color
|
||||||
import android.graphics.Rect
|
|
||||||
import android.graphics.SurfaceTexture
|
|
||||||
import android.os.Handler
|
import android.os.Handler
|
||||||
import android.os.Looper
|
import android.os.Looper
|
||||||
import android.util.Log
|
import android.util.Log
|
||||||
import android.view.Surface
|
import android.view.Surface
|
||||||
import android.view.TextureView
|
import android.view.SurfaceHolder
|
||||||
import android.view.View
|
import android.view.SurfaceView
|
||||||
import android.view.ViewGroup
|
import android.view.ViewGroup
|
||||||
import expo.modules.kotlin.AppContext
|
import expo.modules.kotlin.AppContext
|
||||||
import expo.modules.kotlin.viewevent.EventDispatcher
|
import expo.modules.kotlin.viewevent.EventDispatcher
|
||||||
@@ -26,15 +24,30 @@ data class VideoLoadConfig(
|
|||||||
val autoplay: Boolean = true,
|
val autoplay: Boolean = true,
|
||||||
val initialSubtitleId: Int? = null,
|
val initialSubtitleId: Int? = null,
|
||||||
val initialAudioId: Int? = null,
|
val initialAudioId: Int? = null,
|
||||||
val voDriver: String? = null
|
val voDriver: String? = null,
|
||||||
|
val cacheEnabled: String? = null,
|
||||||
|
val cacheSeconds: Int? = null,
|
||||||
|
val demuxerMaxBytes: Int? = null,
|
||||||
|
val demuxerMaxBackBytes: Int? = null,
|
||||||
)
|
)
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* MpvPlayerView - ExpoView that hosts the MPV player.
|
* MpvPlayerView - ExpoView that hosts the MPV player.
|
||||||
* Uses TextureView for reliable Picture-in-Picture support.
|
*
|
||||||
|
* Uses SurfaceView (not TextureView) so the surface routes directly to
|
||||||
|
* SurfaceFlinger (the OS compositor) rather than compositing into the
|
||||||
|
* app's window surface. This matches mpv-android's architecture and
|
||||||
|
* gives mpv a standalone surface.
|
||||||
|
*
|
||||||
|
* PiP black-screen mitigation: SurfaceView's surface is destroyed and
|
||||||
|
* recreated on PiP entry/exit, and the new surface's initial dimensions
|
||||||
|
* can be stale until the next layout pass. We push dimension updates to
|
||||||
|
* mpv via both SurfaceHolder.Callback.surfaceChanged AND an
|
||||||
|
* OnLayoutChangeListener, so the PiP transition (which fires layout
|
||||||
|
* passes on the view itself) reaches mpv promptly.
|
||||||
*/
|
*/
|
||||||
class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context, appContext),
|
class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context, appContext),
|
||||||
MPVLayerRenderer.Delegate, TextureView.SurfaceTextureListener {
|
MPVLayerRenderer.Delegate, SurfaceHolder.Callback {
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
private const val TAG = "MpvPlayerView"
|
private const val TAG = "MpvPlayerView"
|
||||||
@@ -48,7 +61,7 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
val onTracksReady by EventDispatcher()
|
val onTracksReady by EventDispatcher()
|
||||||
val onPictureInPictureChange by EventDispatcher()
|
val onPictureInPictureChange by EventDispatcher()
|
||||||
|
|
||||||
private var textureView: TextureView
|
private var surfaceView: SurfaceView
|
||||||
private var renderer: MPVLayerRenderer? = null
|
private var renderer: MPVLayerRenderer? = null
|
||||||
private var pipController: PiPController? = null
|
private var pipController: PiPController? = null
|
||||||
|
|
||||||
@@ -59,30 +72,45 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
private var surfaceReady: Boolean = false
|
private var surfaceReady: Boolean = false
|
||||||
private var pendingConfig: VideoLoadConfig? = null
|
private var pendingConfig: VideoLoadConfig? = null
|
||||||
private var rendererStarted: Boolean = false
|
private var rendererStarted: Boolean = false
|
||||||
private var pendingSurface: Surface? = null
|
private var activeSurface: Surface? = null
|
||||||
private var surfaceTexture: SurfaceTexture? = null
|
|
||||||
|
|
||||||
// PiP state tracking
|
// PiP state tracking
|
||||||
private var isWaitingForPiPTransition: Boolean = false
|
|
||||||
private var isPiPSurfaceForced: Boolean = false
|
|
||||||
private val pipHandler = Handler(Looper.getMainLooper())
|
private val pipHandler = Handler(Looper.getMainLooper())
|
||||||
|
|
||||||
init {
|
init {
|
||||||
setBackgroundColor(Color.BLACK)
|
setBackgroundColor(Color.BLACK)
|
||||||
|
|
||||||
// Create TextureView for video rendering (composites into app window for PiP support)
|
// SurfaceView for video rendering. Routes the surface directly to
|
||||||
textureView = TextureView(context).apply {
|
// SurfaceFlinger (the OS compositor), giving mpv a standalone
|
||||||
|
// surface. TextureView composites into the app's window surface
|
||||||
|
// which is less efficient and breaks PiP transitions.
|
||||||
|
surfaceView = SurfaceView(context).apply {
|
||||||
layoutParams = ViewGroup.LayoutParams(
|
layoutParams = ViewGroup.LayoutParams(
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT,
|
ViewGroup.LayoutParams.MATCH_PARENT,
|
||||||
ViewGroup.LayoutParams.MATCH_PARENT
|
ViewGroup.LayoutParams.MATCH_PARENT
|
||||||
)
|
)
|
||||||
surfaceTextureListener = this@MpvPlayerView
|
|
||||||
}
|
}
|
||||||
addView(textureView)
|
surfaceView.holder.addCallback(this@MpvPlayerView)
|
||||||
|
addView(surfaceView)
|
||||||
|
|
||||||
|
// Push dimension updates to mpv on every view bounds change. This
|
||||||
|
// is the primary PiP black-screen fix: entering PiP fires a layout
|
||||||
|
// pass on the SurfaceView itself, and we proactively tell mpv the
|
||||||
|
// new size so it resizes its EGL swapchain before rendering.
|
||||||
|
surfaceView.addOnLayoutChangeListener { _, left, top, right, bottom,
|
||||||
|
oldLeft, oldTop, oldRight, oldBottom ->
|
||||||
|
val w = right - left
|
||||||
|
val h = bottom - top
|
||||||
|
val oldW = oldRight - oldLeft
|
||||||
|
val oldH = oldBottom - oldTop
|
||||||
|
if (w > 0 && h > 0 && (w != oldW || h != oldH)) {
|
||||||
|
renderer?.updateSurfaceSize(w, h)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize PiP controller with Expo's AppContext for proper activity access
|
// Initialize PiP controller with Expo's AppContext for proper activity access
|
||||||
pipController = PiPController(context, appContext)
|
pipController = PiPController(context, appContext)
|
||||||
pipController?.setPlayerView(textureView)
|
pipController?.setPlayerView(surfaceView)
|
||||||
pipController?.delegate = object : PiPController.Delegate {
|
pipController?.delegate = object : PiPController.Delegate {
|
||||||
override fun onPlay() {
|
override fun onPlay() {
|
||||||
play()
|
play()
|
||||||
@@ -98,17 +126,17 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
|
|
||||||
override fun onPictureInPictureModeChanged(isInPiP: Boolean) {
|
override fun onPictureInPictureModeChanged(isInPiP: Boolean) {
|
||||||
if (isInPiP) {
|
if (isInPiP) {
|
||||||
if (!isWaitingForPiPTransition) {
|
// Post size syncs after the PiP layout settles. Two passes
|
||||||
isWaitingForPiPTransition = true
|
// catch both the immediate surface re-attach and the
|
||||||
pipHandler.removeCallbacksAndMessages(null)
|
// post-animation layout pass. Replaces the old TextureView
|
||||||
for (delay in longArrayOf(500, 1000, 1500, 2000)) {
|
// measure/layout polling hack (forcePiPBufferSize).
|
||||||
pipHandler.postDelayed({ forcePiPBufferSize() }, delay)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
isWaitingForPiPTransition = false
|
|
||||||
pipHandler.removeCallbacksAndMessages(null)
|
pipHandler.removeCallbacksAndMessages(null)
|
||||||
restoreFromPiP()
|
pipHandler.postDelayed({ syncSurfaceSizeToView() }, 100)
|
||||||
|
pipHandler.postDelayed({ syncSurfaceSizeToView() }, 500)
|
||||||
|
} else {
|
||||||
|
// Restore from PiP: surface resized back to fullscreen.
|
||||||
|
pipHandler.removeCallbacksAndMessages(null)
|
||||||
|
pipHandler.postDelayed({ syncSurfaceSizeToView() }, 100)
|
||||||
}
|
}
|
||||||
onPictureInPictureChange(mapOf("isActive" to isInPiP))
|
onPictureInPictureChange(mapOf("isActive" to isInPiP))
|
||||||
}
|
}
|
||||||
@@ -121,7 +149,7 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Start the renderer with the given VO driver.
|
* Start the renderer with the given VO driver.
|
||||||
* Called lazily on first loadVideo so the voDriver setting is available.
|
* Called lazily on first loadVideo so user settings are available.
|
||||||
*/
|
*/
|
||||||
private fun ensureRendererStarted(voDriver: String?) {
|
private fun ensureRendererStarted(voDriver: String?) {
|
||||||
if (rendererStarted) return
|
if (rendererStarted) return
|
||||||
@@ -130,9 +158,14 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
renderer?.start(voDriver ?: "gpu-next")
|
renderer?.start(voDriver ?: "gpu-next")
|
||||||
rendererStarted = true
|
rendererStarted = true
|
||||||
|
|
||||||
pendingSurface?.let { surface ->
|
// If the surface is already alive (surfaceCreated fired before
|
||||||
|
// loadVideo), attach it now. With SurfaceView the surface is
|
||||||
|
// owned by the holder, so we read it from there directly rather
|
||||||
|
// than stashing it on the side.
|
||||||
|
surfaceView.holder.surface?.takeIf { it.isValid }?.let { surface ->
|
||||||
|
activeSurface = surface
|
||||||
renderer?.attachSurface(surface)
|
renderer?.attachSurface(surface)
|
||||||
pendingSurface = null
|
syncSurfaceSizeToView()
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
Log.e(TAG, "Failed to start renderer: ${e.message}")
|
Log.e(TAG, "Failed to start renderer: ${e.message}")
|
||||||
@@ -140,18 +173,20 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - TextureView.SurfaceTextureListener
|
// MARK: - SurfaceHolder.Callback
|
||||||
|
|
||||||
override fun onSurfaceTextureAvailable(surfaceTexture: SurfaceTexture, width: Int, height: Int) {
|
override fun surfaceCreated(holder: SurfaceHolder) {
|
||||||
this.surfaceTexture = surfaceTexture
|
val surface = holder.surface
|
||||||
val surface = Surface(surfaceTexture)
|
|
||||||
surfaceTexture.setDefaultBufferSize(width, height)
|
|
||||||
surfaceReady = true
|
surfaceReady = true
|
||||||
|
|
||||||
if (rendererStarted) {
|
if (rendererStarted) {
|
||||||
|
// The previous Surface reference is holder-owned; do NOT release
|
||||||
|
// it (SurfaceView manages its lifecycle). Just track the new one.
|
||||||
|
activeSurface = surface
|
||||||
renderer?.attachSurface(surface)
|
renderer?.attachSurface(surface)
|
||||||
} else {
|
// Push the actual view dimensions immediately so mpv doesn't
|
||||||
pendingSurface = surface
|
// render against stale full-screen geometry during PiP transitions.
|
||||||
|
syncSurfaceSizeToView()
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we have a pending load, execute it now
|
// If we have a pending load, execute it now
|
||||||
@@ -162,20 +197,36 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSurfaceTextureSizeChanged(surfaceTexture: SurfaceTexture, width: Int, height: Int) {
|
override fun surfaceChanged(holder: SurfaceHolder, format: Int, width: Int, height: Int) {
|
||||||
surfaceTexture.setDefaultBufferSize(width, height)
|
if (width > 0 && height > 0) {
|
||||||
renderer?.updateSurfaceSize(width, height)
|
renderer?.updateSurfaceSize(width, height)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSurfaceTextureDestroyed(surfaceTexture: SurfaceTexture): Boolean {
|
override fun surfaceDestroyed(holder: SurfaceHolder) {
|
||||||
this.surfaceTexture = null
|
|
||||||
surfaceReady = false
|
surfaceReady = false
|
||||||
renderer?.detachSurface()
|
renderer?.detachSurface()
|
||||||
return false // mpv manages the SurfaceTexture
|
// Do NOT issue mpv "stop" here. Playback continues against the
|
||||||
|
// demuxer; when surfaceCreated fires again (PiP entry/exit, app
|
||||||
|
// background/foreground), we re-attach and frames resume. This
|
||||||
|
// matches the keep-open=always setting in MPVLayerRenderer.
|
||||||
|
//
|
||||||
|
// Do NOT release activeSurface — SurfaceView owns it via the holder.
|
||||||
|
activeSurface = null
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onSurfaceTextureUpdated(surfaceTexture: SurfaceTexture) {
|
/**
|
||||||
// Called every frame — no action needed, mpv drives rendering directly
|
* Read the actual SurfaceView width/height and push them to mpv.
|
||||||
|
* The PiP transition can fire surfaceCreated before the view's layout
|
||||||
|
* has settled to PiP dimensions, so we re-sync after layout passes.
|
||||||
|
*/
|
||||||
|
private fun syncSurfaceSizeToView() {
|
||||||
|
if (!surfaceReady) return
|
||||||
|
val w = surfaceView.width
|
||||||
|
val h = surfaceView.height
|
||||||
|
if (w > 0 && h > 0) {
|
||||||
|
renderer?.updateSurfaceSize(w, h)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Video Loading
|
// MARK: - Video Loading
|
||||||
@@ -207,7 +258,11 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
startPosition = config.startPosition,
|
startPosition = config.startPosition,
|
||||||
externalSubtitles = config.externalSubtitles,
|
externalSubtitles = config.externalSubtitles,
|
||||||
initialSubtitleId = config.initialSubtitleId,
|
initialSubtitleId = config.initialSubtitleId,
|
||||||
initialAudioId = config.initialAudioId
|
initialAudioId = config.initialAudioId,
|
||||||
|
cacheEnabled = config.cacheEnabled,
|
||||||
|
cacheSeconds = config.cacheSeconds,
|
||||||
|
demuxerMaxBytes = config.demuxerMaxBytes,
|
||||||
|
demuxerMaxBackBytes = config.demuxerMaxBackBytes
|
||||||
)
|
)
|
||||||
|
|
||||||
if (config.autoplay) {
|
if (config.autoplay) {
|
||||||
@@ -236,6 +291,50 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
pipController?.setPlaybackRate(0.0)
|
pipController?.setPlaybackRate(0.0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Stop playback and release decoder resources.
|
||||||
|
*
|
||||||
|
* Delegates to [MPVLayerRenderer.stop], which issues mpv's "stop" command
|
||||||
|
* on a background thread (flushing the demuxer and releasing the
|
||||||
|
* MediaCodec hardware decoder) and drops the per-instance mpv handle.
|
||||||
|
*
|
||||||
|
* NOTE: this does NOT call `LibMPV.destroy()`. libmpv 1.0's
|
||||||
|
* nativeDestroy has an internal use-after-free on the JNI global ref
|
||||||
|
* path, so the native mpv handle is intentionally left for the JVM GC
|
||||||
|
* / native finalizer rather than torn down synchronously. See
|
||||||
|
* [MPVLib] class doc for the full rationale.
|
||||||
|
*
|
||||||
|
* Call this BEFORE navigating away from the player screen so the
|
||||||
|
* decoder is reclaimed before the next screen (or the next episode's
|
||||||
|
* player) mounts. Otherwise Expo Router renders the new screen first
|
||||||
|
* and you briefly have two mpv instances + two 4K decoders alive —
|
||||||
|
* instant OOM on a 2 GB device.
|
||||||
|
*/
|
||||||
|
fun destroy() {
|
||||||
|
renderer?.stop()
|
||||||
|
|
||||||
|
// Reset view-level state so a subsequent loadVideo() on the SAME view
|
||||||
|
// instance re-creates the mpv handle and re-attaches the still-live
|
||||||
|
// SurfaceView surface. Without this, rendererStarted stays true and
|
||||||
|
// ensureRendererStarted() early-returns, so renderer.start() is never
|
||||||
|
// called again — but stop() already nulled the renderer's mpv handle.
|
||||||
|
// The next loadVideo() then runs loadVideoInternal() -> renderer.load()
|
||||||
|
// against mpv == null, where every mpv?.command() (including the
|
||||||
|
// "stop" and load commands) silently no-ops, leaving a black frame.
|
||||||
|
//
|
||||||
|
// This path is hit by direct-player.tsx's goToNextItem()/stop(),
|
||||||
|
// which call destroy() immediately before router.replace() to the
|
||||||
|
// same route — Expo Router reuses the same MpvPlayerView instance,
|
||||||
|
// so the next source load happens on this view without a remount.
|
||||||
|
//
|
||||||
|
// SurfaceView note: the surface is owned by the holder and survives
|
||||||
|
// across destroy()/loadVideo() on the same view instance. The next
|
||||||
|
// ensureRendererStarted() reads it from surfaceView.holder.surface.
|
||||||
|
rendererStarted = false
|
||||||
|
currentUrl = null
|
||||||
|
activeSurface = null
|
||||||
|
}
|
||||||
|
|
||||||
fun seekTo(position: Double) {
|
fun seekTo(position: Double) {
|
||||||
renderer?.seekTo(position)
|
renderer?.seekTo(position)
|
||||||
}
|
}
|
||||||
@@ -267,59 +366,10 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
// MARK: - Picture in Picture
|
// MARK: - Picture in Picture
|
||||||
|
|
||||||
fun startPictureInPicture() {
|
fun startPictureInPicture() {
|
||||||
isWaitingForPiPTransition = true
|
|
||||||
pipController?.startPictureInPicture()
|
pipController?.startPictureInPicture()
|
||||||
|
|
||||||
// Resize buffer to match PiP window after animation settles
|
|
||||||
pipHandler.removeCallbacksAndMessages(null)
|
|
||||||
for (delay in longArrayOf(500, 1000, 1500, 2000)) {
|
|
||||||
pipHandler.postDelayed({ forcePiPBufferSize() }, delay)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resize the SurfaceTexture buffer AND TextureView layout to match the PiP
|
|
||||||
* visible rect so mpv renders at the PiP window's actual dimensions.
|
|
||||||
*/
|
|
||||||
private fun forcePiPBufferSize() {
|
|
||||||
if (!isWaitingForPiPTransition || !surfaceReady) return
|
|
||||||
|
|
||||||
val rect = Rect()
|
|
||||||
textureView.getGlobalVisibleRect(rect)
|
|
||||||
val visW = rect.width()
|
|
||||||
val visH = rect.height()
|
|
||||||
val vw = textureView.width
|
|
||||||
val vh = textureView.height
|
|
||||||
|
|
||||||
if (visW <= 0 || visH <= 0 || (vw == visW && vh == visH)) return
|
|
||||||
|
|
||||||
surfaceTexture?.setDefaultBufferSize(visW, visH)
|
|
||||||
renderer?.updateSurfaceSize(visW, visH)
|
|
||||||
|
|
||||||
// Force TextureView layout to match PiP visible area.
|
|
||||||
// layoutParams alone doesn't work during PiP because the parent
|
|
||||||
// never re-lays out its children.
|
|
||||||
textureView.measure(
|
|
||||||
View.MeasureSpec.makeMeasureSpec(visW, View.MeasureSpec.EXACTLY),
|
|
||||||
View.MeasureSpec.makeMeasureSpec(visH, View.MeasureSpec.EXACTLY)
|
|
||||||
)
|
|
||||||
textureView.layout(0, 0, visW, visH)
|
|
||||||
isPiPSurfaceForced = true
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun restoreFromPiP() {
|
|
||||||
if (!isPiPSurfaceForced) return
|
|
||||||
isPiPSurfaceForced = false
|
|
||||||
|
|
||||||
val lp = textureView.layoutParams
|
|
||||||
lp.width = ViewGroup.LayoutParams.MATCH_PARENT
|
|
||||||
lp.height = ViewGroup.LayoutParams.MATCH_PARENT
|
|
||||||
textureView.layoutParams = lp
|
|
||||||
textureView.requestLayout()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
fun stopPictureInPicture() {
|
fun stopPictureInPicture() {
|
||||||
isWaitingForPiPTransition = false
|
|
||||||
pipHandler.removeCallbacksAndMessages(null)
|
pipHandler.removeCallbacksAndMessages(null)
|
||||||
pipController?.stopPictureInPicture()
|
pipController?.stopPictureInPicture()
|
||||||
}
|
}
|
||||||
@@ -479,13 +529,24 @@ class MpvPlayerView(context: Context, appContext: AppContext) : ExpoView(context
|
|||||||
|
|
||||||
// MARK: - Cleanup
|
// MARK: - Cleanup
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Proactively tear down the player. Called from onDetachedFromWindow so
|
||||||
|
* the app releases mpv + decoder buffers when the View detaches from the
|
||||||
|
* window. The JS-facing destroy() is intentionally thinner (just
|
||||||
|
* renderer.stop()) — see this thread for why the full teardown was kept
|
||||||
|
* off the JS path.
|
||||||
|
*/
|
||||||
fun cleanup() {
|
fun cleanup() {
|
||||||
isWaitingForPiPTransition = false
|
|
||||||
pipHandler.removeCallbacksAndMessages(null)
|
pipHandler.removeCallbacksAndMessages(null)
|
||||||
pipController?.stopPictureInPicture()
|
pipController?.stopPictureInPicture()
|
||||||
renderer?.stop()
|
renderer?.stop()
|
||||||
surfaceTexture = null
|
renderer?.delegate = null
|
||||||
|
|
||||||
|
// SurfaceView owns the Surface via its holder — do NOT release it.
|
||||||
|
activeSurface = null
|
||||||
surfaceReady = false
|
surfaceReady = false
|
||||||
|
currentUrl = null
|
||||||
|
rendererStarted = false
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun onDetachedFromWindow() {
|
override fun onDetachedFromWindow() {
|
||||||
|
|||||||
@@ -44,6 +44,11 @@ class PiPController(private val context: Context, private val appContext: AppCon
|
|||||||
private var currentPosition: Double = 0.0
|
private var currentPosition: Double = 0.0
|
||||||
private var currentDuration: Double = 0.0
|
private var currentDuration: Double = 0.0
|
||||||
private var playbackRate: Double = 1.0
|
private var playbackRate: Double = 1.0
|
||||||
|
// Independently tracks whether the system should auto-enter PiP on home
|
||||||
|
// press. Decoupled from playbackRate so that disabling auto-enter
|
||||||
|
// (e.g. when the player unmounts) doesn't corrupt the play/pause icon
|
||||||
|
// state that buildPiPActions() derives from playbackRate.
|
||||||
|
private var autoEnterEnabled: Boolean = false
|
||||||
|
|
||||||
private var videoWidth: Int = 0
|
private var videoWidth: Int = 0
|
||||||
private var videoHeight: Int = 0
|
private var videoHeight: Int = 0
|
||||||
@@ -106,15 +111,37 @@ class PiPController(private val context: Context, private val appContext: AppCon
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun stopPictureInPicture() {
|
fun stopPictureInPicture() {
|
||||||
|
// Disable auto-enter eligibility without touching playbackRate.
|
||||||
|
// playbackRate drives the play/pause icon in buildPiPActions();
|
||||||
|
// mutating it here would cause a stale icon if PiP is re-entered
|
||||||
|
// before the next playback state callback corrects it.
|
||||||
|
autoEnterEnabled = false
|
||||||
isInPiPMode = false
|
isInPiPMode = false
|
||||||
pipEntryNotified = false
|
pipEntryNotified = false
|
||||||
unregisterLifecycleCallbacks()
|
unregisterLifecycleCallbacks()
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
|
|
||||||
val activity = getActivity()
|
val activity = getActivity() ?: return
|
||||||
if (activity?.isInPictureInPictureMode == true) {
|
|
||||||
activity.moveTaskToBack(false)
|
// Push minimal params with just auto-enter disabled. Do NOT call
|
||||||
|
// buildPiPParams() — it calls ensurePiPReceiverRegistered() and
|
||||||
|
// setActions(), which would re-register the broadcast receiver
|
||||||
|
// (just unregistered above) and attach play/pause/skip actions to
|
||||||
|
// params being torn down. That leaves a live receiver + stale
|
||||||
|
// actions after the player has unmounted.
|
||||||
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
|
try {
|
||||||
|
activity.setPictureInPictureParams(
|
||||||
|
PictureInPictureParams.Builder()
|
||||||
|
.setAutoEnterEnabled(false)
|
||||||
|
.build()
|
||||||
|
)
|
||||||
|
} catch (e: Exception) {
|
||||||
|
Log.e(TAG, "Failed to clear PiP auto-enter params: ${e.message}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (activity.isInPictureInPictureMode) {
|
||||||
|
activity.moveTaskToBack(false)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
fun isCurrentlyInPiP(): Boolean = isInPiPMode
|
fun isCurrentlyInPiP(): Boolean = isInPiPMode
|
||||||
@@ -126,6 +153,7 @@ class PiPController(private val context: Context, private val appContext: AppCon
|
|||||||
|
|
||||||
fun setPlaybackRate(rate: Double) {
|
fun setPlaybackRate(rate: Double) {
|
||||||
playbackRate = rate
|
playbackRate = rate
|
||||||
|
autoEnterEnabled = rate > 0
|
||||||
|
|
||||||
if (rate > 0) {
|
if (rate > 0) {
|
||||||
registerLifecycleCallbacks()
|
registerLifecycleCallbacks()
|
||||||
@@ -208,7 +236,7 @@ class PiPController(private val context: Context, private val appContext: AppCon
|
|||||||
builder.setActions(buildPiPActions())
|
builder.setActions(buildPiPActions())
|
||||||
|
|
||||||
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
|
||||||
builder.setAutoEnterEnabled(forEntering || playbackRate > 0)
|
builder.setAutoEnterEnabled(forEntering || autoEnterEnabled)
|
||||||
}
|
}
|
||||||
|
|
||||||
return builder.build()
|
return builder.build()
|
||||||
|
|||||||
@@ -1020,12 +1020,44 @@ final class MPVLayerRenderer {
|
|||||||
info["cacheSeconds"] = cacheSeconds
|
info["cacheSeconds"] = cacheSeconds
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Configured cache limits — read back from mpv to confirm user
|
||||||
|
// settings actually took effect. mpv stores byte sizes as int64
|
||||||
|
// (bytes); convert to MiB for display.
|
||||||
|
var demuxerMaxBytes: Int64 = 0
|
||||||
|
if getProperty(handle: handle, name: "demuxer-max-bytes", format: MPV_FORMAT_INT64, value: &demuxerMaxBytes) >= 0 {
|
||||||
|
info["demuxerMaxBytes"] = Int(demuxerMaxBytes / (1024 * 1024))
|
||||||
|
}
|
||||||
|
var demuxerMaxBackBytes: Int64 = 0
|
||||||
|
if getProperty(handle: handle, name: "demuxer-max-back-bytes", format: MPV_FORMAT_INT64, value: &demuxerMaxBackBytes) >= 0 {
|
||||||
|
info["demuxerMaxBackBytes"] = Int(demuxerMaxBackBytes / (1024 * 1024))
|
||||||
|
}
|
||||||
|
var cacheSecsLimit: Double = 0
|
||||||
|
if getProperty(handle: handle, name: "cache-secs", format: MPV_FORMAT_DOUBLE, value: &cacheSecsLimit) >= 0 {
|
||||||
|
info["cacheSecsLimit"] = cacheSecsLimit
|
||||||
|
}
|
||||||
|
|
||||||
// Dropped frames
|
// Dropped frames
|
||||||
var droppedFrames: Int64 = 0
|
var droppedFrames: Int64 = 0
|
||||||
if getProperty(handle: handle, name: "frame-drop-count", format: MPV_FORMAT_INT64, value: &droppedFrames) >= 0 {
|
if getProperty(handle: handle, name: "frame-drop-count", format: MPV_FORMAT_INT64, value: &droppedFrames) >= 0 {
|
||||||
info["droppedFrames"] = Int(droppedFrames)
|
info["droppedFrames"] = Int(droppedFrames)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Active video output driver
|
||||||
|
if let voDriver = getStringProperty(handle: handle, name: "vo") {
|
||||||
|
info["voDriver"] = voDriver
|
||||||
|
}
|
||||||
|
|
||||||
|
// Active hardware decoder
|
||||||
|
if let hwdec = getStringProperty(handle: handle, name: "hwdec-current") {
|
||||||
|
info["hwdec"] = hwdec
|
||||||
|
}
|
||||||
|
|
||||||
|
// Estimated video output fps (post-filter)
|
||||||
|
var estimatedVfFps: Double = 0
|
||||||
|
if getProperty(handle: handle, name: "estimated-vf-fps", format: MPV_FORMAT_DOUBLE, value: &estimatedVfFps) >= 0 && estimatedVfFps > 0 {
|
||||||
|
info["estimatedVfFps"] = estimatedVfFps
|
||||||
|
}
|
||||||
|
|
||||||
return info
|
return info
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -75,6 +75,12 @@ public class MpvPlayerModule: Module {
|
|||||||
view.pause()
|
view.pause()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Synchronously destroy mpv instance + decoder before navigating
|
||||||
|
// away from the player screen (cross-platform; matches Android).
|
||||||
|
AsyncFunction("destroy") { (view: MpvPlayerView) in
|
||||||
|
view.destroy()
|
||||||
|
}
|
||||||
|
|
||||||
// Async function to seek to position
|
// Async function to seek to position
|
||||||
AsyncFunction("seekTo") { (view: MpvPlayerView, position: Double) in
|
AsyncFunction("seekTo") { (view: MpvPlayerView, position: Double) in
|
||||||
view.seekTo(position: position)
|
view.seekTo(position: position)
|
||||||
|
|||||||
@@ -289,6 +289,49 @@ class MpvPlayerView: ExpoView {
|
|||||||
pipController?.updatePlaybackState()
|
pipController?.updatePlaybackState()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Synchronously stop and destroy the mpv instance + decoder so memory is
|
||||||
|
* freed before the next screen mounts. Safe to call multiple times — the
|
||||||
|
* underlying renderer.stop() guards against re-entry.
|
||||||
|
*
|
||||||
|
* Cross-platform counterpart of MpvPlayerView.destroy() on Android.
|
||||||
|
*/
|
||||||
|
func destroy() {
|
||||||
|
renderer?.stop()
|
||||||
|
|
||||||
|
// Reset view state and re-create the mpv handle so a subsequent
|
||||||
|
// loadVideo() on the SAME view instance can actually load.
|
||||||
|
// Without this, stop() leaves renderer.mpv == nil, and the next
|
||||||
|
// loadVideo(config:) calls renderer.load() which early-returns
|
||||||
|
// at `guard let handle = self.mpv else { return }` — but only
|
||||||
|
// after flipping isLoading = true and dispatching the loading
|
||||||
|
// delegate callback, so the JS layer is stuck in a perpetual
|
||||||
|
// "loading" state with no actual playback.
|
||||||
|
//
|
||||||
|
// This path is hit by direct-player.tsx's goToNextItem()/stop(),
|
||||||
|
// which call destroy() immediately before router.replace() to
|
||||||
|
// the same route — Expo Router reuses the same MpvPlayerView
|
||||||
|
// instance, so the next `source` prop update arrives on this
|
||||||
|
// view without a remount. setupView() is otherwise the only
|
||||||
|
// place start() is called, so without re-starting here the
|
||||||
|
// renderer stays dead until the whole view is unmounted and
|
||||||
|
// recreated.
|
||||||
|
//
|
||||||
|
// start() is idempotent (`guard !isRunning else { return }`)
|
||||||
|
// and stop() has already nulled mpv synchronously before
|
||||||
|
// dispatching the async mpv_terminate_destroy, so creating a
|
||||||
|
// fresh handle here is safe even while the old handle's
|
||||||
|
// teardown is still in flight on a background queue (libmpv
|
||||||
|
// handles are independent).
|
||||||
|
currentURL = nil
|
||||||
|
intendedPlayState = false
|
||||||
|
do {
|
||||||
|
try renderer?.start()
|
||||||
|
} catch {
|
||||||
|
onError(["error": "Failed to restart renderer after destroy: \(error.localizedDescription)"])
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func seekTo(position: Double) {
|
func seekTo(position: Double) {
|
||||||
// Update cached position and Now Playing immediately for smooth Control Center feedback
|
// Update cached position and Now Playing immediately for smooth Control Center feedback
|
||||||
cachedPosition = position
|
cachedPosition = position
|
||||||
|
|||||||
@@ -89,6 +89,14 @@ export type MpvPlayerViewProps = {
|
|||||||
export interface MpvPlayerViewRef {
|
export interface MpvPlayerViewRef {
|
||||||
play: () => Promise<void>;
|
play: () => Promise<void>;
|
||||||
pause: () => Promise<void>;
|
pause: () => Promise<void>;
|
||||||
|
/**
|
||||||
|
* Synchronously destroy the mpv instance + decoder + surface buffers.
|
||||||
|
* Call before navigating away from the player screen so memory is
|
||||||
|
* freed before the next screen mounts. Safe to call multiple times.
|
||||||
|
*/
|
||||||
|
destroy: () => Promise<void>;
|
||||||
|
// Pre-libmpv-1.0 alias (kept for source-history reference):
|
||||||
|
// stop: () => Promise<void>;
|
||||||
seekTo: (position: number) => Promise<void>;
|
seekTo: (position: number) => Promise<void>;
|
||||||
seekBy: (offset: number) => Promise<void>;
|
seekBy: (offset: number) => Promise<void>;
|
||||||
setSpeed: (speed: number) => Promise<void>;
|
setSpeed: (speed: number) => Promise<void>;
|
||||||
@@ -154,9 +162,17 @@ export type TechnicalInfo = {
|
|||||||
videoBitrate?: number;
|
videoBitrate?: number;
|
||||||
audioBitrate?: number;
|
audioBitrate?: number;
|
||||||
cacheSeconds?: number;
|
cacheSeconds?: number;
|
||||||
|
/** Configured demuxer forward cache cap (MiB), read back from mpv */
|
||||||
|
demuxerMaxBytes?: number;
|
||||||
|
/** Configured demuxer backward cache cap (MiB), read back from mpv */
|
||||||
|
demuxerMaxBackBytes?: number;
|
||||||
|
/** Configured cache-secs floor, read back from mpv */
|
||||||
|
cacheSecsLimit?: number;
|
||||||
droppedFrames?: number;
|
droppedFrames?: number;
|
||||||
/** Active video output driver (read from MPV at runtime) */
|
/** Active video output driver (read from MPV at runtime) */
|
||||||
voDriver?: string;
|
voDriver?: string;
|
||||||
/** Active hardware decoder (read from MPV at runtime) */
|
/** Active hardware decoder (read from MPV at runtime) */
|
||||||
hwdec?: string;
|
hwdec?: string;
|
||||||
|
/** Estimated video output fps (mpv "estimated-vf-fps") */
|
||||||
|
estimatedVfFps?: number;
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -20,6 +20,9 @@ export default React.forwardRef<MpvPlayerViewRef, MpvPlayerViewProps>(
|
|||||||
pause: async () => {
|
pause: async () => {
|
||||||
await nativeRef.current?.pause();
|
await nativeRef.current?.pause();
|
||||||
},
|
},
|
||||||
|
destroy: async () => {
|
||||||
|
await nativeRef.current?.destroy();
|
||||||
|
},
|
||||||
seekTo: async (position: number) => {
|
seekTo: async (position: number) => {
|
||||||
await nativeRef.current?.seekTo(position);
|
await nativeRef.current?.seekTo(position);
|
||||||
},
|
},
|
||||||
|
|||||||
11
package.json
11
package.json
@@ -17,13 +17,13 @@
|
|||||||
"ios:unsigned-build": "cross-env EXPO_TV=0 bun scripts/ios/build-ios.ts --production",
|
"ios:unsigned-build": "cross-env EXPO_TV=0 bun scripts/ios/build-ios.ts --production",
|
||||||
"ios:unsigned-build:tv": "cross-env EXPO_TV=1 bun scripts/ios/build-ios.ts --production",
|
"ios:unsigned-build:tv": "cross-env EXPO_TV=1 bun scripts/ios/build-ios.ts --production",
|
||||||
"prepare": "husky",
|
"prepare": "husky",
|
||||||
"typecheck": "node scripts/typecheck.js",
|
"typecheck": "bun scripts/typecheck.ts",
|
||||||
"check": "biome check . --max-diagnostics 1000",
|
"check": "biome check . --max-diagnostics 1000",
|
||||||
"lint": "biome check --write --unsafe --max-diagnostics 1000",
|
"lint": "biome check --write --unsafe --max-diagnostics 1000",
|
||||||
"format": "biome format --write .",
|
"format": "biome format --write .",
|
||||||
"doctor": "expo-doctor",
|
"doctor": "expo-doctor",
|
||||||
"i18n:check": "bun scripts/check-i18n-keys.mjs",
|
"i18n:check": "bun scripts/check-i18n-keys.ts",
|
||||||
"i18n:fix-unused": "bun scripts/check-i18n-keys.mjs --fix-unused",
|
"i18n:fix-unused": "bun scripts/check-i18n-keys.ts --fix-unused",
|
||||||
"test": "bun run typecheck && bun run lint && bun run format && bun run i18n:check && bun run doctor",
|
"test": "bun run typecheck && bun run lint && bun run format && bun run i18n:check && bun run doctor",
|
||||||
"postinstall": "patch-package"
|
"postinstall": "patch-package"
|
||||||
},
|
},
|
||||||
@@ -132,10 +132,11 @@
|
|||||||
"@types/react": "~19.2.10",
|
"@types/react": "~19.2.10",
|
||||||
"@types/react-test-renderer": "19.1.0",
|
"@types/react-test-renderer": "19.1.0",
|
||||||
"cross-env": "10.1.0",
|
"cross-env": "10.1.0",
|
||||||
"expo-doctor": "1.19.9",
|
"expo-doctor": "1.20.0",
|
||||||
"husky": "9.1.7",
|
"husky": "9.1.7",
|
||||||
"lint-staged": "17.0.7",
|
"lint-staged": "17.0.8",
|
||||||
"react-test-renderer": "19.2.3",
|
"react-test-renderer": "19.2.3",
|
||||||
|
"tsx": "^4.22.4",
|
||||||
"typescript": "6.0.3"
|
"typescript": "6.0.3"
|
||||||
},
|
},
|
||||||
"expo": {
|
"expo": {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
const { withPodfile } = require("expo/config-plugins");
|
import { type ConfigPlugin, withPodfile } from "expo/config-plugins";
|
||||||
|
|
||||||
const PATCH_START = "## >>> runtime-framework headers";
|
const PATCH_START = "## >>> runtime-framework headers";
|
||||||
const PATCH_END = "## <<< runtime-framework headers";
|
const PATCH_END = "## <<< runtime-framework headers";
|
||||||
@@ -13,7 +13,7 @@ const EXTRA_HDRS = [
|
|||||||
`\${PODS_CONFIGURATION_BUILD_DIR}/React-rendererconsistency/React_rendererconsistency.framework/Headers`,
|
`\${PODS_CONFIGURATION_BUILD_DIR}/React-rendererconsistency/React_rendererconsistency.framework/Headers`,
|
||||||
];
|
];
|
||||||
|
|
||||||
function buildPatch() {
|
function buildPatch(): string {
|
||||||
return [
|
return [
|
||||||
PATCH_START,
|
PATCH_START,
|
||||||
" extra_hdrs = [",
|
" extra_hdrs = [",
|
||||||
@@ -91,7 +91,7 @@ function buildPatch() {
|
|||||||
].join("\n");
|
].join("\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function withRuntimeFrameworkHeaders(config) {
|
const withRuntimeFrameworkHeaders: ConfigPlugin = (config) => {
|
||||||
return withPodfile(config, (config) => {
|
return withPodfile(config, (config) => {
|
||||||
let podfile = config.modResults.contents;
|
let podfile = config.modResults.contents;
|
||||||
|
|
||||||
@@ -125,3 +125,5 @@ end
|
|||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default withRuntimeFrameworkHeaders;
|
||||||
@@ -1,10 +1,20 @@
|
|||||||
const {
|
import {
|
||||||
|
type ConfigPlugin,
|
||||||
withAndroidColors,
|
withAndroidColors,
|
||||||
withAndroidColorsNight,
|
withAndroidColorsNight,
|
||||||
} = require("expo/config-plugins");
|
} from "expo/config-plugins";
|
||||||
|
|
||||||
const withAndroidAlertColors = (config) => {
|
interface ColorResourceItem {
|
||||||
const setColor = (colorsList, name, value) => {
|
$: { name: string };
|
||||||
|
_: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const withAndroidAlertColors: ConfigPlugin = (config) => {
|
||||||
|
const setColor = (
|
||||||
|
colorsList: ColorResourceItem[],
|
||||||
|
name: string,
|
||||||
|
value: string,
|
||||||
|
) => {
|
||||||
const existingColor = colorsList.find(
|
const existingColor = colorsList.find(
|
||||||
(item) => item.$ && item.$.name === name,
|
(item) => item.$ && item.$.name === name,
|
||||||
);
|
);
|
||||||
@@ -20,7 +30,7 @@ const withAndroidAlertColors = (config) => {
|
|||||||
|
|
||||||
config = withAndroidColors(config, (config) => {
|
config = withAndroidColors(config, (config) => {
|
||||||
const colors = config.modResults;
|
const colors = config.modResults;
|
||||||
const colorsList = colors.resources.color || [];
|
const colorsList = (colors.resources.color ?? []) as ColorResourceItem[];
|
||||||
setColor(colorsList, "colorPrimary", "#000000");
|
setColor(colorsList, "colorPrimary", "#000000");
|
||||||
colors.resources.color = colorsList;
|
colors.resources.color = colorsList;
|
||||||
return config;
|
return config;
|
||||||
@@ -28,7 +38,7 @@ const withAndroidAlertColors = (config) => {
|
|||||||
|
|
||||||
config = withAndroidColorsNight(config, (config) => {
|
config = withAndroidColorsNight(config, (config) => {
|
||||||
const colors = config.modResults;
|
const colors = config.modResults;
|
||||||
const colorsList = colors.resources.color || [];
|
const colorsList = (colors.resources.color ?? []) as ColorResourceItem[];
|
||||||
setColor(colorsList, "colorPrimary", "#FFFFFF");
|
setColor(colorsList, "colorPrimary", "#FFFFFF");
|
||||||
colors.resources.color = colorsList;
|
colors.resources.color = colorsList;
|
||||||
return config;
|
return config;
|
||||||
@@ -37,4 +47,4 @@ const withAndroidAlertColors = (config) => {
|
|||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = withAndroidAlertColors;
|
export default withAndroidAlertColors;
|
||||||
@@ -1,8 +1,12 @@
|
|||||||
const { withAndroidManifest } = require("expo/config-plugins");
|
import { type ConfigPlugin, withAndroidManifest } from "expo/config-plugins";
|
||||||
|
|
||||||
const _withGoogleCastAndroidManifest = (config) =>
|
const withGoogleCastAndroidManifest: ConfigPlugin = (config) =>
|
||||||
withAndroidManifest(config, async (mod) => {
|
withAndroidManifest(config, async (mod) => {
|
||||||
const mainApplication = mod.modResults.manifest.application[0];
|
const mainApplication = mod.modResults.manifest.application?.[0];
|
||||||
|
|
||||||
|
if (!mainApplication) {
|
||||||
|
return mod;
|
||||||
|
}
|
||||||
|
|
||||||
// Initialize activity array if it doesn't exist
|
// Initialize activity array if it doesn't exist
|
||||||
if (!mainApplication.activity) {
|
if (!mainApplication.activity) {
|
||||||
@@ -39,4 +43,4 @@ const _withGoogleCastAndroidManifest = (config) =>
|
|||||||
return mod;
|
return mod;
|
||||||
});
|
});
|
||||||
|
|
||||||
module.exports = _withGoogleCastAndroidManifest;
|
export default withGoogleCastAndroidManifest;
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
const { readFileSync, writeFileSync } = require("node:fs");
|
import { readFileSync, writeFileSync } from "node:fs";
|
||||||
const { join } = require("node:path");
|
import { join } from "node:path";
|
||||||
const { withDangerousMod } = require("expo/config-plugins");
|
import { type ConfigPlugin, withDangerousMod } from "expo/config-plugins";
|
||||||
|
|
||||||
const withChangeNativeAndroidTextToWhite = (expoConfig) =>
|
const withChangeNativeAndroidTextToWhite: ConfigPlugin = (expoConfig) =>
|
||||||
withDangerousMod(expoConfig, [
|
withDangerousMod(expoConfig, [
|
||||||
"android",
|
"android",
|
||||||
(modConfig) => {
|
(modConfig) => {
|
||||||
@@ -30,4 +30,4 @@ const withChangeNativeAndroidTextToWhite = (expoConfig) =>
|
|||||||
},
|
},
|
||||||
]);
|
]);
|
||||||
|
|
||||||
module.exports = withChangeNativeAndroidTextToWhite;
|
export default withChangeNativeAndroidTextToWhite;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
const { withAppBuildGradle } = require("expo/config-plugins");
|
import { type ConfigPlugin, withAppBuildGradle } from "expo/config-plugins";
|
||||||
|
|
||||||
module.exports = function withExcludeMedia3Dash(config) {
|
const withExcludeMedia3Dash: ConfigPlugin = (config) => {
|
||||||
return withAppBuildGradle(config, (config) => {
|
return withAppBuildGradle(config, (config) => {
|
||||||
const contents = config.modResults.contents;
|
const contents = config.modResults.contents;
|
||||||
|
|
||||||
@@ -32,3 +32,5 @@ configurations.all {
|
|||||||
return config;
|
return config;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default withExcludeMedia3Dash;
|
||||||
@@ -1,6 +1,14 @@
|
|||||||
const { withPodfile } = require("@expo/config-plugins");
|
import { type ConfigPlugin, withPodfile } from "expo/config-plugins";
|
||||||
|
|
||||||
const withGitPod = (config, { podName, podspecUrl }) => {
|
interface GitPodOptions {
|
||||||
|
podName: string;
|
||||||
|
podspecUrl: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const withGitPod: ConfigPlugin<GitPodOptions> = (
|
||||||
|
config,
|
||||||
|
{ podName, podspecUrl },
|
||||||
|
) => {
|
||||||
return withPodfile(config, (config) => {
|
return withPodfile(config, (config) => {
|
||||||
const podfile = config.modResults.contents;
|
const podfile = config.modResults.contents;
|
||||||
|
|
||||||
@@ -21,4 +29,4 @@ const withGitPod = (config, { podName, podspecUrl }) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = withGitPod;
|
export default withGitPod;
|
||||||
@@ -1,12 +1,21 @@
|
|||||||
const { withGradleProperties } = require("expo/config-plugins");
|
import type { ExpoConfig } from "expo/config";
|
||||||
|
import {
|
||||||
|
AndroidConfig,
|
||||||
|
type ConfigPlugin,
|
||||||
|
withGradleProperties,
|
||||||
|
} from "expo/config-plugins";
|
||||||
|
|
||||||
function setGradlePropertiesValue(config, key, value) {
|
function setGradlePropertiesValue(
|
||||||
|
config: ExpoConfig,
|
||||||
|
key: string,
|
||||||
|
value: string,
|
||||||
|
): ExpoConfig {
|
||||||
return withGradleProperties(config, (exportedConfig) => {
|
return withGradleProperties(config, (exportedConfig) => {
|
||||||
const props = exportedConfig.modResults;
|
const props = exportedConfig.modResults;
|
||||||
const keyIdx = props.findIndex(
|
const keyIdx = props.findIndex(
|
||||||
(item) => item.type === "property" && item.key === key,
|
(item) => item.type === "property" && item.key === key,
|
||||||
);
|
);
|
||||||
const property = {
|
const property: AndroidConfig.Properties.PropertiesItem = {
|
||||||
type: "property",
|
type: "property",
|
||||||
key,
|
key,
|
||||||
value,
|
value,
|
||||||
@@ -22,11 +31,14 @@ function setGradlePropertiesValue(config, key, value) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = function withCustomPlugin(config) {
|
const withCustomGradleProperties: ConfigPlugin = (config) => {
|
||||||
// Expo 52 is not setting this
|
// Expo 52 is not setting this
|
||||||
// https://github.com/expo/expo/issues/32558
|
// https://github.com/expo/expo/issues/32558
|
||||||
config = setGradlePropertiesValue(config, "android.enableJetifier", "true");
|
config = setGradlePropertiesValue(config, "android.enableJetifier", "true");
|
||||||
|
|
||||||
|
// NDK version required by libmpv 1.0.0
|
||||||
|
config = setGradlePropertiesValue(config, "ndkVersion", "29.0.14206865");
|
||||||
|
|
||||||
// Increase memory
|
// Increase memory
|
||||||
config = setGradlePropertiesValue(
|
config = setGradlePropertiesValue(
|
||||||
config,
|
config,
|
||||||
@@ -35,3 +47,5 @@ module.exports = function withCustomPlugin(config) {
|
|||||||
);
|
);
|
||||||
return config;
|
return config;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export default withCustomGradleProperties;
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
const { withXcodeProject } = require("@expo/config-plugins");
|
import { type ConfigPlugin, withXcodeProject } from "expo/config-plugins";
|
||||||
|
|
||||||
const withTVOSAppIcon = (config) => {
|
const withTVOSAppIcon: ConfigPlugin = (config) => {
|
||||||
// Only apply for TV builds
|
// Only apply for TV builds
|
||||||
if (process.env.EXPO_TV !== "1") {
|
if (process.env.EXPO_TV !== "1") {
|
||||||
return config;
|
return config;
|
||||||
@@ -28,4 +28,4 @@ const withTVOSAppIcon = (config) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = withTVOSAppIcon;
|
export default withTVOSAppIcon;
|
||||||
@@ -1,8 +1,10 @@
|
|||||||
const {
|
import type { ExpoConfig } from "expo/config";
|
||||||
|
import {
|
||||||
|
type ConfigPlugin,
|
||||||
withEntitlementsPlist,
|
withEntitlementsPlist,
|
||||||
withInfoPlist,
|
withInfoPlist,
|
||||||
withXcodeProject,
|
withXcodeProject,
|
||||||
} = require("@expo/config-plugins");
|
} from "expo/config-plugins";
|
||||||
|
|
||||||
const EXTENSION_TARGET_NAME = "StreamyfinTopShelf";
|
const EXTENSION_TARGET_NAME = "StreamyfinTopShelf";
|
||||||
const TARGET_SOURCE_DIR = "../targets/StreamyfinTopShelf";
|
const TARGET_SOURCE_DIR = "../targets/StreamyfinTopShelf";
|
||||||
@@ -10,19 +12,29 @@ const APP_GROUP_INFO_PLIST_KEY = "StreamyfinAppGroupIdentifier";
|
|||||||
const KEYCHAIN_ACCESS_GROUP_INFO_PLIST_KEY =
|
const KEYCHAIN_ACCESS_GROUP_INFO_PLIST_KEY =
|
||||||
"StreamyfinKeychainAccessGroupIdentifier";
|
"StreamyfinKeychainAccessGroupIdentifier";
|
||||||
|
|
||||||
function getBundleIdentifier(config) {
|
interface AppExtensionConfig {
|
||||||
|
targetName: string;
|
||||||
|
bundleIdentifier: string;
|
||||||
|
entitlements: {
|
||||||
|
"com.apple.security.application-groups": string[];
|
||||||
|
"keychain-access-groups": string[];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
function getBundleIdentifier(config: ExpoConfig): string {
|
||||||
return config.ios?.bundleIdentifier || "com.fredrikburmester.streamyfin";
|
return config.ios?.bundleIdentifier || "com.fredrikburmester.streamyfin";
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAppGroupIdentifier(config) {
|
function getAppGroupIdentifier(config: ExpoConfig): string {
|
||||||
return `group.${getBundleIdentifier(config)}.tvtopshelf`;
|
return `group.${getBundleIdentifier(config)}.tvtopshelf`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getKeychainAccessGroupIdentifier(config) {
|
function getKeychainAccessGroupIdentifier(config: ExpoConfig): string {
|
||||||
return `$(AppIdentifierPrefix)${getBundleIdentifier(config)}`;
|
return `$(AppIdentifierPrefix)${getBundleIdentifier(config)}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getBuildConfigurations(project, configurationListId) {
|
// The xcode project object has no usable typings — keep `any` here.
|
||||||
|
function getBuildConfigurations(project: any, configurationListId: string) {
|
||||||
const configurationList =
|
const configurationList =
|
||||||
project.hash.project.objects.XCConfigurationList[configurationListId];
|
project.hash.project.objects.XCConfigurationList[configurationListId];
|
||||||
|
|
||||||
@@ -30,18 +42,21 @@ function getBuildConfigurations(project, configurationListId) {
|
|||||||
|
|
||||||
const buildConfigurations = project.pbxXCBuildConfigurationSection();
|
const buildConfigurations = project.pbxXCBuildConfigurationSection();
|
||||||
return configurationList.buildConfigurations
|
return configurationList.buildConfigurations
|
||||||
.map((config) => buildConfigurations[config.value])
|
.map((config: { value: string }) => buildConfigurations[config.value])
|
||||||
.filter(Boolean);
|
.filter(Boolean);
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensureAppGroup(value, appGroupIdentifier) {
|
function ensureAppGroup(value: unknown, appGroupIdentifier: string): string[] {
|
||||||
const groups = Array.isArray(value) ? value : [];
|
const groups = Array.isArray(value) ? value : [];
|
||||||
return groups.includes(appGroupIdentifier)
|
return groups.includes(appGroupIdentifier)
|
||||||
? groups
|
? groups
|
||||||
: [...groups, appGroupIdentifier];
|
: [...groups, appGroupIdentifier];
|
||||||
}
|
}
|
||||||
|
|
||||||
function ensureKeychainAccessGroup(value, keychainAccessGroupIdentifier) {
|
function ensureKeychainAccessGroup(
|
||||||
|
value: unknown,
|
||||||
|
keychainAccessGroupIdentifier: string,
|
||||||
|
): string[] {
|
||||||
const groups = Array.isArray(value) ? value : [];
|
const groups = Array.isArray(value) ? value : [];
|
||||||
return groups.includes(keychainAccessGroupIdentifier)
|
return groups.includes(keychainAccessGroupIdentifier)
|
||||||
? groups
|
? groups
|
||||||
@@ -49,13 +64,13 @@ function ensureKeychainAccessGroup(value, keychainAccessGroupIdentifier) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function ensureAppExtension(
|
function ensureAppExtension(
|
||||||
appExtensions,
|
appExtensions: unknown,
|
||||||
targetName,
|
targetName: string,
|
||||||
bundleIdentifier,
|
bundleIdentifier: string,
|
||||||
appGroupIdentifier,
|
appGroupIdentifier: string,
|
||||||
keychainAccessGroupIdentifier,
|
keychainAccessGroupIdentifier: string,
|
||||||
) {
|
): AppExtensionConfig[] {
|
||||||
const extensionConfig = {
|
const extensionConfig: AppExtensionConfig = {
|
||||||
targetName,
|
targetName,
|
||||||
bundleIdentifier,
|
bundleIdentifier,
|
||||||
entitlements: {
|
entitlements: {
|
||||||
@@ -63,7 +78,9 @@ function ensureAppExtension(
|
|||||||
"keychain-access-groups": [keychainAccessGroupIdentifier],
|
"keychain-access-groups": [keychainAccessGroupIdentifier],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
const extensions = Array.isArray(appExtensions) ? appExtensions : [];
|
const extensions: AppExtensionConfig[] = Array.isArray(appExtensions)
|
||||||
|
? appExtensions
|
||||||
|
: [];
|
||||||
// Keep plugin runs idempotent and preserve unrelated app extension entries.
|
// Keep plugin runs idempotent and preserve unrelated app extension entries.
|
||||||
const existingIndex = extensions.findIndex(
|
const existingIndex = extensions.findIndex(
|
||||||
(appExtension) => appExtension?.targetName === targetName,
|
(appExtension) => appExtension?.targetName === targetName,
|
||||||
@@ -78,7 +95,7 @@ function ensureAppExtension(
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
const withTVOSTopShelf = (config) => {
|
const withTVOSTopShelf: ConfigPlugin = (config) => {
|
||||||
const appGroupIdentifier = getAppGroupIdentifier(config);
|
const appGroupIdentifier = getAppGroupIdentifier(config);
|
||||||
const keychainAccessGroupIdentifier =
|
const keychainAccessGroupIdentifier =
|
||||||
getKeychainAccessGroupIdentifier(config);
|
getKeychainAccessGroupIdentifier(config);
|
||||||
@@ -193,4 +210,4 @@ const withTVOSTopShelf = (config) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = withTVOSTopShelf;
|
export default withTVOSTopShelf;
|
||||||
@@ -1,9 +1,9 @@
|
|||||||
const { withEntitlementsPlist } = require("expo/config-plugins");
|
import { type ConfigPlugin, withEntitlementsPlist } from "expo/config-plugins";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expo config plugin to add User Management entitlement for tvOS profile linking
|
* Expo config plugin to add User Management entitlement for tvOS profile linking
|
||||||
*/
|
*/
|
||||||
const withTVUserManagement = (config) => {
|
const withTVUserManagement: ConfigPlugin = (config) => {
|
||||||
// Only add for tvOS builds. The entitlement is restricted by Apple and must
|
// Only add for tvOS builds. The entitlement is restricted by Apple and must
|
||||||
// be present in the provisioning profile, so injecting it into mobile builds
|
// be present in the provisioning profile, so injecting it into mobile builds
|
||||||
// breaks signing ("Entitlement ... not found and could not be included in
|
// breaks signing ("Entitlement ... not found and could not be included in
|
||||||
@@ -24,4 +24,4 @@ const withTVUserManagement = (config) => {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = withTVUserManagement;
|
export default withTVUserManagement;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
const { withDangerousMod } = require("@expo/config-plugins");
|
import { execSync } from "node:child_process";
|
||||||
const { execSync } = require("node:child_process");
|
import fs from "node:fs";
|
||||||
const fs = require("node:fs");
|
import path from "node:path";
|
||||||
const path = require("node:path");
|
import { type ConfigPlugin, withDangerousMod } from "expo/config-plugins";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Expo config plugin that adds EXPO_TV=1 and NODE_BINARY to .xcode.env.local for TV builds.
|
* Expo config plugin that adds EXPO_TV=1 and NODE_BINARY to .xcode.env.local for TV builds.
|
||||||
@@ -12,7 +12,7 @@ const path = require("node:path");
|
|||||||
*
|
*
|
||||||
* It also sets NODE_BINARY for nvm users since Xcode can't resolve shell functions.
|
* It also sets NODE_BINARY for nvm users since Xcode can't resolve shell functions.
|
||||||
*/
|
*/
|
||||||
const withTVXcodeEnv = (config) => {
|
const withTVXcodeEnv: ConfigPlugin = (config) => {
|
||||||
// Only apply for TV builds
|
// Only apply for TV builds
|
||||||
if (process.env.EXPO_TV !== "1") {
|
if (process.env.EXPO_TV !== "1") {
|
||||||
return config;
|
return config;
|
||||||
@@ -70,7 +70,7 @@ const withTVXcodeEnv = (config) => {
|
|||||||
/**
|
/**
|
||||||
* Get the actual node binary path, handling nvm installations.
|
* Get the actual node binary path, handling nvm installations.
|
||||||
*/
|
*/
|
||||||
function getNodeBinaryPath() {
|
function getNodeBinaryPath(): string | null {
|
||||||
try {
|
try {
|
||||||
// First try to get node path directly (works for non-nvm installs)
|
// First try to get node path directly (works for non-nvm installs)
|
||||||
const directPath = execSync("which node 2>/dev/null", {
|
const directPath = execSync("which node 2>/dev/null", {
|
||||||
@@ -114,4 +114,4 @@ function getNodeBinaryPath() {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = withTVXcodeEnv;
|
export default withTVXcodeEnv;
|
||||||
@@ -1,18 +1,29 @@
|
|||||||
const { AndroidConfig, withAndroidManifest } = require("expo/config-plugins");
|
import fs from "node:fs";
|
||||||
const path = require("node:path");
|
import path from "node:path";
|
||||||
const fs = require("node:fs");
|
import {
|
||||||
|
AndroidConfig,
|
||||||
|
type ConfigPlugin,
|
||||||
|
type ExportedConfigWithProps,
|
||||||
|
withAndroidManifest,
|
||||||
|
} from "expo/config-plugins";
|
||||||
|
|
||||||
const fsPromises = fs.promises;
|
const fsPromises = fs.promises;
|
||||||
|
|
||||||
const { getMainApplicationOrThrow } = AndroidConfig.Manifest;
|
const { getMainApplicationOrThrow } = AndroidConfig.Manifest;
|
||||||
|
|
||||||
const withTrustLocalCerts = (config) => {
|
type AndroidManifest = AndroidConfig.Manifest.AndroidManifest;
|
||||||
|
|
||||||
|
const withTrustLocalCerts: ConfigPlugin = (config) => {
|
||||||
return withAndroidManifest(config, async (mod) => {
|
return withAndroidManifest(config, async (mod) => {
|
||||||
mod.modResults = await setCustomConfigAsync(mod, mod.modResults);
|
mod.modResults = await setCustomConfigAsync(mod, mod.modResults);
|
||||||
return mod;
|
return mod;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
async function setCustomConfigAsync(config, androidManifest) {
|
async function setCustomConfigAsync(
|
||||||
|
config: ExportedConfigWithProps<AndroidManifest>,
|
||||||
|
androidManifest: AndroidManifest,
|
||||||
|
): Promise<AndroidManifest> {
|
||||||
const src_file_path = path.join(__dirname, "network_security_config.xml");
|
const src_file_path = path.join(__dirname, "network_security_config.xml");
|
||||||
const res_file_path = path.join(
|
const res_file_path = path.join(
|
||||||
await AndroidConfig.Paths.getResourceFolderAsync(
|
await AndroidConfig.Paths.getResourceFolderAsync(
|
||||||
@@ -45,4 +56,4 @@ async function setCustomConfigAsync(config, androidManifest) {
|
|||||||
return androidManifest;
|
return androidManifest;
|
||||||
}
|
}
|
||||||
|
|
||||||
module.exports = withTrustLocalCerts;
|
export default withTrustLocalCerts;
|
||||||
@@ -96,5 +96,24 @@ export function getDownloadedItemSize(id: string): number {
|
|||||||
*/
|
*/
|
||||||
export function calculateTotalDownloadedSize(): number {
|
export function calculateTotalDownloadedSize(): number {
|
||||||
const items = getAllDownloadedItems();
|
const items = getAllDownloadedItems();
|
||||||
return items.reduce((sum, item) => sum + (item.videoFileSize || 0), 0);
|
return items.reduce((sum, item) => {
|
||||||
|
// Trickplay bytes count too — getDownloadedItemSize models per-item size
|
||||||
|
// as video + trickplay, the total must match.
|
||||||
|
const trickplaySize = item.trickPlayData?.size ?? 0;
|
||||||
|
// Read the live file size on disk so the total reflects actual usage and
|
||||||
|
// self-heals items whose stored videoFileSize is 0 (old schema, or
|
||||||
|
// `fileInfo.size` was undefined at download time). Fall back to the stored
|
||||||
|
// value if the file can't be stat'd.
|
||||||
|
if (item.videoFilePath) {
|
||||||
|
try {
|
||||||
|
const file = new File(filePathToUri(item.videoFilePath));
|
||||||
|
if (file.exists) {
|
||||||
|
return sum + (file.size ?? item.videoFileSize ?? 0) + trickplaySize;
|
||||||
|
}
|
||||||
|
} catch (error) {
|
||||||
|
console.warn("Failed to stat downloaded file for size:", error);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return sum + (item.videoFileSize ?? 0) + trickplaySize;
|
||||||
|
}, 0);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -289,7 +289,24 @@ export function useDownloadOperations({
|
|||||||
);
|
);
|
||||||
|
|
||||||
const appSizeUsage = useCallback(async () => {
|
const appSizeUsage = useCallback(async () => {
|
||||||
const totalSize = calculateTotalDownloadedSize();
|
let totalSize = calculateTotalDownloadedSize();
|
||||||
|
|
||||||
|
// Also count in-progress downloads (they write straight to their final
|
||||||
|
// path) so the growing file shows up as app usage instead of drifting
|
||||||
|
// into the generic device share until completion.
|
||||||
|
for (const process of processes) {
|
||||||
|
try {
|
||||||
|
const file = new File(
|
||||||
|
Paths.document,
|
||||||
|
`${generateFilename(process.item)}.mp4`,
|
||||||
|
);
|
||||||
|
if (file.exists) {
|
||||||
|
totalSize += file.size ?? 0;
|
||||||
|
}
|
||||||
|
} catch {
|
||||||
|
// File not created yet — ignore.
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const [freeDiskStorage, totalDiskCapacity] = await Promise.all([
|
const [freeDiskStorage, totalDiskCapacity] = await Promise.all([
|
||||||
@@ -310,7 +327,7 @@ export function useDownloadOperations({
|
|||||||
appSize: totalSize,
|
appSize: totalSize,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}, []);
|
}, [processes]);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
startBackgroundDownload,
|
startBackgroundDownload,
|
||||||
|
|||||||
@@ -18,11 +18,11 @@
|
|||||||
* - Edge cases the static scan cannot see can be allow-listed in the config file.
|
* - Edge cases the static scan cannot see can be allow-listed in the config file.
|
||||||
*
|
*
|
||||||
* Usage:
|
* Usage:
|
||||||
* bun scripts/check-i18n-keys.mjs # report + exit 1 on missing OR unused
|
* bun scripts/check-i18n-keys.ts # report + exit 1 on missing OR unused
|
||||||
* bun scripts/check-i18n-keys.mjs --unused=warn # exit 1 only on missing; unused = warning
|
* bun scripts/check-i18n-keys.ts --unused=warn # exit 1 only on missing; unused = warning
|
||||||
* bun scripts/check-i18n-keys.mjs --unused=off # ignore unused entirely
|
* bun scripts/check-i18n-keys.ts --unused=off # ignore unused entirely
|
||||||
* bun scripts/check-i18n-keys.mjs --json # machine-readable output
|
* bun scripts/check-i18n-keys.ts --json # machine-readable output
|
||||||
* bun scripts/check-i18n-keys.mjs --fix-unused # remove dead keys from en.json (Crowdin syncs the rest)
|
* bun scripts/check-i18n-keys.ts --fix-unused # remove dead keys from en.json (Crowdin syncs the rest)
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import {
|
import {
|
||||||
@@ -34,9 +34,20 @@ import {
|
|||||||
} from "node:fs";
|
} from "node:fs";
|
||||||
import { extname, join, relative } from "node:path";
|
import { extname, join, relative } from "node:path";
|
||||||
|
|
||||||
|
type LocaleTree = { [key: string]: LocaleTree | string };
|
||||||
|
|
||||||
|
interface I18nConfig {
|
||||||
|
localesDir: string;
|
||||||
|
sourceLocale: string;
|
||||||
|
srcDirs: string[];
|
||||||
|
srcExtensions: string[];
|
||||||
|
excludeDirs: string[];
|
||||||
|
ignoreUnused: string[];
|
||||||
|
}
|
||||||
|
|
||||||
const ROOT = process.cwd();
|
const ROOT = process.cwd();
|
||||||
const args = process.argv.slice(2);
|
const args = process.argv.slice(2);
|
||||||
const flag = (name, def) => {
|
const flag = (name: string, def: string | boolean): string | boolean => {
|
||||||
const a = args.find((x) => x === `--${name}` || x.startsWith(`--${name}=`));
|
const a = args.find((x) => x === `--${name}` || x.startsWith(`--${name}=`));
|
||||||
if (!a) return def;
|
if (!a) return def;
|
||||||
const [, v] = a.split("=");
|
const [, v] = a.split("=");
|
||||||
@@ -48,7 +59,7 @@ const FIX_UNUSED = !!flag("fix-unused", false);
|
|||||||
|
|
||||||
// ---- config ----
|
// ---- config ----
|
||||||
const CONFIG_PATH = join(ROOT, "scripts", "i18n-keys.config.json");
|
const CONFIG_PATH = join(ROOT, "scripts", "i18n-keys.config.json");
|
||||||
const DEFAULT_CONFIG = {
|
const DEFAULT_CONFIG: I18nConfig = {
|
||||||
localesDir: "translations",
|
localesDir: "translations",
|
||||||
sourceLocale: "en",
|
sourceLocale: "en",
|
||||||
// Scan the whole repo by default so keys referenced outside the obvious dirs
|
// Scan the whole repo by default so keys referenced outside the obvious dirs
|
||||||
@@ -69,29 +80,36 @@ const DEFAULT_CONFIG = {
|
|||||||
// Keys (or glob-ish prefixes ending with .* or *) known to be used dynamically / externally.
|
// Keys (or glob-ish prefixes ending with .* or *) known to be used dynamically / externally.
|
||||||
ignoreUnused: [],
|
ignoreUnused: [],
|
||||||
};
|
};
|
||||||
const config = existsSync(CONFIG_PATH)
|
const config: I18nConfig = existsSync(CONFIG_PATH)
|
||||||
? { ...DEFAULT_CONFIG, ...JSON.parse(readFileSync(CONFIG_PATH, "utf8")) }
|
? {
|
||||||
|
...DEFAULT_CONFIG,
|
||||||
|
...(JSON.parse(readFileSync(CONFIG_PATH, "utf8")) as Partial<I18nConfig>),
|
||||||
|
}
|
||||||
: DEFAULT_CONFIG;
|
: DEFAULT_CONFIG;
|
||||||
|
|
||||||
// ---- helpers ----
|
// ---- helpers ----
|
||||||
const flatten = (obj, prefix = "", out = {}) => {
|
const flatten = (
|
||||||
|
obj: LocaleTree,
|
||||||
|
prefix = "",
|
||||||
|
out: Record<string, string> = {},
|
||||||
|
): Record<string, string> => {
|
||||||
for (const [k, v] of Object.entries(obj)) {
|
for (const [k, v] of Object.entries(obj)) {
|
||||||
const key = prefix ? `${prefix}.${k}` : k;
|
const key = prefix ? `${prefix}.${k}` : k;
|
||||||
if (v && typeof v === "object" && !Array.isArray(v)) flatten(v, key, out);
|
if (v && typeof v === "object" && !Array.isArray(v)) flatten(v, key, out);
|
||||||
else out[key] = v;
|
else out[key] = v as string;
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
};
|
};
|
||||||
|
|
||||||
const globMatch = (key, pattern) => {
|
const globMatch = (key: string, pattern: string): boolean => {
|
||||||
if (pattern.endsWith(".*"))
|
if (pattern.endsWith(".*"))
|
||||||
return key === pattern.slice(0, -2) || key.startsWith(pattern.slice(0, -1));
|
return key === pattern.slice(0, -2) || key.startsWith(pattern.slice(0, -1));
|
||||||
if (pattern.endsWith("*")) return key.startsWith(pattern.slice(0, -1));
|
if (pattern.endsWith("*")) return key.startsWith(pattern.slice(0, -1));
|
||||||
return key === pattern;
|
return key === pattern;
|
||||||
};
|
};
|
||||||
|
|
||||||
const walk = (dir, files = []) => {
|
const walk = (dir: string, files: string[] = []): string[] => {
|
||||||
let entries;
|
let entries: string[];
|
||||||
try {
|
try {
|
||||||
entries = readdirSync(dir);
|
entries = readdirSync(dir);
|
||||||
} catch {
|
} catch {
|
||||||
@@ -99,7 +117,7 @@ const walk = (dir, files = []) => {
|
|||||||
}
|
}
|
||||||
for (const name of entries) {
|
for (const name of entries) {
|
||||||
const full = join(dir, name);
|
const full = join(dir, name);
|
||||||
let st;
|
let st: ReturnType<typeof statSync>;
|
||||||
try {
|
try {
|
||||||
st = statSync(full);
|
st = statSync(full);
|
||||||
} catch {
|
} catch {
|
||||||
@@ -118,7 +136,7 @@ const walk = (dir, files = []) => {
|
|||||||
// ---- load source keys ----
|
// ---- load source keys ----
|
||||||
const sourcePath = join(ROOT, config.localesDir, `${config.sourceLocale}.json`);
|
const sourcePath = join(ROOT, config.localesDir, `${config.sourceLocale}.json`);
|
||||||
const sourceKeys = Object.keys(
|
const sourceKeys = Object.keys(
|
||||||
flatten(JSON.parse(readFileSync(sourcePath, "utf8"))),
|
flatten(JSON.parse(readFileSync(sourcePath, "utf8")) as LocaleTree),
|
||||||
);
|
);
|
||||||
const sourceKeySet = new Set(sourceKeys);
|
const sourceKeySet = new Set(sourceKeys);
|
||||||
|
|
||||||
@@ -129,16 +147,16 @@ const TPL_DYN_RE = /\bt\(\s*`([^`$]*)\$\{/g; // t(`a.b.${x}`) -> prefix "a.b."
|
|||||||
const I18NKEY_RE = /\bi18nKey\s*=\s*(?:\{\s*)?(['"])((?:\\.|(?!\1).)+?)\1/g; // <Trans i18nKey="a.b">
|
const I18NKEY_RE = /\bi18nKey\s*=\s*(?:\{\s*)?(['"])((?:\\.|(?!\1).)+?)\1/g; // <Trans i18nKey="a.b">
|
||||||
const KEY_SHAPE = /^[A-Za-z0-9_]+(\.[A-Za-z0-9_]+)+$/; // dotted key, e.g. home.x.y
|
const KEY_SHAPE = /^[A-Za-z0-9_]+(\.[A-Za-z0-9_]+)+$/; // dotted key, e.g. home.x.y
|
||||||
|
|
||||||
const usedStatic = new Set(); // keys passed to t(...) / i18nKey — used for MISSING detection
|
const usedStatic = new Set<string>(); // keys passed to t(...) / i18nKey — used for MISSING detection
|
||||||
const dynamicPrefixes = new Set();
|
const dynamicPrefixes = new Set<string>();
|
||||||
const fullyDynamic = []; // { file, line }
|
const fullyDynamic: Array<{ file: string; line: number }> = [];
|
||||||
let codeBlob = ""; // all (comment-stripped) source text — searched for delimited key literals
|
let codeBlob = ""; // all (comment-stripped) source text — searched for delimited key literals
|
||||||
|
|
||||||
// Strip comments so keys mentioned in comments (e.g. `// t("old.key")`) are not counted as
|
// Strip comments so keys mentioned in comments (e.g. `// t("old.key")`) are not counted as
|
||||||
// usage. Block comments and JSX {/* */} are blanked (preserving newlines for line numbers);
|
// usage. Block comments and JSX {/* */} are blanked (preserving newlines for line numbers);
|
||||||
// line comments are only stripped when `//` follows start/whitespace/punctuation, which keeps
|
// line comments are only stripped when `//` follows start/whitespace/punctuation, which keeps
|
||||||
// `://` inside string URLs intact.
|
// `://` inside string URLs intact.
|
||||||
const stripComments = (src) =>
|
const stripComments = (src: string): string =>
|
||||||
src
|
src
|
||||||
.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, " "))
|
.replace(/\/\*[\s\S]*?\*\//g, (m) => m.replace(/[^\n]/g, " "))
|
||||||
.replace(/(^|[\s;{}()[\],=>])\/\/[^\n]*/g, (_m, p) => p);
|
.replace(/(^|[\s;{}()[\],=>])\/\/[^\n]*/g, (_m, p) => p);
|
||||||
@@ -168,11 +186,11 @@ const prefixList = [...dynamicPrefixes];
|
|||||||
// the code (covers t("k"), <Trans i18nKey>, and keys stored as bare string constants in
|
// the code (covers t("k"), <Trans i18nKey>, and keys stored as bare string constants in
|
||||||
// arrays/config then resolved via t(variable)), or it is reached via a dynamic prefix, or
|
// arrays/config then resolved via t(variable)), or it is reached via a dynamic prefix, or
|
||||||
// explicitly allow-listed. Delimited search avoids substring false-matches (e.g. a.b vs a.b_c).
|
// explicitly allow-listed. Delimited search avoids substring false-matches (e.g. a.b vs a.b_c).
|
||||||
const literalUsed = (key) =>
|
const literalUsed = (key: string): boolean =>
|
||||||
codeBlob.includes(`"${key}"`) ||
|
codeBlob.includes(`"${key}"`) ||
|
||||||
codeBlob.includes(`'${key}'`) ||
|
codeBlob.includes(`'${key}'`) ||
|
||||||
codeBlob.includes(`\`${key}\``);
|
codeBlob.includes(`\`${key}\``);
|
||||||
const isUsed = (key) =>
|
const isUsed = (key: string): boolean =>
|
||||||
literalUsed(key) ||
|
literalUsed(key) ||
|
||||||
prefixList.some((p) => key.startsWith(p)) ||
|
prefixList.some((p) => key.startsWith(p)) ||
|
||||||
config.ignoreUnused.some((g) => globMatch(key, g));
|
config.ignoreUnused.some((g) => globMatch(key, g));
|
||||||
@@ -191,25 +209,22 @@ const missing = [...usedStatic]
|
|||||||
// keys are static literals in practice; revisit if dynamic key constants become common.
|
// keys are static literals in practice; revisit if dynamic key constants become common.
|
||||||
|
|
||||||
// ---- optional fix: strip dead keys from the source locale (en.json) ----
|
// ---- optional fix: strip dead keys from the source locale (en.json) ----
|
||||||
const removeKey = (obj, parts) => {
|
const removeKey = (obj: LocaleTree, parts: string[]): void => {
|
||||||
const [head, ...rest] = parts;
|
const [head, ...rest] = parts;
|
||||||
if (!(head in obj)) return;
|
if (!(head in obj)) return;
|
||||||
if (rest.length === 0) {
|
if (rest.length === 0) {
|
||||||
delete obj[head];
|
delete obj[head];
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
removeKey(obj[head], rest);
|
const child = obj[head];
|
||||||
if (
|
if (!child || typeof child !== "object") return;
|
||||||
obj[head] &&
|
removeKey(child, rest);
|
||||||
typeof obj[head] === "object" &&
|
if (Object.keys(child).length === 0) delete obj[head];
|
||||||
Object.keys(obj[head]).length === 0
|
|
||||||
)
|
|
||||||
delete obj[head];
|
|
||||||
};
|
};
|
||||||
if (FIX_UNUSED && unused.length) {
|
if (FIX_UNUSED && unused.length) {
|
||||||
// Only edit the SOURCE locale (en.json). Crowdin owns the target locales and removes
|
// Only edit the SOURCE locale (en.json). Crowdin owns the target locales and removes
|
||||||
// the keys from them automatically on the next sync once they disappear from the source.
|
// the keys from them automatically on the next sync once they disappear from the source.
|
||||||
const data = JSON.parse(readFileSync(sourcePath, "utf8"));
|
const data = JSON.parse(readFileSync(sourcePath, "utf8")) as LocaleTree;
|
||||||
for (const key of unused) removeKey(data, key.split("."));
|
for (const key of unused) removeKey(data, key.split("."));
|
||||||
writeFileSync(sourcePath, `${JSON.stringify(data, null, 2)}\n`);
|
writeFileSync(sourcePath, `${JSON.stringify(data, null, 2)}\n`);
|
||||||
console.log(
|
console.log(
|
||||||
@@ -259,7 +274,7 @@ if (JSON_OUT) {
|
|||||||
);
|
);
|
||||||
for (const k of unused) console.log(` - ${k}`);
|
for (const k of unused) console.log(` - ${k}`);
|
||||||
console.log(
|
console.log(
|
||||||
`\n → remove with: bun scripts/check-i18n-keys.mjs --fix-unused`,
|
`\n → remove with: bun scripts/check-i18n-keys.ts --fix-unused`,
|
||||||
);
|
);
|
||||||
console.log(
|
console.log(
|
||||||
` → or allow-list a dynamic key in scripts/i18n-keys.config.json ("ignoreUnused").`,
|
` → or allow-list a dynamic key in scripts/i18n-keys.config.json ("ignoreUnused").`,
|
||||||
@@ -21,8 +21,14 @@
|
|||||||
import { execFileSync } from "node:child_process";
|
import { execFileSync } from "node:child_process";
|
||||||
import { readFileSync } from "node:fs";
|
import { readFileSync } from "node:fs";
|
||||||
|
|
||||||
|
interface Issue {
|
||||||
|
number: number;
|
||||||
|
title: string;
|
||||||
|
body: string | null;
|
||||||
|
}
|
||||||
|
|
||||||
// Parse a numeric env var, falling back to `def` only when unset/empty/NaN so an explicit 0 is honoured.
|
// Parse a numeric env var, falling back to `def` only when unset/empty/NaN so an explicit 0 is honoured.
|
||||||
const numEnv = (name, def) => {
|
const numEnv = (name: string, def: number): number => {
|
||||||
const raw = process.env[name];
|
const raw = process.env[name];
|
||||||
if (raw === undefined || raw === "") return def;
|
if (raw === undefined || raw === "") return def;
|
||||||
const n = Number(raw);
|
const n = Number(raw);
|
||||||
@@ -51,9 +57,9 @@ const STOP = new Set(
|
|||||||
).split(/\s+/),
|
).split(/\s+/),
|
||||||
);
|
);
|
||||||
|
|
||||||
const stem = (w) => w.replace(/(ing|ed|es|s)$/, "");
|
const stem = (w: string): string => w.replace(/(ing|ed|es|s)$/, "");
|
||||||
|
|
||||||
const tokens = (s) =>
|
const tokens = (s: string | null): string[] =>
|
||||||
(s || "")
|
(s || "")
|
||||||
.toLowerCase()
|
.toLowerCase()
|
||||||
.replace(/```[\s\S]*?```/g, " ") // drop code blocks
|
.replace(/```[\s\S]*?```/g, " ") // drop code blocks
|
||||||
@@ -65,7 +71,7 @@ const tokens = (s) =>
|
|||||||
.map(stem)
|
.map(stem)
|
||||||
.filter((w) => w.length > 2);
|
.filter((w) => w.length > 2);
|
||||||
|
|
||||||
const jaccard = (a, b) => {
|
const jaccard = (a: string[], b: string[]): number => {
|
||||||
const A = new Set(a);
|
const A = new Set(a);
|
||||||
const B = new Set(b);
|
const B = new Set(b);
|
||||||
if (!A.size || !B.size) return 0;
|
if (!A.size || !B.size) return 0;
|
||||||
@@ -76,14 +82,14 @@ const jaccard = (a, b) => {
|
|||||||
|
|
||||||
const newTitle = tokens(TITLE);
|
const newTitle = tokens(TITLE);
|
||||||
const newBody = tokens(BODY);
|
const newBody = tokens(BODY);
|
||||||
const score = (o) =>
|
const score = (o: Issue): number =>
|
||||||
0.6 * jaccard(newTitle, tokens(o.title)) +
|
0.6 * jaccard(newTitle, tokens(o.title)) +
|
||||||
0.4 * jaccard(newBody, tokens(o.body));
|
0.4 * jaccard(newBody, tokens(o.body));
|
||||||
|
|
||||||
// fetch open issues (excluding PRs and the new issue itself)
|
// fetch open issues (excluding PRs and the new issue itself)
|
||||||
let issues;
|
let issues: Issue[];
|
||||||
if (process.env.DUP_FIXTURE) {
|
if (process.env.DUP_FIXTURE) {
|
||||||
issues = JSON.parse(readFileSync(process.env.DUP_FIXTURE, "utf8"));
|
issues = JSON.parse(readFileSync(process.env.DUP_FIXTURE, "utf8")) as Issue[];
|
||||||
} else {
|
} else {
|
||||||
const raw = execFileSync(
|
const raw = execFileSync(
|
||||||
"gh",
|
"gh",
|
||||||
@@ -105,7 +111,7 @@ if (process.env.DUP_FIXTURE) {
|
|||||||
issues = raw
|
issues = raw
|
||||||
.split("\n")
|
.split("\n")
|
||||||
.filter(Boolean)
|
.filter(Boolean)
|
||||||
.map((l) => JSON.parse(l));
|
.map((l) => JSON.parse(l) as Issue);
|
||||||
}
|
}
|
||||||
|
|
||||||
const matches = issues
|
const matches = issues
|
||||||
@@ -123,7 +129,7 @@ if (!matches.length) {
|
|||||||
// Neutralise other issues' titles before echoing them back: break @mentions and
|
// Neutralise other issues' titles before echoing them back: break @mentions and
|
||||||
// strip markdown/HTML control chars so a maliciously-named issue can't ping people
|
// strip markdown/HTML control chars so a maliciously-named issue can't ping people
|
||||||
// or inject formatting into our comment. GitHub linkifies "#123" on its own.
|
// or inject formatting into our comment. GitHub linkifies "#123" on its own.
|
||||||
const safeTitle = (t) =>
|
const safeTitle = (t: string): string =>
|
||||||
(t || "")
|
(t || "")
|
||||||
.replace(/@/g, "@")
|
.replace(/@/g, "@")
|
||||||
.replace(/[`<>|*_~[\]]/g, " ")
|
.replace(/[`<>|*_~[\]]/g, " ")
|
||||||
@@ -1,62 +0,0 @@
|
|||||||
#!/usr/bin/env node
|
|
||||||
|
|
||||||
const _fs = require("node:fs");
|
|
||||||
const path = require("node:path");
|
|
||||||
const process = require("node:process");
|
|
||||||
const { execSync } = require("node:child_process");
|
|
||||||
|
|
||||||
const root = process.cwd();
|
|
||||||
// const tvosPath = path.join(root, 'iostv');
|
|
||||||
// const iosPath = path.join(root, 'iosmobile');
|
|
||||||
// const androidPath = path.join(root, 'androidmobile');
|
|
||||||
// const androidTVPath = path.join(root, 'androidtv');
|
|
||||||
// const device = process.argv[2];
|
|
||||||
// const platform = process.argv[2];
|
|
||||||
const isTV = process.env.EXPO_TV || false;
|
|
||||||
|
|
||||||
const paths = new Map([
|
|
||||||
["tvos", path.join(root, "iostv")],
|
|
||||||
["ios", path.join(root, "iosmobile")],
|
|
||||||
["android", path.join(root, "androidmobile")],
|
|
||||||
["androidtv", path.join(root, "androidtv")],
|
|
||||||
]);
|
|
||||||
|
|
||||||
// const platformPath = paths.get(platform);
|
|
||||||
|
|
||||||
if (isTV) {
|
|
||||||
stdout = execSync(
|
|
||||||
`mkdir -p ${paths.get("tvos")}; ln -nsf ${paths.get("tvos")} ios`,
|
|
||||||
);
|
|
||||||
console.log(stdout.toString());
|
|
||||||
stdout = execSync(
|
|
||||||
`mkdir -p ${paths.get("androidtv")}; ln -nsf ${paths.get(
|
|
||||||
"androidtv",
|
|
||||||
)} android`,
|
|
||||||
);
|
|
||||||
console.log(stdout.toString());
|
|
||||||
} else {
|
|
||||||
stdout = execSync(
|
|
||||||
`mkdir -p ${paths.get("ios")}; ln -nsf ${paths.get("ios")} ios`,
|
|
||||||
);
|
|
||||||
console.log(stdout.toString());
|
|
||||||
stdout = execSync(
|
|
||||||
`mkdir -p ${paths.get("android")}; ln -nsf ${paths.get("android")} android`,
|
|
||||||
);
|
|
||||||
console.log(stdout.toString());
|
|
||||||
}
|
|
||||||
|
|
||||||
// target = "";
|
|
||||||
// switch (platform) {
|
|
||||||
// case "tvos":
|
|
||||||
// target = "ios";
|
|
||||||
// break;
|
|
||||||
// case "ios":
|
|
||||||
// target = "ios";
|
|
||||||
// break;
|
|
||||||
// case "android":
|
|
||||||
// target = "android";
|
|
||||||
// break;
|
|
||||||
// case "androidtv":
|
|
||||||
// target = "android";
|
|
||||||
// break;
|
|
||||||
// }
|
|
||||||
@@ -1,5 +1,8 @@
|
|||||||
const { execFileSync } = require("node:child_process");
|
import { execFileSync } from "node:child_process";
|
||||||
const process = require("node:process");
|
import { createRequire } from "node:module";
|
||||||
|
import process from "node:process";
|
||||||
|
|
||||||
|
const require = createRequire(import.meta.url);
|
||||||
|
|
||||||
// Enhanced ANSI color codes and styles
|
// Enhanced ANSI color codes and styles
|
||||||
const colors = {
|
const colors = {
|
||||||
@@ -32,7 +35,7 @@ const centeredTitle = " ".repeat(titlePadding) + title;
|
|||||||
|
|
||||||
const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
const useColor = process.stdout.isTTY && !process.env.NO_COLOR;
|
||||||
|
|
||||||
function log(message, color = "") {
|
function log(message: string, color = "") {
|
||||||
if (useColor && color) {
|
if (useColor && color) {
|
||||||
console.log(`${color}${message}${colors.reset}`);
|
console.log(`${color}${message}${colors.reset}`);
|
||||||
} else {
|
} else {
|
||||||
@@ -40,7 +43,7 @@ function log(message, color = "") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function formatError(errorLine) {
|
function formatError(errorLine: string): string {
|
||||||
if (!useColor) return errorLine;
|
if (!useColor) return errorLine;
|
||||||
|
|
||||||
// Color file paths in cyan
|
// Color file paths in cyan
|
||||||
@@ -70,12 +73,15 @@ function formatError(errorLine) {
|
|||||||
return formatted;
|
return formatted;
|
||||||
}
|
}
|
||||||
|
|
||||||
function parseErrorsAndCreateSummary(errorOutput) {
|
function parseErrorsAndCreateSummary(errorOutput: string): {
|
||||||
|
formattedErrors: string[];
|
||||||
|
errorsByFile: Map<string, number>;
|
||||||
|
} {
|
||||||
const lines = errorOutput.split("\n").filter((line) => line.trim());
|
const lines = errorOutput.split("\n").filter((line) => line.trim());
|
||||||
const errorsByFile = new Map();
|
const errorsByFile = new Map<string, number>();
|
||||||
const formattedErrors = [];
|
const formattedErrors: string[] = [];
|
||||||
|
|
||||||
let currentError = [];
|
let currentError: string[] = [];
|
||||||
|
|
||||||
for (const line of lines) {
|
for (const line of lines) {
|
||||||
const trimmedLine = line.trim();
|
const trimmedLine = line.trim();
|
||||||
@@ -96,7 +102,7 @@ function parseErrorsAndCreateSummary(errorOutput) {
|
|||||||
if (!errorsByFile.has(filePath)) {
|
if (!errorsByFile.has(filePath)) {
|
||||||
errorsByFile.set(filePath, 0);
|
errorsByFile.set(filePath, 0);
|
||||||
}
|
}
|
||||||
errorsByFile.set(filePath, errorsByFile.get(filePath) + 1);
|
errorsByFile.set(filePath, (errorsByFile.get(filePath) ?? 0) + 1);
|
||||||
|
|
||||||
// Start new error
|
// Start new error
|
||||||
currentError.push(formatError(line));
|
currentError.push(formatError(line));
|
||||||
@@ -119,7 +125,7 @@ function parseErrorsAndCreateSummary(errorOutput) {
|
|||||||
return { formattedErrors, errorsByFile };
|
return { formattedErrors, errorsByFile };
|
||||||
}
|
}
|
||||||
|
|
||||||
function createErrorSummaryTable(errorsByFile) {
|
function createErrorSummaryTable(errorsByFile: Map<string, number>): string {
|
||||||
if (errorsByFile.size === 0) return "";
|
if (errorsByFile.size === 0) return "";
|
||||||
|
|
||||||
const sortedFiles = Array.from(errorsByFile.entries()).sort(
|
const sortedFiles = Array.from(errorsByFile.entries()).sort(
|
||||||
@@ -136,7 +142,7 @@ function createErrorSummaryTable(errorsByFile) {
|
|||||||
return table;
|
return table;
|
||||||
}
|
}
|
||||||
|
|
||||||
function runTypeCheck() {
|
function runTypeCheck(): { ok: boolean } {
|
||||||
const extraArgs = process.argv.slice(2);
|
const extraArgs = process.argv.slice(2);
|
||||||
|
|
||||||
// Prefer local TypeScript binary when available
|
// Prefer local TypeScript binary when available
|
||||||
@@ -150,16 +156,13 @@ function runTypeCheck() {
|
|||||||
"false",
|
"false",
|
||||||
...extraArgs,
|
...extraArgs,
|
||||||
];
|
];
|
||||||
let execArgs = null;
|
let execArgs: { cmd: string; args: string[] };
|
||||||
try {
|
try {
|
||||||
const tscBin = require.resolve("typescript/bin/tsc");
|
const tscBin = require.resolve("typescript/bin/tsc");
|
||||||
execArgs = { cmd: process.execPath, args: [tscBin, ...runnerArgs] };
|
execArgs = { cmd: process.execPath, args: [tscBin, ...runnerArgs] };
|
||||||
} catch {
|
} catch {
|
||||||
// fallback to PATH tsc
|
// fallback to PATH tsc (reuse runnerArgs so --pretty false is preserved)
|
||||||
execArgs = {
|
execArgs = { cmd: "tsc", args: runnerArgs };
|
||||||
cmd: "tsc",
|
|
||||||
args: ["-p", "tsconfig.json", "--noEmit", ...extraArgs],
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -183,7 +186,21 @@ function runTypeCheck() {
|
|||||||
);
|
);
|
||||||
return { ok: true };
|
return { ok: true };
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
const errorOutput = (error && (error.stderr || error.stdout)) || "";
|
const execError = error as { stderr?: string; stdout?: string };
|
||||||
|
const errorOutput = [execError.stdout, execError.stderr]
|
||||||
|
.filter((chunk): chunk is string => Boolean(chunk))
|
||||||
|
.join("\n");
|
||||||
|
|
||||||
|
// No compiler output = tsc never ran (e.g. binary missing). Don't let a
|
||||||
|
// launch failure fall through to the "passed" branch and green-light CI.
|
||||||
|
if (!errorOutput) {
|
||||||
|
const message = error instanceof Error ? error.message : String(error);
|
||||||
|
log(
|
||||||
|
`❌ ${colors.bold}TypeScript check failed to start${colors.reset} ${colors.gray}${message}${colors.reset}`,
|
||||||
|
colors.red,
|
||||||
|
);
|
||||||
|
return { ok: false };
|
||||||
|
}
|
||||||
|
|
||||||
// Filter out jellyseerr utils errors - this is a third-party git submodule
|
// Filter out jellyseerr utils errors - this is a third-party git submodule
|
||||||
// that generates a large volume of known type errors
|
// that generates a large volume of known type errors
|
||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "اختر",
|
|
||||||
"no_trailer_available": "لا يوجد مقطع دعائي متوفر",
|
"no_trailer_available": "لا يوجد مقطع دعائي متوفر",
|
||||||
"video": "فيديو",
|
"video": "فيديو",
|
||||||
"audio": "الصوت",
|
"audio": "الصوت",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "Vídeo",
|
"video": "Vídeo",
|
||||||
"audio": "Àudio",
|
"audio": "Àudio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Vybrat",
|
|
||||||
"no_trailer_available": "Přípojné vozidlo není k dispozici",
|
"no_trailer_available": "Přípojné vozidlo není k dispozici",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Zvuk",
|
"audio": "Zvuk",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Vælg",
|
|
||||||
"no_trailer_available": "Intet påhængskøretøj tilgængeligt",
|
"no_trailer_available": "Intet påhængskøretøj tilgængeligt",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Lyd",
|
"audio": "Lyd",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Auswählen",
|
|
||||||
"no_trailer_available": "Kein Trailer verfügbar",
|
"no_trailer_available": "Kein Trailer verfügbar",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Sprache",
|
"language": "Sprache",
|
||||||
"results": "Ergebnisse",
|
"results": "Ergebnisse",
|
||||||
"searching": "Suche ...",
|
|
||||||
"search_failed": "Suche fehlgeschlagen",
|
"search_failed": "Suche fehlgeschlagen",
|
||||||
"no_subtitle_provider": "Kein Untertitelanbieter auf dem Server konfiguriert",
|
"no_subtitle_provider": "Kein Untertitelanbieter auf dem Server konfiguriert",
|
||||||
"no_subtitles_found": "Keine Untertitel gefunden",
|
"no_subtitles_found": "Keine Untertitel gefunden",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Επιλογή",
|
|
||||||
"no_trailer_available": "Δεν υπάρχει διαθέσιμο ρυμουλκούμενο",
|
"no_trailer_available": "Δεν υπάρχει διαθέσιμο ρυμουλκούμενο",
|
||||||
"video": "Βίντεο",
|
"video": "Βίντεο",
|
||||||
"audio": "Ήχος",
|
"audio": "Ήχος",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -384,6 +384,8 @@
|
|||||||
"device_usage": "Device {{availableSpace}}%",
|
"device_usage": "Device {{availableSpace}}%",
|
||||||
"size_used": "{{used}} of {{total}} used",
|
"size_used": "{{used}} of {{total}} used",
|
||||||
"delete_all_downloaded_files": "Delete all downloaded files",
|
"delete_all_downloaded_files": "Delete all downloaded files",
|
||||||
|
"delete_all_downloaded_files_confirm": "Delete All Downloaded Files?",
|
||||||
|
"delete_all_downloaded_files_confirm_desc": "Are you sure you want to delete all downloaded files? This action cannot be undone.",
|
||||||
"music_cache_title": "Music cache",
|
"music_cache_title": "Music cache",
|
||||||
"music_cache_description": "Automatically cache songs as you listen for smoother playback and offline support",
|
"music_cache_description": "Automatically cache songs as you listen for smoother playback and offline support",
|
||||||
"clear_music_cache": "Clear music cache",
|
"clear_music_cache": "Clear music cache",
|
||||||
@@ -484,7 +486,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No results",
|
"no_results": "No results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +622,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin server",
|
"using_jellyfin_server": "Using Jellyfin server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Seleccionar",
|
|
||||||
"no_trailer_available": "No hay tráiler disponible",
|
"no_trailer_available": "No hay tráiler disponible",
|
||||||
"video": "Vídeo",
|
"video": "Vídeo",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Valitse",
|
|
||||||
"no_trailer_available": "Perävaunua ei saatavilla",
|
"no_trailer_available": "Perävaunua ei saatavilla",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Ääni",
|
"audio": "Ääni",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -4,9 +4,9 @@
|
|||||||
"error_title": "Erreur",
|
"error_title": "Erreur",
|
||||||
"login_title": "Se connecter",
|
"login_title": "Se connecter",
|
||||||
"login_to_title": "Se connecter à",
|
"login_to_title": "Se connecter à",
|
||||||
"select_user": "Select a user to log in",
|
"select_user": "Sélectionnez un utilisateur pour vous connecter",
|
||||||
"add_user_to_login": "Add a user to log in",
|
"add_user_to_login": "Ajouter un utilisateur pour se connecter",
|
||||||
"add_user": "Add User",
|
"add_user": "Ajouter un utilisateur",
|
||||||
"username_placeholder": "Nom d'utilisateur",
|
"username_placeholder": "Nom d'utilisateur",
|
||||||
"password_placeholder": "Mot de passe",
|
"password_placeholder": "Mot de passe",
|
||||||
"login_button": "Se connecter",
|
"login_button": "Se connecter",
|
||||||
@@ -42,19 +42,19 @@
|
|||||||
"please_login_again": "Votre session enregistrée a expiré. Veuillez vous connecter à nouveau.",
|
"please_login_again": "Votre session enregistrée a expiré. Veuillez vous connecter à nouveau.",
|
||||||
"remove_saved_login": "Supprimer l'identifiant enregistré",
|
"remove_saved_login": "Supprimer l'identifiant enregistré",
|
||||||
"remove_saved_login_description": "Cela supprimera vos identifiants enregistrés pour ce serveur. Vous devrez saisir à nouveau votre nom d’utilisateur et votre mot de passe la prochaine fois.",
|
"remove_saved_login_description": "Cela supprimera vos identifiants enregistrés pour ce serveur. Vous devrez saisir à nouveau votre nom d’utilisateur et votre mot de passe la prochaine fois.",
|
||||||
"accounts_count": "Comptes {{count}}",
|
"accounts_count": "{{count}} comptes",
|
||||||
"select_account": "Sélectionnez un compte",
|
"select_account": "Sélectionnez un compte",
|
||||||
"add_account": "Ajouter un compte",
|
"add_account": "Ajouter un compte",
|
||||||
"remove_account_description": "Cela supprimera les identifiants enregistrés pour {{username}}.",
|
"remove_account_description": "Cela supprimera les identifiants enregistrés pour {{username}}.",
|
||||||
"remove_server": "Remove Server",
|
"remove_server": "Supprimer le serveur",
|
||||||
"remove_server_description": "This will remove {{server}} and all saved accounts from your list.",
|
"remove_server_description": "Ceci supprimera {{server}} et tous les comptes enregistrés de votre liste.",
|
||||||
"select_your_server": "Select Your Server",
|
"select_your_server": "Sélectionnez votre serveur",
|
||||||
"add_server_to_get_started": "Add a server to get started",
|
"add_server_to_get_started": "Ajouter un serveur pour commencer",
|
||||||
"add_server": "Add Server",
|
"add_server": "Ajouter un serveur",
|
||||||
"change_server": "Change Server"
|
"change_server": "Changer de serveur"
|
||||||
},
|
},
|
||||||
"save_account": {
|
"save_account": {
|
||||||
"title": "Sauvegarder le compte",
|
"title": "Enregistrer le compte",
|
||||||
"save_for_later": "Enregistrer ce compte",
|
"save_for_later": "Enregistrer ce compte",
|
||||||
"security_option": "Options de sécurité",
|
"security_option": "Options de sécurité",
|
||||||
"no_protection": "Aucune protection",
|
"no_protection": "Aucune protection",
|
||||||
@@ -95,9 +95,9 @@
|
|||||||
"oops": "Oups !",
|
"oops": "Oups !",
|
||||||
"error_message": "Quelque chose s'est mal passé.\nVeuillez vous reconnecter à nouveau.",
|
"error_message": "Quelque chose s'est mal passé.\nVeuillez vous reconnecter à nouveau.",
|
||||||
"continue_watching": "Continuer à regarder",
|
"continue_watching": "Continuer à regarder",
|
||||||
"continue": "Continue",
|
"continue": "Continuer",
|
||||||
"next_up": "À suivre",
|
"next_up": "À suivre",
|
||||||
"continue_and_next_up": "Continuer de regarder et à suivre",
|
"continue_and_next_up": "Continuer à regarder et à suivre",
|
||||||
"recently_added_in": "Ajoutés récemment dans {{libraryName}}",
|
"recently_added_in": "Ajoutés récemment dans {{libraryName}}",
|
||||||
"suggested_movies": "Films suggérés",
|
"suggested_movies": "Films suggérés",
|
||||||
"suggested_episodes": "Épisodes suggérés",
|
"suggested_episodes": "Épisodes suggérés",
|
||||||
@@ -120,10 +120,10 @@
|
|||||||
"settings_title": "Paramètres",
|
"settings_title": "Paramètres",
|
||||||
"log_out_button": "Déconnexion",
|
"log_out_button": "Déconnexion",
|
||||||
"switch_user": {
|
"switch_user": {
|
||||||
"title": "Switch User",
|
"title": "Changer d'utilisateur",
|
||||||
"account": "Account",
|
"account": "Compte",
|
||||||
"switch_user": "Switch User on This Server",
|
"switch_user": "Changer d'utilisateur sur ce serveur",
|
||||||
"current": "current"
|
"current": "actuel"
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"title": "Catégories"
|
"title": "Catégories"
|
||||||
@@ -136,32 +136,32 @@
|
|||||||
},
|
},
|
||||||
"appearance": {
|
"appearance": {
|
||||||
"title": "Apparence",
|
"title": "Apparence",
|
||||||
"merge_next_up_continue_watching": "Fusionner, continuer à regarder et à suivre",
|
"merge_next_up_continue_watching": "Fusionner « Continuer à regarder » et « À suivre »",
|
||||||
"hide_remote_session_button": "Masquer le bouton de session distante",
|
"hide_remote_session_button": "Masquer le bouton de session distante",
|
||||||
"show_home_backdrop": "Dynamic Home Backdrop",
|
"show_home_backdrop": "Arrière-plan d'accueil dynamique",
|
||||||
"show_hero_carousel": "Hero Carousel",
|
"show_hero_carousel": "Carrousel principal",
|
||||||
"show_series_poster_on_episode": "Show Series Poster on Episodes",
|
"show_series_poster_on_episode": "Afficher l'affiche de la série sur les épisodes",
|
||||||
"theme_music": "Theme Music",
|
"theme_music": "Musique de thème",
|
||||||
"display_size": "Display Size",
|
"display_size": "Taille d'affichage",
|
||||||
"display_size_small": "Small",
|
"display_size_small": "Petite",
|
||||||
"display_size_default": "Default",
|
"display_size_default": "Par défaut",
|
||||||
"display_size_large": "Large",
|
"display_size_large": "Grande",
|
||||||
"display_size_extra_large": "Extra Large"
|
"display_size_extra_large": "Très grande"
|
||||||
},
|
},
|
||||||
"network": {
|
"network": {
|
||||||
"title": "Réseau",
|
"title": "Réseau",
|
||||||
"local_network": "Réseau local",
|
"local_network": "Réseau local",
|
||||||
"auto_switch_enabled": "Basculement automatique quand à la maison",
|
"auto_switch_enabled": "Basculement automatique à la maison",
|
||||||
"auto_switch_description": "Basculer automatiquement vers l'URL locale lorsque vous êtes connecté au Wi-Fi de la maison",
|
"auto_switch_description": "Basculer automatiquement vers l'URL locale lorsque vous êtes connecté au Wi-Fi de la maison",
|
||||||
"local_url": "URL locale",
|
"local_url": "URL locale",
|
||||||
"local_url_hint": "Entrez l'adresse de votre serveur local (exemple, http://192.168.1.100:8096)",
|
"local_url_hint": "Entrez l'adresse de votre serveur local (par exemple http://192.168.1.100:8096)",
|
||||||
"local_url_placeholder": "http://192.168.1.100:8096",
|
"local_url_placeholder": "http://192.168.1.100:8096",
|
||||||
"home_wifi_networks": "Réseaux Wi-Fi domestiques",
|
"home_wifi_networks": "Réseaux Wi-Fi domestiques",
|
||||||
"add_current_network": "Ajouter \"{{ssid}}\"",
|
"add_current_network": "Ajouter \"{{ssid}}\"",
|
||||||
"not_connected_to_wifi": "Non connecté au WiFi",
|
"not_connected_to_wifi": "Non connecté au Wi-Fi",
|
||||||
"no_networks_configured": "Pas de réseau configuré",
|
"no_networks_configured": "Pas de réseau configuré",
|
||||||
"add_network_hint": "Ajouter votre réseau Wi-Fi domestique pour activer la commutation automatique",
|
"add_network_hint": "Ajouter votre réseau Wi-Fi domestique pour activer le basculement automatique",
|
||||||
"current_wifi": "WiFi actuel",
|
"current_wifi": "Wi-Fi actuel",
|
||||||
"using_url": "Utilisant",
|
"using_url": "Utilisant",
|
||||||
"local": "URL locale",
|
"local": "URL locale",
|
||||||
"remote": "URL à distance",
|
"remote": "URL à distance",
|
||||||
@@ -172,9 +172,9 @@
|
|||||||
"not_configured": "Non configuré",
|
"not_configured": "Non configuré",
|
||||||
"network_added": "Réseau ajouté",
|
"network_added": "Réseau ajouté",
|
||||||
"network_already_added": "Réseau déjà ajouté",
|
"network_already_added": "Réseau déjà ajouté",
|
||||||
"no_wifi_connected": "Non connecté au WiFi",
|
"no_wifi_connected": "Non connecté au Wi-Fi",
|
||||||
"permission_denied": "Autorisation de localisation refusée",
|
"permission_denied": "Autorisation de localisation refusée",
|
||||||
"permission_denied_explanation": "Une autorisation de localisation est requise pour détecter le réseau Wifi afin de changer automatiquement. Veuillez l’activer dans les paramètres."
|
"permission_denied_explanation": "Une autorisation de localisation est requise pour détecter le réseau Wi-Fi afin de basculer automatiquement. Veuillez l'activer dans les paramètres."
|
||||||
},
|
},
|
||||||
"user_info": {
|
"user_info": {
|
||||||
"user_info_title": "Informations utilisateur",
|
"user_info_title": "Informations utilisateur",
|
||||||
@@ -184,35 +184,35 @@
|
|||||||
"app_version": "Version de l'application"
|
"app_version": "Version de l'application"
|
||||||
},
|
},
|
||||||
"quick_connect": {
|
"quick_connect": {
|
||||||
"quick_connect_title": "Connexion Rapide",
|
"quick_connect_title": "Connexion rapide",
|
||||||
"authorize_button": "Autoriser une Connexion Rapide",
|
"authorize_button": "Autoriser une connexion rapide",
|
||||||
"enter_the_quick_connect_code": "Entrez le code de Connexion Rapide...",
|
"enter_the_quick_connect_code": "Entrez le code de connexion rapide...",
|
||||||
"success": "Succès",
|
"success": "Succès",
|
||||||
"quick_connect_autorized": "Connexion Rapide autorisé",
|
"quick_connect_autorized": "Connexion rapide autorisée",
|
||||||
"error": "Erreur",
|
"error": "Erreur",
|
||||||
"invalid_code": "Code invalide",
|
"invalid_code": "Code invalide",
|
||||||
"authorize": "Autoriser"
|
"authorize": "Autoriser"
|
||||||
},
|
},
|
||||||
"media_controls": {
|
"media_controls": {
|
||||||
"media_controls_title": "Contrôles Média",
|
"media_controls_title": "Contrôles média",
|
||||||
"forward_skip_length": "Durée de saut en avant",
|
"forward_skip_length": "Durée de saut en avant",
|
||||||
"rewind_length": "Durée de retour en arrière",
|
"rewind_length": "Durée de retour en arrière",
|
||||||
"seconds_unit": "s"
|
"seconds_unit": "s"
|
||||||
},
|
},
|
||||||
"buffer": {
|
"buffer": {
|
||||||
"title": "Buffer Settings",
|
"title": "Paramètres du tampon",
|
||||||
"cache_mode": "Cache Mode",
|
"cache_mode": "Mode de cache",
|
||||||
"cache_auto": "Auto",
|
"cache_auto": "Auto",
|
||||||
"cache_yes": "Enabled",
|
"cache_yes": "Activé",
|
||||||
"cache_no": "Disabled",
|
"cache_no": "Désactivé",
|
||||||
"buffer_duration": "Buffer Duration",
|
"buffer_duration": "Durée du tampon",
|
||||||
"max_cache_size": "Max Cache Size",
|
"max_cache_size": "Taille maximale du cache",
|
||||||
"max_backward_cache": "Max Backward Cache"
|
"max_backward_cache": "Cache arrière maximal"
|
||||||
},
|
},
|
||||||
"vo_driver": {
|
"vo_driver": {
|
||||||
"title": "Video Output",
|
"title": "Sortie vidéo",
|
||||||
"vo_mode": "VO Driver",
|
"vo_mode": "Pilote VO",
|
||||||
"gpu_next": "gpu-next (Recommended)",
|
"gpu_next": "gpu-next (Recommandé)",
|
||||||
"gpu": "gpu"
|
"gpu": "gpu"
|
||||||
},
|
},
|
||||||
"gesture_controls": {
|
"gesture_controls": {
|
||||||
@@ -225,8 +225,8 @@
|
|||||||
"right_side_volume_description": "Glisser vers le haut/bas sur le côté droit pour ajuster le volume",
|
"right_side_volume_description": "Glisser vers le haut/bas sur le côté droit pour ajuster le volume",
|
||||||
"hide_volume_slider": "Masquer le curseur de volume",
|
"hide_volume_slider": "Masquer le curseur de volume",
|
||||||
"hide_volume_slider_description": "Masquer le curseur de volume dans le lecteur vidéo",
|
"hide_volume_slider_description": "Masquer le curseur de volume dans le lecteur vidéo",
|
||||||
"hide_brightness_slider": "Cacher le curseur de luminosité",
|
"hide_brightness_slider": "Masquer le curseur de luminosité",
|
||||||
"hide_brightness_slider_description": "Masquer le curseur de volume dans le lecteur vidéo"
|
"hide_brightness_slider_description": "Masquer le curseur de luminosité dans le lecteur vidéo"
|
||||||
},
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"audio_title": "Audio",
|
"audio_title": "Audio",
|
||||||
@@ -234,14 +234,14 @@
|
|||||||
"audio_language": "Langue audio",
|
"audio_language": "Langue audio",
|
||||||
"audio_hint": "Choisissez une langue audio par défaut.",
|
"audio_hint": "Choisissez une langue audio par défaut.",
|
||||||
"none": "Aucune",
|
"none": "Aucune",
|
||||||
"language": "Langage",
|
"language": "Langue",
|
||||||
"transcode_mode": {
|
"transcode_mode": {
|
||||||
"title": "Transcodage audio",
|
"title": "Transcodage audio",
|
||||||
"description": "Contrôle la gestion de l'audio surround (7.1, TrueHD, DTS-HD)",
|
"description": "Contrôle la gestion de l'audio surround (7.1, TrueHD, DTS-HD)",
|
||||||
"auto": "Auto",
|
"auto": "Auto",
|
||||||
"stereo": "Forcer la stéréo",
|
"stereo": "Forcer la stéréo",
|
||||||
"5_1": "Autoriser 5.1",
|
"5_1": "Autoriser 5.1",
|
||||||
"passthrough": "Intercommunication"
|
"passthrough": "Passthrough"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"subtitles": {
|
"subtitles": {
|
||||||
@@ -252,7 +252,7 @@
|
|||||||
"set_subtitle_track": "Piste de sous-titres de l'élément précédent",
|
"set_subtitle_track": "Piste de sous-titres de l'élément précédent",
|
||||||
"subtitle_size": "Taille des sous-titres",
|
"subtitle_size": "Taille des sous-titres",
|
||||||
"none": "Aucune",
|
"none": "Aucune",
|
||||||
"language": "Langage",
|
"language": "Langue",
|
||||||
"loading": "Chargement",
|
"loading": "Chargement",
|
||||||
"modes": {
|
"modes": {
|
||||||
"Default": "Par défaut",
|
"Default": "Par défaut",
|
||||||
@@ -262,20 +262,20 @@
|
|||||||
"OnlyForced": "Forcés seulement"
|
"OnlyForced": "Forcés seulement"
|
||||||
},
|
},
|
||||||
"opensubtitles_title": "OpenSubtitles",
|
"opensubtitles_title": "OpenSubtitles",
|
||||||
"opensubtitles_hint": "Enter your OpenSubtitles API key to enable client-side subtitle search as a fallback when your Jellyfin server doesn't have a subtitle provider configured.",
|
"opensubtitles_hint": "Entrez votre clé API OpenSubtitles pour activer la recherche de sous-titres côté client comme solution de secours lorsque votre serveur Jellyfin n'a pas de fournisseur de sous-titres configuré.",
|
||||||
"opensubtitles_api_key": "API Key",
|
"opensubtitles_api_key": "Clé API",
|
||||||
"opensubtitles_api_key_placeholder": "Enter API key...",
|
"opensubtitles_api_key_placeholder": "Entrez la clé API...",
|
||||||
"opensubtitles_get_key": "Get your free API key at opensubtitles.com/en/consumers",
|
"opensubtitles_get_key": "Obtenez votre clé API gratuite sur opensubtitles.com/fr/consumers",
|
||||||
"mpv_subtitle_scale": "Subtitle Scale",
|
"mpv_subtitle_scale": "Échelle des sous-titres",
|
||||||
"mpv_subtitle_margin_y": "Vertical Margin",
|
"mpv_subtitle_margin_y": "Marge verticale",
|
||||||
"mpv_subtitle_align_x": "Horizontal Align",
|
"mpv_subtitle_align_x": "Alignement horizontal",
|
||||||
"mpv_subtitle_align_y": "Vertical Align",
|
"mpv_subtitle_align_y": "Alignement vertical",
|
||||||
"align": {
|
"align": {
|
||||||
"left": "Left",
|
"left": "Gauche",
|
||||||
"center": "Center",
|
"center": "Centre",
|
||||||
"right": "Right",
|
"right": "Droite",
|
||||||
"top": "Top",
|
"top": "Haut",
|
||||||
"bottom": "Bottom"
|
"bottom": "Bas"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
@@ -283,38 +283,38 @@
|
|||||||
"video_orientation": "Orientation vidéo",
|
"video_orientation": "Orientation vidéo",
|
||||||
"orientation": "Orientation",
|
"orientation": "Orientation",
|
||||||
"orientations": {
|
"orientations": {
|
||||||
"DEFAULT": "Par défaut",
|
"DEFAULT": "Suivre l'orientation de l'appareil",
|
||||||
"ALL": "Toutes",
|
"ALL": "Toutes",
|
||||||
"PORTRAIT": "Portrait",
|
"PORTRAIT": "Portrait auto",
|
||||||
"PORTRAIT_UP": "Portrait Haut",
|
"PORTRAIT_UP": "Portrait haut",
|
||||||
"PORTRAIT_DOWN": "Portrait Bas",
|
"PORTRAIT_DOWN": "Portrait bas",
|
||||||
"LANDSCAPE": "Paysage",
|
"LANDSCAPE": "Paysage auto",
|
||||||
"LANDSCAPE_LEFT": "Paysage Gauche",
|
"LANDSCAPE_LEFT": "Paysage gauche",
|
||||||
"LANDSCAPE_RIGHT": "Paysage Droite",
|
"LANDSCAPE_RIGHT": "Paysage droite",
|
||||||
"OTHER": "Autre",
|
"OTHER": "Autre",
|
||||||
"UNKNOWN": "Inconnu"
|
"UNKNOWN": "Inconnu"
|
||||||
},
|
},
|
||||||
"safe_area_in_controls": "Zone de sécurité dans les contrôles",
|
"safe_area_in_controls": "Zone de sécurité dans les contrôles",
|
||||||
"show_custom_menu_links": "Afficher les liens personnalisés",
|
"show_custom_menu_links": "Afficher les liens personnalisés",
|
||||||
"show_large_home_carousel": "Afficher le grand carrousel d’accueil (bêta)",
|
"show_large_home_carousel": "Afficher le grand carrousel d’accueil (bêta)",
|
||||||
"hide_libraries": "Cacher des bibliothèques",
|
"hide_libraries": "Masquer les bibliothèques",
|
||||||
"select_liraries_you_want_to_hide": "Sélectionnez les bibliothèques que vous souhaitez masquer dans l'onglet Bibliothèque et les sections de la page d'accueil.",
|
"select_liraries_you_want_to_hide": "Sélectionnez les bibliothèques que vous souhaitez masquer dans l'onglet Bibliothèque et les sections de la page d'accueil.",
|
||||||
"disable_haptic_feedback": "Désactiver le retour haptique",
|
"disable_haptic_feedback": "Désactiver le retour haptique",
|
||||||
"default_quality": "Qualité par défaut",
|
"default_quality": "Qualité par défaut",
|
||||||
"default_playback_speed": "Vitesse de lecture par défaut",
|
"default_playback_speed": "Vitesse de lecture par défaut",
|
||||||
"auto_play_next_episode": "Lecture automatique de l'épisode suivant",
|
"auto_play_next_episode": "Lecture automatique de l'épisode suivant",
|
||||||
"max_auto_play_episode_count": "Nombre d'épisodes en lecture automatique max",
|
"max_auto_play_episode_count": "Nombre max d'épisodes en lecture automatique",
|
||||||
"disabled": "Désactivé"
|
"disabled": "Désactivé"
|
||||||
},
|
},
|
||||||
"music": {
|
"music": {
|
||||||
"title": "Musique",
|
"title": "Musique",
|
||||||
"playback_title": "Lecture",
|
"playback_title": "Lecture",
|
||||||
"playback_description": "Configurer le mode de lecture de la musique.",
|
"playback_description": "Configurer le mode de lecture de la musique.",
|
||||||
"prefer_downloaded": "Supprimer toutes les musiques téléchargées",
|
"prefer_downloaded": "Préférer les musiques téléchargées",
|
||||||
"caching_title": "Mise en cache",
|
"caching_title": "Mise en cache",
|
||||||
"caching_description": "Mettre automatiquement en cache les pistes à venir pour une lecture plus fluide.",
|
"caching_description": "Mettre automatiquement en cache les pistes à venir pour une lecture plus fluide.",
|
||||||
"lookahead_enabled": "Activer la mise en cache guidée",
|
"lookahead_enabled": "Activer la mise en cache anticipée",
|
||||||
"lookahead_count": "Pistes à pré-mettre en cache",
|
"lookahead_count": "Pistes à mettre en cache à l'avance",
|
||||||
"max_cache_size": "Taille max de cache"
|
"max_cache_size": "Taille max de cache"
|
||||||
},
|
},
|
||||||
"plugins": {
|
"plugins": {
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
"tv_quota_days": "Jours de quota de séries",
|
"tv_quota_days": "Jours de quota de séries",
|
||||||
"reset_jellyseerr_config_button": "Réinitialiser la configuration Seerr",
|
"reset_jellyseerr_config_button": "Réinitialiser la configuration Seerr",
|
||||||
"unlimited": "Illimité",
|
"unlimited": "Illimité",
|
||||||
"plus_n_more": "+{{n}} Plus",
|
"plus_n_more": "+{{n}} de plus",
|
||||||
"order_by": {
|
"order_by": {
|
||||||
"DEFAULT": "Par défaut",
|
"DEFAULT": "Par défaut",
|
||||||
"VOTE_COUNT_AND_AVERAGE": "Nombre de votes et moyenne",
|
"VOTE_COUNT_AND_AVERAGE": "Nombre de votes et moyenne",
|
||||||
@@ -341,7 +341,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"marlin_search": {
|
"marlin_search": {
|
||||||
"enable_marlin_search": "Activer Marlin Search",
|
"enable_marlin_search": "Activer la recherche Marlin",
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
"server_url_placeholder": "http(s)://domaine.org:port",
|
"server_url_placeholder": "http(s)://domaine.org:port",
|
||||||
"marlin_search_hint": "Entrez l'URL du serveur Marlin. L'URL devrait inclure http ou https et optionnellement le port.",
|
"marlin_search_hint": "Entrez l'URL du serveur Marlin. L'URL devrait inclure http ou https et optionnellement le port.",
|
||||||
@@ -362,10 +362,10 @@
|
|||||||
"features_title": "Fonctionnalités",
|
"features_title": "Fonctionnalités",
|
||||||
"enable_movie_recommendations": "Recommandations de films",
|
"enable_movie_recommendations": "Recommandations de films",
|
||||||
"enable_series_recommendations": "Recommandations de séries",
|
"enable_series_recommendations": "Recommandations de séries",
|
||||||
"enable_promoted_watchlists": "Listes de lecture promues",
|
"enable_promoted_watchlists": "Listes de suivi promues",
|
||||||
"hide_watchlists_tab": "Masquer l'onglet des listes de lecture",
|
"hide_watchlists_tab": "Masquer l'onglet des listes de suivi",
|
||||||
"home_sections_hint": "Afficher des recommandations personnalisées et des listes de lecture promues de Streamystats sur la page d’accueil.",
|
"home_sections_hint": "Afficher des recommandations personnalisées et des listes de suivi promues de Streamystats sur la page d’accueil.",
|
||||||
"recommended_movies": "Films Recommandés",
|
"recommended_movies": "Films recommandés",
|
||||||
"recommended_series": "Séries recommandées",
|
"recommended_series": "Séries recommandées",
|
||||||
"toasts": {
|
"toasts": {
|
||||||
"saved": "Enregistré",
|
"saved": "Enregistré",
|
||||||
@@ -375,7 +375,7 @@
|
|||||||
"refresh_from_server": "Rafraîchir les paramètres depuis le serveur"
|
"refresh_from_server": "Rafraîchir les paramètres depuis le serveur"
|
||||||
},
|
},
|
||||||
"kefinTweaks": {
|
"kefinTweaks": {
|
||||||
"watchlist_enabler": "Activer l'intégration de notre liste de lecture"
|
"watchlist_enabler": "Activer l'intégration de la liste de suivi"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"storage": {
|
"storage": {
|
||||||
@@ -392,10 +392,10 @@
|
|||||||
"delete_all_downloaded_songs": "Supprimer toutes les musiques téléchargées",
|
"delete_all_downloaded_songs": "Supprimer toutes les musiques téléchargées",
|
||||||
"downloaded_songs_size": "{{size}} téléchargé",
|
"downloaded_songs_size": "{{size}} téléchargé",
|
||||||
"downloaded_songs_deleted": "Chansons téléchargées supprimées",
|
"downloaded_songs_deleted": "Chansons téléchargées supprimées",
|
||||||
"clear_all_cache": "Clear All Cache",
|
"clear_all_cache": "Effacer tout le cache",
|
||||||
"clear_all_cache_confirm": "Clear All Cache?",
|
"clear_all_cache_confirm": "Effacer tout le cache ?",
|
||||||
"clear_all_cache_confirm_desc": "Are you sure you want to clear all cached data? This will clear all cached images, music files, subtitles, and query caches. Your settings and login session will be kept.",
|
"clear_all_cache_confirm_desc": "Êtes-vous sûr de vouloir effacer toutes les données en cache ? Cela supprimera toutes les images, fichiers musicaux, sous-titres et caches de requêtes mis en cache. Vos paramètres et votre session de connexion seront conservés.",
|
||||||
"clear_all_cache_error_desc": "An error occurred while clearing the cache."
|
"clear_all_cache_error_desc": "Une erreur est survenue lors de l'effacement du cache."
|
||||||
},
|
},
|
||||||
"intro": {
|
"intro": {
|
||||||
"title": "Introduction",
|
"title": "Introduction",
|
||||||
@@ -419,17 +419,17 @@
|
|||||||
"error_deleting_files": "Erreur lors de la suppression des fichiers"
|
"error_deleting_files": "Erreur lors de la suppression des fichiers"
|
||||||
},
|
},
|
||||||
"security": {
|
"security": {
|
||||||
"title": "Security",
|
"title": "Sécurité",
|
||||||
"inactivity_timeout": {
|
"inactivity_timeout": {
|
||||||
"title": "Inactivity Timeout",
|
"title": "Délai d'inactivité",
|
||||||
"disabled": "Disabled",
|
"disabled": "Désactivé",
|
||||||
"1_minute": "1 minute",
|
"1_minute": "1 minute",
|
||||||
"5_minutes": "5 minutes",
|
"5_minutes": "5 minutes",
|
||||||
"15_minutes": "15 minutes",
|
"15_minutes": "15 minutes",
|
||||||
"30_minutes": "30 minutes",
|
"30_minutes": "30 minutes",
|
||||||
"1_hour": "1 hour",
|
"1_hour": "1 heure",
|
||||||
"4_hours": "4 hours",
|
"4_hours": "4 heures",
|
||||||
"24_hours": "24 hours"
|
"24_hours": "24 heures"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -446,7 +446,7 @@
|
|||||||
"delete_all_movies_button": "Supprimer tous les films",
|
"delete_all_movies_button": "Supprimer tous les films",
|
||||||
"delete_all_series_button": "Supprimer toutes les séries",
|
"delete_all_series_button": "Supprimer toutes les séries",
|
||||||
"delete_all_button": "Supprimer tous les médias",
|
"delete_all_button": "Supprimer tous les médias",
|
||||||
"delete_all_other_media_button": "Supprimer un autre média",
|
"delete_all_other_media_button": "Supprimer les autres médias",
|
||||||
"active_download": "Téléchargement actif",
|
"active_download": "Téléchargement actif",
|
||||||
"no_active_downloads": "Pas de téléchargements actifs",
|
"no_active_downloads": "Pas de téléchargements actifs",
|
||||||
"active_downloads": "Téléchargements actifs",
|
"active_downloads": "Téléchargements actifs",
|
||||||
@@ -454,7 +454,7 @@
|
|||||||
"new_app_version_requires_re_download_description": "La nouvelle mise à jour nécessite que le contenu soit téléchargé à nouveau. Veuillez supprimer tout le contenu téléchargé et réessayer.",
|
"new_app_version_requires_re_download_description": "La nouvelle mise à jour nécessite que le contenu soit téléchargé à nouveau. Veuillez supprimer tout le contenu téléchargé et réessayer.",
|
||||||
"back": "Retour",
|
"back": "Retour",
|
||||||
"delete": "Supprimer",
|
"delete": "Supprimer",
|
||||||
"delete_download": "Delete Download",
|
"delete_download": "Supprimer le téléchargement",
|
||||||
"something_went_wrong": "Quelque chose s'est mal passé",
|
"something_went_wrong": "Quelque chose s'est mal passé",
|
||||||
"could_not_get_stream_url_from_jellyfin": "Impossible d'obtenir l'URL du flux depuis Jellyfin",
|
"could_not_get_stream_url_from_jellyfin": "Impossible d'obtenir l'URL du flux depuis Jellyfin",
|
||||||
"eta": "ETA {{eta}}",
|
"eta": "ETA {{eta}}",
|
||||||
@@ -465,7 +465,7 @@
|
|||||||
"deleted_all_series_successfully": "Toutes les séries ont été supprimées avec succès !",
|
"deleted_all_series_successfully": "Toutes les séries ont été supprimées avec succès !",
|
||||||
"failed_to_delete_all_series": "Échec de la suppression de toutes les séries",
|
"failed_to_delete_all_series": "Échec de la suppression de toutes les séries",
|
||||||
"deleted_media_successfully": "Les autres médias ont été supprimés avec succès !",
|
"deleted_media_successfully": "Les autres médias ont été supprimés avec succès !",
|
||||||
"failed_to_delete_media": "Échec de la suppression d'un autre média",
|
"failed_to_delete_media": "Échec de la suppression des autres médias",
|
||||||
"download_cancelled": "Téléchargement annulé",
|
"download_cancelled": "Téléchargement annulé",
|
||||||
"could_not_delete_download": "Impossible de supprimer le téléchargement",
|
"could_not_delete_download": "Impossible de supprimer le téléchargement",
|
||||||
"download_completed": "Téléchargement terminé",
|
"download_completed": "Téléchargement terminé",
|
||||||
@@ -483,17 +483,16 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "Aucun résultat",
|
||||||
"select": "Sélectionner",
|
|
||||||
"no_trailer_available": "Aucune bande-annonce disponible",
|
"no_trailer_available": "Aucune bande-annonce disponible",
|
||||||
"video": "Vidéo",
|
"video": "Vidéo",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
"subtitle": "Sous-titres",
|
"subtitle": "Sous-titres",
|
||||||
"play": "Lecture",
|
"play": "Lecture",
|
||||||
"mark_as_played": "Mark as Played",
|
"mark_as_played": "Marquer comme vu",
|
||||||
"mark_as_not_played": "Mark as not Played",
|
"mark_as_not_played": "Marquer comme non vu",
|
||||||
"none": "Aucun",
|
"none": "Aucun",
|
||||||
"track": "Suivre",
|
"track": "Piste",
|
||||||
"cancel": "Annuler",
|
"cancel": "Annuler",
|
||||||
"delete": "Supprimer",
|
"delete": "Supprimer",
|
||||||
"ok": "Ok",
|
"ok": "Ok",
|
||||||
@@ -501,15 +500,15 @@
|
|||||||
"back": "Précédent",
|
"back": "Précédent",
|
||||||
"continue": "Continuer",
|
"continue": "Continuer",
|
||||||
"verifying": "Vérification...",
|
"verifying": "Vérification...",
|
||||||
"login": "Login",
|
"login": "Connexion",
|
||||||
"episodes": "Episodes",
|
"episodes": "Épisodes",
|
||||||
"movies": "Movies",
|
"movies": "Films",
|
||||||
"loading": "Loading…",
|
"loading": "Chargement…",
|
||||||
"seeAll": "See all"
|
"seeAll": "Tout afficher"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"search": "Rechercher...",
|
"search": "Rechercher...",
|
||||||
"x_items": "{{count}} Médias",
|
"x_items": "{{count}} médias",
|
||||||
"library": "Bibliothèque",
|
"library": "Bibliothèque",
|
||||||
"discover": "Découvrir",
|
"discover": "Découvrir",
|
||||||
"no_results": "Aucun résultat",
|
"no_results": "Aucun résultat",
|
||||||
@@ -527,7 +526,7 @@
|
|||||||
"request_series": "Demander une série",
|
"request_series": "Demander une série",
|
||||||
"recently_added": "Ajoutés récemment",
|
"recently_added": "Ajoutés récemment",
|
||||||
"recent_requests": "Demandes récentes",
|
"recent_requests": "Demandes récentes",
|
||||||
"plex_watchlist": "Liste de lecture Plex",
|
"plex_watchlist": "Liste de suivi Plex",
|
||||||
"trending": "Tendance",
|
"trending": "Tendance",
|
||||||
"popular_movies": "Films populaires",
|
"popular_movies": "Films populaires",
|
||||||
"movie_genres": "Genres de films",
|
"movie_genres": "Genres de films",
|
||||||
@@ -536,7 +535,7 @@
|
|||||||
"popular_tv": "Séries populaires",
|
"popular_tv": "Séries populaires",
|
||||||
"tv_genres": "Genres des séries",
|
"tv_genres": "Genres des séries",
|
||||||
"upcoming_tv": "Séries à venir",
|
"upcoming_tv": "Séries à venir",
|
||||||
"networks": "Studios",
|
"networks": "Chaînes",
|
||||||
"tmdb_movie_keyword": "Mots-clés de film TMDB",
|
"tmdb_movie_keyword": "Mots-clés de film TMDB",
|
||||||
"tmdb_movie_genre": "Genre de film TMDB",
|
"tmdb_movie_genre": "Genre de film TMDB",
|
||||||
"tmdb_tv_keyword": "Mots-clés de séries TMDB",
|
"tmdb_tv_keyword": "Mots-clés de séries TMDB",
|
||||||
@@ -553,7 +552,7 @@
|
|||||||
"item_types": {
|
"item_types": {
|
||||||
"movies": "Films",
|
"movies": "Films",
|
||||||
"series": "Séries",
|
"series": "Séries",
|
||||||
"boxsets": "Coffrets ",
|
"boxsets": "Coffrets",
|
||||||
"playlists": "Playlists",
|
"playlists": "Playlists",
|
||||||
"items": "Médias"
|
"items": "Médias"
|
||||||
},
|
},
|
||||||
@@ -575,10 +574,10 @@
|
|||||||
"filter_by": "Filtrer par",
|
"filter_by": "Filtrer par",
|
||||||
"sort_order": "Ordre de tri",
|
"sort_order": "Ordre de tri",
|
||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"all": "All",
|
"all": "Tout",
|
||||||
"reset": "Reset",
|
"reset": "Réinitialiser",
|
||||||
"asc": "Ascending",
|
"asc": "Croissant",
|
||||||
"desc": "Descending"
|
"desc": "Décroissant"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"favorites": {
|
"favorites": {
|
||||||
@@ -592,11 +591,11 @@
|
|||||||
"noData": "Marquez des éléments comme favoris pour les voir apparaître ici pour un accès rapide."
|
"noData": "Marquez des éléments comme favoris pour les voir apparaître ici pour un accès rapide."
|
||||||
},
|
},
|
||||||
"custom_links": {
|
"custom_links": {
|
||||||
"no_links": "Aucuns liens"
|
"no_links": "Aucun lien"
|
||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
"live": "LIVE",
|
"live": "EN DIRECT",
|
||||||
"mpv_player_title": "MPV Player",
|
"mpv_player_title": "Lecteur MPV",
|
||||||
"error": "Erreur",
|
"error": "Erreur",
|
||||||
"failed_to_get_stream_url": "Échec de l'obtention de l'URL du flux",
|
"failed_to_get_stream_url": "Échec de l'obtention de l'URL du flux",
|
||||||
"an_error_occured_while_playing_the_video": "Une erreur s’est produite lors de la lecture de la vidéo. Vérifiez les journaux dans les paramètres.",
|
"an_error_occured_while_playing_the_video": "Une erreur s’est produite lors de la lecture de la vidéo. Vérifiez les journaux dans les paramètres.",
|
||||||
@@ -611,72 +610,71 @@
|
|||||||
"downloaded_file_yes": "Oui",
|
"downloaded_file_yes": "Oui",
|
||||||
"downloaded_file_no": "Non",
|
"downloaded_file_no": "Non",
|
||||||
"downloaded_file_cancel": "Annuler",
|
"downloaded_file_cancel": "Annuler",
|
||||||
"swipe_down_settings": "Swipe down for settings",
|
"swipe_down_settings": "Balayez vers le bas pour les paramètres",
|
||||||
"ends_at": "Ends at {{time}}",
|
"ends_at": "Se termine à {{time}}",
|
||||||
"search_subtitles": "Search Subtitles",
|
"search_subtitles": "Rechercher des sous-titres",
|
||||||
"subtitle_tracks": "Tracks",
|
"subtitle_tracks": "Pistes",
|
||||||
"subtitle_search": "Search & Download",
|
"subtitle_search": "Rechercher et télécharger",
|
||||||
"download": "Download",
|
"download": "Télécharger",
|
||||||
"subtitle_download_hint": "Downloaded subtitles will be saved to your library",
|
"subtitle_download_hint": "Les sous-titres téléchargés seront enregistrés dans votre bibliothèque",
|
||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Utilisation du serveur Jellyfin",
|
||||||
"language": "Language",
|
"language": "Langue",
|
||||||
"results": "Results",
|
"results": "Résultats",
|
||||||
"searching": "Searching...",
|
"search_failed": "Recherche échouée",
|
||||||
"search_failed": "Search failed",
|
"no_subtitle_provider": "Aucun fournisseur de sous-titres configuré sur le serveur",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitles_found": "Aucun sous-titre trouvé",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"add_opensubtitles_key_hint": "Ajoutez une clé API OpenSubtitles dans les paramètres pour une solution de secours côté client",
|
||||||
"add_opensubtitles_key_hint": "Add OpenSubtitles API key in settings for client-side fallback",
|
"settings": "Paramètres",
|
||||||
"settings": "Settings",
|
"skip_intro": "Passer l'intro",
|
||||||
"skip_intro": "Skip Intro",
|
"skip_credits": "Passer le générique",
|
||||||
"skip_credits": "Skip Credits",
|
"stopPlayback": "Arrêter la lecture",
|
||||||
"stopPlayback": "Stop Playback",
|
"stopPlayingTitle": "Arrêter de lire \"{{title}}\" ?",
|
||||||
"stopPlayingTitle": "Stop playing \"{{title}}\"?",
|
"stopPlayingConfirm": "Êtes-vous sûr de vouloir arrêter la lecture ?",
|
||||||
"stopPlayingConfirm": "Are you sure you want to stop playback?",
|
"downloaded": "Téléchargé",
|
||||||
"downloaded": "Downloaded",
|
"missing_parameters": "Paramètres de lecture manquants"
|
||||||
"missing_parameters": "Missing playback parameters"
|
|
||||||
},
|
},
|
||||||
"chapters": {
|
"chapters": {
|
||||||
"title": "Chapters",
|
"title": "Chapitres",
|
||||||
"chapter_number": "Chapter {{number}}",
|
"chapter_number": "Chapitre {{number}}",
|
||||||
"open": "Open chapters",
|
"open": "Ouvrir les chapitres",
|
||||||
"close": "Close chapters"
|
"close": "Fermer les chapitres"
|
||||||
},
|
},
|
||||||
"item_card": {
|
"item_card": {
|
||||||
"next_up": "À suivre",
|
"next_up": "À suivre",
|
||||||
"no_items_to_display": "Aucuns médias à afficher",
|
"no_items_to_display": "Aucun média à afficher",
|
||||||
"cast_and_crew": "Distribution et équipe",
|
"cast_and_crew": "Distribution et équipe",
|
||||||
"series": "Séries",
|
"series": "Séries",
|
||||||
"seasons": "Saisons",
|
"seasons": "Saisons",
|
||||||
"season": "Saison",
|
"season": "Saison",
|
||||||
"from_this_series": "From This Series",
|
"from_this_series": "De cette série",
|
||||||
"more_from_this_season": "More from this Season",
|
"more_from_this_season": "Plus de cette saison",
|
||||||
"view_series": "View Series",
|
"view_series": "Voir la série",
|
||||||
"view_season": "View Season",
|
"view_season": "Voir la saison",
|
||||||
"select_season": "Select Season",
|
"select_season": "Sélectionner une saison",
|
||||||
"no_episodes_for_this_season": "Aucun épisode pour cette saison",
|
"no_episodes_for_this_season": "Aucun épisode pour cette saison",
|
||||||
"overview": "Aperçu",
|
"overview": "Aperçu",
|
||||||
"more_with": "Plus avec {{name}}",
|
"more_with": "Plus avec {{name}}",
|
||||||
"similar_items": "Médias similaires",
|
"similar_items": "Médias similaires",
|
||||||
"no_similar_items_found": "Aucuns médias similaires trouvés",
|
"no_similar_items_found": "Aucun média similaire trouvé",
|
||||||
"video": "Vidéo",
|
"video": "Vidéo",
|
||||||
"more_details": "Plus de détails",
|
"more_details": "Plus de détails",
|
||||||
"media_options": "Options média",
|
"media_options": "Options média",
|
||||||
"quality": "Qualité",
|
"quality": "Qualité",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
"subtitles": {
|
"subtitles": {
|
||||||
"label": "Subtitle",
|
"label": "Sous-titres",
|
||||||
"none": "None",
|
"none": "Aucun",
|
||||||
"tracks": "Tracks"
|
"tracks": "Pistes"
|
||||||
},
|
},
|
||||||
"show_more": "Afficher plus",
|
"show_more": "Afficher plus",
|
||||||
"show_less": "Afficher moins",
|
"show_less": "Afficher moins",
|
||||||
"left": "left",
|
"left": "restant",
|
||||||
"director": "Director",
|
"director": "Réalisateur",
|
||||||
"cast": "Cast",
|
"cast": "Distribution",
|
||||||
"technical_details": "Technical Details",
|
"technical_details": "Détails techniques",
|
||||||
"appeared_in": "Apparu dans",
|
"appeared_in": "Apparu dans",
|
||||||
"movies": "Movies",
|
"movies": "Films",
|
||||||
"shows": "Shows",
|
"shows": "Séries",
|
||||||
"could_not_load_item": "Impossible de charger le média",
|
"could_not_load_item": "Impossible de charger le média",
|
||||||
"none": "Aucun",
|
"none": "Aucun",
|
||||||
"download": {
|
"download": {
|
||||||
@@ -688,13 +686,13 @@
|
|||||||
"download_unwatched_only": "Non visionné uniquement",
|
"download_unwatched_only": "Non visionné uniquement",
|
||||||
"download_button": "Télécharger"
|
"download_button": "Télécharger"
|
||||||
},
|
},
|
||||||
"mark_played": "Mark as Watched",
|
"mark_played": "Marquer comme vu",
|
||||||
"mark_unplayed": "Mark as Unwatched",
|
"mark_unplayed": "Marquer comme non vu",
|
||||||
"resume_playback": "Resume Playback",
|
"resume_playback": "Reprendre la lecture",
|
||||||
"resume_playback_description": "Do you want to continue where you left off or start from the beginning?",
|
"resume_playback_description": "Voulez-vous continuer où vous vous êtes arrêté ou commencer à partir du début ?",
|
||||||
"play_from_start": "Play from Start",
|
"play_from_start": "Lire depuis le début",
|
||||||
"continue_from": "Continue from {{time}}",
|
"continue_from": "Continuer depuis {{time}}",
|
||||||
"no_data_available": "No data available"
|
"no_data_available": "Aucune donnée disponible"
|
||||||
},
|
},
|
||||||
"live_tv": {
|
"live_tv": {
|
||||||
"next": "Suivant",
|
"next": "Suivant",
|
||||||
@@ -706,16 +704,16 @@
|
|||||||
"sports": "Sports",
|
"sports": "Sports",
|
||||||
"for_kids": "Pour enfants",
|
"for_kids": "Pour enfants",
|
||||||
"news": "Actualités",
|
"news": "Actualités",
|
||||||
"page_of": "Page {{current}} of {{total}}",
|
"page_of": "Page {{current}} sur {{total}}",
|
||||||
"no_programs": "No programs available",
|
"no_programs": "Aucun programme disponible",
|
||||||
"no_channels": "No channels available",
|
"no_channels": "Aucune chaîne disponible",
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"programs": "Programs",
|
"programs": "Programmes",
|
||||||
"guide": "Guide",
|
"guide": "Guide",
|
||||||
"channels": "Channels",
|
"channels": "Chaînes",
|
||||||
"recordings": "Recordings",
|
"recordings": "Enregistrements",
|
||||||
"schedule": "Schedule",
|
"schedule": "Programmation",
|
||||||
"series": "Series"
|
"series": "Séries"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jellyseerr": {
|
"jellyseerr": {
|
||||||
@@ -725,7 +723,7 @@
|
|||||||
"whats_wrong": "Quel est le problème ?",
|
"whats_wrong": "Quel est le problème ?",
|
||||||
"issue_type": "Type de problème",
|
"issue_type": "Type de problème",
|
||||||
"select_an_issue": "Sélectionnez un problème",
|
"select_an_issue": "Sélectionnez un problème",
|
||||||
"types": "Types de fichiers",
|
"types": "Types",
|
||||||
"describe_the_issue": "(optionnel) Décrivez le problème...",
|
"describe_the_issue": "(optionnel) Décrivez le problème...",
|
||||||
"submit_button": "Soumettre",
|
"submit_button": "Soumettre",
|
||||||
"report_issue_button": "Signaler un problème",
|
"report_issue_button": "Signaler un problème",
|
||||||
@@ -734,7 +732,7 @@
|
|||||||
"failed_to_login": "Échec de la connexion",
|
"failed_to_login": "Échec de la connexion",
|
||||||
"cast": "Distribution",
|
"cast": "Distribution",
|
||||||
"details": "Détails",
|
"details": "Détails",
|
||||||
"status": "Statuts",
|
"status": "Statut",
|
||||||
"original_title": "Titre original",
|
"original_title": "Titre original",
|
||||||
"series_type": "Type de série",
|
"series_type": "Type de série",
|
||||||
"release_dates": "Dates de sortie",
|
"release_dates": "Dates de sortie",
|
||||||
@@ -752,32 +750,32 @@
|
|||||||
"tags": "Tags",
|
"tags": "Tags",
|
||||||
"quality_profile": "Profil de qualité",
|
"quality_profile": "Profil de qualité",
|
||||||
"root_folder": "Dossier racine",
|
"root_folder": "Dossier racine",
|
||||||
"season_all": "Saison (Tous)",
|
"season_all": "Saison (Toutes)",
|
||||||
"season_number": "Saison {{season_number}}",
|
"season_number": "Saison {{season_number}}",
|
||||||
"number_episodes": "{{episode_number}} Épisodes",
|
"number_episodes": "{{episode_number}} épisodes",
|
||||||
"born": "Né(e) le",
|
"born": "Né(e) le",
|
||||||
"appearances": "Apparences",
|
"appearances": "Apparitions",
|
||||||
"approve": "Valider",
|
"approve": "Valider",
|
||||||
"decline": "Refuser",
|
"decline": "Refuser",
|
||||||
"requested_by": "Demandé par {{user}}",
|
"requested_by": "Demandé par {{user}}",
|
||||||
"unknown_user": "Utilisateur inconnu",
|
"unknown_user": "Utilisateur inconnu",
|
||||||
"select": "Select",
|
"select": "Sélectionner",
|
||||||
"request_all": "Request All",
|
"request_all": "Tout demander",
|
||||||
"request_seasons": "Request Seasons",
|
"request_seasons": "Demander des saisons",
|
||||||
"select_seasons": "Select Seasons",
|
"select_seasons": "Sélectionner les saisons",
|
||||||
"request_selected": "Request Selected",
|
"request_selected": "Demander la sélection",
|
||||||
"n_selected": "{{count}} selected",
|
"n_selected": "{{count}} sélectionnés",
|
||||||
"toasts": {
|
"toasts": {
|
||||||
"jellyseer_does_not_meet_requirements": "Seerr ne répond pas aux exigences ! Veuillez mettre à jour au moins vers la version 2.0.0.",
|
"jellyseer_does_not_meet_requirements": "Seerr ne répond pas aux exigences ! Veuillez mettre à jour au moins vers la version 2.0.0.",
|
||||||
"jellyseerr_test_failed": "Le test Seerr a échoué. Veuillez réessayer.",
|
"jellyseerr_test_failed": "Le test Seerr a échoué. Veuillez réessayer.",
|
||||||
"failed_to_test_jellyseerr_server_url": "Échec du test de l'URL du serveur Seerr",
|
"failed_to_test_jellyseerr_server_url": "Échec du test de l'URL du serveur Seerr",
|
||||||
"issue_submitted": "Problème soumis !",
|
"issue_submitted": "Problème soumis !",
|
||||||
"requested_item": "{{item}}} demandé !",
|
"requested_item": "{{item}} demandé !",
|
||||||
"you_dont_have_permission_to_request": "Vous n'avez pas la permission de demander !",
|
"you_dont_have_permission_to_request": "Vous n'avez pas la permission de demander !",
|
||||||
"something_went_wrong_requesting_media": "Quelque chose s'est mal passé en demandant le média !",
|
"something_went_wrong_requesting_media": "Une erreur s'est produite lors de la demande du média !",
|
||||||
"request_approved": "Demande approuvée !",
|
"request_approved": "Demande approuvée !",
|
||||||
"request_declined": "Demande déclinée !",
|
"request_declined": "Demande refusée !",
|
||||||
"failed_to_approve_request": "Échec d'approbation de la demande",
|
"failed_to_approve_request": "Échec de l'approbation de la demande",
|
||||||
"failed_to_decline_request": "Échec du refus de la demande"
|
"failed_to_decline_request": "Échec du refus de la demande"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -787,7 +785,7 @@
|
|||||||
"library": "Bibliothèque",
|
"library": "Bibliothèque",
|
||||||
"custom_links": "Liens personnalisés",
|
"custom_links": "Liens personnalisés",
|
||||||
"favorites": "Favoris",
|
"favorites": "Favoris",
|
||||||
"settings": "Settings"
|
"settings": "Réglages"
|
||||||
},
|
},
|
||||||
"music": {
|
"music": {
|
||||||
"title": "Musique",
|
"title": "Musique",
|
||||||
@@ -807,13 +805,13 @@
|
|||||||
"play_top_tracks": "Jouer les pistes les plus populaires",
|
"play_top_tracks": "Jouer les pistes les plus populaires",
|
||||||
"no_suggestions": "Pas de suggestion disponible",
|
"no_suggestions": "Pas de suggestion disponible",
|
||||||
"no_albums": "Pas d'albums trouvés",
|
"no_albums": "Pas d'albums trouvés",
|
||||||
"no_artists": "Pas d'artistes trouvé",
|
"no_artists": "Pas d'artistes trouvés",
|
||||||
"no_playlists": "Pas de playlists trouvées",
|
"no_playlists": "Pas de playlists trouvées",
|
||||||
"album_not_found": "Album introuvable",
|
"album_not_found": "Album introuvable",
|
||||||
"artist_not_found": "Artiste introuvable",
|
"artist_not_found": "Artiste introuvable",
|
||||||
"playlist_not_found": "Playlist introuvable",
|
"playlist_not_found": "Playlist introuvable",
|
||||||
"track_options": {
|
"track_options": {
|
||||||
"play_next": "Lecture suivante",
|
"play_next": "Lire ensuite",
|
||||||
"add_to_queue": "Ajouter à la file d'attente",
|
"add_to_queue": "Ajouter à la file d'attente",
|
||||||
"add_to_playlist": "Ajouter à la playlist",
|
"add_to_playlist": "Ajouter à la playlist",
|
||||||
"download": "Télécharger",
|
"download": "Télécharger",
|
||||||
@@ -822,15 +820,15 @@
|
|||||||
"cached": "En cache",
|
"cached": "En cache",
|
||||||
"delete_download": "Supprimer un téléchargement",
|
"delete_download": "Supprimer un téléchargement",
|
||||||
"delete_cache": "Supprimer du cache",
|
"delete_cache": "Supprimer du cache",
|
||||||
"go_to_artist": "Voir l'artiste",
|
"go_to_artist": "Aller à l'artiste",
|
||||||
"go_to_album": "Aller à l’album",
|
"go_to_album": "Aller à l'album",
|
||||||
"add_to_favorites": "Ajouter aux favoris",
|
"add_to_favorites": "Ajouter aux favoris",
|
||||||
"remove_from_favorites": "Retirer des favoris",
|
"remove_from_favorites": "Retirer des favoris",
|
||||||
"remove_from_playlist": "Retirer de la playlist"
|
"remove_from_playlist": "Retirer de la playlist"
|
||||||
},
|
},
|
||||||
"playlists": {
|
"playlists": {
|
||||||
"create_playlist": "Créer une Playlist",
|
"create_playlist": "Créer une playlist",
|
||||||
"playlist_name": "Nom de la Playlist",
|
"playlist_name": "Nom de la playlist",
|
||||||
"enter_name": "Entrer le nom de la playlist",
|
"enter_name": "Entrer le nom de la playlist",
|
||||||
"create": "Créer",
|
"create": "Créer",
|
||||||
"search_playlists": "Rechercher des playlists...",
|
"search_playlists": "Rechercher des playlists...",
|
||||||
@@ -841,10 +839,10 @@
|
|||||||
"created": "Playlist créée",
|
"created": "Playlist créée",
|
||||||
"create_new": "Créer une nouvelle playlist",
|
"create_new": "Créer une nouvelle playlist",
|
||||||
"failed_to_add": "Échec de l'ajout à la playlist",
|
"failed_to_add": "Échec de l'ajout à la playlist",
|
||||||
"failed_to_remove": "Échec de la suppression de la playlist",
|
"failed_to_remove": "Échec du retrait de la playlist",
|
||||||
"failed_to_create": "Échec de la suppression de la playlist",
|
"failed_to_create": "Échec de la création de la playlist",
|
||||||
"delete_playlist": "Supprimer la playlist",
|
"delete_playlist": "Supprimer la playlist",
|
||||||
"delete_confirm": "Êtes-vous sûr de vouloir supprimer « {{ name }} » ? Cette action est irréversible.",
|
"delete_confirm": "Êtes-vous sûr de vouloir supprimer « {{name}} » ? Cette action est irréversible.",
|
||||||
"deleted": "Playlist supprimée",
|
"deleted": "Playlist supprimée",
|
||||||
"failed_to_delete": "Échec de la suppression de la playlist"
|
"failed_to_delete": "Échec de la suppression de la playlist"
|
||||||
},
|
},
|
||||||
@@ -855,46 +853,46 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"watchlists": {
|
"watchlists": {
|
||||||
"title": "Listes de lecture",
|
"title": "Listes de suivi",
|
||||||
"my_watchlists": "Mes listes de lecture",
|
"my_watchlists": "Mes listes de suivi",
|
||||||
"public_watchlists": "Watchlist publique",
|
"public_watchlists": "Listes de suivi publiques",
|
||||||
"create_title": "Créer une Watchlist",
|
"create_title": "Créer une liste de suivi",
|
||||||
"edit_title": "Modifier la Watchlist",
|
"edit_title": "Modifier la liste de suivi",
|
||||||
"create_button": "Créer une Watchlist",
|
"create_button": "Créer une liste de suivi",
|
||||||
"save_button": "Enregistrer les modifications",
|
"save_button": "Enregistrer les modifications",
|
||||||
"delete_button": "Supprimer",
|
"delete_button": "Supprimer",
|
||||||
"remove_button": "Retirer",
|
"remove_button": "Retirer",
|
||||||
"cancel_button": "Annuler",
|
"cancel_button": "Annuler",
|
||||||
"name_label": "Nom",
|
"name_label": "Nom",
|
||||||
"name_placeholder": "Entrer le nom de la playlist",
|
"name_placeholder": "Entrez le nom de la liste de suivi",
|
||||||
"description_label": "Description",
|
"description_label": "Description",
|
||||||
"description_placeholder": "Entrez la description (facultatif)",
|
"description_placeholder": "Entrez la description (facultatif)",
|
||||||
"is_public_label": "Liste de lecture Publique",
|
"is_public_label": "Liste de suivi publique",
|
||||||
"is_public_description": "Autoriser d'autres personnes à voir cette liste de suivi",
|
"is_public_description": "Autoriser d'autres personnes à voir cette liste de suivi",
|
||||||
"allowed_type_label": "Type de contenu",
|
"allowed_type_label": "Type de contenu",
|
||||||
"sort_order_label": "Ordre de tri par défaut",
|
"sort_order_label": "Ordre de tri par défaut",
|
||||||
"empty_title": "Pas de Watchlists",
|
"empty_title": "Aucune liste de suivi",
|
||||||
"empty_description": "Créez votre première liste de suivi pour commencer à organiser vos médias",
|
"empty_description": "Créez votre première liste de suivi pour commencer à organiser vos médias",
|
||||||
"empty_watchlist": "Cette liste de suivi est vide",
|
"empty_watchlist": "Cette liste de suivi est vide",
|
||||||
"empty_watchlist_hint": "Ajouter des éléments de votre bibliothèque à cette liste de suivi",
|
"empty_watchlist_hint": "Ajouter des éléments de votre bibliothèque à cette liste de suivi",
|
||||||
"not_configured_title": "Streamystats non configuré",
|
"not_configured_title": "Streamystats non configuré",
|
||||||
"not_configured_description": "Configurer Streamystats dans les paramètres pour utiliser les listes de suivi",
|
"not_configured_description": "Configurer Streamystats dans les paramètres pour utiliser les listes de suivi",
|
||||||
"go_to_settings": "Accédez aux Paramètres",
|
"go_to_settings": "Accédez aux paramètres",
|
||||||
"add_to_watchlist": "Ajouter à la Watchlist",
|
"add_to_watchlist": "Ajouter à la liste de suivi",
|
||||||
"remove_from_watchlist": "Retirer de la Watchlist",
|
"remove_from_watchlist": "Retirer de la liste de suivi",
|
||||||
"select_watchlist": "Sélectionner la liste de suivi",
|
"select_watchlist": "Sélectionner la liste de suivi",
|
||||||
"create_new": "Créer une Watchlist",
|
"create_new": "Créer une nouvelle liste de suivi",
|
||||||
"item": "médias",
|
"item": "élément",
|
||||||
"items": "élément",
|
"items": "éléments",
|
||||||
"public": "Publique",
|
"public": "Publique",
|
||||||
"private": "Privée",
|
"private": "Privée",
|
||||||
"you": "Vous-même",
|
"you": "Vous",
|
||||||
"by_owner": "Par un autre utilisateur",
|
"by_owner": "Par un autre utilisateur",
|
||||||
"not_found": "Playlist introuvable",
|
"not_found": "Liste de suivi introuvable",
|
||||||
"delete_confirm_title": "Supprimer la Watchlist",
|
"delete_confirm_title": "Supprimer la liste de suivi",
|
||||||
"delete_confirm_message": "Tous les médias (par défaut)",
|
"delete_confirm_message": "Voulez-vous vraiment supprimer « {{name}} » ? Cette action est irréversible.",
|
||||||
"remove_item_title": "Retirer de la Watchlist",
|
"remove_item_title": "Retirer de la liste de suivi",
|
||||||
"remove_item_message": "Retirer «{{name}}» de cette liste de suivi?",
|
"remove_item_message": "Retirer « {{name}} » de cette liste de suivi ?",
|
||||||
"loading": "Chargement des listes de suivi...",
|
"loading": "Chargement des listes de suivi...",
|
||||||
"no_compatible_watchlists": "Aucune liste de suivi compatible",
|
"no_compatible_watchlists": "Aucune liste de suivi compatible",
|
||||||
"create_one_first": "Créer une liste de suivi qui accepte ce type de contenu"
|
"create_one_first": "Créer une liste de suivi qui accepte ce type de contenu"
|
||||||
@@ -910,33 +908,33 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"companion_login": {
|
"companion_login": {
|
||||||
"title": "Pair with TV",
|
"title": "Associer à la TV",
|
||||||
"align_qr": "Align the QR code within the frame",
|
"align_qr": "Alignez le code QR dans le cadre",
|
||||||
"enter_code_manually": "Enter code manually",
|
"enter_code_manually": "Saisir le code manuellement",
|
||||||
"pairing_enter_credentials": "Enter credentials for TV",
|
"pairing_enter_credentials": "Entrez les identifiants pour le téléviseur",
|
||||||
"pairing_code_label": "Pairing code",
|
"pairing_code_label": "Code d'appairage",
|
||||||
"server": "Server",
|
"server": "Serveur",
|
||||||
"authorize_button": "Authorize",
|
"authorize_button": "Autoriser",
|
||||||
"authorizing": "Authorizing...",
|
"authorizing": "Autorisation en cours...",
|
||||||
"scan_again": "Scan Again",
|
"scan_again": "Scanner à nouveau",
|
||||||
"done": "Done",
|
"done": "Terminé",
|
||||||
"success_title": "Authorization Sent",
|
"success_title": "Autorisation envoyée",
|
||||||
"pairing_tv_connecting": "The TV is connecting to your account",
|
"pairing_tv_connecting": "La TV se connecte à votre compte",
|
||||||
"error_title": "Authorization Failed",
|
"error_title": "Échec de l'autorisation",
|
||||||
"error_invalid_qr": "Invalid QR code. Please scan the TV pairing code.",
|
"error_invalid_qr": "Code QR invalide. Veuillez scanner le code d'appairage du téléviseur.",
|
||||||
"error_generic": "Something went wrong. Please try again.",
|
"error_generic": "Une erreur s'est produite. Veuillez réessayer.",
|
||||||
"error_permission_denied": "Camera permission is required to scan QR codes.",
|
"error_permission_denied": "L'accès à la caméra est nécessaire pour scanner les QR codes.",
|
||||||
"login_as": "Log in as {{username}}?",
|
"login_as": "Se connecter en tant que {{username}} ?",
|
||||||
"on_server": "on {{server}}",
|
"on_server": "sur {{server}}",
|
||||||
"use_different_user": "Use a different user",
|
"use_different_user": "Utiliser un autre utilisateur",
|
||||||
"open_settings": "Open Settings"
|
"open_settings": "Ouvrir les paramètres"
|
||||||
},
|
},
|
||||||
"pairing": {
|
"pairing": {
|
||||||
"pair_with_phone": "Pair with Phone",
|
"pair_with_phone": "Associer au téléphone",
|
||||||
"pair_with_phone_title": "Login TV",
|
"pair_with_phone_title": "Se connecter sur la TV",
|
||||||
"waiting_for_phone": "Waiting for phone...",
|
"waiting_for_phone": "En attente du téléphone...",
|
||||||
"scan_with_phone": "Scan with the Streamyfin app on your phone",
|
"scan_with_phone": "Scanner avec l'application Streamyfin sur votre téléphone",
|
||||||
"logging_in": "Logging in...",
|
"logging_in": "Connexion en cours...",
|
||||||
"logging_in_description": "Connecting to your server"
|
"logging_in_description": "Connexion à votre serveur"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "בחר",
|
|
||||||
"no_trailer_available": "אין טריילר זמין",
|
"no_trailer_available": "אין טריילר זמין",
|
||||||
"video": "וידאו",
|
"video": "וידאו",
|
||||||
"audio": "שמע",
|
"audio": "שמע",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "Videó",
|
"video": "Videó",
|
||||||
"audio": "Hang",
|
"audio": "Hang",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -226,7 +226,7 @@
|
|||||||
"hide_volume_slider": "Hide Volume Slider",
|
"hide_volume_slider": "Hide Volume Slider",
|
||||||
"hide_volume_slider_description": "Nascondi il cursore del volume nel lettore video",
|
"hide_volume_slider_description": "Nascondi il cursore del volume nel lettore video",
|
||||||
"hide_brightness_slider": "Hide Brightness Slider",
|
"hide_brightness_slider": "Hide Brightness Slider",
|
||||||
"hide_brightness_slider_description": "Hide the brightness slider in the video player"
|
"hide_brightness_slider_description": "Nascondi il cursore della luminosità nel lettore video"
|
||||||
},
|
},
|
||||||
"audio": {
|
"audio": {
|
||||||
"audio_title": "Audio",
|
"audio_title": "Audio",
|
||||||
@@ -237,10 +237,10 @@
|
|||||||
"language": "Lingua",
|
"language": "Lingua",
|
||||||
"transcode_mode": {
|
"transcode_mode": {
|
||||||
"title": "Audio Transcoding",
|
"title": "Audio Transcoding",
|
||||||
"description": "Controls how surround audio (7.1, TrueHD, DTS-HD) is handled",
|
"description": "Controlla come viene gestito l'audio surround (7.1, TrueHD, DTS-HD)",
|
||||||
"auto": "Auto",
|
"auto": "Automatico",
|
||||||
"stereo": "Force Stereo",
|
"stereo": "Force Stereo",
|
||||||
"5_1": "Allow 5.1",
|
"5_1": "Consenti 5.1",
|
||||||
"passthrough": "Passthrough"
|
"passthrough": "Passthrough"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -262,20 +262,20 @@
|
|||||||
"OnlyForced": "Solo forzati"
|
"OnlyForced": "Solo forzati"
|
||||||
},
|
},
|
||||||
"opensubtitles_title": "OpenSubtitles",
|
"opensubtitles_title": "OpenSubtitles",
|
||||||
"opensubtitles_hint": "Enter your OpenSubtitles API key to enable client-side subtitle search as a fallback when your Jellyfin server doesn't have a subtitle provider configured.",
|
"opensubtitles_hint": "Inserisci la tua chiave API OpenSubtitles per abilitare la ricerca dei sottotitoli quando il tuo server Jellyfin non ha un provider di sottotitoli configurato.",
|
||||||
"opensubtitles_api_key": "API Key",
|
"opensubtitles_api_key": "API Key",
|
||||||
"opensubtitles_api_key_placeholder": "Enter API key...",
|
"opensubtitles_api_key_placeholder": "Inserisci la chiave API...",
|
||||||
"opensubtitles_get_key": "Get your free API key at opensubtitles.com/en/consumers",
|
"opensubtitles_get_key": "Ottieni la tua chiave API gratuita su opensubtitles.com/en/consumers",
|
||||||
"mpv_subtitle_scale": "Subtitle Scale",
|
"mpv_subtitle_scale": "Subtitle Scale",
|
||||||
"mpv_subtitle_margin_y": "Vertical Margin",
|
"mpv_subtitle_margin_y": "Vertical Margin",
|
||||||
"mpv_subtitle_align_x": "Horizontal Align",
|
"mpv_subtitle_align_x": "Horizontal Align",
|
||||||
"mpv_subtitle_align_y": "Vertical Align",
|
"mpv_subtitle_align_y": "Vertical Align",
|
||||||
"align": {
|
"align": {
|
||||||
"left": "Left",
|
"left": "Sinistra",
|
||||||
"center": "Center",
|
"center": "Centro",
|
||||||
"right": "Right",
|
"right": "Destra",
|
||||||
"top": "Top",
|
"top": "Alto",
|
||||||
"bottom": "Bottom"
|
"bottom": "Basso"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"other": {
|
"other": {
|
||||||
@@ -307,9 +307,9 @@
|
|||||||
"disabled": "Disabilitato"
|
"disabled": "Disabilitato"
|
||||||
},
|
},
|
||||||
"music": {
|
"music": {
|
||||||
"title": "Music",
|
"title": "Musica",
|
||||||
"playback_title": "Playback",
|
"playback_title": "Riproduzione",
|
||||||
"playback_description": "Configure how music is played.",
|
"playback_description": "Configura come viene riprodotta la musica.",
|
||||||
"prefer_downloaded": "Prefer Downloaded Songs",
|
"prefer_downloaded": "Prefer Downloaded Songs",
|
||||||
"caching_title": "Caching",
|
"caching_title": "Caching",
|
||||||
"caching_description": "Automatically cache upcoming tracks for smoother playback.",
|
"caching_description": "Automatically cache upcoming tracks for smoother playback.",
|
||||||
@@ -333,7 +333,7 @@
|
|||||||
"tv_quota_days": "Giorni di quota per le serie TV",
|
"tv_quota_days": "Giorni di quota per le serie TV",
|
||||||
"reset_jellyseerr_config_button": "Ripristina la configurazione di Jellyseerr",
|
"reset_jellyseerr_config_button": "Ripristina la configurazione di Jellyseerr",
|
||||||
"unlimited": "Illimitato",
|
"unlimited": "Illimitato",
|
||||||
"plus_n_more": "+{{n}} more",
|
"plus_n_more": "+{{n}} altro",
|
||||||
"order_by": {
|
"order_by": {
|
||||||
"DEFAULT": "Predefinito",
|
"DEFAULT": "Predefinito",
|
||||||
"VOTE_COUNT_AND_AVERAGE": "Conteggio delle votazioni e media",
|
"VOTE_COUNT_AND_AVERAGE": "Conteggio delle votazioni e media",
|
||||||
@@ -352,25 +352,25 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"streamystats": {
|
"streamystats": {
|
||||||
"disable_streamystats": "Disable Streamystats",
|
"disable_streamystats": "Disabilita Streamystats",
|
||||||
"enable_search": "Use for Search",
|
"enable_search": "Use for Search",
|
||||||
"url": "URL",
|
"url": "URL",
|
||||||
"server_url_placeholder": "http(s)://streamystats.example.com",
|
"server_url_placeholder": "http(s)://streamystats.example.com",
|
||||||
"streamystats_search_hint": "Enter the URL for your Streamystats server. The URL should include http or https and optionally the port.",
|
"streamystats_search_hint": "Inserisci l'URL per il tuo server Streamystats. L'URL dovrebbe includere http o https ed eventualmente la porta.",
|
||||||
"read_more_about_streamystats": "Read More About Streamystats.",
|
"read_more_about_streamystats": "Read More About Streamystats.",
|
||||||
"save": "Save",
|
"save": "Salva",
|
||||||
"features_title": "Features",
|
"features_title": "Funzionalità",
|
||||||
"enable_movie_recommendations": "Movie Recommendations",
|
"enable_movie_recommendations": "Movie Recommendations",
|
||||||
"enable_series_recommendations": "Series Recommendations",
|
"enable_series_recommendations": "Series Recommendations",
|
||||||
"enable_promoted_watchlists": "Promoted Watchlists",
|
"enable_promoted_watchlists": "Promoted Watchlists",
|
||||||
"hide_watchlists_tab": "Hide Watchlists Tab",
|
"hide_watchlists_tab": "Hide Watchlists Tab",
|
||||||
"home_sections_hint": "Show personalized recommendations and promoted watchlists from Streamystats on the home page.",
|
"home_sections_hint": "Mostra consigli personalizzati e watchlist promosse da Streamystats nella home page.",
|
||||||
"recommended_movies": "Recommended Movies",
|
"recommended_movies": "Recommended Movies",
|
||||||
"recommended_series": "Recommended Series",
|
"recommended_series": "Recommended Series",
|
||||||
"toasts": {
|
"toasts": {
|
||||||
"saved": "Saved",
|
"saved": "Salvato",
|
||||||
"refreshed": "Settings refreshed from server",
|
"refreshed": "Impostazioni aggiornate dal server",
|
||||||
"disabled": "Streamystats disabled"
|
"disabled": "Streamystats disabilitato"
|
||||||
},
|
},
|
||||||
"refresh_from_server": "Refresh Settings from Server"
|
"refresh_from_server": "Refresh Settings from Server"
|
||||||
},
|
},
|
||||||
@@ -385,17 +385,17 @@
|
|||||||
"size_used": "{{used}} di {{total}} usato",
|
"size_used": "{{used}} di {{total}} usato",
|
||||||
"delete_all_downloaded_files": "Cancella Tutti i File Scaricati",
|
"delete_all_downloaded_files": "Cancella Tutti i File Scaricati",
|
||||||
"music_cache_title": "Music Cache",
|
"music_cache_title": "Music Cache",
|
||||||
"music_cache_description": "Automatically cache songs as you listen for smoother playback and offline support",
|
"music_cache_description": "Precarica automaticamente i brani mentre ascolti per una riproduzione più fluida e il supporto offline",
|
||||||
"clear_music_cache": "Clear Music Cache",
|
"clear_music_cache": "Clear Music Cache",
|
||||||
"music_cache_size": "{{size}} cached",
|
"music_cache_size": "{{size}} nella cache",
|
||||||
"music_cache_cleared": "Music cache cleared",
|
"music_cache_cleared": "Cache musicale cancellata",
|
||||||
"delete_all_downloaded_songs": "Delete All Downloaded Songs",
|
"delete_all_downloaded_songs": "Delete All Downloaded Songs",
|
||||||
"downloaded_songs_size": "{{size}} downloaded",
|
"downloaded_songs_size": "{{size}} scaricato",
|
||||||
"downloaded_songs_deleted": "Downloaded songs deleted",
|
"downloaded_songs_deleted": "Brani scaricati eliminati",
|
||||||
"clear_all_cache": "Clear All Cache",
|
"clear_all_cache": "Clear All Cache",
|
||||||
"clear_all_cache_confirm": "Clear All Cache?",
|
"clear_all_cache_confirm": "Clear All Cache?",
|
||||||
"clear_all_cache_confirm_desc": "Are you sure you want to clear all cached data? This will clear all cached images, music files, subtitles, and query caches. Your settings and login session will be kept.",
|
"clear_all_cache_confirm_desc": "Sei sicuro di voler cancellare tutti i dati nella cache? Questo cancellerà tutte le immagini nella cache, i file musicali, i sottotitoli e le cache delle interrogazioni. Le impostazioni e la sessione di login verranno mantenute.",
|
||||||
"clear_all_cache_error_desc": "An error occurred while clearing the cache."
|
"clear_all_cache_error_desc": "Si è verificato un errore durante la cancellazione della cache."
|
||||||
},
|
},
|
||||||
"intro": {
|
"intro": {
|
||||||
"title": "Intro",
|
"title": "Intro",
|
||||||
@@ -404,8 +404,8 @@
|
|||||||
},
|
},
|
||||||
"logs": {
|
"logs": {
|
||||||
"logs_title": "Log",
|
"logs_title": "Log",
|
||||||
"export_logs": "Export logs",
|
"export_logs": "Esporta i logs",
|
||||||
"click_for_more_info": "Click for more info",
|
"click_for_more_info": "Clicca per maggiori informazioni",
|
||||||
"level": "Livello",
|
"level": "Livello",
|
||||||
"no_logs_available": "Nessun log disponibile",
|
"no_logs_available": "Nessun log disponibile",
|
||||||
"delete_all_logs": "Cancella tutti i log"
|
"delete_all_logs": "Cancella tutti i log"
|
||||||
@@ -419,17 +419,17 @@
|
|||||||
"error_deleting_files": "Errore nella cancellazione dei file"
|
"error_deleting_files": "Errore nella cancellazione dei file"
|
||||||
},
|
},
|
||||||
"security": {
|
"security": {
|
||||||
"title": "Security",
|
"title": "Sicurezza",
|
||||||
"inactivity_timeout": {
|
"inactivity_timeout": {
|
||||||
"title": "Inactivity Timeout",
|
"title": "Inactivity Timeout",
|
||||||
"disabled": "Disabled",
|
"disabled": "Disabilitato",
|
||||||
"1_minute": "1 minute",
|
"1_minute": "1 minuto",
|
||||||
"5_minutes": "5 minutes",
|
"5_minutes": "5 minuti",
|
||||||
"15_minutes": "15 minutes",
|
"15_minutes": "15 minuti",
|
||||||
"30_minutes": "30 minutes",
|
"30_minutes": "30 minuti",
|
||||||
"1_hour": "1 hour",
|
"1_hour": "1 ora",
|
||||||
"4_hours": "4 hours",
|
"4_hours": "4 ore",
|
||||||
"24_hours": "24 hours"
|
"24_hours": "24 ore"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Seleziona",
|
|
||||||
"no_trailer_available": "Nessun trailer disponibile",
|
"no_trailer_available": "Nessun trailer disponibile",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -494,18 +493,18 @@
|
|||||||
"mark_as_not_played": "Mark as not Played",
|
"mark_as_not_played": "Mark as not Played",
|
||||||
"none": "Nulla",
|
"none": "Nulla",
|
||||||
"track": "Traccia",
|
"track": "Traccia",
|
||||||
"cancel": "Cancel",
|
"cancel": "Annulla",
|
||||||
"delete": "Delete",
|
"delete": "Cancella",
|
||||||
"ok": "OK",
|
"ok": "OK",
|
||||||
"remove": "Remove",
|
"remove": "Rimuovi",
|
||||||
"back": "Back",
|
"back": "Indietro",
|
||||||
"continue": "Continue",
|
"continue": "Continua",
|
||||||
"verifying": "Verifying...",
|
"verifying": "Verifica in corso...",
|
||||||
"login": "Login",
|
"login": "Accedi",
|
||||||
"episodes": "Episodes",
|
"episodes": "Episodi",
|
||||||
"movies": "Movies",
|
"movies": "Film",
|
||||||
"loading": "Loading…",
|
"loading": "Caricamento…",
|
||||||
"seeAll": "See all"
|
"seeAll": "Visualizza tutti"
|
||||||
},
|
},
|
||||||
"search": {
|
"search": {
|
||||||
"search": "Cerca...",
|
"search": "Cerca...",
|
||||||
@@ -519,10 +518,10 @@
|
|||||||
"episodes": "Episodi",
|
"episodes": "Episodi",
|
||||||
"collections": "Collezioni",
|
"collections": "Collezioni",
|
||||||
"actors": "Attori",
|
"actors": "Attori",
|
||||||
"artists": "Artists",
|
"artists": "Artisti",
|
||||||
"albums": "Albums",
|
"albums": "Album",
|
||||||
"songs": "Songs",
|
"songs": "Tracce",
|
||||||
"playlists": "Playlists",
|
"playlists": "Playlist",
|
||||||
"request_movies": "Film Richiesti",
|
"request_movies": "Film Richiesti",
|
||||||
"request_series": "Serie Richieste",
|
"request_series": "Serie Richieste",
|
||||||
"recently_added": "Aggiunti di Recente",
|
"recently_added": "Aggiunti di Recente",
|
||||||
@@ -554,7 +553,7 @@
|
|||||||
"movies": "film",
|
"movies": "film",
|
||||||
"series": "serie TV",
|
"series": "serie TV",
|
||||||
"boxsets": "cofanetti",
|
"boxsets": "cofanetti",
|
||||||
"playlists": "Playlists",
|
"playlists": "Playlist",
|
||||||
"items": "elementi"
|
"items": "elementi"
|
||||||
},
|
},
|
||||||
"options": {
|
"options": {
|
||||||
@@ -566,7 +565,7 @@
|
|||||||
"cover": "Copertina",
|
"cover": "Copertina",
|
||||||
"show_titles": "Mostra titoli",
|
"show_titles": "Mostra titoli",
|
||||||
"show_stats": "Mostra statistiche",
|
"show_stats": "Mostra statistiche",
|
||||||
"options_title": "Options"
|
"options_title": "Impostazioni"
|
||||||
},
|
},
|
||||||
"filters": {
|
"filters": {
|
||||||
"genres": "Generi",
|
"genres": "Generi",
|
||||||
@@ -575,10 +574,10 @@
|
|||||||
"filter_by": "Filter By",
|
"filter_by": "Filter By",
|
||||||
"sort_order": "Criterio di ordinamento",
|
"sort_order": "Criterio di ordinamento",
|
||||||
"tags": "Tag",
|
"tags": "Tag",
|
||||||
"all": "All",
|
"all": "Tutto",
|
||||||
"reset": "Reset",
|
"reset": "Ripristina",
|
||||||
"asc": "Ascending",
|
"asc": "Crescente",
|
||||||
"desc": "Descending"
|
"desc": "Decrescente"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"favorites": {
|
"favorites": {
|
||||||
@@ -595,7 +594,7 @@
|
|||||||
"no_links": "Nessun link"
|
"no_links": "Nessun link"
|
||||||
},
|
},
|
||||||
"player": {
|
"player": {
|
||||||
"live": "LIVE",
|
"live": "IN DIRETTA",
|
||||||
"mpv_player_title": "MPV Player",
|
"mpv_player_title": "MPV Player",
|
||||||
"error": "Errore",
|
"error": "Errore",
|
||||||
"failed_to_get_stream_url": "Impossibile ottenere l'URL dello stream",
|
"failed_to_get_stream_url": "Impossibile ottenere l'URL dello stream",
|
||||||
@@ -606,40 +605,39 @@
|
|||||||
"next_episode": "Prossimo Episodio",
|
"next_episode": "Prossimo Episodio",
|
||||||
"continue_watching": "Continua a guardare",
|
"continue_watching": "Continua a guardare",
|
||||||
"go_back": "Indietro",
|
"go_back": "Indietro",
|
||||||
"downloaded_file_title": "You have this file downloaded",
|
"downloaded_file_title": "Questo file è stato scaricato",
|
||||||
"downloaded_file_message": "Do you want to play the downloaded file?",
|
"downloaded_file_message": "Vuoi riprodurre il file scaricato?",
|
||||||
"downloaded_file_yes": "Yes",
|
"downloaded_file_yes": "Si",
|
||||||
"downloaded_file_no": "No",
|
"downloaded_file_no": "No",
|
||||||
"downloaded_file_cancel": "Cancel",
|
"downloaded_file_cancel": "Annulla",
|
||||||
"swipe_down_settings": "Swipe down for settings",
|
"swipe_down_settings": "Scorri in basso per le impostazioni",
|
||||||
"ends_at": "Ends at {{time}}",
|
"ends_at": "Termina alle {{time}}",
|
||||||
"search_subtitles": "Search Subtitles",
|
"search_subtitles": "Search Subtitles",
|
||||||
"subtitle_tracks": "Tracks",
|
"subtitle_tracks": "Tracce",
|
||||||
"subtitle_search": "Search & Download",
|
"subtitle_search": "Search & Download",
|
||||||
"download": "Download",
|
"download": "Scarica",
|
||||||
"subtitle_download_hint": "Downloaded subtitles will be saved to your library",
|
"subtitle_download_hint": "I sottotitoli scaricati verranno salvati nella tua libreria",
|
||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Lingua",
|
||||||
"results": "Results",
|
"results": "Risultati",
|
||||||
"searching": "Searching...",
|
"search_failed": "Ricerca fallita",
|
||||||
"search_failed": "Search failed",
|
"no_subtitle_provider": "Nessun provider di sottotitoli configurato sul server",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitles_found": "Nessun sottotitolo trovato",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"add_opensubtitles_key_hint": "Aggiungi la chiave API OpenSubtitles nelle impostazioni",
|
||||||
"add_opensubtitles_key_hint": "Add OpenSubtitles API key in settings for client-side fallback",
|
"settings": "Impostazioni",
|
||||||
"settings": "Settings",
|
|
||||||
"skip_intro": "Skip Intro",
|
"skip_intro": "Skip Intro",
|
||||||
"skip_credits": "Skip Credits",
|
"skip_credits": "Skip Credits",
|
||||||
"stopPlayback": "Stop Playback",
|
"stopPlayback": "Stop Playback",
|
||||||
"stopPlayingTitle": "Stop playing \"{{title}}\"?",
|
"stopPlayingTitle": "Interrompere la riproduzione \"{{title}}\"?",
|
||||||
"stopPlayingConfirm": "Are you sure you want to stop playback?",
|
"stopPlayingConfirm": "Sei sicuro di voler interrompere la riproduzione?",
|
||||||
"downloaded": "Downloaded",
|
"downloaded": "Scaricato",
|
||||||
"missing_parameters": "Missing playback parameters"
|
"missing_parameters": "Parametri di riproduzione mancanti"
|
||||||
},
|
},
|
||||||
"chapters": {
|
"chapters": {
|
||||||
"title": "Chapters",
|
"title": "Capitoli",
|
||||||
"chapter_number": "Chapter {{number}}",
|
"chapter_number": "Capitolo {{number}}",
|
||||||
"open": "Open chapters",
|
"open": "Apri capitoli",
|
||||||
"close": "Close chapters"
|
"close": "Chiudi i capitoli"
|
||||||
},
|
},
|
||||||
"item_card": {
|
"item_card": {
|
||||||
"next_up": "Il prossimo",
|
"next_up": "Il prossimo",
|
||||||
@@ -664,19 +662,19 @@
|
|||||||
"quality": "Qualità",
|
"quality": "Qualità",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
"subtitles": {
|
"subtitles": {
|
||||||
"label": "Subtitle",
|
"label": "Sottotitoli",
|
||||||
"none": "None",
|
"none": "Vuoto",
|
||||||
"tracks": "Tracks"
|
"tracks": "Tracce"
|
||||||
},
|
},
|
||||||
"show_more": "Mostra di più",
|
"show_more": "Mostra di più",
|
||||||
"show_less": "Mostra di meno",
|
"show_less": "Mostra di meno",
|
||||||
"left": "left",
|
"left": "sinistra",
|
||||||
"director": "Director",
|
"director": "Regista",
|
||||||
"cast": "Cast",
|
"cast": "Cast",
|
||||||
"technical_details": "Technical Details",
|
"technical_details": "Technical Details",
|
||||||
"appeared_in": "Apparso in",
|
"appeared_in": "Apparso in",
|
||||||
"movies": "Movies",
|
"movies": "Film",
|
||||||
"shows": "Shows",
|
"shows": "Serie",
|
||||||
"could_not_load_item": "Impossibile caricare l'elemento",
|
"could_not_load_item": "Impossibile caricare l'elemento",
|
||||||
"none": "Nessuno",
|
"none": "Nessuno",
|
||||||
"download": {
|
"download": {
|
||||||
@@ -691,10 +689,10 @@
|
|||||||
"mark_played": "Mark as Watched",
|
"mark_played": "Mark as Watched",
|
||||||
"mark_unplayed": "Mark as Unwatched",
|
"mark_unplayed": "Mark as Unwatched",
|
||||||
"resume_playback": "Resume Playback",
|
"resume_playback": "Resume Playback",
|
||||||
"resume_playback_description": "Do you want to continue where you left off or start from the beginning?",
|
"resume_playback_description": "Vuoi continuare da dove hai lasciato o riniziare da capo?",
|
||||||
"play_from_start": "Play from Start",
|
"play_from_start": "Play from Start",
|
||||||
"continue_from": "Continue from {{time}}",
|
"continue_from": "Continua da {{time}}",
|
||||||
"no_data_available": "No data available"
|
"no_data_available": "Nessun dato disponibile"
|
||||||
},
|
},
|
||||||
"live_tv": {
|
"live_tv": {
|
||||||
"next": "Prossimo",
|
"next": "Prossimo",
|
||||||
@@ -706,16 +704,16 @@
|
|||||||
"sports": "Sport",
|
"sports": "Sport",
|
||||||
"for_kids": "Per Bambini",
|
"for_kids": "Per Bambini",
|
||||||
"news": "Notiziari",
|
"news": "Notiziari",
|
||||||
"page_of": "Page {{current}} of {{total}}",
|
"page_of": "Pagina {{current}} di {{total}}",
|
||||||
"no_programs": "No programs available",
|
"no_programs": "Nessun programma disponibile",
|
||||||
"no_channels": "No channels available",
|
"no_channels": "Nessun canale disponibile",
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"programs": "Programs",
|
"programs": "Programmi",
|
||||||
"guide": "Guide",
|
"guide": "Guida",
|
||||||
"channels": "Channels",
|
"channels": "Canali",
|
||||||
"recordings": "Recordings",
|
"recordings": "Registrazioni",
|
||||||
"schedule": "Schedule",
|
"schedule": "Pianifica",
|
||||||
"series": "Series"
|
"series": "Serie Tv"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"jellyseerr": {
|
"jellyseerr": {
|
||||||
@@ -761,12 +759,12 @@
|
|||||||
"decline": "Rifiuta",
|
"decline": "Rifiuta",
|
||||||
"requested_by": "Richiesto da {{user}}",
|
"requested_by": "Richiesto da {{user}}",
|
||||||
"unknown_user": "Utente Sconosciuto",
|
"unknown_user": "Utente Sconosciuto",
|
||||||
"select": "Select",
|
"select": "Seleziona",
|
||||||
"request_all": "Request All",
|
"request_all": "Request All",
|
||||||
"request_seasons": "Request Seasons",
|
"request_seasons": "Request Seasons",
|
||||||
"select_seasons": "Select Seasons",
|
"select_seasons": "Select Seasons",
|
||||||
"request_selected": "Request Selected",
|
"request_selected": "Request Selected",
|
||||||
"n_selected": "{{count}} selected",
|
"n_selected": "{{count}} selezionati",
|
||||||
"toasts": {
|
"toasts": {
|
||||||
"jellyseer_does_not_meet_requirements": "Il server Jellyseerr non soddisfa i requisiti minimi di versione! Aggiornare almeno alla versione 2.0.0.",
|
"jellyseer_does_not_meet_requirements": "Il server Jellyseerr non soddisfa i requisiti minimi di versione! Aggiornare almeno alla versione 2.0.0.",
|
||||||
"jellyseerr_test_failed": "Il test di Jellyseerr non è riuscito. Riprovare.",
|
"jellyseerr_test_failed": "Il test di Jellyseerr non è riuscito. Riprovare.",
|
||||||
@@ -787,39 +785,39 @@
|
|||||||
"library": "Libreria",
|
"library": "Libreria",
|
||||||
"custom_links": "Collegamenti personalizzati",
|
"custom_links": "Collegamenti personalizzati",
|
||||||
"favorites": "Preferiti",
|
"favorites": "Preferiti",
|
||||||
"settings": "Settings"
|
"settings": "Impostazioni"
|
||||||
},
|
},
|
||||||
"music": {
|
"music": {
|
||||||
"title": "Music",
|
"title": "Musica",
|
||||||
"tabs": {
|
"tabs": {
|
||||||
"suggestions": "Suggestions",
|
"suggestions": "Suggerimenti",
|
||||||
"albums": "Albums",
|
"albums": "Album",
|
||||||
"artists": "Artists",
|
"artists": "Artisti",
|
||||||
"playlists": "Playlists",
|
"playlists": "Playlist",
|
||||||
"tracks": "tracks"
|
"tracks": "tracks"
|
||||||
},
|
},
|
||||||
"recently_added": "Recently Added",
|
"recently_added": "Recently Added",
|
||||||
"recently_played": "Recently Played",
|
"recently_played": "Recently Played",
|
||||||
"frequently_played": "Frequently Played",
|
"frequently_played": "Frequently Played",
|
||||||
"top_tracks": "Top Tracks",
|
"top_tracks": "Top Tracks",
|
||||||
"play": "Play",
|
"play": "Riproduci",
|
||||||
"shuffle": "Shuffle",
|
"shuffle": "Riproduzione casuale",
|
||||||
"play_top_tracks": "Play Top Tracks",
|
"play_top_tracks": "Play Top Tracks",
|
||||||
"no_suggestions": "No suggestions available",
|
"no_suggestions": "Nessun suggerimento disponibile",
|
||||||
"no_albums": "No albums found",
|
"no_albums": "Nessun album trovato",
|
||||||
"no_artists": "No artists found",
|
"no_artists": "Artista non trovato",
|
||||||
"no_playlists": "No playlists found",
|
"no_playlists": "Nessuna playlist trovata",
|
||||||
"album_not_found": "Album not found",
|
"album_not_found": "Album non trovato",
|
||||||
"artist_not_found": "Artist not found",
|
"artist_not_found": "Artista non trovato",
|
||||||
"playlist_not_found": "Playlist not found",
|
"playlist_not_found": "Playlist non trovata",
|
||||||
"track_options": {
|
"track_options": {
|
||||||
"play_next": "Play Next",
|
"play_next": "Play Next",
|
||||||
"add_to_queue": "Add to Queue",
|
"add_to_queue": "Add to Queue",
|
||||||
"add_to_playlist": "Add to Playlist",
|
"add_to_playlist": "Add to Playlist",
|
||||||
"download": "Download",
|
"download": "Scarica",
|
||||||
"downloaded": "Downloaded",
|
"downloaded": "Scaricato",
|
||||||
"downloading": "Downloading...",
|
"downloading": "Scaricamento...",
|
||||||
"cached": "Cached",
|
"cached": "Memorizzato nella cache",
|
||||||
"delete_download": "Delete Download",
|
"delete_download": "Delete Download",
|
||||||
"delete_cache": "Remove from Cache",
|
"delete_cache": "Remove from Cache",
|
||||||
"go_to_artist": "Go to Artist",
|
"go_to_artist": "Go to Artist",
|
||||||
@@ -831,112 +829,112 @@
|
|||||||
"playlists": {
|
"playlists": {
|
||||||
"create_playlist": "Create Playlist",
|
"create_playlist": "Create Playlist",
|
||||||
"playlist_name": "Playlist Name",
|
"playlist_name": "Playlist Name",
|
||||||
"enter_name": "Enter playlist name",
|
"enter_name": "Inserisci il nome della playlist",
|
||||||
"create": "Create",
|
"create": "Crea",
|
||||||
"search_playlists": "Search playlists...",
|
"search_playlists": "Cerca playlist...",
|
||||||
"added_to": "Added to {{name}}",
|
"added_to": "Aggiunto a {{name}}",
|
||||||
"added": "Added to playlist",
|
"added": "Aggiunto alla playlist",
|
||||||
"removed_from": "Removed from {{name}}",
|
"removed_from": "Rimosso da {{name}}",
|
||||||
"removed": "Removed from playlist",
|
"removed": "Rimosso dalla playlist",
|
||||||
"created": "Playlist created",
|
"created": "Playlist creata",
|
||||||
"create_new": "Create New Playlist",
|
"create_new": "Create New Playlist",
|
||||||
"failed_to_add": "Failed to add to playlist",
|
"failed_to_add": "Impossibile aggiungere alla playlist",
|
||||||
"failed_to_remove": "Failed to remove from playlist",
|
"failed_to_remove": "Impossibile rimuovere dalla playlist",
|
||||||
"failed_to_create": "Failed to create playlist",
|
"failed_to_create": "Impossibile creare la playlist",
|
||||||
"delete_playlist": "Delete Playlist",
|
"delete_playlist": "Delete Playlist",
|
||||||
"delete_confirm": "Are you sure you want to delete \"{{name}}\"? This action cannot be undone.",
|
"delete_confirm": "Sei sicuro di voler eliminare\"{{name}}\"? Questa azione non può essere annullata.",
|
||||||
"deleted": "Playlist deleted",
|
"deleted": "Playlist eliminata",
|
||||||
"failed_to_delete": "Failed to delete playlist"
|
"failed_to_delete": "Impossibile eliminare la playlist"
|
||||||
},
|
},
|
||||||
"sort": {
|
"sort": {
|
||||||
"title": "Sort By",
|
"title": "Sort By",
|
||||||
"alphabetical": "Alphabetical",
|
"alphabetical": "Alfabetico",
|
||||||
"date_created": "Date Created"
|
"date_created": "Date Created"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"watchlists": {
|
"watchlists": {
|
||||||
"title": "Watchlists",
|
"title": "Da vedere",
|
||||||
"my_watchlists": "My Watchlists",
|
"my_watchlists": "My Watchlists",
|
||||||
"public_watchlists": "Public Watchlists",
|
"public_watchlists": "Public Watchlists",
|
||||||
"create_title": "Create Watchlist",
|
"create_title": "Create Watchlist",
|
||||||
"edit_title": "Edit Watchlist",
|
"edit_title": "Edit Watchlist",
|
||||||
"create_button": "Create Watchlist",
|
"create_button": "Create Watchlist",
|
||||||
"save_button": "Save Changes",
|
"save_button": "Save Changes",
|
||||||
"delete_button": "Delete",
|
"delete_button": "Cancella",
|
||||||
"remove_button": "Remove",
|
"remove_button": "Rimuovi",
|
||||||
"cancel_button": "Cancel",
|
"cancel_button": "Annulla",
|
||||||
"name_label": "Name",
|
"name_label": "Nome",
|
||||||
"name_placeholder": "Enter watchlist name",
|
"name_placeholder": "Inserisci il nome della lista \"Da vedere\"",
|
||||||
"description_label": "Description",
|
"description_label": "Descrizione",
|
||||||
"description_placeholder": "Enter description (optional)",
|
"description_placeholder": "Inserisci descrizione (opzionale)",
|
||||||
"is_public_label": "Public Watchlist",
|
"is_public_label": "Public Watchlist",
|
||||||
"is_public_description": "Allow others to view this watchlist",
|
"is_public_description": "Permetti ad altri di vedere questa lista",
|
||||||
"allowed_type_label": "Content Type",
|
"allowed_type_label": "Content Type",
|
||||||
"sort_order_label": "Default Sort Order",
|
"sort_order_label": "Default Sort Order",
|
||||||
"empty_title": "No Watchlists",
|
"empty_title": "No Watchlists",
|
||||||
"empty_description": "Create your first watchlist to start organizing your media",
|
"empty_description": "Crea la tua prima lista \"Da vedere\" per iniziare a organizzare i tuoi media",
|
||||||
"empty_watchlist": "This watchlist is empty",
|
"empty_watchlist": "Questa lista è vuota",
|
||||||
"empty_watchlist_hint": "Add items from your library to this watchlist",
|
"empty_watchlist_hint": "Aggiungi elementi dalla tua libreria a questa lista",
|
||||||
"not_configured_title": "Streamystats Not Configured",
|
"not_configured_title": "Streamystats Not Configured",
|
||||||
"not_configured_description": "Configure Streamystats in settings to use watchlists",
|
"not_configured_description": "Configura Streamystats nelle impostazioni per utilizzare le watchlist",
|
||||||
"go_to_settings": "Go to Settings",
|
"go_to_settings": "Vai alle impostazioni",
|
||||||
"add_to_watchlist": "Add to Watchlist",
|
"add_to_watchlist": "Add to Watchlist",
|
||||||
"remove_from_watchlist": "Remove from Watchlist",
|
"remove_from_watchlist": "Remove from Watchlist",
|
||||||
"select_watchlist": "Select Watchlist",
|
"select_watchlist": "Select Watchlist",
|
||||||
"create_new": "Create New Watchlist",
|
"create_new": "Create New Watchlist",
|
||||||
"item": "item",
|
"item": "elemento",
|
||||||
"items": "items",
|
"items": "elementi",
|
||||||
"public": "Public",
|
"public": "Pubblico",
|
||||||
"private": "Private",
|
"private": "Privato",
|
||||||
"you": "You",
|
"you": "Tu",
|
||||||
"by_owner": "By another user",
|
"by_owner": "Da un altro utente",
|
||||||
"not_found": "Watchlist not found",
|
"not_found": "\"Da vedere\" non trovata",
|
||||||
"delete_confirm_title": "Delete Watchlist",
|
"delete_confirm_title": "Delete Watchlist",
|
||||||
"delete_confirm_message": "Are you sure you want to delete \"{{name}}\"? This action cannot be undone.",
|
"delete_confirm_message": "Sei sicuro di voler eliminare\"{{name}}\"? Questa azione non può essere annullata.",
|
||||||
"remove_item_title": "Remove from Watchlist",
|
"remove_item_title": "Remove from Watchlist",
|
||||||
"remove_item_message": "Remove \"{{name}}\" from this watchlist?",
|
"remove_item_message": "Rimuovere \"{{name}}\" da questa lista?",
|
||||||
"loading": "Loading watchlists...",
|
"loading": "Caricamento liste...",
|
||||||
"no_compatible_watchlists": "No compatible watchlists",
|
"no_compatible_watchlists": "Nessuna lista compatibile",
|
||||||
"create_one_first": "Create a watchlist that accepts this content type"
|
"create_one_first": "Crea una lista che accetti questo tipo di contenuto"
|
||||||
},
|
},
|
||||||
"playback_speed": {
|
"playback_speed": {
|
||||||
"title": "Playback Speed",
|
"title": "Playback Speed",
|
||||||
"apply_to": "Apply To",
|
"apply_to": "Apply To",
|
||||||
"speed": "Speed",
|
"speed": "Velocità",
|
||||||
"scope": {
|
"scope": {
|
||||||
"media": "This media only",
|
"media": "Solo questo media",
|
||||||
"show": "This show",
|
"show": "Questo show",
|
||||||
"all": "All media (default)"
|
"all": "Tutti i media (predefinito)"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"companion_login": {
|
"companion_login": {
|
||||||
"title": "Pair with TV",
|
"title": "Associa con la TV",
|
||||||
"align_qr": "Align the QR code within the frame",
|
"align_qr": "Allinea il QR code all'interno del riquadro",
|
||||||
"enter_code_manually": "Enter code manually",
|
"enter_code_manually": "Inserisci il codice manualmente",
|
||||||
"pairing_enter_credentials": "Enter credentials for TV",
|
"pairing_enter_credentials": "Inserire le credenziali per la TV",
|
||||||
"pairing_code_label": "Pairing code",
|
"pairing_code_label": "Codice di associazione",
|
||||||
"server": "Server",
|
"server": "Server",
|
||||||
"authorize_button": "Authorize",
|
"authorize_button": "Autorizza",
|
||||||
"authorizing": "Authorizing...",
|
"authorizing": "Autorizzando...",
|
||||||
"scan_again": "Scan Again",
|
"scan_again": "Scan Again",
|
||||||
"done": "Done",
|
"done": "Fatto",
|
||||||
"success_title": "Authorization Sent",
|
"success_title": "Authorization Sent",
|
||||||
"pairing_tv_connecting": "The TV is connecting to your account",
|
"pairing_tv_connecting": "La TV si sta collegando al tuo account",
|
||||||
"error_title": "Authorization Failed",
|
"error_title": "Authorization Failed",
|
||||||
"error_invalid_qr": "Invalid QR code. Please scan the TV pairing code.",
|
"error_invalid_qr": "QR code non valido. Scansiona il codice di associazione della TV.",
|
||||||
"error_generic": "Something went wrong. Please try again.",
|
"error_generic": "Si è verificato un errore. Riprova.",
|
||||||
"error_permission_denied": "Camera permission is required to scan QR codes.",
|
"error_permission_denied": "Per scansionare i codici QR è necessaria l'autorizzazione della fotocamera.",
|
||||||
"login_as": "Log in as {{username}}?",
|
"login_as": "Accedi come {{username}}?",
|
||||||
"on_server": "on {{server}}",
|
"on_server": "su {{server}}",
|
||||||
"use_different_user": "Use a different user",
|
"use_different_user": "Usa un altro utente",
|
||||||
"open_settings": "Open Settings"
|
"open_settings": "Apri le impostazioni"
|
||||||
},
|
},
|
||||||
"pairing": {
|
"pairing": {
|
||||||
"pair_with_phone": "Pair with Phone",
|
"pair_with_phone": "Pair with Phone",
|
||||||
"pair_with_phone_title": "Login TV",
|
"pair_with_phone_title": "Login TV",
|
||||||
"waiting_for_phone": "Waiting for phone...",
|
"waiting_for_phone": "In attesa del telefono...",
|
||||||
"scan_with_phone": "Scan with the Streamyfin app on your phone",
|
"scan_with_phone": "Scansiona con l'applicazione Streamyfin sul tuo telefono",
|
||||||
"logging_in": "Logging in...",
|
"logging_in": "Accesso in corso...",
|
||||||
"logging_in_description": "Connecting to your server"
|
"logging_in_description": "Sto connettendo al server"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "選択",
|
|
||||||
"no_trailer_available": "トレーラーがありません",
|
"no_trailer_available": "トレーラーがありません",
|
||||||
"video": "映像",
|
"video": "映像",
|
||||||
"audio": "音声",
|
"audio": "音声",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Selecteren",
|
|
||||||
"no_trailer_available": "Geen trailer beschikbaar",
|
"no_trailer_available": "Geen trailer beschikbaar",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Velg",
|
|
||||||
"no_trailer_available": "Ingen trailer tilgjengelig",
|
"no_trailer_available": "Ingen trailer tilgjengelig",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Lyd",
|
"audio": "Lyd",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Wybierz",
|
|
||||||
"no_trailer_available": "Brak dostępnego zwiastunu",
|
"no_trailer_available": "Brak dostępnego zwiastunu",
|
||||||
"video": "Wideo",
|
"video": "Wideo",
|
||||||
"audio": "Dźwięk",
|
"audio": "Dźwięk",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Selecionar",
|
|
||||||
"no_trailer_available": "Nenhum trailer disponível",
|
"no_trailer_available": "Nenhum trailer disponível",
|
||||||
"video": "Vídeo",
|
"video": "Vídeo",
|
||||||
"audio": "Áudio",
|
"audio": "Áudio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Selectare",
|
|
||||||
"no_trailer_available": "Nicio remorcă disponibilă",
|
"no_trailer_available": "Nicio remorcă disponibilă",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Выбрать",
|
|
||||||
"no_trailer_available": "Трейлер недоступен",
|
"no_trailer_available": "Трейлер недоступен",
|
||||||
"video": "Видео",
|
"video": "Видео",
|
||||||
"audio": "Звук",
|
"audio": "Звук",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "Inga resultat",
|
"no_results": "Inga resultat",
|
||||||
"select": "Välj",
|
|
||||||
"no_trailer_available": "Ingen trailer tillgänglig",
|
"no_trailer_available": "Ingen trailer tillgänglig",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Ljud",
|
"audio": "Ljud",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Använder Jellyfin-server",
|
"using_jellyfin_server": "Använder Jellyfin-server",
|
||||||
"language": "Språk",
|
"language": "Språk",
|
||||||
"results": "Resultat",
|
"results": "Resultat",
|
||||||
"searching": "Söker...",
|
|
||||||
"search_failed": "Sökningen misslyckades",
|
"search_failed": "Sökningen misslyckades",
|
||||||
"no_subtitle_provider": "Ingen undertextleverantör konfigurerad på servern",
|
"no_subtitle_provider": "Ingen undertextleverantör konfigurerad på servern",
|
||||||
"no_subtitles_found": "Inga undertexter hittades",
|
"no_subtitles_found": "Inga undertexter hittades",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "mu'tlhegh",
|
"video": "mu'tlhegh",
|
||||||
"audio": "QoQ",
|
"audio": "QoQ",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Seç",
|
|
||||||
"no_trailer_available": "Fragman mevcut değil",
|
"no_trailer_available": "Fragman mevcut değil",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Ses",
|
"audio": "Ses",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Audio",
|
"audio": "Audio",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
@@ -484,7 +484,6 @@
|
|||||||
},
|
},
|
||||||
"common": {
|
"common": {
|
||||||
"no_results": "No Results",
|
"no_results": "No Results",
|
||||||
"select": "Select",
|
|
||||||
"no_trailer_available": "No trailer available",
|
"no_trailer_available": "No trailer available",
|
||||||
"video": "Video",
|
"video": "Video",
|
||||||
"audio": "Âm thanh",
|
"audio": "Âm thanh",
|
||||||
@@ -621,7 +620,6 @@
|
|||||||
"using_jellyfin_server": "Using Jellyfin Server",
|
"using_jellyfin_server": "Using Jellyfin Server",
|
||||||
"language": "Language",
|
"language": "Language",
|
||||||
"results": "Results",
|
"results": "Results",
|
||||||
"searching": "Searching...",
|
|
||||||
"search_failed": "Search failed",
|
"search_failed": "Search failed",
|
||||||
"no_subtitle_provider": "No subtitle provider configured on server",
|
"no_subtitle_provider": "No subtitle provider configured on server",
|
||||||
"no_subtitles_found": "No subtitles found",
|
"no_subtitles_found": "No subtitles found",
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user