Initial commit: Emby TUI client with libmpv playback

A ratatui-based terminal browser for an Emby server with mpv as the player
backend. Authenticates via /Users/AuthenticateByName, lists libraries and
items, streams via /Videos/{id}/stream, and reports playback progress so
"Continue Watching" stays in sync across clients.

Credentials are read in priority order: CLI flags, env vars
(EMBY_SERVER/EMBY_USER/EMBY_PASSWORD), ./config.toml or
$XDG_CONFIG_HOME/emby-client/config.toml, then an in-TUI login prompt with
an option to persist to config.toml.

Modules: config (CLI + TOML loader), login (TUI prompt), emby (HTTP client
+ progress Reporter), player (libmpv2 wrapper, blocks until file ends),
app (browse state, Continue Watching virtual entry), ui (ratatui frontend).

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
This commit is contained in:
janisslsmandClaude Opus 4.7 committed 2026-05-16 21:38:22 +03:00
commit af43b21f5d
11 files changed
+3712

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
mod app;
mod config;
mod emby;
mod login;
mod player;
mod ui;
use anyhow::Result;
use clap::Parser;
#[tokio::main]
async fn main() -> Result<()> {
let args = config::CliArgs::parse();
let (cfg, save_target) = config::load(&args)?;
let cfg = match cfg {
Some(c) => c,
None => {
// Interactive credential prompt in the TUI
login::prompt(save_target.as_deref())?
}
};
let client = emby::Client::new(&cfg).await?;
let mut app = app::App::new(client).await?;
ui::run(&mut app).await?;
Ok(())
}