Update test data

This commit is contained in:
freearhey
2023-10-02 05:52:19 +03:00
parent 97d4e7ad6d
commit 047df3c707
35 changed files with 130 additions and 112 deletions

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels site="example.com">
<channel lang="" xmltv_id="" site_id="140">CNN International</channel>
</channels>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel site="lint.com" xmltv_id="CNNInternationalEurope.us" site_id="140">CNN International</channel>
</channels>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels site="parse-channels.com">
<channel lang="en" xmltv_id="CNNInternational.us" site_id="140">CNN International</channel>
</channels>

View File

@@ -1,8 +1,6 @@
module.exports = {
site: 'parse-channels.com',
url() {
return `https://parse-channels.com`
},
url: 'https://parse-channels.com',
parser() {
return []
},

View File

@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels site="duplicate.com">
<channel lang="en" xmltv_id="BravoEast.us" site_id="150">Bravo</channel>
<channel lang="en" xmltv_id="BravoEast.us" site_id="140">Bravo</channel>
</channels>

View File

@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels site="wrong_xmltv_id.com">
<channel lang="en" xmltv_id="CNNInternational" site_id="140">CNN International</channel>
</channels>

View File

@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel site="example.com" lang="en" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
<channel site="example.com" lang="en" xmltv_id="Channel2.us" site_id="142">Channel 2</channel>
<channel site="example.com" lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
<channel site="example2.com" lang="en" xmltv_id="Channel3.us" site_id="150">Channel 3</channel>
<channel site="example2.com" lang="en" xmltv_id="Channel4.us" site_id="152">Channel 4</channel>
<channel site="example2.com" lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
</channels>

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels site="example.com">
<channel lang="en" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
<channel lang="en" xmltv_id="Channel2.us" site_id="142">Channel 2</channel>
<channel lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
</channels>

View File

@@ -0,0 +1,28 @@
module.exports = {
site: 'example.com',
days: 2,
request: {
timeout: 1000
},
url: 'https://example.com',
parser({ channel, date }) {
if (channel.xmltv_id === 'Channel2.us') return []
else if (channel.xmltv_id === 'Channel1.us' && channel.lang === 'fr') {
return [
{
title: 'Programme1 (example.com)',
start: `${date.format('YYYY-MM-DD')}T04:30:00.000Z`,
stop: `${date.format('YYYY-MM-DD')}T07:10:00.000Z`
}
]
}
return [
{
title: 'Program1 (example.com)',
start: `${date.format('YYYY-MM-DD')}T04:30:00.000Z`,
stop: `${date.format('YYYY-MM-DD')}T07:10:00.000Z`
}
]
}
}

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels site="example2.com">
<channel lang="en" xmltv_id="Channel3.us" site_id="150">Channel 3</channel>
<channel lang="en" xmltv_id="Channel4.us" site_id="152">Channel 4</channel>
<channel lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
</channels>

View File

@@ -0,0 +1,23 @@
module.exports = {
site: 'example2.com',
url: 'https://example2.com',
parser({ channel, date }) {
if (channel.lang === 'fr') {
return [
{
title: 'Programme1 (example2.com)',
start: `${date.format('YYYY-MM-DD')}T04:40:00.000Z`,
stop: `${date.format('YYYY-MM-DD')}T07:10:00.000Z`
}
]
}
return [
{
title: 'Program1 (example2.com)',
start: `${date.format('YYYY-MM-DD')}T04:30:00.000Z`,
stop: `${date.format('YYYY-MM-DD')}T07:10:00.000Z`
}
]
}
}

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="duplicate.com">
<channels>
<channel lang="en" xmltv_id="BravoEast.us" site_id="150">Bravo</channel>
<channel lang="en" xmltv_id="BravoEast.us" site_id="140">Bravo</channel>
</channels>
</site>

View File

@@ -1,8 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="example.com">
<channels>
<channel lang="en" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
<channel lang="en" xmltv_id="Channel2.us" site_id="142">Channel 2</channel>
<channel lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
</channels>
</site>

View File

@@ -1,21 +0,0 @@
module.exports = {
site: 'example.com',
days: 1,
request: {
timeout: 1000
},
url() {
return `https://example.com`
},
parser({ channel }) {
if (channel.xmltv_id === 'Channel2.us') return []
return [
{
title: 'Program1',
start: '2022-03-06T04:30:00.000Z',
stop: '2022-03-06T07:10:00.000Z'
}
]
}
}

View File

@@ -1,10 +0,0 @@
module.exports = {
site: 'example.com',
days: 2,
url() {
return `https://example.com`
},
parser() {
return []
}
}

View File

@@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="example.com">
<channels>
<channel lang="en" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
<channel lang="en" xmltv_id="Channel2.us" site_id="141">Channel 2</channel>
</channels>
</site>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="example.com">
<channels>
<channel lang="ru" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
</channels>
</site>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="ignore.com">
<channels>
<channel lang="en" xmltv_id="1Plus2.lv" site_id="1341">1+2</channel>
</channels>
</site>

View File

@@ -1,10 +0,0 @@
module.exports = {
site: 'ignore.com',
ignore: true,
url() {
return `https://ignore.com`
},
parser() {
return []
}
}

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="lint.com">
<channels>
<channel xmltv_id="CNNInternationalEurope.us" site_id="140">CNN International</channel>
</channels>
</site>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="parse-channels.com">
<channels>
<channel lang="en" xmltv_id="CNNInternational.us" site_id="140">CNN International</channel>
</channels>
</site>

View File

@@ -1,6 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="wrong_xmltv_id.com">
<channels>
<channel lang="en" xmltv_id="CNNInternational" site_id="140">CNN International</channel>
</channels>
</site>