YouTube 2.0.0: native client without ads
All checks were successful
release / release (push) Successful in 10m13s

Replaces the web app (youtube.com/tv in Chromium) with a native Rust +
Slint client on sf-ui, built on Netflex TV's page engine.

- InnerTube: web client for public pages, the TV client with the
  account's OAuth token for personal ones, visionOS (direct URLs) for
  streams, the TV client with yt-dlp's ejs solver (QuickJS) as fallback.
- One version, no ads: ad breaks are never requested, ad renderers are
  skipped in feeds. SponsorBlock skips sponsored parts.
- Sign-in with a QR code / youtube.com/activate (OAuth device flow).
- Signed out: subscriptions and history on the TV; a home filled with
  this week's popular Hungarian videos when YouTube's is empty.
- Playback: one-quality DASH manifest for GStreamer, H.264 up to 1080p
  or AV1 up to 4K, captions, quality switching, up next, resume.
- Release builds for x86-64 and the Raspberry Pi (aarch64).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Tamas Csikel
2026-11-02 16:27:41 +01:00
parent 645fd1c6fe
commit 9875d435e1
40 changed files with 15776 additions and 37 deletions

58
src/main.rs Normal file
View File

@@ -0,0 +1,58 @@
//! YouTube for Fennec OS: a native TV client, without ads.
//!
//! - UI: Slint (ui/*.slint) on sf-ui's Liquid Glass layer; the page engine
//! and controller come from Netflex TV (src/page.rs, src/app.rs).
//! - YouTube: src/yt (InnerTube; QR sign-in; streams as DASH manifests).
//! - Playback: sf-ui's GStreamer player (Linux, hardware decoding).
// Without a player (Windows, for UI work) some playback code sits unused.
#![cfg_attr(not(target_os = "linux"), allow(dead_code, unused_imports))]
mod app;
mod config;
mod format;
mod page;
mod player;
mod qr;
mod screens;
mod task;
mod yt;
use slint::{ComponentHandle, Model};
slint::include_modules!();
sf_ui::glue!(App);
fn main() -> anyhow::Result<()> {
env_logger::Builder::from_env(env_logger::Env::default().default_filter_or("info")).init();
sf_ui::init()?;
#[cfg(target_os = "linux")]
if let Err(e) = sf_ui::video::init() {
log::error!("video: {e:#}");
}
let ui = App::new()?;
ui.sf_ui_setup();
if std::env::var_os("SF_UI_SIZE").is_none() && std::env::var_os("YOUTUBE_WINDOWED").is_none() {
ui.window().set_fullscreen(true);
}
let glass = sf_ui::Glass::install(&ui, |ui, p| {
p.extend(ui.get_glass_page().iter());
p.extend(ui.get_glass_page_keyboard().iter());
p.extend(ui.get_glass_player().iter());
p.extend(ui.get_glass_player_subs().iter());
p.extend(ui.get_glass_player_quality().iter());
p.extend(ui.get_glass_link().iter());
p.extend(ui.get_glass_toast().iter());
})?;
glass.set_palette(sf_ui::Palette::from_hex(app::PALETTE));
let images = sf_ui::images::Images::new(384 << 20);
let app = app::Controller::new(&ui, glass, images);
app.start();
ui.run()?;
app.shutdown();
Ok(())
}