Make orders strings instead of usize (#63)

This commit is contained in:
Philip Kristoffersen
2022-03-28 19:44:23 +02:00
committed by GitHub
parent 20fa076ee7
commit 704d5b5758
11 changed files with 15 additions and 15 deletions
Generated
+4 -4
View File
@@ -832,6 +832,7 @@ checksum = "9c5c51b9083a3c620fa67a2a635d1ce7d95b897e957d6b28ff9a5da960a103a6"
dependencies = [ dependencies = [
"bitvec", "bitvec",
"funty", "funty",
"lexical-core",
"memchr", "memchr",
"version_check", "version_check",
] ]
@@ -1363,13 +1364,12 @@ checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f"
[[package]] [[package]]
name = "steam_shortcuts_util" name = "steam_shortcuts_util"
version = "1.1.4" version = "1.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "git+https://github.com/PhilipK/steam_shortcuts_util#45ea43c26aa34a088f4c2a5343434c546c0359a0"
checksum = "66ae244ca0579ba5b4e05a52a3afef6f23412e85b8eb448dbf0aa92d0687cb50"
dependencies = [ dependencies = [
"ascii", "ascii",
"crc32fast", "crc32fast",
"nom 7.0.0", "nom 6.2.1",
"nom_locate", "nom_locate",
] ]
+1 -1
View File
@@ -5,7 +5,7 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies] [dependencies]
steam_shortcuts_util = "^1.1.4" steam_shortcuts_util = {git="https://github.com/PhilipK/steam_shortcuts_util"}
steamgriddb_api = "^0.2,0" steamgriddb_api = "^0.2,0"
serde = { version = "^1.0.130", features = ["derive"] } serde = { version = "^1.0.130", features = ["derive"] }
serde_json = "^1.0.68" serde_json = "^1.0.68"
+2 -2
View File
@@ -39,7 +39,7 @@ fn exe_shortcut(manifest: ManifestItem) -> ShortcutOwned {
let exe = exe.trim_matches('\"'); let exe = exe.trim_matches('\"');
let start_dir = start_dir.trim_matches('\"'); let start_dir = start_dir.trim_matches('\"');
Shortcut::new( Shortcut::new(
0, "0",
manifest.display_name.as_str(), manifest.display_name.as_str(),
exe, exe,
start_dir, start_dir,
@@ -54,7 +54,7 @@ fn launcher_shortcut(manifest: ManifestItem) -> ShortcutOwned {
let icon = manifest.exe(); let icon = manifest.exe();
let url = manifest.get_launch_url(); let url = manifest.get_launch_url();
Shortcut::new( Shortcut::new(
0, "0",
manifest.display_name.as_str(), manifest.display_name.as_str(),
url.as_str(), url.as_str(),
"", "",
+1 -1
View File
@@ -44,7 +44,7 @@ impl From<GogShortcut> for ShortcutOwned {
exe.to_str().unwrap_or("").to_string() exe.to_str().unwrap_or("").to_string()
}; };
let shortcut = Shortcut::new( let shortcut = Shortcut::new(
0, "0",
gogs.name.as_str(), gogs.name.as_str(),
exe.to_str().unwrap(), exe.to_str().unwrap(),
gogs.working_dir.as_str(), gogs.working_dir.as_str(),
+1 -1
View File
@@ -31,7 +31,7 @@ impl From<HeroicGame> for ShortcutOwned {
let launch_options = format!("launch {}",game.app_name); let launch_options = format!("launch {}",game.app_name);
let shortcut = Shortcut::new( let shortcut = Shortcut::new(
0, "0",
game.title.as_str(), game.title.as_str(),
launch.as_str(), launch.as_str(),
"", "",
+1 -1
View File
@@ -16,7 +16,7 @@ impl From<ItchGame> for ShortcutOwned {
let exe = Path::new(&game.install_path).join(&game.executable); let exe = Path::new(&game.install_path).join(&game.executable);
let exe = exe.to_str().unwrap().to_string(); let exe = exe.to_str().unwrap().to_string();
let shortcut = Shortcut::new( let shortcut = Shortcut::new(
0, "0",
game.title.as_str(), game.title.as_str(),
exe.as_str(), exe.as_str(),
&game.install_path, &game.install_path,
+1 -1
View File
@@ -20,7 +20,7 @@ impl From<LegendaryGame> for ShortcutOwned {
start_dir = format!("\"{}\"", game.install_path); start_dir = format!("\"{}\"", game.install_path);
} }
let shortcut = Shortcut::new( let shortcut = Shortcut::new(
0, "0",
game.title.as_str(), game.title.as_str(),
launch.as_str(), launch.as_str(),
start_dir.as_str(), start_dir.as_str(),
+1 -1
View File
@@ -12,7 +12,7 @@ impl From<LutrisGame> for ShortcutOwned {
fn from(game: LutrisGame) -> Self { fn from(game: LutrisGame) -> Self {
let options = format!("lutris:rungame/{}", game.id); let options = format!("lutris:rungame/{}", game.id);
Shortcut::new( Shortcut::new(
0, "0",
game.name.as_str(), game.name.as_str(),
"lutris", "lutris",
"", "",
+1 -1
View File
@@ -7,7 +7,7 @@ pub struct OriginGame {
impl From<OriginGame> for ShortcutOwned { impl From<OriginGame> for ShortcutOwned {
fn from(game: OriginGame) -> Self { fn from(game: OriginGame) -> Self {
let launch = format!("origin2://game/launch?offerIds={}&autoDownload=1", game.id); let launch = format!("origin2://game/launch?offerIds={}&autoDownload=1", game.id);
let shortcut = Shortcut::new(0, game.title.as_str(), launch.as_str(), "", "", "", ""); let shortcut = Shortcut::new("0", game.title.as_str(), launch.as_str(), "", "", "", "");
let mut owned_shortcut = shortcut.to_owned(); let mut owned_shortcut = shortcut.to_owned();
owned_shortcut.tags.push("Origin".to_owned()); owned_shortcut.tags.push("Origin".to_owned());
owned_shortcut.tags.push("Ready TO Play".to_owned()); owned_shortcut.tags.push("Ready TO Play".to_owned());
+1 -1
View File
@@ -33,7 +33,7 @@ pub fn create_sym_links(shortcut: &ShortcutOwned) -> ShortcutOwned {
}; };
let new_shortcut = Shortcut::new( let new_shortcut = Shortcut::new(
0, "0",
shortcut.app_name.as_str(), shortcut.app_name.as_str(),
exe.as_str(), exe.as_str(),
start_dir.as_str(), start_dir.as_str(),
+1 -1
View File
@@ -9,6 +9,6 @@ pub(crate) struct Game {
impl From<Game> for ShortcutOwned { impl From<Game> for ShortcutOwned {
fn from(game: Game) -> Self { fn from(game: Game) -> Self {
let launch = format!("uplay://launch/{}", game.id); let launch = format!("uplay://launch/{}", game.id);
Shortcut::new(0, &game.name, &launch, "", &game.icon, "", "").to_owned() Shortcut::new("0", &game.name, &launch, "", &game.icon, "", "").to_owned()
} }
} }