Update tests data

This commit is contained in:
freearhey 2023-09-19 06:15:48 +03:00
parent 54d482269f
commit 4b9d0bd678
3 changed files with 9 additions and 2 deletions

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>
<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="20220306043000 +0000" stop="20220306071000 +0000" channel="Channel1.us"><title lang="en">Program1</title></programme>
</tv> </tv>

View file

@ -2,6 +2,7 @@
<site site="example.com"> <site site="example.com">
<channels> <channels>
<channel lang="en" xmltv_id="Channel1.us" site_id="140">Channel 1</channel> <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> <channel lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
</channels> </channels>
</site> </site>

View file

@ -1,10 +1,15 @@
module.exports = { module.exports = {
site: 'example.com', site: 'example.com',
days: 2, days: 1,
request: {
timeout: 1000
},
url() { url() {
return `https://example.com` return `https://example.com`
}, },
parser() { parser({ channel }) {
if (channel.xmltv_id === 'Channel2.us') return []
return [ return [
{ {
title: 'Program1', title: 'Program1',