Closes#1312Fixes#883
Adds a unified segment skip feature using the Jellyfin 10.11+
MediaSegments API. Replaces the legacy intro-only and credits-only
hooks with a single useSegmentSkipper hook covering Intro, Outro,
Recap, Commercial, and Preview.
Three modes per segment type: none, ask (show button), auto (skip
automatically). A dedicated submenu under Playback Controls keeps
the main settings page uncluttered.
Highlights:
- utils/segments.ts uses getMediaSegmentsApi from @jellyfin/sdk so
includeSegmentTypes is serialized as repeated keys instead of the
bracket-encoded form axios produces by default (the Jellyfin
server silently ignored the filter otherwise). Falls back to the
pre-10.11 intro-skipper / chapter-credits plugin endpoints when
the new API is unavailable.
- hooks/useSegmentSkipper.ts stores seek and haptic in refs so the
auto-skip effect does not re-run when their identities change
(useHaptic returns a fresh no-op every render when disabled).
currentSegment is memoized; the per-segment-type setting lookup
uses a small map instead of a switch IIFE.
- components/video-player/controls/Controls.tsx prioritizes
Commercial > Recap > Intro > Preview > Outro when multiple
segments overlap and exposes the active type to BottomControls
via skipButtonText.
- components/video-player/controls/BottomControls.tsx accepts the
dynamic skipButtonText/skipCreditButtonText props.
- providers/Downloads/types.ts extends DownloadedItem with the
three new segment buckets for offline playback.
- utils/atoms/settings.ts adds SegmentSkipMode and the five skip
settings, defaulting to "ask".
- app/(auth)/(tabs)/(home)/settings/segment-skip/page.tsx renders
the five dropdowns from a data table.
- translations/en.json and translations/fr.json add the new keys.
Carry the live subtitle/audio selection to the next episode on all TV
navigation paths (next/prev buttons, autoplay) and feed TV subtitle modal
selections back into player state via onSubtitleIndexChange so the chosen
track is what gets carried.
Rank subtitles by language plus forced/hearing-impaired mode, with a
no-language fallback (mode + codec + position), and use an explicit match
flag so a deliberate "off" selection is retained too.
Fixed a race condition where the upnext countdown started and a user
cancelled/stop the current playback that they would exit the player but
the timer would still be running and then start playing the next episode
and you wouldn't be able to press back or exit out of it
Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>
Added the ability to swap VO options for android only between "GPU" and
"GPU-next"
Removed some console logs from previous debugging
Added the ability to see what VO is being used to render in the video
player
Signed-off-by: Lance Chant <13349722+lancechant@users.noreply.github.com>