-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
9cef742
commit e101712
Showing
6 changed files
with
46 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,16 @@ | ||
[package] | ||
name = "iceportal_rich_presense" | ||
version = "1.0.2" | ||
name = "iceportal_rich_presence" | ||
version = "1.0.3" | ||
edition = "2021" | ||
authors = ["AdriDevelopsThings"] | ||
readme = "README.md" | ||
repository = "https://github.com/AdriDevelopsThings/iceportal_rich_presense" | ||
repository = "https://github.com/AdriDevelopsThings/iceportal_rich_presence" | ||
license = "AGPL-3.0" | ||
description = "Show your current ride in discord via the ICE portal api" | ||
|
||
|
||
[dependencies] | ||
discord-rich-presence = "0.2.3" | ||
iceportal = "2.0.1" | ||
iceportal = "2.0.2" | ||
inquire = "0.5.2" | ||
tokio = { version = "1", features = ["full"] } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
pub fn translate_series(series: &str) -> &str { | ||
let series_as_int = series.parse::<u16>(); | ||
match series_as_int { | ||
Ok(s) => { | ||
if (801..804).contains(&s) { | ||
"401" | ||
} else if (805..808).contains(&s) { | ||
"402" | ||
} else if s == 812 { | ||
"412" | ||
} else { | ||
series | ||
} | ||
}, | ||
Err(_) => series | ||
} | ||
|
||
} |