Wholphin/.github/workflows/pr.yml
Ray 494ff07b72
Fix smart & default subtitle selection logic (#579)
## Description
Fixes the logic for subtitle selection when using `Smart` or `Default`
server modes. Also takes into account unknown languages.

This is heavily inspired by [the server selection
logic](https://github.com/jellyfin/jellyfin/blob/release-10.11.z/Emby.Server.Implementations/Library/MediaStreamSelector.cs).
For better or for worse, Wholphin implements this client side.

### Related issues
Fixes #570
2025-12-27 14:22:40 -05:00

62 lines
1.6 KiB
YAML

name: PR
on:
pull_request:
defaults:
run:
shell: bash
env:
BUILD_DIRS_ARTIFACT: build-dirs
GRADLE_OPTS: "-Dorg.gradle.jvmargs='-Xmx4g -XX:MaxMetaspaceSize=512m'"
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
uses: actions/checkout@v5
with:
fetch-depth: 0 # Need the tags to build
- name: Setup Python
uses: actions/setup-python@v6
with:
python-version: '3.12'
- name: Run pre-commit
uses: pre-commit/action@v3.0.1
build:
runs-on: ubuntu-latest
needs: pre-commit
steps:
- name: Checkout the code
uses: actions/checkout@v5
with:
fetch-depth: 0 # Need the tags to build
- name: Setup
uses: ./.github/actions/setup
- name: Native build
uses: ./.github/actions/native-build
with:
cache: true
- name: Build app
id: buildapp
run: |
./gradlew clean assembleDebug testDebugUnitTest --no-daemon
apks=$(find app/build/outputs/apk -name '*.apk' -print0 | tr '\0' ',' | sed 's/,$//')
echo "apks=$apks" >> "$GITHUB_OUTPUT"
- name: Tar build dirs
run: |
tar -czf build.tgz ./app/.
- uses: actions/upload-artifact@v5
id: upload-build-dirs
with:
name: "${{ env.BUILD_DIRS_ARTIFACT }}"
path: build.tgz
if-no-files-found: error
- uses: actions/upload-artifact@v5
with:
name: APKs
path: "${{ steps.buildapp.outputs.apks }}"
compression-level: 0