Refactor Frigate specific details out of ViewMediaBase.
This commit is contained in:
@@ -128,7 +128,7 @@ export class FrigateCardThumbnailFeatureRecording extends LitElement {
|
||||
@customElement('frigate-card-thumbnail-details-event')
|
||||
export class FrigateCardThumbnailDetailsEvent extends LitElement {
|
||||
@property({ attribute: false })
|
||||
public media?: EventViewMedia;
|
||||
public media?: EventViewMedia<unknown>;
|
||||
|
||||
@property({ attribute: false })
|
||||
public mediaSeek?: MediaSeek;
|
||||
@@ -180,7 +180,7 @@ export class FrigateCardThumbnailDetailsEvent extends LitElement {
|
||||
@customElement('frigate-card-thumbnail-details-recording')
|
||||
export class FrigateCardThumbnailDetailsRecording extends LitElement {
|
||||
@property({ attribute: false })
|
||||
public media?: RecordingViewMedia;
|
||||
public media?: RecordingViewMedia<unknown>;
|
||||
|
||||
@property({ attribute: false })
|
||||
public mediaSeek?: MediaSeek;
|
||||
|
||||
@@ -374,8 +374,11 @@ export class FrigateCardViewerCarousel extends LitElement {
|
||||
!media ||
|
||||
// If this specific media item has no clip, then do nothing (even if all
|
||||
// the other media items do).
|
||||
!ViewMediaClassifier.isFrigateEvent(media) ||
|
||||
!media.hasClip() ||
|
||||
!ViewMediaClassifier.isEvent(media) ||
|
||||
// If the event certainly has no clip, don't bother going further. If
|
||||
// we're not sure for this camera type (i.e. hasClip() === null) the query
|
||||
// will proceed anyway.
|
||||
media.hasClip() === false ||
|
||||
!MediaQueriesClassifier.areEventQueries(this.view.query)
|
||||
) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user