Merge branch 'timezone-fix' into 'dev'

Fix video browser time zone used by HA plugin

See merge request Shinobi-Systems/Shinobi!476
node-20
Moe 2023-07-30 17:53:03 +00:00
commit d56b92ada7
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 => { videoItems.forEach(v => {
const imagesOfVideo = imageItems.filter(i => i.time >= v.time && i.time <= v.end); 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.time = getISODateTime(v.time);
v.filename = chosenImage.filename; v.end = getISODateTime(v.end);
delete v.end; if (imagesOfVideo.length > 0) {
v.filename = imagesOfVideo[0].filename;
} }
}); });