Skip to content

Commit

Permalink
Make orders strings instead of usize (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilipK authored Mar 28, 2022
1 parent 20fa076 commit 704d5b5
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
steam_shortcuts_util = "^1.1.4"
steam_shortcuts_util = {git="https://github.com/PhilipK/steam_shortcuts_util"}
steamgriddb_api = "^0.2,0"
serde = { version = "^1.0.130", features = ["derive"] }
serde_json = "^1.0.68"
Expand Down
4 changes: 2 additions & 2 deletions src/egs/manifest_item.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ fn exe_shortcut(manifest: ManifestItem) -> ShortcutOwned {
let exe = exe.trim_matches('\"');
let start_dir = start_dir.trim_matches('\"');
Shortcut::new(
0,
"0",
manifest.display_name.as_str(),
exe,
start_dir,
Expand All @@ -54,7 +54,7 @@ fn launcher_shortcut(manifest: ManifestItem) -> ShortcutOwned {
let icon = manifest.exe();
let url = manifest.get_launch_url();
Shortcut::new(
0,
"0",
manifest.display_name.as_str(),
url.as_str(),
"",
Expand Down
2 changes: 1 addition & 1 deletion src/gog/gog_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ impl From<GogShortcut> for ShortcutOwned {
exe.to_str().unwrap_or("").to_string()
};
let shortcut = Shortcut::new(
0,
"0",
gogs.name.as_str(),
exe.to_str().unwrap(),
gogs.working_dir.as_str(),
Expand Down
2 changes: 1 addition & 1 deletion src/heroic/heroic_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl From<HeroicGame> for ShortcutOwned {
let launch_options = format!("launch {}",game.app_name);

let shortcut = Shortcut::new(
0,
"0",
game.title.as_str(),
launch.as_str(),
"",
Expand Down
2 changes: 1 addition & 1 deletion src/itch/itch_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ impl From<ItchGame> for ShortcutOwned {
let exe = Path::new(&game.install_path).join(&game.executable);
let exe = exe.to_str().unwrap().to_string();
let shortcut = Shortcut::new(
0,
"0",
game.title.as_str(),
exe.as_str(),
&game.install_path,
Expand Down
2 changes: 1 addition & 1 deletion src/legendary/legendary_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl From<LegendaryGame> for ShortcutOwned {
start_dir = format!("\"{}\"", game.install_path);
}
let shortcut = Shortcut::new(
0,
"0",
game.title.as_str(),
launch.as_str(),
start_dir.as_str(),
Expand Down
2 changes: 1 addition & 1 deletion src/lutris/lutris_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ impl From<LutrisGame> for ShortcutOwned {
fn from(game: LutrisGame) -> Self {
let options = format!("lutris:rungame/{}", game.id);
Shortcut::new(
0,
"0",
game.name.as_str(),
"lutris",
"",
Expand Down
2 changes: 1 addition & 1 deletion src/origin/origin_game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub struct OriginGame {
impl From<OriginGame> for ShortcutOwned {
fn from(game: OriginGame) -> Self {
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();
owned_shortcut.tags.push("Origin".to_owned());
owned_shortcut.tags.push("Ready TO Play".to_owned());
Expand Down
2 changes: 1 addition & 1 deletion src/sync/symlinks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ pub fn create_sym_links(shortcut: &ShortcutOwned) -> ShortcutOwned {
};

let new_shortcut = Shortcut::new(
0,
"0",
shortcut.app_name.as_str(),
exe.as_str(),
start_dir.as_str(),
Expand Down
2 changes: 1 addition & 1 deletion src/uplay/game.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pub(crate) struct Game {
impl From<Game> for ShortcutOwned {
fn from(game: Game) -> Self {
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()
}
}

0 comments on commit 704d5b5

Please sign in to comment.