Fix video browser time zone used by HA plugin

node-20
skvalex 2023-07-30 11:52:48 +07:00
parent d00fe997cf
commit 4f5b8fd117
1 changed files with 4 additions and 6 deletions

View File

@ -158,13 +158,11 @@ module.exports = (s, shinobiConfig, lang, app, io) => {
videoItems.forEach(v => {
const imagesOfVideo = imageItems.filter(i => i.time >= v.time && i.time <= v.end);
if (imagesOfVideo.length > 0) {
const chosenImage = imagesOfVideo[0];
v.time = getISODateTime(v.time);
v.filename = chosenImage.filename;
v.time = getISODateTime(v.time);
v.end = getISODateTime(v.end);
delete v.end;
if (imagesOfVideo.length > 0) {
v.filename = imagesOfVideo[0].filename;
}
});