straw/buildSrc
Kayos 964bcddb3a vc=48: autoplay (off / same-channel / yt-related) + SB for queued items
Two requested features in one ship.

Autoplay:
  * Settings → Autoplay section. Three modes: Off, Same channel,
    YouTube related. Default Same channel — per Cobb 2026-05-26,
    "plays next account's video".
  * Skip-already-watched toggle, default on. Autoplay picks the
    first un-watched candidate (filters History.watches by videoId).
  * When STATE_ENDED fires and the queue has no next item,
    PlaybackService's autoplay handler picks a candidate per mode,
    resolves it via strawcore, and enqueues — which auto-starts
    because the queue is empty (enqueueLast routes through
    setPlayingFrom in that case).
  * SameChannel calls strawcore.channelInfo(uploaderUrl).take(1).
    Plumbed NowPlayingItem.uploaderUrl + setPlayingFrom/enqueueLast
    sig to carry it forward so the autoplay handler has what it
    needs without re-resolving.
  * YtRelated re-resolves the current streamInfo and picks
    info.related[0]. strawcore returns empty for related today, so
    YtRelated falls open to no-op until that extractor work lands —
    documented in the AutoplayMode enum help text.

SponsorBlock for queued items:
  * The vc=47 known-limitation. Now: when onMediaItemTransition
    surfaces a queued item with empty SB segments, fire a
    background fetch of SB for that video, then NowPlaying.claim()
    again with the freshened segments. The skip-loop (reactive on
    NowPlaying.current.segments) picks them up.
  * Fetch lives in StrawApp.globalScope — outlives the controller
    transition + sheet UI.

Refactor:
  * StrawMediaController extensions retyped from MediaController →
    Player so PlaybackService can call them on the ExoPlayer
    directly. MediaController IS a Player so all existing UI call
    sites continue to work.
  * Shared extractYtVideoId util in feature/detail/StreamResolution.kt.
    The duplicate VIDEO_ID_RE in StrawHome.kt will fold into it next
    time that file is touched.
2026-05-26 07:04:35 -07:00
..
src/main/kotlin vc=48: autoplay (off / same-channel / yt-related) + SB for queued items 2026-05-26 07:04:35 -07:00
build.gradle.kts Relocate toml lint task to buildSrc and extend against default task 2025-11-21 20:08:26 +08:00