live tracking and filter
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
Some checks failed
Create and publish a Docker image / build-and-push-image (push) Has been cancelled
This commit is contained in:
parent
534c36b0f7
commit
f5e0a31bb7
16 changed files with 414 additions and 115 deletions
|
|
@ -55,6 +55,7 @@ async fn convert_stop_schedules(json_data:Vec<crate::septa_json::stop_schedule::
|
|||
parsed_data.push(*libseptastic::stop_schedule::StopSchedule::from_septa_json(json_single)?);
|
||||
}
|
||||
|
||||
|
||||
Ok(parsed_data)
|
||||
}
|
||||
|
||||
|
|
@ -205,11 +206,17 @@ impl SeptaFetcher {
|
|||
let directions = Self::fetch_directions(&version).await?;
|
||||
info!("Directions data successfully downloaded for {} route directions", directions.len());
|
||||
|
||||
let calendar = Self::fetch_calendar(&version).await?;
|
||||
let mut calendar = Self::fetch_calendar(&version).await?;
|
||||
info!("Calendar data successfully downloaded for {} days", calendar.len());
|
||||
for entry in calendar.clone() {
|
||||
if entry.1.release_name != "20250914" {
|
||||
calendar.remove(&entry.0.clone());
|
||||
}
|
||||
}
|
||||
|
||||
let schedule_stops = Self::fetch_schedules(&route_stops, &version).await?;
|
||||
let mut schedule_stops = Self::fetch_schedules(&route_stops, &version).await?;
|
||||
info!("Schedule data downloaded for {} scheduled stops", schedule_stops.len());
|
||||
schedule_stops = schedule_stops.into_iter().filter(|x| x.release_name == "20250914").collect();
|
||||
|
||||
let mut stop_map: HashMap<String, i64> = HashMap::new();
|
||||
let mut stop_set: HashSet<i64> = HashSet::new();
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ use crate::traits::*;
|
|||
use serde::{Deserialize, Serialize};
|
||||
|
||||
|
||||
#[derive(Default, Debug, Serialize, Deserialize)]
|
||||
#[derive(Default, Debug, Serialize, Deserialize, Clone)]
|
||||
pub struct ScheduleDay {
|
||||
pub release_name: String,
|
||||
pub special: bool,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue