chore: app update check handles Videoland TV builds #211
No reviewers
Labels
No labels
area/architecture
area/build-ci
area/bytecode
area/code-quality
area/docs
area/extension
area/fingerprint
area/security
area/tests
Bug report
Feature request
review
sev/low
sev/medium
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
midas/midas-patches!211
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "chore/app-update-check-tv-builds"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The daily check did not know Videoland ships a phone and an Android TV build under one package. For TV 1.119.2 that gave issue #201 (the opt-in Auto skip intro was tried on an undeclared TV build and threw) and PR #199 (version added to the targets, but not to
TV_ONLY_VERSIONS). This makes both cases work without a human.Design
scripts/check-patches.sh(step 4c): for a platform with ashared/<Platform>Build.kt(Videoland) it readsTV_MARKER/PHONE_MARKERfrom that Kotlin file, so the check cannot drift from the patches (the constants are now one-line literals; an unreadable marker is exit 2). It then searches the base APK'sclasses*.dexfor the class descriptor: a descriptor is a string in the dex string table, so unzip + grep is enough, no decompile. The phone marker wins, as invideolandBuild(). It printsBuild: phone|tv|unknownand writes<out dir>/build.app-update-check.sh: the check step copies a whitelistedbuild=into themetafile; the report step re-validates it and passes it toopen_pullanddeclare_version. Fortvthebump:PR also adds the version toTV_ONLY_VERSIONS(newinsert_tv_only: one-linesetOf(...)only, newest first, anything else fails the package like the other edits). Phone,unknownand all other platforms behave exactly as before. No new token exposure: the build word is produced in the token-less check job and only used as a whitelisted word in the report job.fix:): on a TV build it now logs and returns instead of throwing, the same pattern as Midas Settings on a phone build.Why the patch skips itself and check-patches.sh has no special case
check-patches.sh enables every opt-in patch, and its "Skipped:" is derived from the declared versions, which an undeclared version by definition lacks. A special case would need a hard-coded list of mobile-player patches in the script (or inferring TV versions from the compat lists), and every future TV-incompatible patch would need an entry. Letting the patch decide matches the existing convention (a patch that cannot work on a build handles that itself) and keeps check-patches.sh free of per-patch knowledge; it only reports the build. Trade-off: someone who force-enables Auto skip intro on an undeclared TV build gets a log line instead of a failed patch (it hooks nothing there anyway; for declared TV versions Manager does not list it). A phone build whose marker was renamed still fails loudly (
videolandBuild()throws when neither marker exists, or a fingerprint fails).Note: the
fix:commit means merging this into dev creates a pre-release. The branch also contains #199's fix commit (04cd884) because it is not in dev yet; it drops out of the diff once that is merged.Tested locally (Git Bash, bundle built from this branch)
Build: phone, exit 0. On 1.116.3 TV xapk, 1.118.0 TV splits and 1.119.2 TV apk:Build: tv, exit 0 (Auto skip introSkipped:as declared).Constants.kt(undeclared TV, the #201 case):Build: tv, log lineAuto skip intro hooks the mobile player, ... skipping,Applied: Auto skip intro, exit 0.:patches:test(extension contract check) ran as part ofbuildAndroid.declare_versionon a scratch copy ofConstants.ktwithout 1.119.2:tvadds theAppTargetand puts"1.119.2"first inTV_ONLY_VERSIONS(diff checked);phoneonly theAppTarget; a multi-linesetOf(is rejected with an error; an emptysetOf()works. Git Bash's gawk drops the CRs of CRLF files (the existinginsert_targettoo); CI checks out LF.Not tested locally (needs a CI dispatch)
The jq/curl parts of the report step, the real APKPure download and the end-to-end path meta -> PR body. Dispatch
app-update-checkon branchchore/app-update-check-tv-buildswithdry_run=true,packages=nl.rtl.videoland.v2andtested_override=nl.rtl.videoland.v2=1.115.2(pretends 1.115.2 is the newest tested version, so APKPure's newer TV build is checked). Expected in the log:Build: tv, and the dry-run PR body lists "adds<version>to the targets" plus "adds it toTV_ONLY_VERSIONS", with a diff showing both lines inConstants.kt. The run must also stay green when the check step meets Auto skip intro (no::warningabout a patch that no longer applies). Run it only on a base that lacks the version (it says "already declared" otherwise). A phone build would show only theAppTargetline.🤖 Generated with Claude Code
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.