Don't show the timeline if no cameras support it.
This commit is contained in:
@@ -39,9 +39,6 @@ export class FrigateCardThumbnailCarousel extends LitElement {
|
||||
@property({ attribute: false })
|
||||
public view?: Readonly<View>;
|
||||
|
||||
@property({ attribute: false })
|
||||
public cameras?: Map<string, CameraConfig>;
|
||||
|
||||
@property({ attribute: false })
|
||||
public cameraManager?: CameraManager;
|
||||
|
||||
@@ -150,8 +147,7 @@ export class FrigateCardThumbnailCarousel extends LitElement {
|
||||
*/
|
||||
protected _renderThumbnail(index: number): TemplateResult | void {
|
||||
const media = this.view?.queryResults?.getResult(index) ?? null;
|
||||
const cameraConfig = media ? this.cameras?.get(media.getCameraID()) : null;
|
||||
if (!media || !cameraConfig || !this.view) {
|
||||
if (!media || !this.view) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -166,7 +162,6 @@ export class FrigateCardThumbnailCarousel extends LitElement {
|
||||
.cameraManager=${this.cameraManager}
|
||||
.hass=${this.hass}
|
||||
.media=${media}
|
||||
.cameraConfig=${cameraConfig}
|
||||
.view=${this.view}
|
||||
.seek=${seekTarget && media.includesTime(seekTarget) ? seekTarget : undefined}
|
||||
?details=${!!this.config?.show_details}
|
||||
|
||||
Reference in New Issue
Block a user