Update utils.js

This commit is contained in:
Aleksandr Statciuk 2022-04-09 18:43:15 +03:00
parent 4ae18b24dd
commit c99019c2bb
1 changed files with 4 additions and 2 deletions

View File

@ -220,13 +220,15 @@ utils.convertToXMLTV = function ({ channels, programs }) {
output += '</tv>'
function createXMLTVNS(s, e) {
if (!s || !e) return null
if (!s && !e) return null
s = s || 1
return `${s - 1}.${e - 1}.0/1`
}
function createOnScreen(s, e) {
if (!s || !e) return null
if (!s && !e) return null
s = s || 1
s = padStart(s, 2, '0')
e = padStart(e, 2, '0')