Fix xmltv writer crashing when a rating in the channel json is null for some reason (usually because of the python library)
This commit is contained in:
parent
c114cab269
commit
c2a8bdc4c9
@ -105,7 +105,7 @@ async function _writeProgramme(channel, program, xw) {
|
||||
}
|
||||
xw.endElement()
|
||||
// Rating
|
||||
if (typeof program.rating !== 'undefined') {
|
||||
if ( (program.rating != null) && (typeof program.rating !== 'undefined') ) {
|
||||
xw.startElement('rating')
|
||||
xw.writeAttribute('system', 'MPAA')
|
||||
xw.writeElement('value', program.rating)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user