epg-grabber 0.18.0 → 0.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/epg-grabber.js +1 -1
- package/package.json +1 -1
- package/src/utils.js +1 -1
- package/tests/utils.test.js +3 -3
package/bin/epg-grabber.js
CHANGED
|
@@ -79,7 +79,7 @@ async function main() {
|
|
|
79
79
|
if (!config.channels) return logger.error('Path to [site].channels.xml is missing')
|
|
80
80
|
logger.info(`Loading '${config.channels}'...`)
|
|
81
81
|
const channelsXML = fs.readFileSync(path.resolve(config.channels), { encoding: 'utf-8' })
|
|
82
|
-
const channels = utils.parseChannels(channelsXML)
|
|
82
|
+
const { channels } = utils.parseChannels(channelsXML)
|
|
83
83
|
|
|
84
84
|
let programs = []
|
|
85
85
|
let i = 1
|
package/package.json
CHANGED
package/src/utils.js
CHANGED
package/tests/utils.test.js
CHANGED
|
@@ -28,7 +28,7 @@ it('can load valid config.js', () => {
|
|
|
28
28
|
|
|
29
29
|
it('can parse valid channels.xml', () => {
|
|
30
30
|
const file = fs.readFileSync('./tests/input/example.com.channels.xml', { encoding: 'utf-8' })
|
|
31
|
-
const channels = utils.parseChannels(file)
|
|
31
|
+
const { channels } = utils.parseChannels(file)
|
|
32
32
|
expect(channels).toEqual([
|
|
33
33
|
{
|
|
34
34
|
name: '1 TV',
|
|
@@ -51,7 +51,7 @@ it('can parse valid channels.xml', () => {
|
|
|
51
51
|
|
|
52
52
|
it('can convert object to xmltv string', () => {
|
|
53
53
|
const file = fs.readFileSync('./tests/input/example.com.channels.xml', { encoding: 'utf-8' })
|
|
54
|
-
const channels = utils.parseChannels(file)
|
|
54
|
+
const { channels } = utils.parseChannels(file)
|
|
55
55
|
const programs = [
|
|
56
56
|
{
|
|
57
57
|
title: 'Program 1',
|
|
@@ -101,7 +101,7 @@ it('can convert object to xmltv string without categories', () => {
|
|
|
101
101
|
|
|
102
102
|
it('can convert object to xmltv string with multiple categories', () => {
|
|
103
103
|
const file = fs.readFileSync('./tests/input/example.com.channels.xml', { encoding: 'utf-8' })
|
|
104
|
-
const channels = utils.parseChannels(file)
|
|
104
|
+
const { channels } = utils.parseChannels(file)
|
|
105
105
|
const programs = [
|
|
106
106
|
{
|
|
107
107
|
title: 'Program 1',
|