Create Kaleido Desktop, a cinematic Plex client for Windows
Tauri 2 shell with a React/TypeScript interface and libmpv playback composed beneath the web view (DirectComposition on Windows). Shared code with per-OS platform modules and configs so macOS and Linux can follow. - Plex sign-in (browser, plex.tv/link or manual), server selection, Plex Home - Home, Movies and TV Shows (Discover, Library, Collections), search, people - Title pages with logos, ratings, cast, extras, seasons and episodes - Direct play with Plex conversion fallback, tracks, markers, autoplay - Metadata editing, artwork, fix match, refresh, analyze and deletion - Resumable offline downloads - App settings and Plex server administration with a live dashboard - Signed updater feed and Forgejo CI Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
commit
00d72e70f4
121 changed files with 25315 additions and 0 deletions
64
src-tauri/src/lib.rs
Normal file
64
src-tauri/src/lib.rs
Normal file
|
|
@ -0,0 +1,64 @@
|
|||
mod downloads;
|
||||
mod mpv;
|
||||
mod platform;
|
||||
mod player;
|
||||
mod system;
|
||||
|
||||
use tauri::{Manager, WindowEvent};
|
||||
|
||||
pub fn run() {
|
||||
tauri::Builder::default()
|
||||
.plugin(tauri_plugin_http::init())
|
||||
.plugin(tauri_plugin_dialog::init())
|
||||
.plugin(tauri_plugin_opener::init())
|
||||
.plugin(tauri_plugin_updater::Builder::new().build())
|
||||
.plugin(tauri_plugin_process::init())
|
||||
.plugin(
|
||||
tauri_plugin_window_state::Builder::default()
|
||||
.with_state_flags(
|
||||
tauri_plugin_window_state::StateFlags::SIZE
|
||||
| tauri_plugin_window_state::StateFlags::POSITION
|
||||
| tauri_plugin_window_state::StateFlags::MAXIMIZED,
|
||||
)
|
||||
.build(),
|
||||
)
|
||||
.manage(player::PlayerState::default())
|
||||
.manage(downloads::Downloads::default())
|
||||
.setup(|app| {
|
||||
let handle = app.handle().clone();
|
||||
downloads::restore(&handle);
|
||||
if let Some(window) = app.get_webview_window("main") {
|
||||
let w = window.clone();
|
||||
window.on_window_event(move |event| {
|
||||
if let WindowEvent::Resized(_) | WindowEvent::ScaleFactorChanged { .. } = event {
|
||||
player::on_resize(&w);
|
||||
}
|
||||
});
|
||||
}
|
||||
Ok(())
|
||||
})
|
||||
.invoke_handler(tauri::generate_handler![
|
||||
player::player_init,
|
||||
player::player_show,
|
||||
player::player_command,
|
||||
player::player_set,
|
||||
player::player_get,
|
||||
system::secret_get,
|
||||
system::secret_set,
|
||||
system::secret_delete,
|
||||
system::app_info,
|
||||
system::dev_session,
|
||||
system::keep_awake,
|
||||
system::disk_space,
|
||||
system::save_url,
|
||||
downloads::download_start,
|
||||
downloads::download_pause,
|
||||
downloads::download_resume,
|
||||
downloads::download_remove,
|
||||
downloads::download_list,
|
||||
downloads::download_set_dir,
|
||||
downloads::download_write_meta,
|
||||
])
|
||||
.run(tauri::generate_context!())
|
||||
.expect("error while running Kaleido");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue