feat: add 'games' to the manifest

This commit is contained in:
2025-04-19 20:09:32 +00:00
parent 3479804dca
commit dbbd80c6c3
5 changed files with 39 additions and 29 deletions

View File

@ -83,7 +83,7 @@ impl PackageStore {
pub async fn reload_package(&mut self, key: PkgKey) {
let dir = util::pkg_dir().join(&key.0);
if let Ok(pkg) = Package::from_dir(dir, PackageSource::Rainy).await {
if let Ok((pkg, _)) = Package::from_dir(dir, PackageSource::Rainy).await {
self.update_nonremote(key, pkg);
} else {
log::error!("couldn't reload {}", key);
@ -102,7 +102,13 @@ impl PackageStore {
}
while let Some(res) = futures.join_next().await {
if let Ok(Ok(pkg)) = res {
if let Ok(Ok((pkg, locally_declared_games))) = res {
if let Some(games) = locally_declared_games {
self.meta_list.insert(pkg.key(), PackageListEntry {
version: pkg.loc.as_ref().unwrap().version.clone(),
games
});
}
self.update_nonremote(pkg.key(), pkg);
}
}