Commit Graph

4 Commits

Author SHA1 Message Date
Uruk
0990e479d2 fix(segments): backport segment-skip fixes from chromecast refactor
Reconcile segment-skip with the diverged-but-ahead version on the
chromecast refactor branch:
- useSegmentSkipper: track auto-skip by segment identity instead of a
  bool, so it no longer re-triggers on pause/unpause; guard skipMode
  "none"; use a finite totalDuration check for Outro.
- Controls: playingRef avoids a stale-closure resume after a seek; only
  resume playback if it was actually playing; skipCredit noop fallback.
- segments: drop the dead try/catch around Promise.allSettled.
- Remove the obsolete useIntroSkipper / useCreditSkipper hooks (177 dead
  lines, superseded by useSegmentSkipper).
2026-05-22 01:47:41 +02:00
Uruk
fe315699b9 fix: update dependencies in skipSegment callback for accurate state tracking 2026-01-14 20:15:11 +01:00
Uruk
be575b7c04 refactor: address GitHub Copilot review comments
- Remove unnecessary currentSegment from skipSegment dependency array
- Remove redundant wrappedSeek wrapper (ref guard prevents issues)
- Document 200ms setTimeout delay for seek operations
- Improve code clarity and reduce unnecessary re-renders
2026-01-14 14:07:14 +01:00
Uruk
62f50590d4 feat: add comprehensive segment skip with all 5 types and settings submenu
- Add SegmentSkipMode type ('none', 'ask', 'auto') in settings.ts
- Create 5 segment skip settings: skipIntro, skipOutro, skipRecap, skipCommercial, skipPreview
- Update segments.ts to fetch all 5 segment types from Jellyfin MediaSegments API (10.11+)
- Create unified useSegmentSkipper hook supporting all segment types with 3 modes
- Update video player Controls.tsx with priority system (Commercial > Recap > Intro > Preview > Outro)
- Add dynamic skip button text in BottomControls.tsx
- Create dedicated settings submenu at settings/segment-skip/page.tsx
- Simplify PlaybackControlsSettings.tsx with navigation to submenu
- Extend DownloadedItem interface with all segment types for offline support
- Add 13+ translation keys for segment skip UI
2026-01-14 13:53:06 +01:00