Add support for lutris

This commit is contained in:
Philip Kristoffersen
2022-03-08 21:24:24 +01:00
parent 4d71aca0a6
commit 36dca25297
9 changed files with 187 additions and 3 deletions
+25
View File
@@ -0,0 +1,25 @@
use steam_shortcuts_util::{shortcut::ShortcutOwned, Shortcut};
#[derive(Clone)]
pub struct LutrisGame {
pub index: String,
pub name: String,
pub id: String,
pub platform: String,
}
impl From<LutrisGame> for ShortcutOwned {
fn from(game: LutrisGame) -> Self {
let options = format!("lutris:rungame/{}", game.id);
Shortcut::new(
0,
game.name.as_str(),
"lutris",
"",
"",
"",
&options.as_str(),
)
.to_owned()
}
}