Skip to content

Bound handoff body reads, separate manifests, split worker - #45

Merged
Linuxuser67 merged 1 commit into
mainfrom
fix/review-stalled-body-and-manifests
Oct 27, 2026
Merged

Linuxuser67 merged 1 commit into
mainfrom
fix/review-stalled-body-and-manifests

Conversation

@Linuxuser67

Copy link
Copy Markdown
Owner

Address the v1.6.3 review's required items:

- verifyGrab/grabStatus now read the JSON body under the same
  AbortController deadline as the fetch, so a listener that sends
  headers and stalls the body can no longer hold pairing verification
  (and the download's deciding guard) open. A malformed/stalled body
  is unverified; an unreachable port is still down.
- mergeVideoFinds keys each manifest by its own path. Two same-protocol
  manifests in one directory no longer collapse into one menu entry.
  A folder with exactly one HLS and one DASH manifest still pairs them
  as protocol alternates, and direct renditions attach only when the
  folder holds a single family.
- Split background.js into handoff.js (pairing, cookies, handoff,
  explicit sends, status), intercept.js (download interception), and
  video-menu.js (detection, menu, tab listeners). background.js keeps
  the shared helpers and runtime dispatcher. Chrome loads siblings via
  importScripts; Firefox lists them before background.js.

Nits: remove the unreachable "unpaired" options branch, drop the
duplicate pairing-code regex check, return the fitted cookie count
instead of re-parsing the body, and move the test-only handOff helper
into the test loader. Add tests for a stalled body, same-directory
manifests, query-string variants, and multi-family direct renditions.
@Linuxuser67
Linuxuser67 merged commit 2fe5609 into main Oct 27, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant