Merge pull request #931 from dermotduffy/fix-timeline-for-recordings
Fix timeline button for recordings
This commit is contained in:
@@ -355,7 +355,6 @@ export class FrigateCardThumbnail extends LitElement {
|
||||
if (!this.view || !this.media) {
|
||||
return;
|
||||
}
|
||||
if (ViewMediaClassifier.isEvent(this.media)) {
|
||||
this.view
|
||||
.evolve({
|
||||
view: 'timeline',
|
||||
@@ -365,31 +364,8 @@ export class FrigateCardThumbnail extends LitElement {
|
||||
})
|
||||
.removeContext('timeline')
|
||||
.dispatchChangeEvent(this);
|
||||
} else if (ViewMediaClassifier.isRecording(this.media)) {
|
||||
const startTime = this.media.getStartTime();
|
||||
const endTime = this.media.getStartTime();
|
||||
if (!startTime || !endTime) {
|
||||
return;
|
||||
}
|
||||
// Specifically reset the media target/childIndex, as we cannot
|
||||
// 'select' an hour in the timeline rather we set the window to
|
||||
// matching values.
|
||||
this.view
|
||||
?.evolve({
|
||||
view: 'timeline',
|
||||
query: null,
|
||||
})
|
||||
.mergeInContext({
|
||||
timeline: {
|
||||
window: {
|
||||
start: startTime,
|
||||
end: endTime,
|
||||
},
|
||||
},
|
||||
})
|
||||
.dispatchChangeEvent(this);
|
||||
}
|
||||
}}
|
||||
></ha-icon>`
|
||||
: ''}`;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user