Compare commits

..

1 Commits

Author SHA1 Message Date
Gauvino
3d6f12ceb2 chore: git hygiene — enforce LF, drop dead .gitattributes/.gitignore rules
- .gitattributes: 'text=auto eol=lf' so files are stored and checked out as LF
  on every OS (no more CRLF churn on Windows, regardless of core.autocrlf);
  mark common binaries; keep .bat/.cmd as CRLF.
- Remove the stale Git LFS rule for modules/vlc-player (that module no longer
  exists and no LFS objects are tracked).
- .gitignore: stop ignoring bun.lock (it's committed and checked by the lockfile
  workflow), and replace the dead/duplicate per-module build paths (player,
  hls-downloader, sf-player, music-controls, duplicate mpv-player) with a single
  modules/*/android/build/ glob.
- Renormalise the one CRLF-stored file (crowdin.yml) to LF (EOL only).
2026-06-01 17:22:45 +02:00
7 changed files with 172 additions and 133 deletions

29
.gitattributes vendored
View File

@@ -1 +1,28 @@
.modules/vlc-player/Frameworks/*.xcframework filter=lfs diff=lfs merge=lfs -text # Normalise line endings to LF for everyone. Files are stored as LF in git and
# checked out as LF on every OS, so Windows clones stop producing CRLF churn
# (no more "LF will be replaced by CRLF" warnings) regardless of core.autocrlf.
* text=auto eol=lf
# Windows-only scripts must stay CRLF
*.bat text eol=crlf
*.cmd text eol=crlf
# Binary assets — never touched / never normalised
*.png binary
*.jpg binary
*.jpeg binary
*.gif binary
*.webp binary
*.ico binary
*.icns binary
*.ttf binary
*.otf binary
*.woff binary
*.woff2 binary
*.mp3 binary
*.mp4 binary
*.mov binary
*.pdf binary
*.keystore binary
*.jks binary
*.p12 binary

View File

@@ -1,29 +1,24 @@
name: 🏷🔀Merge Conflict Labeler name: 🏷🔀Merge Conflict Labeler
on: on:
push: push:
branches: [develop] branches: [develop]
# SECURITY: pull_request_target runs with the base repo's write token and secrets. pull_request_target:
# This job only labels via the API and is safe ONLY because it never checks out or branches: [develop]
# runs the PR head's code. NEVER add `actions/checkout` of the PR head (or any `run:` types: [synchronize]
# that interpolates PR-controlled data) to this workflow — that would turn it into a
# full repo-compromise vector. jobs:
pull_request_target: label:
branches: [develop] name: 🏷️ Labeling Merge Conflicts
types: [synchronize] runs-on: ubuntu-24.04
if: ${{ github.repository == 'streamyfin/streamyfin' }}
jobs: permissions:
label: contents: read
name: 🏷️ Labeling Merge Conflicts pull-requests: write
runs-on: ubuntu-24.04 steps:
if: ${{ github.repository == 'streamyfin/streamyfin' }} - name: 🚩 Apply merge conflict label
permissions: uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
contents: read with:
pull-requests: write dirtyLabel: '⚔️ merge-conflict'
steps: commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'
- name: 🚩 Apply merge conflict label repoToken: '${{ secrets.GITHUB_TOKEN }}'
uses: eps1lon/actions-label-merge-conflict@1df065ebe6e3310545d4f4c4e862e43bdca146f0 # v3.0.3
with:
dirtyLabel: '⚔️ merge-conflict'
commentOnDirty: 'This pull request has merge conflicts. Please resolve the conflicts so the PR can be successfully reviewed and merged.'
repoToken: '${{ secrets.GITHUB_TOKEN }}'

View File

@@ -1,51 +1,51 @@
name: 🌐 Translation Sync name: 🌐 Translation Sync
on: on:
push: push:
branches: [develop] branches: [develop]
paths: paths:
- "translations/**" - "translations/**"
- "crowdin.yml" - "crowdin.yml"
- "i18n.ts" - "i18n.ts"
- ".github/workflows/crowdin.yml" - ".github/workflows/crowdin.yml"
# Run weekly to pull new translations # Run weekly to pull new translations
schedule: schedule:
- cron: "0 2 * * 1" # Every Monday at 2 AM UTC - cron: "0 2 * * 1" # Every Monday at 2 AM UTC
workflow_dispatch: workflow_dispatch:
permissions: permissions:
contents: write contents: write
pull-requests: write pull-requests: write
jobs: jobs:
sync-translations: sync-translations:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: 📥 Checkout Repository - name: 📥 Checkout Repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: 🌐 Sync Translations with Crowdin - name: 🌐 Sync Translations with Crowdin
uses: crowdin/github-action@8868a33591d21088edfc398968173a3b98d51706 # v2.16.2 uses: crowdin/github-action@8868a33591d21088edfc398968173a3b98d51706 # v2.16.2
with: with:
upload_sources: true upload_sources: true
upload_translations: true upload_translations: true
download_translations: true download_translations: true
localization_branch_name: I10n_crowdin_translations localization_branch_name: I10n_crowdin_translations
create_pull_request: true create_pull_request: true
pull_request_title: "feat: New Crowdin Translations" pull_request_title: "feat: New Crowdin Translations"
pull_request_body: "New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)" pull_request_body: "New Crowdin translations by [Crowdin GH Action](https://github.com/crowdin/github-action)"
pull_request_base_branch_name: "develop" pull_request_base_branch_name: "develop"
pull_request_labels: "🌐 translation" pull_request_labels: "🌐 translation"
# Quality control options # Quality control options
skip_untranslated_strings: false skip_untranslated_strings: false
skip_untranslated_files: false skip_untranslated_files: false
export_only_approved: false export_only_approved: false
# Commit customization # Commit customization
commit_message: "feat(i18n): update translations from Crowdin" commit_message: "feat(i18n): update translations from Crowdin"
env: env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}

11
.gitignore vendored
View File

@@ -1,6 +1,5 @@
# Dependencies and Package Managers # Dependencies and Package Managers
node_modules/ node_modules/
bun.lock
bun.lockb bun.lockb
package-lock.json package-lock.json
@@ -21,10 +20,8 @@ web-build/
# Gradle caches (top-level + per-module native projects) # Gradle caches (top-level + per-module native projects)
**/.gradle/ **/.gradle/
# Module-specific Builds # Native module build outputs (any module)
modules/mpv-player/android/build modules/*/android/build/
modules/player/android
modules/hls-downloader/android/build
# Generated Applications # Generated Applications
Streamyfin.app Streamyfin.app
@@ -69,10 +66,6 @@ certs/
# Version and Backup Files # Version and Backup Files
/version-backup-* /version-backup-*
/modules/sf-player/android/build
/modules/music-controls/android/build
modules/background-downloader/android/build/*
/modules/mpv-player/android/build
# ios:unsigned-build Artifacts # ios:unsigned-build Artifacts
build/ build/

View File

@@ -1254,7 +1254,7 @@ export const Controls: FC<Props> = ({
<Text <Text
style={[styles.endsAtText, { fontSize: typography.callout }]} style={[styles.endsAtText, { fontSize: typography.callout }]}
> >
{t("player.ends_at", { time: getFinishTime() })} {t("player.ends_at")} {getFinishTime()}
</Text> </Text>
</View> </View>
)} )}
@@ -1448,7 +1448,7 @@ export const Controls: FC<Props> = ({
<Text <Text
style={[styles.endsAtText, { fontSize: typography.callout }]} style={[styles.endsAtText, { fontSize: typography.callout }]}
> >
{t("player.ends_at", { time: getFinishTime() })} {t("player.ends_at")} {getFinishTime()}
</Text> </Text>
</View> </View>
)} )}

View File

@@ -1,22 +1,12 @@
#!/bin/bash #!/bin/bash
# Local helper: fast-forward master into develop and back. Aborts on any failure and [[ -z $(git status --porcelain) ]] &&
# restores the branch you started on. Not used in CI. git checkout master &&
set -euo pipefail git pull --ff-only &&
git checkout develop &&
if [[ -n $(git status --porcelain) ]]; then git merge master &&
echo "Error: working tree is not clean — commit or stash first." >&2 git push --follow-tags &&
exit 1 git checkout master &&
fi git merge develop --ff-only &&
git push &&
start_branch=$(git rev-parse --abbrev-ref HEAD) git checkout develop ||
trap 'git checkout "$start_branch" >/dev/null 2>&1 || true' EXIT (echo "Error: Failed to merge" && exit 1)
git checkout master
git pull --ff-only
git checkout develop
git merge master
git push --follow-tags
git checkout master
git merge develop --ff-only
git push
git checkout develop

View File

@@ -1,28 +1,62 @@
#!/usr/bin/env node #!/usr/bin/env node
// Symlinks the platform-specific native dirs to `ios` / `android` depending on EXPO_TV. const _fs = require("node:fs");
// Uses fs APIs (no shell) so there is no command-injection surface.
const fs = require("node:fs");
const path = require("node:path"); const path = require("node:path");
const process = require("node:process");
const { execSync } = require("node:child_process");
const root = process.cwd(); const root = process.cwd();
const isTV = process.env.EXPO_TV && process.env.EXPO_TV !== "0"; // 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 links = isTV const paths = new Map([
? { ios: path.join(root, "iostv"), android: path.join(root, "androidtv") } ["tvos", path.join(root, "iostv")],
: { ["ios", path.join(root, "iosmobile")],
ios: path.join(root, "iosmobile"), ["android", path.join(root, "androidmobile")],
android: path.join(root, "androidmobile"), ["androidtv", path.join(root, "androidtv")],
}; ]);
for (const [link, target] of Object.entries(links)) { // const platformPath = paths.get(platform);
fs.mkdirSync(target, { recursive: true });
try { if (isTV) {
fs.unlinkSync(link); // replace an existing symlink/file (ln -nsf) stdout = execSync(
} catch { `mkdir -p ${paths.get("tvos")}; ln -nsf ${paths.get("tvos")} ios`,
// nothing to remove );
} console.log(stdout.toString());
fs.symlinkSync(target, link); stdout = execSync(
console.log(`${link} -> ${target}`); `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;
// }