mirror of
https://github.com/djibux/BoilR.git
synced 2026-09-01 05:53:41 +02:00
Only show launchable Epic Games
This commit is contained in:
@@ -39,7 +39,8 @@ pub(crate) fn get_egs_manifests(
|
||||
let manifests = manifest_dir
|
||||
.filter_map(|dir| dir.ok())
|
||||
.filter_map(get_manifest_item)
|
||||
.filter(is_game_installed);
|
||||
.filter(is_game_installed)
|
||||
.filter(is_game_launchable);
|
||||
Ok(manifests.collect())
|
||||
}
|
||||
Err(err) => Err(ReadDirError {
|
||||
@@ -129,6 +130,10 @@ fn is_game_installed(manifest: &ManifestItem) -> bool {
|
||||
Path::new(manifest.manifest_location.as_str()).exists()
|
||||
}
|
||||
|
||||
fn is_game_launchable(manifest: &ManifestItem) -> bool {
|
||||
(!manifest.launch_executable.is_empty()) || (manifest.is_managed)
|
||||
}
|
||||
|
||||
fn get_manifest_item(dir_entry: DirEntry) -> Option<ManifestItem> {
|
||||
if let Some(extension) = dir_entry.path().extension() {
|
||||
if extension.eq("item") {
|
||||
|
||||
Reference in New Issue
Block a user