Skip to content

Commit f629cfa

Browse files
author
Greg Trihus
committed
TT-7351 Refactor audio and navigation properties to use 'x-apmId' instead of 'apmId'
- Updated useBurritoAudio and useBurritoNavigation to change property key from 'apmId' to 'x-apmId' for consistency. - Adjusted related test cases to reflect the property name change.
1 parent 0aa3fb3 commit f629cfa

3 files changed

Lines changed: 8 additions & 8 deletions

File tree

src/renderer/src/burrito/useBurritoAudio.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ describe('useBurritoAudio', () => {
284284
});
285285

286286
const audioIngredient = Object.entries(metadata.ingredients).find(
287-
([, ing]) => ing?.properties?.apmId === '35928'
287+
([, ing]) => ing?.properties?.['x-apmId'] === '35928'
288288
);
289289
expect(audioIngredient).toBeDefined();
290290
expect(audioIngredient![0].toLowerCase().endsWith('.mp3')).toBe(true);
@@ -361,7 +361,7 @@ describe('useBurritoAudio', () => {
361361

362362
expect(ipc.copyFile).toHaveBeenCalled();
363363
const ipIngredient = Object.entries(metadata.ingredients).find(
364-
([, ing]) => ing?.properties?.apmId === 'remote-ip-1'
364+
([, ing]) => ing?.properties?.['x-apmId'] === 'remote-ip-1'
365365
);
366366
expect(ipIngredient).toBeDefined();
367367
expect(ipIngredient![0]).toContain('rights-statement');

src/renderer/src/burrito/useBurritoAudio.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ export const useBurritoAudio = (teamId: string) => {
242242
size,
243243
scope: { [book]: scopeRef ? [scopeRef] : [] },
244244
properties: {
245-
apmId: m.keys?.remoteId || m.id,
245+
'x-apmId': m.keys?.remoteId || m.id,
246246
},
247247
};
248248
};
@@ -265,7 +265,7 @@ export const useBurritoAudio = (teamId: string) => {
265265
size: attr.originalFile.length,
266266
scope: { [book]: scopeRef ? [scopeRef] : [] },
267267
properties: {
268-
apmId: m.keys?.remoteId || m.id,
268+
'x-apmId': m.keys?.remoteId || m.id,
269269
},
270270
};
271271
};
@@ -289,7 +289,7 @@ export const useBurritoAudio = (teamId: string) => {
289289
size: attr.originalFile.length,
290290
scope: { [book]: scopeRef ? [scopeRef] : [] },
291291
properties: {
292-
apmId: m.keys?.remoteId || m.id,
292+
'x-apmId': m.keys?.remoteId || m.id,
293293
},
294294
};
295295
};
@@ -311,7 +311,7 @@ export const useBurritoAudio = (teamId: string) => {
311311
size: url.length + 1,
312312
scope: { [book]: scopeRef ? [scopeRef] : [] },
313313
properties: {
314-
apmId: m.keys?.remoteId || m.id,
314+
'x-apmId': m.keys?.remoteId || m.id,
315315
},
316316
};
317317
};

src/renderer/src/burrito/useBurritoNavigation.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ export const useBurritoNavigation = (teamId: string) => {
279279
size,
280280
scope: { [book]: scopeRef ? [scopeRef] : [] },
281281
properties: {
282-
apmId: m.keys?.remoteId || m.id,
282+
'x-apmId': m.keys?.remoteId || m.id,
283283
},
284284
};
285285
return true;
@@ -372,7 +372,7 @@ export const useBurritoNavigation = (teamId: string) => {
372372
size: stat?.size ?? 0,
373373
scope: { [book]: scopeRef ? [scopeRef] : [] },
374374
properties: {
375-
apmId: g.keys?.remoteId || g.id,
375+
'x-apmId': g.keys?.remoteId || g.id,
376376
},
377377
};
378378
graphicsManifest.push({

0 commit comments

Comments
 (0)