From dcf08f30bc08354812abfee42c129a4ba67863a6 Mon Sep 17 00:00:00 2001 From: Duncan Tourolle Date: Tue, 23 Jun 2026 21:12:01 +0000 Subject: [PATCH] fix: Autoplay now resets time to zero and ignores trigger if episode already started (#3) Reviewed-on: https://gitea.tourolle.paris/dtourolle/jellytau/pulls/3 Co-authored-by: Duncan Tourolle Co-committed-by: Duncan Tourolle --- .gitea/workflows/traceability-check.yml | 22 ++++++--- src/lib/components/player/VideoPlayer.svelte | 28 +++++++---- src/lib/services/nextEpisodeService.ts | 6 ++- src/routes/player/[id]/+page.svelte | 51 ++++++++++++++------ 4 files changed, 74 insertions(+), 33 deletions(-) diff --git a/.gitea/workflows/traceability-check.yml b/.gitea/workflows/traceability-check.yml index 9cc8099..56172f9 100644 --- a/.gitea/workflows/traceability-check.yml +++ b/.gitea/workflows/traceability-check.yml @@ -95,20 +95,28 @@ jobs: echo "" # Check each file - MISSING_TRACES=0 - while IFS= read -r file; do + # Pipe into the loop instead of a here-string (<<<) so this step works + # under POSIX sh/dash, not just bash. Use `case` instead of `[[ == ]]` + # for the same reason. The loop runs in a subshell (so a counter var + # wouldn't survive), so we record warnings in a temp file and count it + # afterwards. + MISSING_FILE=$(mktemp) + echo "$CHANGED" | while IFS= read -r file; do # Skip test files - if [[ "$file" == *".test."* ]]; then - continue - fi + case "$file" in + *.test.*) continue ;; + esac if [ -f "$file" ]; then if ! grep -q "TRACES:" "$file"; then echo "⚠️ Missing TRACES: $file" - MISSING_TRACES=$((MISSING_TRACES + 1)) + echo "$file" >> "$MISSING_FILE" fi fi - done <<< "$CHANGED" + done + + MISSING_TRACES=$(wc -l < "$MISSING_FILE" | tr -d ' ') + rm -f "$MISSING_FILE" if [ "$MISSING_TRACES" -gt 0 ]; then echo "" diff --git a/src/lib/components/player/VideoPlayer.svelte b/src/lib/components/player/VideoPlayer.svelte index 905f3a5..7612970 100644 --- a/src/lib/components/player/VideoPlayer.svelte +++ b/src/lib/components/player/VideoPlayer.svelte @@ -1,6 +1,6 @@