diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0f84cc9 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +/target +/.vscode \ No newline at end of file diff --git a/Cargo.lock b/Cargo.lock index b883a27..17a20c1 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -422,7 +422,7 @@ dependencies = [ [[package]] name = "iceportal_rich_presense" -version = "1.0.0" +version = "1.0.1" dependencies = [ "discord-rich-presence", "iceportal", diff --git a/Cargo.toml b/Cargo.toml index 12320fc..6cd9e5b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "iceportal_rich_presense" -version = "1.0.0" +version = "1.0.1" edition = "2021" authors = ["AdriDevelopsThings"] readme = "README.md" diff --git a/src/main.rs b/src/main.rs index 0712b74..3eb92ea 100644 --- a/src/main.rs +++ b/src/main.rs @@ -46,6 +46,7 @@ async fn main() { let status_info = ICEPortal::fetch_status().await .expect("Error while fetching iceportal data"); let available_stops = trip_info.trip.stops.iter() + .filter(|stop| stop.info.position_status.is_none() || stop.info.position_status == Some(PositionStatus::Future)) .map(|stop| stop.station.name.as_str()).collect::>(); let leave_station = Select::new("At which station will you leave the train?", available_stops).prompt() .expect("Error while prompt");