diff --git a/src/components/timeline-core.ts b/src/components/timeline-core.ts index 59bcb9ce..4bc8a063 100644 --- a/src/components/timeline-core.ts +++ b/src/components/timeline-core.ts @@ -1073,6 +1073,7 @@ export class FrigateCardTimelineCore extends LitElement { this.cameraManager, cameraIDs, this.timelineConfig.media, + this.timelineConfig.show_recordings, ); } else { this._timelineSource = null; diff --git a/src/utils/timeline-source.ts b/src/utils/timeline-source.ts index 67d2a2a8..343ad79e 100644 --- a/src/utils/timeline-source.ts +++ b/src/utils/timeline-source.ts @@ -49,15 +49,18 @@ export class TimelineDataSource { protected _cameraIDs: Set; protected _mediaType: ClipsOrSnapshotsOrAll; + protected _showRecordings: boolean; constructor( cameraManager: CameraManager, cameraIDs: Set, media: ClipsOrSnapshotsOrAll, + showRecordings: boolean, ) { this._cameraManager = cameraManager; this._cameraIDs = cameraIDs; this._mediaType = media; + this._showRecordings = showRecordings; } get dataset(): DataSet { @@ -83,7 +86,7 @@ export class TimelineDataSource { try { await Promise.all([ this._refreshEvents(hass, window), - this._refreshRecordings(hass, window), + ...(this._showRecordings ? [this._refreshRecordings(hass, window)] : []), ]); } catch (e) { errorToConsole(e as Error);