mirror of
https://github.com/streamyfin/streamyfin.git
synced 2026-07-06 04:22:51 +01:00
Compare commits
3 Commits
ci/paralle
...
fix/subtit
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d9677cbece | ||
|
|
97ef9b5ee7 | ||
|
|
d6980cfc8e |
376
.github/workflows/build-apps.yml
vendored
376
.github/workflows/build-apps.yml
vendored
@@ -30,66 +30,64 @@ 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:
|
||||||
- parallel:
|
- name: 🗑️ Free Disk Space
|
||||||
- name: 🗑️ Free Disk Space
|
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
||||||
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
with:
|
||||||
with:
|
tool-cache: false
|
||||||
tool-cache: false
|
mandb: true
|
||||||
mandb: true
|
android: false
|
||||||
android: false
|
dotnet: true
|
||||||
dotnet: true
|
haskell: true
|
||||||
haskell: true
|
large-packages: false
|
||||||
large-packages: false
|
docker-images: true
|
||||||
docker-images: true
|
swap-storage: false
|
||||||
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: ☕ Set up JDK 17
|
- name: 💾 Cache Bun dependencies
|
||||||
# ubuntu-26.04 defaults to JDK 25, which breaks the RN/AGP native build
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
# (Kotlin falls back to JVM_23, the foojay toolchain + CMake configure
|
with:
|
||||||
# fail). Pin Temurin 17 for a deterministic Android build.
|
path: ~/.bun/install/cache
|
||||||
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
with:
|
restore-keys: |
|
||||||
distribution: temurin
|
${{ runner.os }}-${{ runner.arch }}-bun-
|
||||||
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@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: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild
|
run: bun run prebuild
|
||||||
|
|
||||||
@@ -132,66 +130,64 @@ 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:
|
||||||
- parallel:
|
- name: 🗑️ Free Disk Space
|
||||||
- name: 🗑️ Free Disk Space
|
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
||||||
uses: BRAINSia/free-disk-space@7048ffbf50819342ac964ef3998a51c2564a8a75 # v2.1.3
|
with:
|
||||||
with:
|
tool-cache: false
|
||||||
tool-cache: false
|
mandb: true
|
||||||
mandb: true
|
android: false
|
||||||
android: false
|
dotnet: true
|
||||||
dotnet: true
|
haskell: true
|
||||||
haskell: true
|
large-packages: false
|
||||||
large-packages: false
|
docker-images: true
|
||||||
docker-images: true
|
swap-storage: false
|
||||||
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: ☕ Set up JDK 17
|
- name: 💾 Cache Bun dependencies
|
||||||
# ubuntu-26.04 defaults to JDK 25, which breaks the RN/AGP native build
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
# (Kotlin falls back to JVM_23, the foojay toolchain + CMake configure
|
with:
|
||||||
# fail). Pin Temurin 17 for a deterministic Android build.
|
path: ~/.bun/install/cache
|
||||||
uses: actions/setup-java@ad2b38190b15e4d6bdf0c97fb4fca8412226d287 # v5.3.0
|
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
||||||
with:
|
restore-keys: |
|
||||||
distribution: temurin
|
${{ runner.os }}-${{ runner.arch }}-bun-
|
||||||
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@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: 🛠️ Generate project files
|
- name: 🛠️ Generate project files
|
||||||
run: bun run prebuild:tv
|
run: bun run prebuild:tv
|
||||||
|
|
||||||
@@ -233,33 +229,19 @@ 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:
|
||||||
- parallel:
|
- 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: 🔧 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: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
@@ -277,6 +259,19 @@ 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
|
||||||
@@ -306,26 +301,19 @@ 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:
|
||||||
- parallel:
|
- 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: 🔧 Setup Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
|
||||||
with:
|
|
||||||
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
|
||||||
xcode-version: "26.5"
|
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
@@ -343,6 +331,12 @@ 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
|
||||||
@@ -374,33 +368,19 @@ 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:
|
||||||
- parallel:
|
- 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: 🔧 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: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
@@ -418,6 +398,19 @@ 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
|
||||||
@@ -445,26 +438,19 @@ 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:
|
||||||
- parallel:
|
- 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: 🔧 Setup Xcode
|
|
||||||
uses: maxim-lobanov/setup-xcode@ed7a3b1fda3918c0306d1b724322adc0b8cc0a90 # v1
|
|
||||||
with:
|
|
||||||
# renovate: datasource=custom.xcode depName=xcode versioning=loose
|
|
||||||
xcode-version: "26.5"
|
|
||||||
|
|
||||||
- name: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
@@ -482,6 +468,12 @@ 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
|
||||||
|
|||||||
24
.github/workflows/check-lockfile.yml
vendored
24
.github/workflows/check-lockfile.yml
vendored
@@ -18,19 +18,19 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- parallel:
|
- name: 📥 Checkout repository
|
||||||
- name: 📥 Checkout repository
|
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 }}
|
show-progress: false
|
||||||
show-progress: false
|
submodules: recursive
|
||||||
submodules: recursive
|
fetch-depth: 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: 💾 Cache Bun dependencies
|
- name: 💾 Cache Bun dependencies
|
||||||
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
|
|||||||
15
.github/workflows/detect-duplicate.yml
vendored
15
.github/workflows/detect-duplicate.yml
vendored
@@ -20,15 +20,14 @@ jobs:
|
|||||||
issues: write
|
issues: write
|
||||||
contents: read
|
contents: read
|
||||||
steps:
|
steps:
|
||||||
- parallel:
|
- name: 📥 Checkout repository
|
||||||
- name: 📥 Checkout repository
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
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.ts
|
run: bun scripts/detect-duplicate-issue.ts
|
||||||
|
|||||||
104
.github/workflows/linting.yml
vendored
104
.github/workflows/linting.yml
vendored
@@ -2,7 +2,7 @@ name: 🚦 Security & Quality Gate
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, synchronize, reopened]
|
types: [opened, edited, synchronize, reopened]
|
||||||
branches: [develop, master]
|
branches: [develop, master]
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
push:
|
push:
|
||||||
@@ -11,11 +11,39 @@ 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
|
||||||
@@ -39,26 +67,18 @@ jobs:
|
|||||||
name: 🚑 Expo Doctor Check
|
name: 🚑 Expo Doctor Check
|
||||||
runs-on: ubuntu-26.04
|
runs-on: ubuntu-26.04
|
||||||
steps:
|
steps:
|
||||||
- parallel:
|
- name: 🛒 Checkout repository
|
||||||
- name: 🛒 Checkout repository
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: 🍞 Setup Bun
|
|
||||||
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:
|
||||||
path: ~/.bun/install/cache
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
submodules: recursive
|
||||||
restore-keys: |
|
fetch-depth: 0
|
||||||
${{ runner.os }}-${{ runner.arch }}-bun-
|
|
||||||
|
- name: 🍞 Setup Bun
|
||||||
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
|
with:
|
||||||
|
# renovate: datasource=npm depName=bun
|
||||||
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: 📦 Install dependencies (bun)
|
- name: 📦 Install dependencies (bun)
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
@@ -83,26 +103,24 @@ jobs:
|
|||||||
- "i18n:check"
|
- "i18n:check"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- parallel:
|
- name: "📥 Checkout PR code"
|
||||||
- name: "📥 Checkout PR code"
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
||||||
with:
|
|
||||||
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
|
||||||
submodules: recursive
|
|
||||||
|
|
||||||
- name: "🍞 Setup Bun"
|
|
||||||
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:
|
||||||
path: ~/.bun/install/cache
|
ref: ${{ github.event.pull_request.head.sha || github.sha }}
|
||||||
key: ${{ runner.os }}-${{ runner.arch }}-bun-${{ hashFiles('bun.lock') }}
|
submodules: recursive
|
||||||
restore-keys: |
|
fetch-depth: 0
|
||||||
${{ runner.os }}-${{ runner.arch }}-bun-
|
|
||||||
|
- name: "🟢 Setup Node.js"
|
||||||
|
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
|
||||||
|
with:
|
||||||
|
# renovate: datasource=node-version depName=node versioning=node
|
||||||
|
node-version: "24.18.0"
|
||||||
|
|
||||||
|
- name: "🍞 Setup Bun"
|
||||||
|
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
|
||||||
|
with:
|
||||||
|
# renovate: datasource=npm depName=bun
|
||||||
|
bun-version: "1.3.14"
|
||||||
|
|
||||||
- name: "📦 Install dependencies"
|
- name: "📦 Install dependencies"
|
||||||
run: bun install --frozen-lockfile
|
run: bun install --frozen-lockfile
|
||||||
|
|||||||
45
.github/workflows/pr-title.yml
vendored
45
.github/workflows/pr-title.yml
vendored
@@ -1,45 +0,0 @@
|
|||||||
name: 📝 PR Title
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
types: [opened, edited, synchronize, reopened]
|
|
||||||
branches: [develop, master]
|
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{ github.workflow }}-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
validate_pr_title:
|
|
||||||
name: "📝 Validate PR Title"
|
|
||||||
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
|
|
||||||
39
.github/workflows/release.yml
vendored
39
.github/workflows/release.yml
vendored
@@ -13,8 +13,6 @@ 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:
|
||||||
@@ -65,26 +63,18 @@ jobs:
|
|||||||
artifact_name: streamyfin-android-tv-apk
|
artifact_name: streamyfin-android-tv-apk
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- parallel:
|
- name: 📥 Checkout code
|
||||||
- name: 📥 Checkout code
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
with:
|
||||||
with:
|
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: 🏗️ 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@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
uses: actions/cache@2c8a9bd7457de244a408f35966fab2fb45fda9c8 # v6.0.0
|
||||||
@@ -99,6 +89,13 @@ 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,20 +25,19 @@ jobs:
|
|||||||
contents: write
|
contents: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- parallel:
|
- name: 📥 Checkout repository
|
||||||
- name: 📥 Checkout repository
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
||||||
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
with:
|
||||||
with:
|
# On `release` events GITHUB_SHA is the tagged commit — without this the
|
||||||
# On `release` events GITHUB_SHA is the tagged commit — without this the
|
# script would regenerate the form from the tag's (stale) copy and the bot
|
||||||
# script would regenerate the form from the tag's (stale) copy and the bot
|
# PR would revert any form edits made on develop since that release.
|
||||||
# PR would revert any form edits made on develop since that release.
|
ref: develop
|
||||||
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
|
||||||
|
|||||||
@@ -12,16 +12,11 @@ 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 {
|
import { useLocalSearchParams, useNavigation } from "expo-router";
|
||||||
useFocusEffect,
|
|
||||||
useLocalSearchParams,
|
|
||||||
useNavigation,
|
|
||||||
} from "expo-router";
|
|
||||||
import { useAtom } from "jotai";
|
import { useAtom } from "jotai";
|
||||||
import React, { useCallback, useEffect, useMemo, useRef } from "react";
|
import React, { useCallback, useEffect, useMemo } from "react";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import {
|
import {
|
||||||
BackHandler,
|
|
||||||
FlatList,
|
FlatList,
|
||||||
Platform,
|
Platform,
|
||||||
ScrollView,
|
ScrollView,
|
||||||
@@ -85,9 +80,8 @@ const Page = () => {
|
|||||||
sortBy?: string;
|
sortBy?: string;
|
||||||
sortOrder?: string;
|
sortOrder?: string;
|
||||||
filterBy?: string;
|
filterBy?: string;
|
||||||
fromSeeAll?: string;
|
|
||||||
};
|
};
|
||||||
const { libraryId, fromSeeAll } = searchParams;
|
const { libraryId } = searchParams;
|
||||||
|
|
||||||
const typography = useScaledTVTypography();
|
const typography = useScaledTVTypography();
|
||||||
const posterSizes = useScaledTVPosterSizes();
|
const posterSizes = useScaledTVPosterSizes();
|
||||||
@@ -118,22 +112,6 @@ 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
|
||||||
@@ -291,23 +269,6 @@ 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,
|
||||||
|
|||||||
@@ -201,18 +201,12 @@ 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: "/[libraryId]",
|
pathname: "/(auth)/(tabs)/(libraries)/[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]);
|
||||||
@@ -354,14 +348,11 @@ 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 && (
|
||||||
|
|||||||
@@ -44,9 +44,22 @@ export const isSubtitleInMpv = (
|
|||||||
/**
|
/**
|
||||||
* Calculate the MPV track ID for a given Jellyfin subtitle index.
|
* Calculate the MPV track ID for a given Jellyfin subtitle index.
|
||||||
*
|
*
|
||||||
* MPV track IDs are 1-based and only count subtitles that are actually in MPV.
|
* MPV track IDs are 1-based, but MPV's track list is NOT in MediaStreams order:
|
||||||
* We iterate through all subtitles, counting only those in MPV, until we find
|
* 1. Embedded/HLS subs are enumerated from the container (or HLS playlist)
|
||||||
* the one matching the Jellyfin index.
|
* first, in MediaStreams order.
|
||||||
|
* 2. External subs are appended via `sub-add` AFTER the file loads, in the
|
||||||
|
* order they are passed to MPV (here, also MediaStreams order — see
|
||||||
|
* direct-player.tsx where the externalSubtitles array is built by
|
||||||
|
* filtering MediaStreams).
|
||||||
|
*
|
||||||
|
* Iterating in pure MediaStreams order produces the wrong MPV ID whenever an
|
||||||
|
* External sub is listed before an Embed sub in MediaStreams (common when
|
||||||
|
* Jellyfin prepends a converted SRT/VTT ahead of an original PGS/ASS track),
|
||||||
|
* causing e.g. English to select Spanish. We therefore count in two phases
|
||||||
|
* that mirror MPV's actual ordering.
|
||||||
|
*
|
||||||
|
* Image-based subs (PGS/VOBSUB) during transcoding are burned into the video
|
||||||
|
* and absent from MPV's track list; they are skipped in both phases.
|
||||||
*
|
*
|
||||||
* @param mediaSource - The media source containing subtitle streams
|
* @param mediaSource - The media source containing subtitle streams
|
||||||
* @param jellyfinSubtitleIndex - The Jellyfin server-side subtitle index (-1 = disabled)
|
* @param jellyfinSubtitleIndex - The Jellyfin server-side subtitle index (-1 = disabled)
|
||||||
@@ -74,14 +87,30 @@ export const getMpvSubtitleId = (
|
|||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Count MPV track position (1-based)
|
const isExternal = (sub: MediaStream) =>
|
||||||
|
sub.DeliveryMethod === SubtitleDeliveryMethod.External;
|
||||||
|
|
||||||
let mpvIndex = 0;
|
let mpvIndex = 0;
|
||||||
|
|
||||||
|
// Phase 1: embedded / HLS subs — these occupy MPV track IDs first because
|
||||||
|
// they come from the container or HLS playlist.
|
||||||
for (const sub of allSubs) {
|
for (const sub of allSubs) {
|
||||||
if (isSubtitleInMpv(sub, isTranscoding)) {
|
if (isExternal(sub)) continue;
|
||||||
mpvIndex++;
|
if (!isSubtitleInMpv(sub, isTranscoding)) continue;
|
||||||
if (sub.Index === jellyfinSubtitleIndex) {
|
mpvIndex++;
|
||||||
return mpvIndex;
|
if (sub.Index === jellyfinSubtitleIndex) {
|
||||||
}
|
return mpvIndex;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Phase 2: external subs — appended via `sub-add` after the file loads,
|
||||||
|
// so they come last in MPV's track list.
|
||||||
|
for (const sub of allSubs) {
|
||||||
|
if (!isExternal(sub)) continue;
|
||||||
|
if (!isSubtitleInMpv(sub, isTranscoding)) continue;
|
||||||
|
mpvIndex++;
|
||||||
|
if (sub.Index === jellyfinSubtitleIndex) {
|
||||||
|
return mpvIndex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user