Merge pull request #1033 from dermotduffy/disable-recordings
Fix broken show_recordings timeline option
This commit is contained in:
@@ -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;
|
||||||
|
|||||||
@@ -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);
|
||||||
|
|||||||
Reference in New Issue
Block a user