diff --git a/package.json b/package.json index 93ebc83a..20f5ded1 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "node": ">=16" }, "dependencies": { - "@commaai/api": "github:commaai/comma-api#3.1.2", + "@commaai/api": "github:commaai/comma-api#3.1.3", "@commaai/my-comma-auth": "^1.4.1", "@mapbox/mapbox-sdk": "^0.15.3", "@material-ui/core": "^1.5.1", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index aec028f7..7617c8b2 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -6,8 +6,8 @@ settings: dependencies: '@commaai/api': - specifier: github:commaai/comma-api#3.1.2 - version: github.com/commaai/comma-api/d23b152ea64bfcd0de0937d2d525d556870820b6 + specifier: github:commaai/comma-api#3.1.3 + version: github.com/commaai/comma-api/eaae69b722eb0666c1d0f126f1cd1514a7993fb6 '@commaai/my-comma-auth': specifier: ^1.4.1 version: 1.4.1 @@ -9779,10 +9779,10 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - github.com/commaai/comma-api/d23b152ea64bfcd0de0937d2d525d556870820b6: - resolution: {tarball: https://codeload.github.com/commaai/comma-api/tar.gz/d23b152ea64bfcd0de0937d2d525d556870820b6} + github.com/commaai/comma-api/eaae69b722eb0666c1d0f126f1cd1514a7993fb6: + resolution: {tarball: https://codeload.github.com/commaai/comma-api/tar.gz/eaae69b722eb0666c1d0f126f1cd1514a7993fb6} name: '@commaai/api' - version: 3.1.2 + version: 3.1.3 dependencies: '@babel/runtime': 7.23.5 query-string: 7.1.3 diff --git a/src/actions/index.js b/src/actions/index.js index 9c6cc3e4..a928583a 100644 --- a/src/actions/index.js +++ b/src/actions/index.js @@ -32,10 +32,17 @@ export function checkRoutesData() { const { dongleId } = state; const fetchRange = state.filter; - routesRequest = { - req: Drives.getRoutesSegments(dongleId, fetchRange.start, fetchRange.end, state.limit), - dongleId, - }; + if (state.segmentRange) { + routesRequest = { + req: Drives.getRoutesSegments(dongleId, undefined, undefined, undefined, `${dongleId}|${state.segmentRange.log_id}`), + dongleId, + }; + } else { + routesRequest = { + req: Drives.getRoutesSegments(dongleId, fetchRange.start, fetchRange.end, state.limit), + dongleId, + }; + } routesRequestPromise = routesRequest.req.then((routesData) => { state = getState(); @@ -148,8 +155,6 @@ export function urlForState(dongleId, log_id, start, end, prime) { } function updateTimeline(state, dispatch, log_id, start, end, allowPathChange) { - dispatch(checkRoutesData()); - if (!state.loop || !state.loop.startTime || !state.loop.duration || state.loop.startTime < start || state.loop.startTime + state.loop.duration > end || state.loop.duration < end - start) { dispatch(resetPlayback());