Update utils.js

This commit is contained in:
Aleksandr Statciuk 2021-11-18 17:32:04 +03:00
parent 019a08b676
commit 25a04a6cbc
1 changed files with 2 additions and 1 deletions

View File

@ -59,11 +59,12 @@ utils.parseChannels = function (xml) {
const channel = el.attributes
if (!el.elements) throw new Error(`Channel '${channel.xmltv_id}' has no valid name`)
channel.name = el.elements.find(el => el.type === 'text').text
channel.site = channel.site || site
return channel
})
return { site, channels }
return channels
}
utils.sleep = function (ms) {