fix: detect Videoland TV and phone builds by class and scope the Force HD toggle #115

Merged
midas merged 4 commits from review/videoland-builds into dev 2026-10-17 16:48:30 +02:00
Owner

Part of #105, fixes #87 and #88, and the Videoland points of #100.

  • #87: videoland/shared/VideolandBuild.kt tells phone (MobileReplayControl) and Android TV (SettingsFragment) builds apart by class, not by a version list; throws when neither exists. Hide ads uses the throwing .method for the pause-ad hook on phone builds and skips it only on TV. The TV Midas Settings patch skips cleanly (log line) on a phone build picked via the experimental target. Auto skip intro fails with a clear message on TV builds. videoland.md has a per-version phone/TV table (1.116.4: unknown, assumed phone).
  • #88: force_hd is only registered on TV builds; on phone builds Force HD is always on when applied, and the description says so (no more "54 Mbps"). PatchCategory KDoc fixed (Playback is a toggle category only); AGENTS.md/videoland.md corrected.
  • #100 (Videoland): the empty-response hook needs exactly one matching sget-object after the parse call; isSetVisibility requires android.view.View. The move-result insertions in Force HD and Log video assets stay plain addInstructions on purpose: a branch into the next instruction carries another value and must skip the hook (comment in the code).

Verified: build, unit tests; list-patches identical except Force HD's description; Applied identical to origin/dev on 1.115.2 (phone) and 1.116.3 (TV) with all patches enabled; with -f the TV settings patch skips on phone and Auto skip intro refuses TV. No device test.

🤖 Generated with Claude Code

Part of #105, fixes #87 and #88, and the Videoland points of #100. - #87: `videoland/shared/VideolandBuild.kt` tells phone (`MobileReplayControl`) and Android TV (`SettingsFragment`) builds apart by class, not by a version list; throws when neither exists. Hide ads uses the throwing `.method` for the pause-ad hook on phone builds and skips it only on TV. The TV Midas Settings patch skips cleanly (log line) on a phone build picked via the experimental target. Auto skip intro fails with a clear message on TV builds. `videoland.md` has a per-version phone/TV table (1.116.4: unknown, assumed phone). - #88: `force_hd` is only registered on TV builds; on phone builds Force HD is always on when applied, and the description says so (no more "54 Mbps"). `PatchCategory` KDoc fixed (Playback is a toggle category only); AGENTS.md/videoland.md corrected. - #100 (Videoland): the empty-response hook needs exactly one matching `sget-object` after the parse call; `isSetVisibility` requires `android.view.View`. The move-result insertions in Force HD and Log video assets stay plain `addInstructions` on purpose: a branch into the next instruction carries another value and must skip the hook (comment in the code). Verified: build, unit tests; `list-patches` identical except Force HD's description; Applied identical to origin/dev on 1.115.2 (phone) and 1.116.3 (TV) with all patches enabled; with `-f` the TV settings patch skips on phone and Auto skip intro refuses TV. No device test. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The patches now detect the build from marker classes (MobileReplayControl for
the phone, the TV SettingsFragment for Android TV) instead of from the declared
version list, so undeclared versions behave correctly.

- Hide ads: the pause-ad hook uses the throwing `method` on phone builds, so a
  broken fingerprint fails the patch; it is only skipped on TV builds.
- Midas Settings (TV): skips with a log line on a phone build instead of failing
  with a PatchException (the experimental target can select it there).
- Auto skip intro: fails with a clear message on an undeclared TV build.
- Hide ads: the empty ad response must be exactly one sget-object of its own
  type after the parse call, not the first match.
- Auto skip intro: setVisibility only counts on android.view.View.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
fix: only offer the Force HD toggle where Midas Settings can be opened
All checks were successful
CI / Build (pull_request) Successful in 1m24s
2a9dee6784
Phone builds have no entry to Midas Settings, so Force HD no longer registers
its toggle there: it is always on once applied, as the patch description now
says (and without the hardcoded 54 Mbps). TV builds keep the toggle.

Also comment FORCE_HD's default, fix the PatchCategory KDoc (PLAYBACK is a
toggle category only), and bring AGENTS.md and docs/apps/videoland.md in line:
per tested version phone or TV, settings contradictions, Log video assets
section moved out of Midas Settings.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Sign in to join this conversation.
No description provided.