Live install verified end-to-end:
- SSH'd into 192.168.0.158 (LibreELEC, Kodi 20.3 Nexus, kernel aarch64
/ userspace armhf — that's why the static Rust sidecar runs but the
PyInstaller yt-dlp binary couldn't)
- Dropped addon dir into /storage/.kodi/addons/
- systemctl restart kodi → Kodi rescans /storage/.kodi/addons/
- JSON-RPC Addons.SetAddonEnabled flipped enabled:false → true
- Player.Open with plugin URL → 7s yt-dlp resolve → VideoFullScreen.xml,
fullscreen:true, currentwindow 12005, audio+video synced
Fixes that surfaced during the install:
- yt-dlp swap: PyInstaller aarch64 binary needs ld-linux-aarch64.so.1
which LibreELEC doesn't ship. Switched to the universal Python zipapp
(~3MB) which runs on /usr/bin/python3.11. build-addon-zip.sh updated.
- main.py now puts the addon's bin/ dir on PATH so the sidecar's
Command::new('yt-dlp') call resolves to the bundled zipapp.
- Cosmetic fix: resolve.rs's classify_yt_dlp_error preserves the
original error message (was downcasing it for keyword matching and
then using the lowercased copy as the user-facing error).
Caveats logged for later:
- 360p ceiling (yt-dlp '-f best[ext=mp4]' picks itag 18; 720p
progressive itag 22 is deprecated by YouTube; higher quality wants
DASH manifest generation).
- ALSA sink: device 'sysdefault:CARD=vc4hdmi1' fails to open on this
Pi but Kodi auto-falls-back to 'sysdefault' so audio works. Worth
cleaning up in Kodi audio settings later.
MILESTONES + docs/install.md updated with the SSH + JSON-RPC alternate
install path.
4.2 KiB
4.2 KiB
torttube milestones
M0 — Scaffold [current]
Sulkta-Coop/torttubeon LAN Gitea- Layout:
addon/(Python) +sidecar/(Rust workspace) - GPL-3.0 license headers
- crafting-table build target produces a static aarch64 sidecar binary
M1 — sidecar resolve (three-tier)
- reads
{"op":"resolve","id":"<yt-id>"}from stdin - Tier 1: rustypipe →
{"streams":[…],"title":"…","duration_s":N,"source":"rustypipe"} - Tier 2: on Tier-1 failure, shell out to
yt-dlp -j <url>→ same JSON shape with"source":"yt-dlp" - Tier 3: new op
{"op":"rip","id":"<yt-id>","dest":"/storage/.kodi/temp/torttube/<id>.<ext>"}invoked by addon on Tier-1+2 stream failures or 403-mid-play; yt-dlp downloads file, sidecar returns local path - typed errors for age-restricted / region-restricted / private (not panics)
- sig decoding verified against a known-good video
- DASH manifest URL or per-itag direct stream URL — whichever inputstream.adaptive prefers
M2 — SponsorBlock
{"op":"sponsorblock","id":"<yt-id>"}→ segments array- SHA-256 prefix lookup (privacy-preserving — only send first 4 hex chars)
- category filter honoured from addon settings (skip / mute / show only)
- cache per-session
M3 — Kodi addon plays one video
addon.xml+main.pyregister as video pluginmain.pyhandlesplugin://plugin.video.torttube/?action=play&id=<id>and?url=<full-url>— wired so JSON-RPCPlayer.Openfrom any LAN client (phone, HA, curl) triggers resolve + play. See docs/remote-control.md.- cross-compile sidecar for aarch64, drop into
bin/of addon dir - install + smoke on LibreELEC RPi at
192.168.0.158 - (later) hardcoded list of 3 test videos for in-Kodi navigation
M4 — search + channel browse
- search box → sidecar
{"op":"search","q":"…"}→ results - channel browse →
{"op":"channel","id":"…"} - playlist browse →
{"op":"playlist","id":"…"} - result thumbnails + duration + uploader
M5 — SponsorBlock skipping
- background thread on
Player()polls position - when position enters a skip segment →
xbmc.Player().seekTime(end) - toast on skip + skip-counter in settings
- category toggles in
settings.xml
M6 — install + cross-compile [DONE]
- cross-compile sidecar for aarch64-musl static via throwaway
messense/rust-musl-cross:aarch64-muslcontainer. 6.2MB stripped static binary. Builds clean fromscripts/build-addon-zip.sh. - bundle yt-dlp's universal Python zipapp (~3MB, not the PyInstaller
binary — that breaks on LibreELEC's armhf userspace because the
aarch64 dynamic loader doesn't exist; Python zipapp runs on
/usr/bin/python3which is always there). - zip layout matches Kodi "install from zip" expectations
- addon.zip dropped at
smb://lucy/downloads/torttube/ - install + smoke recipe documented at
docs/install.md - installed on Livingroom Pi (
192.168.0.158) via SSH +systemctl restart kodi+Addons.SetAddonEnabled - JSON-RPC
Player.Opensmoke verified — Rick Astley played end-to-end with audio + video synced (yt-dlp-f best[ext=mp4]/bestpicked format 18, 360p H.264+AAC progressive) - armv7 build for older Pis (deferred — current TV is aarch64-capable and my static sidecar runs on it even though userspace is armhf)
- 720p+ playback (deferred to M5+) — itag 22 (720p progressive) is deprecated by YouTube; higher quality needs DASH manifest generation
Upstream PR work (parallel lane — every bug evaluated for "fix it upstream?")
This isn't a separate milestone, it's a posture. Every sidecar bug we diagnose: ask "is this rustypipe / NPE / yt-dlp's bug?" — if yes, fix lands upstream too. Log every filed PR in docs/upstream.md.
Opening shortlist:
- rustypipe PR #77 — review + help land
- NPE #1357 (JDoc) — smallest credible PR, opens the relationship
- NPE #1444 (typed errors) — clean signal/contract change
- NPE #1360 (refactor link handlers, "help wanted")
- rustypipe ↔ NPE port — anything one project has that the other lacks