get day start as seconds

This commit is contained in:
jb-alvarado 2021-03-23 21:46:31 +01:00
parent 62b1db61ed
commit 7b83b5d751

View File

@ -1,10 +1,10 @@
export default ({ app }, inject) => { export default ({ app }, inject) => {
inject('processPlaylist', (dayStart, list) => { inject('processPlaylist', (dayStart, list) => {
if (!dayStart) { if (!dayStart) {
dayStart = '00:00:00' dayStart = 0
} }
const [h, m, s] = dayStart.split(':')
let begin = parseFloat(h) * 3600 + parseFloat(m) * 60 + parseFloat(s) let begin = dayStart
for (const item of list) { for (const item of list) {
item.begin = begin item.begin = begin