Compare commits

...

2 Commits

Author SHA1 Message Date
Philipp Hofer
2f3abdf546 Merge branch 'main' of https://git.hofer.link/philipp/oe1-player
All checks were successful
CI/CD Pipeline / test (push) Successful in 2m37s
CI/CD Pipeline / deploy (push) Successful in 2m7s
2025-10-15 15:06:58 +02:00
Philipp Hofer
fe59406819 only keep last 10 episodes; Fixes #7 2025-10-15 15:06:53 +02:00

View File

@@ -29,9 +29,16 @@ impl Feed {
}
}
self.only_keep_last_episodes();
Ok(())
}
fn only_keep_last_episodes(&mut self) {
self.episodes = self.episodes.clone().into_iter().rev().take(10).collect();
// only keep last 10
}
fn has_broadcast_url(&self, url: &str) -> bool {
self.episodes.iter().any(|e| e.url == url)
}