diff --git a/README.md b/README.md index ce397dc..0338cfc 100644 --- a/README.md +++ b/README.md @@ -116,6 +116,22 @@ its token expires, but a reconnect needs a fresh one. Browser streaming without OBS: the live portal's **Go Live** (Windows Chrome 141+ for window audio + GPU encode). +## 5a. Onboarding a gamer's clips (Syncthing) + +Server side (once per person; name = their Authentik/Discord username, lowercase): + + ./addClipUser.sh # creates /srv/media/clips/ with the video-only .stignore + +Their side (Windows: Syncthing installer or SyncTrayzor; Mac/Linux: Syncthing): open the UI, **Actions → Show ID**, +send you the Device ID. In their UI: **Add Remote Device** with the server's ID (ours: `/sync/` → Actions → Show ID), +then **Add Folder** on their clip directory (ShadowPlay/Medal/Steam saves), Sharing tab → tick the server, +Folder Type **Send Only**, Save. + +Our side at https://HOST/sync/: **Add Remote Device** → paste their ID, name it after them, Save. When their folder +offer pops up: **Add** → Folder Path `/var/syncthing/clips/`, Folder Type **Receive Only**, Advanced → +Minimum Free Disk Space **300 GB**, Save. Clips start arriving; the sweep normalizes them; Jellyfin shows the +folder as that person's show. Their own folder structure is mirrored; only video files are pulled. + ## 5b. Syncthing hardening (do once, in the server's Syncthing UI) Syncthing receives straight into `clips/` (Syncthing UI path `/var/syncthing/clips/`), diff --git a/addClipUser.sh b/addClipUser.sh new file mode 100755 index 0000000..6b7aa2b --- /dev/null +++ b/addClipUser.sh @@ -0,0 +1,10 @@ +#!/bin/bash +# Create the server-side clips folder for a Syncthing gamer. Name = their Authentik/Discord username (lowercase), +# because the Jellyfin plugin treats the folder as the show and looks the person up by that name. +set -euo pipefail +cd "$(dirname "$0")" +u="${1:-}"; [[ $u =~ ^[a-z0-9_.-]{2,32}$ ]] || { echo "usage: $0 (lowercase letters, digits, _ . -)"; exit 1; } +sudo install -d -o 1000 -g 1000 "/srv/media/clips/$u" +sudo install -m 0644 -o 1000 -g 1000 syncthing/stignore "/srv/media/clips/$u/.stignore" +echo "ready: /srv/media/clips/$u (Syncthing path: /var/syncthing/clips/$u)" +echo "next: pair their device in https://$(grep -E '^# vanguard:main' -A1 Caddyfile 2>/dev/null | tail -1 | awk '{print $1}')/sync/ and accept their folder at that path, Receive Only, min free 300 GB" diff --git a/check.sh b/check.sh index 351561b..077ad53 100755 --- a/check.sh +++ b/check.sh @@ -5,7 +5,7 @@ cd "$(dirname "$0")" fail=0 say() { printf '%-28s %s\n' "$1" "$2"; } -for f in install.sh addCommunityMediaServer.sh installJellyfinPlugin.sh registerGiteaRunner.sh createGiteaDb.sh deployLive.sh firewall/firewall.sh bin/*.sh home/*.sh bot/entrypoint.sh mariadb/init/*.sh; do +for f in install.sh addCommunityMediaServer.sh installJellyfinPlugin.sh registerGiteaRunner.sh createGiteaDb.sh deployLive.sh addClipUser.sh firewall/firewall.sh bin/*.sh home/*.sh bot/entrypoint.sh mariadb/init/*.sh; do [[ -f $f ]] || continue bash -n "$f" && say "$f" ok || { say "$f" "BASH SYNTAX"; fail=1; } done