Commit b9b9008

mo khan <mo@mokhan.ca>
2025-06-25 04:27:04
Fix compilation issues and implement feed loading
- Remove invalid std-process dependency - Load feeds from config on app startup - Implement refresh_feeds functionality - Handle feed fetch errors gracefully Now compiles successfully with working feed structure. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent ba94d8c
Changed files (2)
src/app.rs
@@ -19,7 +19,10 @@ pub struct App {
 impl App {
     pub fn new() -> Result<Self> {
         let config = Config::load()?;
-        let feeds = vec![]; // Will load from config
+        let feeds: Vec<Feed> = config.feeds
+            .iter()
+            .map(|(name, url)| Feed::new(name.clone(), url.clone()))
+            .collect();
         
         Ok(Self {
             current_screen: CurrentScreen::FeedList,
@@ -79,7 +82,12 @@ impl App {
     }
 
     pub fn refresh_feeds(&mut self) -> Result<()> {
-        // TODO: Implement feed refresh
+        for feed in &mut self.feeds {
+            if let Err(e) = feed.fetch_episodes() {
+                // Log error but continue with other feeds
+                eprintln!("Failed to fetch episodes for {}: {}", feed.name, e);
+            }
+        }
         Ok(())
     }
 
Cargo.toml
@@ -23,8 +23,7 @@ chrono = { version = "0.4", features = ["serde"] }
 # Error handling
 anyhow = "1.0"
 
-# Audio playback
-std-process = "0.1"
+# Audio playback (using std::process)
 
 # Async runtime
 tokio = { version = "1.0", features = ["full"] }