v0.1.1: external modules, publish YAML, proxy reset, binary-first README
- Host discovers/builds modules under modules/ (bbc, rte, tg4) - module-publish.yaml tracked; local module.yaml gitignored - drm --modules-dir / DRM_MODULES_DIR - drm proxy reset; Magisk reinject reliability - modules-v* Forgejo release workflow + build scripts - BBC full Explore channel map including S4C - README quickstart based on release binaries
This commit is contained in:
parent
1d36961a7c
commit
f9c28be3f1
52 changed files with 2915 additions and 636 deletions
|
|
@ -90,34 +90,35 @@ func (a *App) Launch(c *adb.Client) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// AutoPlay: best-effort; iPlayer UI varies — operator can play by hand.
|
||||
// AutoPlay opens Explore, taps the channel logo, then Watch live — same style
|
||||
// as RTE/TG4 interactive navigation, driven by uiautomator dumps.
|
||||
func (a *App) AutoPlay(c *adb.Client, channel string) error {
|
||||
id, err := a.Resolve(channel)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
ch := a.cfg.Channels[id]
|
||||
fmt.Printf("[*] Auto-play %s — open Live and start playback on the phone…\n", a.Label(id))
|
||||
fmt.Printf("[*] Auto-play %s…\n", a.Label(id))
|
||||
if ch.VPID != "" {
|
||||
fmt.Printf(" expected mediaselector vpid ≈ %s\n", ch.VPID)
|
||||
}
|
||||
c.DismissShadeIfFocused()
|
||||
if len(ch.PlayDesc) == 0 && len(ch.ChipDesc) == 0 {
|
||||
return fmt.Errorf("no UI selectors for %s — play manually on the phone", id)
|
||||
|
||||
if err := a.openExplorePage(c); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(ch.ChipDesc) > 0 {
|
||||
if err := uiflow.TapUI(c, a.CacheDir(), uiflow.Match{DescRE: ch.ChipDesc}, 20*time.Second); err != nil {
|
||||
return fmt.Errorf("channel chip: %w", err)
|
||||
}
|
||||
time.Sleep(2 * time.Second)
|
||||
if err := a.tapChannel(c, ch); err != nil {
|
||||
return err
|
||||
}
|
||||
if len(ch.PlayDesc) > 0 {
|
||||
if err := uiflow.TapUI(c, a.CacheDir(), uiflow.Match{DescRE: ch.PlayDesc}, 15*time.Second); err != nil {
|
||||
return fmt.Errorf("play: %w", err)
|
||||
}
|
||||
time.Sleep(time.Duration(a.cfg.Timeouts.AfterChannel))
|
||||
if err := a.tapWatchLive(c, ch); err != nil {
|
||||
return err
|
||||
}
|
||||
// Soft-fail: clear streams often start without a dumpsys audio session.
|
||||
return uiflow.WaitPlayback(c, a.CacheDir(), a.Package(), uiflow.PlaybackOpts{
|
||||
Timeout: time.Duration(a.cfg.Timeouts.Playback),
|
||||
Timeout: time.Duration(a.cfg.Timeouts.Playback),
|
||||
SoftFail: true,
|
||||
OrDescContains: a.cfg.UI.PlaybackDescContains,
|
||||
})
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue