added config

This commit is contained in:
2026-02-13 22:03:18 -06:00
parent 8b562a2780
commit 5f07f6e611
5 changed files with 185 additions and 2 deletions

33
src/core/jellyfin.rs Normal file
View File

@@ -0,0 +1,33 @@
use super::config::Config;
#[derive(Clone)]
pub struct JellyfinClient {
pub cfg: Config,
}
#[derive(Debug, Clone)]
pub struct JfItem {
pub id: String,
pub name: String,
pub item_type: String, // "Movie", "Series", etc.
pub image_tag: Option<String>,
}
impl JellyfinClient {
pub fn new(cfg: Config) -> Self {
Self { cfg }
}
// Placeholder for now — next step will use reqwest and actually call Jellyfin.
pub fn test_connection_stub(&self) -> Result<String, String> {
Ok(format!("Configured for {}", self.cfg.base_url))
}
// Placeholder list so we can wire UI without network yet
pub fn list_movies_stub(&self) -> Vec<JfItem> {
vec![
JfItem { id: "1".into(), name: "Movie A".into(), item_type: "Movie".into(), image_tag: None },
JfItem { id: "2".into(), name: "Movie B".into(), item_type: "Movie".into(), image_tag: None },
]
}
}