Match media direction to timeline.

This commit is contained in:
Dermot Duffy
2023-02-08 19:51:57 -08:00
parent 1d4cb3f9ff
commit 479671ab6c
8 changed files with 77 additions and 56 deletions
+3 -1
View File
@@ -132,12 +132,13 @@ export class TimelineDataSource {
}
const mediaArray = await this._cameraManager.executeMediaQueries(hass, eventQueries);
const data: FrigateCardTimelineItem[] = []
for (const media of mediaArray ?? []) {
const endTime = media.getEndTime();
const startTime = media.getStartTime();
const id = media.getID();
if (id && startTime) {
this._dataset.update({
data.push({
id: id,
group: media.getCameraID(),
content: '',
@@ -148,6 +149,7 @@ export class TimelineDataSource {
});
}
}
this._dataset.update(data);
this._eventRanges.add({
...cacheFriendlyWindow,