Fix broken show_recordings timeline option .

This commit is contained in:
Dermot Duffy
2023-03-28 20:06:44 -07:00
parent bbf85c294c
commit fc5785150c
2 changed files with 5 additions and 1 deletions
+1
View File
@@ -1073,6 +1073,7 @@ export class FrigateCardTimelineCore extends LitElement {
this.cameraManager, this.cameraManager,
cameraIDs, cameraIDs,
this.timelineConfig.media, this.timelineConfig.media,
this.timelineConfig.show_recordings,
); );
} else { } else {
this._timelineSource = null; this._timelineSource = null;
+4 -1
View File
@@ -49,15 +49,18 @@ export class TimelineDataSource {
protected _cameraIDs: Set<string>; protected _cameraIDs: Set<string>;
protected _mediaType: ClipsOrSnapshotsOrAll; protected _mediaType: ClipsOrSnapshotsOrAll;
protected _showRecordings: boolean;
constructor( constructor(
cameraManager: CameraManager, cameraManager: CameraManager,
cameraIDs: Set<string>, cameraIDs: Set<string>,
media: ClipsOrSnapshotsOrAll, media: ClipsOrSnapshotsOrAll,
showRecordings: boolean,
) { ) {
this._cameraManager = cameraManager; this._cameraManager = cameraManager;
this._cameraIDs = cameraIDs; this._cameraIDs = cameraIDs;
this._mediaType = media; this._mediaType = media;
this._showRecordings = showRecordings;
} }
get dataset(): DataSet<FrigateCardTimelineItem> { get dataset(): DataSet<FrigateCardTimelineItem> {
@@ -83,7 +86,7 @@ export class TimelineDataSource {
try { try {
await Promise.all([ await Promise.all([
this._refreshEvents(hass, window), this._refreshEvents(hass, window),
this._refreshRecordings(hass, window), ...(this._showRecordings ? [this._refreshRecordings(hass, window)] : []),
]); ]);
} catch (e) { } catch (e) {
errorToConsole(e as Error); errorToConsole(e as Error);