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,14 @@
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
<channel id="Channel1.us"><display-name>Channel 1</display-name><url>https://example.com</url></channel>
<channel id="Channel1.us"><display-name>Channel 1</display-name><url>https://example2.com</url></channel>
<channel id="Channel2.us"><display-name>Channel 2</display-name><url>https://example.com</url></channel>
<channel id="Channel3.us"><display-name>Channel 3</display-name><url>https://example2.com</url></channel>
<channel id="Channel4.us"><display-name>Channel 4</display-name><url>https://example2.com</url></channel>
<programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
<programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example.com)</title></programme>
<programme start="20221019044000 +0000" stop="20221019071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example.com)</title></programme>
<programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
<programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel4.us"><title lang="en">Program1 (example2.com)</title></programme>
</tv>

Binary file not shown.

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
<channel id="Channel1.us"><display-name>Channel 1</display-name><url>https://example.com</url></channel>
<channel id="Channel2.us"><display-name>Channel 2</display-name><url>https://example.com</url></channel>
<programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
<programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example.com)</title></programme>
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example.com)</title></programme>
</tv>

View file

@ -1,5 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020"> <?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
<channel id="Channel1.us"><display-name>Channel 1</display-name><url>https://example.com</url></channel> <channel id="Channel1.us"><display-name>Channel 1</display-name><url>https://example.com</url></channel>
<channel id="Channel2.us"><display-name>Channel 2</display-name><url>https://example.com</url></channel> <channel id="Channel2.us"><display-name>Channel 2</display-name><url>https://example.com</url></channel>
<programme start="20220306043000 +0000" stop="20220306071000 +0000" channel="Channel1.us"><title lang="en">Program1</title></programme> <programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
</tv> </tv>

View file

@ -1,4 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020"> <?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
<channel id="Channel1.us"><display-name>Channel 1</display-name><url>https://example.com</url></channel> <channel id="Channel1.us"><display-name>Channel 1</display-name><url>https://example.com</url></channel>
<programme start="20220306043000 +0000" stop="20220306071000 +0000" channel="Channel1.us"><title lang="fr">Program1</title></programme> <programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example.com)</title></programme>
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example.com)</title></programme>
</tv> </tv>

View file

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<channels>
<channel site="parse-channels.com" lang="en" xmltv_id="" site_id="140">CNN International</channel>
<channel site="parse-channels.com" lang="en" xmltv_id="" site_id="240">BBC World News</channel>
</channels>

View file

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

View file

@ -1,7 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="parse-channels.com">
<channels>
<channel lang="en" xmltv_id="" site_id="140">CNN International</channel>
<channel lang="en" xmltv_id="" site_id="240">BBC World News</channel>
</channels>
</site>

View file

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

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 = { module.exports = {
site: 'parse-channels.com', site: 'parse-channels.com',
url() { url: 'https://parse-channels.com',
return `https://parse-channels.com`
},
parser() { parser() {
return [] 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>