Closed davidrothera closed 4 years ago
Opening hours for today (6th)
UPDATE: This seems to actually happen also on GetWaitTimes
as well:
~/D/wait_times ❯❯❯ NODE_DEBUG=themeparks node bug2.js ✘ 130 master ◼
THEMEPARKS 10995: WaltDisneyWorldEpcot: Set useragent to Mozilla/5.0 (Linux; U; Android 2.2; en-us; ADR6300 Build/FRF91) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1
THEMEPARKS 10995: Setting up database "/Users/david/Developer/wait_times/themeparks.db"
THEMEPARKS 10995: WaltDisneyWorldHollywoodStudios: Set useragent to Mozilla/5.0 (Linux; U; Android 1.1; en-gb; dream) AppleWebKit/525.10 (KHTML, like Gecko) Version/3.0.4 Mobile Safari/523.12.2
THEMEPARKS 10995: WaltDisneyWorldAnimalKingdom: Set useragent to Mozilla/5.0 (Linux; U; Android 1.5; de-ch; HTC Hero Build/CUPCAKE) AppleWebKit/528.5 (KHTML, like Gecko) Version/3.1.2 Mobile Safari/525.20.1
THEMEPARKS 10995: WaltDisneyWorldMagicKingdom: Set useragent to Mozilla/5.0 (Linux; U; Android 2.3.4; en-us; BNTV250 Build/GINGERBREAD) AppleWebKit/533.1 (KHTML, like Gecko) Version/4.0 Safari/533.1
THEMEPARKS 10995: CouchbaseChannelDisney[facilitystatus_wdw]: Fetching initial state since 42860266
THEMEPARKS 10995: CouchbaseChannelDisney[facilitystatus_wdw]: Initial state returned 0 document updates
THEMEPARKS 10995: CouchbaseChannelDisney[facilitystatus_wdw]: Starting long-poll for live updates
THEMEPARKS 10995: CouchbaseChannelDisney[facilitystatus_wdw]: Starting long-poll from sequence 42860266
THEMEPARKS 10995: CouchbaseChannelDisney[facilities_wdw]: Fetching initial state since 42868826
THEMEPARKS 10995: CouchbaseChannelDisney[facilities_wdw]: Initial state returned 0 document updates
THEMEPARKS 10995: CouchbaseChannelDisney[facilities_wdw]: Starting long-poll for live updates
THEMEPARKS 10995: FacilityChannel: No new facility data to bulk write to DB, skipping write
THEMEPARKS 10995: FacilityChannel: No new calendar data to bulk write to DB, skipping write
THEMEPARKS 10995: CouchbaseChannelDisney[facilities_wdw]: Starting long-poll from sequence 42868826
EPCOT
{
meta: {
fastPassStartTime: null,
fastPassEndTime: null,
area: 'Future World',
longitude: -81.552248,
latitude: 28.373592
},
id: 'WaltDisneyWorldEpcot_20194',
name: "Soarin' Around the World",
active: false,
waitTime: 0,
fastPass: true,
lastUpdate: '2020-02-06T08:24:20.045Z',
status: 'Closed'
}
AnimalKingdom
{
meta: {
fastPassStartTime: null,
fastPassEndTime: null,
area: 'Future World',
longitude: -81.552248,
latitude: 28.373592
},
id: 'WaltDisneyWorldAnimalKingdom_20194',
name: "Soarin' Around the World",
active: false,
waitTime: 0,
fastPass: true,
lastUpdate: '2020-02-06T08:24:20.046Z',
status: 'Closed'
}
MagicKingdom
{
meta: {
fastPassStartTime: null,
fastPassEndTime: null,
area: 'Future World',
longitude: -81.552248,
latitude: 28.373592
},
id: 'WaltDisneyWorldMagicKingdom_20194',
name: "Soarin' Around the World",
active: false,
waitTime: 0,
fastPass: true,
lastUpdate: '2020-02-06T08:24:20.043Z',
status: 'Closed'
}
HollywoodStudios
{
meta: {
fastPassStartTime: null,
fastPassEndTime: null,
area: 'Future World',
longitude: -81.552248,
latitude: 28.373592
},
id: 'WaltDisneyWorldHollywoodStudios_20194',
name: "Soarin' Around the World",
active: false,
waitTime: 0,
fastPass: true,
lastUpdate: '2020-02-06T08:24:20.048Z',
status: 'Closed'
}
Found the issue, because I was passing in ParkOptions
it was being mutated with the settings of the first park and then passed down and overriding the settings of the other parks.
Park All WDW resorts (only ones I'm using)
Context
Describe the bug I have an instance of each of the parks so I can access info for each of them:
When calling
GetOpeningTimes()
on any of these objects I get the opening hours for whichever is first in the list (in this case EPCOT) rather than the one requested.If I re-order the creation of the park objects (e.g. make MK the first) then I get the hours for MK even when calling
HollywoodStudios.GetOpeningHours()
etc.EDIT - This does actually happen with the other API methods like
GetWaitTimes
This issue doesn't happen with
GetWaitTimes()
and that seems to support having the multiple objects all open at once.Output