diff --git a/lib/portaventura/portaventura.js b/lib/portaventura/portaventura.js index c8fb864..75a8617 100644 --- a/lib/portaventura/portaventura.js +++ b/lib/portaventura/portaventura.js @@ -50,15 +50,16 @@ class PortAventura extends Park { }).then((rides) => { rides.forEach((ride) => { // parse wait time - // ride.time_range or ride.time_sign / tolerencia ? - // const parsedTime = /([-\d]+)(?::(\d+))?/.exec(ride.tiempo_espera); - // let waitTime = null; - // if (parsedTime[1] !== '-1' && parsedTime[2] !== undefined) { - // waitTime = (Number(parsedTime[1]) * 60) + Number(parsedTime[2]); - // } let waitTime = null; - if (ride.location_status === 0) { // TODO : find the location_status when a ride is not operational + // TODO: find the location_status when a ride is not operational + if (ride.location_status === 0) { waitTime = -1; + } else { + // TODO: parse waiting time (ride.time_range or ride.time_sign)? + // const parsedTime = /([-\d]+)(?::(\d+))?/.exec(ride.tiempo_espera); + // if (parsedTime[1] !== '-1' && parsedTime[2] !== undefined) { + // waitTime = (Number(parsedTime[1]) * 60) + Number(parsedTime[2]); + // } } // update ride object