Update tests/__data__

This commit is contained in:
freearhey 2025-04-19 02:04:20 +03:00
parent 9f93a30988
commit e54dfb4042
10 changed files with 68 additions and 1 deletions

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="Channel3.us"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/><url>https://example.com</url></channel>
<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>
<programme start="20221019043000 +0000" stop="20221019071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
</tv>

View file

@ -0,0 +1 @@
[]

View file

@ -0,0 +1 @@
[{"id":"auto","name":"Auto"},{"id":"animation","name":"Animation"},{"id":"business","name":"Business"},{"id":"classic","name":"Classic"},{"id":"comedy","name":"Comedy"},{"id":"cooking","name":"Cooking"},{"id":"culture","name":"Culture"},{"id":"documentary","name":"Documentary"},{"id":"education","name":"Education"},{"id":"entertainment","name":"Entertainment"},{"id":"family","name":"Family"},{"id":"general","name":"General"},{"id":"kids","name":"Kids"},{"id":"legislative","name":"Legislative"},{"id":"lifestyle","name":"Lifestyle"},{"id":"movies","name":"Movies"},{"id":"music","name":"Music"},{"id":"news","name":"News"},{"id":"outdoor","name":"Outdoor"},{"id":"relax","name":"Relax"},{"id":"religious","name":"Religious"},{"id":"series","name":"Series"},{"id":"science","name":"Science"},{"id":"shop","name":"Shop"},{"id":"sports","name":"Sports"},{"id":"travel","name":"Travel"},{"id":"weather","name":"Weather"},{"id":"xxx","name":"XXX"}]

View file

@ -0,0 +1,10 @@
[
{
"channel": "CNNInternational.us",
"feed": "SD",
"site": "9tv.co.il",
"site_id": "#",
"site_name": "CNN (guide)",
"lang": "en"
}
]

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,10 @@
[
{
"channel": "CNNInternational.us",
"feed": "SD",
"url": "https://live.relentlessinnovations.net:1936/imantv/imantv/playlist.m3u8",
"referrer": null,
"user_agent": null,
"quality": "480p"
}
]

File diff suppressed because one or more lines are too long

View file

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

View file

@ -0,0 +1,7 @@
<?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" logo="https://i.imgur.com/qmRnD0M.png">Channel 2</channel>
<channel lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
<channel lang="it" xmltv_id="Channel3.us" site_id="143">Channel 3</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`
}
]
}
}