Normalize line endings per .gitattributes
This commit is contained in:
1 parent
c5a88bcc6b
commit
4007505adc
1356 files changed
+782784
-782784
No files matched your search
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" site_id="140" lang="en" xmltv_id="CNNInternational.us@MENA">CNN International</channel>
|
||||
<channel site="example.com" site_id="240" lang="en" logo="https://example.com/logo.png" xmltv_id="">BBC World News</channel>
|
||||
</channels>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" site_id="140" lang="en" xmltv_id="CNNInternational.us@MENA">CNN International</channel>
|
||||
<channel site="example.com" site_id="240" lang="en" logo="https://example.com/logo.png" xmltv_id="">BBC World News</channel>
|
||||
</channels>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" site_id="240" lang="en" xmltv_id="">BBC World News</channel>
|
||||
<channel site="example.com" site_id="140" lang="en" xmltv_id="CNNInternational.us@Europe">CNN International</channel>
|
||||
</channels>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" site_id="240" lang="en" xmltv_id="">BBC World News</channel>
|
||||
<channel site="example.com" site_id="140" lang="en" xmltv_id="CNNInternational.us@Europe">CNN International</channel>
|
||||
</channels>
|
||||
@@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us@HD"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel2.us"><display-name>Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/><lcn>36</lcn></channel>
|
||||
<channel id="140"><display-name>Channel 1</display-name></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"/></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us@HD"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel2.us"><display-name>Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/><lcn>36</lcn></channel>
|
||||
<channel id="140"><display-name>Channel 1</display-name></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"/></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,18 +1,18 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us"><display-name>Custom Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></channel>
|
||||
<channel id="Channel3.us@Wrong"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<channel id="Channel2.us"><display-name>Custom Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021044000 +0000" stop="20221021071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us@Wrong"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us@Wrong"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us"><display-name>Custom Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></channel>
|
||||
<channel id="Channel3.us@Wrong"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<channel id="Channel2.us"><display-name>Custom Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021044000 +0000" stop="20221021071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us@Wrong"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us@Wrong"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel3.us"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel3.us"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel3.us"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel3.us"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,8 +1,8 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="140"><display-name>Channel 1</display-name></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"/></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="140"><display-name>Channel 1</display-name></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"/></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,21 +1,21 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us@HD"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></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"/></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"/></channel>
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<channel id="Channel2.us"><display-name>Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/><lcn>36</lcn></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021044000 +0000" stop="20221021071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us@HD"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel1.us"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel4.us@HD"><display-name>Channel 4</display-name><icon src="https://i.imgur.com/BPzH88J.png"/></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"/></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"/></channel>
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<channel id="Channel2.us"><display-name>Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/><lcn>36</lcn></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021044000 +0000" stop="20221021071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221020044000 +0000" stop="20221020071000 +0000" channel="Channel1.us"><title lang="fr">Programme1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel4.us@HD"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="en">Program1 (example2.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us@HD"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel2.us"><display-name>Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/><lcn>36</lcn></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel1.us@HD"><display-name>Channel 1</display-name><icon src="https://i.imgur.com/GPzH88J.png"/></channel>
|
||||
<channel id="Channel2.us"><display-name>Channel 2</display-name><icon src="https://i.imgur.com/qmRnD0M.png"/><lcn>36</lcn></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel1.us@HD"><title lang="en">Program1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="140"><display-name>Channel 1</display-name></channel>
|
||||
<programme start="20221020043000 +0000" stop="20221020071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
<programme start="20221021043000 +0000" stop="20221021071000 +0000" channel="140"><title lang="fr">Programme1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel3.us"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221020">
|
||||
<channel id="Channel3.us"><display-name>Channel 3</display-name><icon src="https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"/></channel>
|
||||
<programme start="20221020043100 +0000" stop="20221020071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
<programme start="20221021043100 +0000" stop="20221021071000 +0000" channel="Channel3.us"><title lang="it">Program1 (example.com)</title></programme>
|
||||
</tv>
|
||||
@@ -1,13 +1,13 @@
|
||||
# Guides
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th align="left">Host</th><th align="left">Status</th><th align="left">Channels</th><th align="left">Last Updated</th><th align="left">Links</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>example.com</td><td align="center">🔴</td><td align="right">0</td><td align="left">-</td><td>-</td></tr>
|
||||
<tr><td>worker-9dd4.onrender.com</td><td align="center">🟢</td><td align="right">1</td><td align="left">a day ago</td><td><a href="https://worker-9dd4.onrender.com/guide.xml">XML</a> | <a href="https://worker-9dd4.onrender.com/guide.xml.gz">GZIP</a> | <a href="https://worker-9dd4.onrender.com/guide.json">JSON</a></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
[How can I add my server to the list?](CONTRIBUTING.md#how-to-add-my-server-to-the-guidesmd)
|
||||
# Guides
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th align="left">Host</th><th align="left">Status</th><th align="left">Channels</th><th align="left">Last Updated</th><th align="left">Links</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td>example.com</td><td align="center">🔴</td><td align="right">0</td><td align="left">-</td><td>-</td></tr>
|
||||
<tr><td>worker-9dd4.onrender.com</td><td align="center">🟢</td><td align="right">1</td><td align="left">a day ago</td><td><a href="https://worker-9dd4.onrender.com/guide.xml">XML</a> | <a href="https://worker-9dd4.onrender.com/guide.xml.gz">GZIP</a> | <a href="https://worker-9dd4.onrender.com/guide.json">JSON</a></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
[How can I add my server to the list?](CONTRIBUTING.md#how-to-add-my-server-to-the-guidesmd)
|
||||
@@ -1,21 +1,21 @@
|
||||
# example.com
|
||||
|
||||
https://example.com
|
||||
|
||||
### Download the guide
|
||||
|
||||
```sh
|
||||
npm run grab --- --sites=example.com
|
||||
```
|
||||
|
||||
### Update channel list
|
||||
|
||||
```sh
|
||||
npm run channels:parse --- --config=./sites/example.com/example.com.config.js --output=./sites/example.com/example.com.channels.xml
|
||||
```
|
||||
|
||||
### Test
|
||||
|
||||
```sh
|
||||
npm test --- example.com
|
||||
```
|
||||
# example.com
|
||||
|
||||
https://example.com
|
||||
|
||||
### Download the guide
|
||||
|
||||
```sh
|
||||
npm run grab --- --sites=example.com
|
||||
```
|
||||
|
||||
### Update channel list
|
||||
|
||||
```sh
|
||||
npm run channels:parse --- --config=./sites/example.com/example.com.config.js --output=./sites/example.com/example.com.channels.xml
|
||||
```
|
||||
|
||||
### Test
|
||||
|
||||
```sh
|
||||
npm test --- example.com
|
||||
```
|
||||
@@ -1,12 +1,12 @@
|
||||
# Sites
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th align="left">Site</th><th align="left">Channels</th><th align="left">Status</th><th align="left">Notes</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td><a href="sites/iltalehti.fi">iltalehti.fi</a></td><td align="right">142</td><td align="center">🟡</td><td>https://github.com/iptv-org/epg/issues/2396</td></tr>
|
||||
<tr><td><a href="sites/indihometv.com">indihometv.com</a></td><td align="right">130</td><td align="center">🟢</td><td></td></tr>
|
||||
<tr><td><a href="sites/kan.org.il">kan.org.il</a></td><td align="right">3</td><td align="center">🔴</td><td>https://github.com/iptv-org/epg/issues/2273</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
# Sites
|
||||
|
||||
<table>
|
||||
<thead>
|
||||
<tr><th align="left">Site</th><th align="left">Channels</th><th align="left">Status</th><th align="left">Notes</th></tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr><td><a href="sites/iltalehti.fi">iltalehti.fi</a></td><td align="right">142</td><td align="center">🟡</td><td>https://github.com/iptv-org/epg/issues/2396</td></tr>
|
||||
<tr><td><a href="sites/indihometv.com">indihometv.com</a></td><td align="right">130</td><td align="center">🟢</td><td></td></tr>
|
||||
<tr><td><a href="sites/kan.org.il">kan.org.il</a></td><td align="right">3</td><td align="center">🔴</td><td>https://github.com/iptv-org/epg/issues/2273</td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" xmltv_id="wrong_id" site_id="240" lang="en" logo="https://example.com/logo.png">BBC World News</channel>
|
||||
<channel site="example.com" lang="en" xmltv_id="CNNInternational.us" site_id="140" >CNN International</channel>
|
||||
</channels>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" xmltv_id="wrong_id" site_id="240" lang="en" logo="https://example.com/logo.png">BBC World News</channel>
|
||||
<channel site="example.com" lang="en" xmltv_id="CNNInternational.us" site_id="140" >CNN International</channel>
|
||||
</channels>
|
||||
@@ -1,138 +1,138 @@
|
||||
[
|
||||
{
|
||||
"id": "Bravo.us",
|
||||
"name": "Bravo",
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"closed": "2020-01-01",
|
||||
"replaced_by": "R6.co"
|
||||
},
|
||||
{
|
||||
"id": "Bravos.us",
|
||||
"name": "Bravos",
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "CNNInternational.us",
|
||||
"name": "CNN International",
|
||||
"alt_names": [
|
||||
"CNN",
|
||||
"CNN Int"
|
||||
],
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "MNetMovies2.za",
|
||||
"name": "M-Net Movies 2",
|
||||
"network": null,
|
||||
"country": "ZA",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "6eren.dk",
|
||||
"name": "6'eren",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [
|
||||
"Warner Bros. Discovery EMEA"
|
||||
],
|
||||
"country": "DK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": "2009-01-01",
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": "http://www.6-eren.dk/"
|
||||
},
|
||||
{
|
||||
"id": "BBCNews.uk",
|
||||
"name": "BBC News",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": "http://news.bbc.co.uk/"
|
||||
},
|
||||
{
|
||||
"id": "CNN.us",
|
||||
"name": "CNN",
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "Channel1.us",
|
||||
"name": "Channel 1",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
},
|
||||
{
|
||||
"id": "Channel2.us",
|
||||
"name": "Channel 2",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
},
|
||||
{
|
||||
"id": "Channel3.us",
|
||||
"name": "Channel 3",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
},
|
||||
{
|
||||
"id": "Channel4.us",
|
||||
"name": "Channel 4",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
}
|
||||
[
|
||||
{
|
||||
"id": "Bravo.us",
|
||||
"name": "Bravo",
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"closed": "2020-01-01",
|
||||
"replaced_by": "R6.co"
|
||||
},
|
||||
{
|
||||
"id": "Bravos.us",
|
||||
"name": "Bravos",
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "CNNInternational.us",
|
||||
"name": "CNN International",
|
||||
"alt_names": [
|
||||
"CNN",
|
||||
"CNN Int"
|
||||
],
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "MNetMovies2.za",
|
||||
"name": "M-Net Movies 2",
|
||||
"network": null,
|
||||
"country": "ZA",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "6eren.dk",
|
||||
"name": "6'eren",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [
|
||||
"Warner Bros. Discovery EMEA"
|
||||
],
|
||||
"country": "DK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": "2009-01-01",
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": "http://www.6-eren.dk/"
|
||||
},
|
||||
{
|
||||
"id": "BBCNews.uk",
|
||||
"name": "BBC News",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [
|
||||
"news"
|
||||
],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": "http://news.bbc.co.uk/"
|
||||
},
|
||||
{
|
||||
"id": "CNN.us",
|
||||
"name": "CNN",
|
||||
"network": null,
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false
|
||||
},
|
||||
{
|
||||
"id": "Channel1.us",
|
||||
"name": "Channel 1",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "US",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
},
|
||||
{
|
||||
"id": "Channel2.us",
|
||||
"name": "Channel 2",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
},
|
||||
{
|
||||
"id": "Channel3.us",
|
||||
"name": "Channel 3",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
},
|
||||
{
|
||||
"id": "Channel4.us",
|
||||
"name": "Channel 4",
|
||||
"alt_names": [],
|
||||
"network": null,
|
||||
"owners": [],
|
||||
"country": "UK",
|
||||
"categories": [],
|
||||
"is_nsfw": false,
|
||||
"launched": null,
|
||||
"closed": null,
|
||||
"replaced_by": null,
|
||||
"website": ""
|
||||
}
|
||||
]
|
||||
@@ -1,72 +1,72 @@
|
||||
[
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"id": "MENA",
|
||||
"name": "MENA",
|
||||
"is_main": true,
|
||||
"broadcast_area": [
|
||||
"r/INT"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"id": "Europe",
|
||||
"name": "Europe",
|
||||
"is_main": false,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "Bravo.us",
|
||||
"id": "East",
|
||||
"name": "East",
|
||||
"is_main": true,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "Channel1.us",
|
||||
"id": "HD",
|
||||
"name": "HD",
|
||||
"is_main": false,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "Channel4.us",
|
||||
"id": "HD",
|
||||
"name": "HD",
|
||||
"is_main": true,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
}
|
||||
[
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"id": "MENA",
|
||||
"name": "MENA",
|
||||
"is_main": true,
|
||||
"broadcast_area": [
|
||||
"r/INT"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"id": "Europe",
|
||||
"name": "Europe",
|
||||
"is_main": false,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "Bravo.us",
|
||||
"id": "East",
|
||||
"name": "East",
|
||||
"is_main": true,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "Channel1.us",
|
||||
"id": "HD",
|
||||
"name": "HD",
|
||||
"is_main": false,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
},
|
||||
{
|
||||
"channel": "Channel4.us",
|
||||
"id": "HD",
|
||||
"name": "HD",
|
||||
"is_main": true,
|
||||
"broadcast_area": [
|
||||
"r/EUR"
|
||||
],
|
||||
"timezones": [
|
||||
"America/New_York"
|
||||
],
|
||||
"languages": [],
|
||||
"video_format": "480i"
|
||||
}
|
||||
]
|
||||
@@ -1,10 +1,10 @@
|
||||
[
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"feed": "SD",
|
||||
"site": "9tv.co.il",
|
||||
"site_id": "#",
|
||||
"site_name": "CNN (guide)",
|
||||
"lang": "en"
|
||||
}
|
||||
[
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"feed": "SD",
|
||||
"site": "9tv.co.il",
|
||||
"site_id": "#",
|
||||
"site_name": "CNN (guide)",
|
||||
"lang": "en"
|
||||
}
|
||||
]
|
||||
@@ -1,29 +1,29 @@
|
||||
[
|
||||
{
|
||||
"channel": "Channel3.us",
|
||||
"feed": null,
|
||||
"tags": [],
|
||||
"width": 334,
|
||||
"height": 210,
|
||||
"format": "PNG",
|
||||
"url": "https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"
|
||||
},
|
||||
{
|
||||
"channel": "Channel4.us",
|
||||
"feed": "HD",
|
||||
"tags": [],
|
||||
"width": 334,
|
||||
"height": 210,
|
||||
"format": "PNG",
|
||||
"url": "https://i.imgur.com/BPzH88J.png"
|
||||
},
|
||||
{
|
||||
"channel": "Channel1.us",
|
||||
"feed": null,
|
||||
"tags": [],
|
||||
"width": 334,
|
||||
"height": 210,
|
||||
"format": "PNG",
|
||||
"url": "https://i.imgur.com/GPzH88J.png"
|
||||
}
|
||||
[
|
||||
{
|
||||
"channel": "Channel3.us",
|
||||
"feed": null,
|
||||
"tags": [],
|
||||
"width": 334,
|
||||
"height": 210,
|
||||
"format": "PNG",
|
||||
"url": "https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"
|
||||
},
|
||||
{
|
||||
"channel": "Channel4.us",
|
||||
"feed": "HD",
|
||||
"tags": [],
|
||||
"width": 334,
|
||||
"height": 210,
|
||||
"format": "PNG",
|
||||
"url": "https://i.imgur.com/BPzH88J.png"
|
||||
},
|
||||
{
|
||||
"channel": "Channel1.us",
|
||||
"feed": null,
|
||||
"tags": [],
|
||||
"width": 334,
|
||||
"height": 210,
|
||||
"format": "PNG",
|
||||
"url": "https://i.imgur.com/GPzH88J.png"
|
||||
}
|
||||
]
|
||||
@@ -1,10 +1,10 @@
|
||||
[
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"feed": "SD",
|
||||
"url": "https://live.relentlessinnovations.net:1936/imantv/imantv/playlist.m3u8",
|
||||
"referrer": null,
|
||||
"user_agent": null,
|
||||
"quality": "480p"
|
||||
}
|
||||
[
|
||||
{
|
||||
"channel": "CNNInternational.us",
|
||||
"feed": "SD",
|
||||
"url": "https://live.relentlessinnovations.net:1936/imantv/imantv/playlist.m3u8",
|
||||
"referrer": null,
|
||||
"user_agent": null,
|
||||
"quality": "480p"
|
||||
}
|
||||
]
|
||||
@@ -1,352 +1,352 @@
|
||||
[
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Alberta",
|
||||
"code": "CA-AB"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "British Columbia",
|
||||
"code": "CA-BC"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Manitoba",
|
||||
"code": "CA-MB"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "New Brunswick",
|
||||
"code": "CA-NB"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Newfoundland and Labrador",
|
||||
"code": "CA-NL"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Northwest Territories",
|
||||
"code": "CA-NT"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Nova Scotia",
|
||||
"code": "CA-NS"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Nunavut",
|
||||
"code": "CA-NU"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Ontario",
|
||||
"code": "CA-ON"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Prince Edward Island",
|
||||
"code": "CA-PE"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Quebec",
|
||||
"code": "CA-QC"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Saskatchewan",
|
||||
"code": "CA-SK"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Yukon",
|
||||
"code": "CA-YT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Alabama",
|
||||
"code": "US-AL"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Alaska",
|
||||
"code": "US-AK"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "American Samoa",
|
||||
"code": "US-AS"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Arizona",
|
||||
"code": "US-AZ"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Arkansas",
|
||||
"code": "US-AR"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "California",
|
||||
"code": "US-CA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Colorado",
|
||||
"code": "US-CO"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Connecticut",
|
||||
"code": "US-CT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Delaware",
|
||||
"code": "US-DE"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "District of Columbia",
|
||||
"code": "US-DC"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Florida",
|
||||
"code": "US-FL"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Georgia",
|
||||
"code": "US-GA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Guam",
|
||||
"code": "US-GU"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Hawaii",
|
||||
"code": "US-HI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Idaho",
|
||||
"code": "US-ID"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Illinois",
|
||||
"code": "US-IL"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Indiana",
|
||||
"code": "US-IN"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Iowa",
|
||||
"code": "US-IA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Kansas",
|
||||
"code": "US-KS"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Kentucky",
|
||||
"code": "US-KY"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Louisiana",
|
||||
"code": "US-LA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Maine",
|
||||
"code": "US-ME"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Maryland",
|
||||
"code": "US-MD"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Massachusetts",
|
||||
"code": "US-MA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Michigan",
|
||||
"code": "US-MI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Minnesota",
|
||||
"code": "US-MN"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Mississippi",
|
||||
"code": "US-MS"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Missouri",
|
||||
"code": "US-MO"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Montana",
|
||||
"code": "US-MT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Nebraska",
|
||||
"code": "US-NE"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Nevada",
|
||||
"code": "US-NV"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New Hampshire",
|
||||
"code": "US-NH"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New Jersey",
|
||||
"code": "US-NJ"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New Mexico",
|
||||
"code": "US-NM"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New York",
|
||||
"code": "US-NY"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "North Carolina",
|
||||
"code": "US-NC"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "North Dakota",
|
||||
"code": "US-ND"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Northern Mariana Islands",
|
||||
"code": "US-MP"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Ohio",
|
||||
"code": "US-OH"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Oklahoma",
|
||||
"code": "US-OK"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Oregon",
|
||||
"code": "US-OR"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Pennsylvania",
|
||||
"code": "US-PA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Puerto Rico",
|
||||
"code": "US-PR"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Rhode Island",
|
||||
"code": "US-RI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "South Carolina",
|
||||
"code": "US-SC"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "South Dakota",
|
||||
"code": "US-SD"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Tennessee",
|
||||
"code": "US-TN"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Texas",
|
||||
"code": "US-TX"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "U.S. Virgin Islands",
|
||||
"code": "US-VI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "United States Minor Outlying Islands",
|
||||
"code": "US-UM"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Utah",
|
||||
"code": "US-UT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Vermont",
|
||||
"code": "US-VT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Virginia",
|
||||
"code": "US-VA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Washington",
|
||||
"code": "US-WA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "West Virginia",
|
||||
"code": "US-WV"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Wisconsin",
|
||||
"code": "US-WI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Wyoming",
|
||||
"code": "US-WY"
|
||||
}
|
||||
[
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Alberta",
|
||||
"code": "CA-AB"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "British Columbia",
|
||||
"code": "CA-BC"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Manitoba",
|
||||
"code": "CA-MB"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "New Brunswick",
|
||||
"code": "CA-NB"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Newfoundland and Labrador",
|
||||
"code": "CA-NL"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Northwest Territories",
|
||||
"code": "CA-NT"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Nova Scotia",
|
||||
"code": "CA-NS"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Nunavut",
|
||||
"code": "CA-NU"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Ontario",
|
||||
"code": "CA-ON"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Prince Edward Island",
|
||||
"code": "CA-PE"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Quebec",
|
||||
"code": "CA-QC"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Saskatchewan",
|
||||
"code": "CA-SK"
|
||||
},
|
||||
{
|
||||
"country": "CA",
|
||||
"name": "Yukon",
|
||||
"code": "CA-YT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Alabama",
|
||||
"code": "US-AL"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Alaska",
|
||||
"code": "US-AK"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "American Samoa",
|
||||
"code": "US-AS"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Arizona",
|
||||
"code": "US-AZ"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Arkansas",
|
||||
"code": "US-AR"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "California",
|
||||
"code": "US-CA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Colorado",
|
||||
"code": "US-CO"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Connecticut",
|
||||
"code": "US-CT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Delaware",
|
||||
"code": "US-DE"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "District of Columbia",
|
||||
"code": "US-DC"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Florida",
|
||||
"code": "US-FL"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Georgia",
|
||||
"code": "US-GA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Guam",
|
||||
"code": "US-GU"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Hawaii",
|
||||
"code": "US-HI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Idaho",
|
||||
"code": "US-ID"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Illinois",
|
||||
"code": "US-IL"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Indiana",
|
||||
"code": "US-IN"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Iowa",
|
||||
"code": "US-IA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Kansas",
|
||||
"code": "US-KS"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Kentucky",
|
||||
"code": "US-KY"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Louisiana",
|
||||
"code": "US-LA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Maine",
|
||||
"code": "US-ME"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Maryland",
|
||||
"code": "US-MD"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Massachusetts",
|
||||
"code": "US-MA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Michigan",
|
||||
"code": "US-MI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Minnesota",
|
||||
"code": "US-MN"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Mississippi",
|
||||
"code": "US-MS"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Missouri",
|
||||
"code": "US-MO"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Montana",
|
||||
"code": "US-MT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Nebraska",
|
||||
"code": "US-NE"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Nevada",
|
||||
"code": "US-NV"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New Hampshire",
|
||||
"code": "US-NH"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New Jersey",
|
||||
"code": "US-NJ"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New Mexico",
|
||||
"code": "US-NM"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "New York",
|
||||
"code": "US-NY"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "North Carolina",
|
||||
"code": "US-NC"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "North Dakota",
|
||||
"code": "US-ND"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Northern Mariana Islands",
|
||||
"code": "US-MP"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Ohio",
|
||||
"code": "US-OH"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Oklahoma",
|
||||
"code": "US-OK"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Oregon",
|
||||
"code": "US-OR"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Pennsylvania",
|
||||
"code": "US-PA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Puerto Rico",
|
||||
"code": "US-PR"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Rhode Island",
|
||||
"code": "US-RI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "South Carolina",
|
||||
"code": "US-SC"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "South Dakota",
|
||||
"code": "US-SD"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Tennessee",
|
||||
"code": "US-TN"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Texas",
|
||||
"code": "US-TX"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "U.S. Virgin Islands",
|
||||
"code": "US-VI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "United States Minor Outlying Islands",
|
||||
"code": "US-UM"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Utah",
|
||||
"code": "US-UT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Vermont",
|
||||
"code": "US-VT"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Virginia",
|
||||
"code": "US-VA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Washington",
|
||||
"code": "US-WA"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "West Virginia",
|
||||
"code": "US-WV"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Wisconsin",
|
||||
"code": "US-WI"
|
||||
},
|
||||
{
|
||||
"country": "US",
|
||||
"name": "Wyoming",
|
||||
"code": "US-WY"
|
||||
}
|
||||
]
|
||||
@@ -1,9 +1,9 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" lang="en" xmltv_id="Channel1.us" site_id="140">Custom Channel 1</channel>
|
||||
<channel site="example.com" lang="en" xmltv_id="Channel2.us" site_id="142" logo="https://i.imgur.com/qmRnD0M.png">Custom Channel 2</channel>
|
||||
<channel site="example.com" lang="fr" xmltv_id="" site_id="140">Channel 1</channel>
|
||||
<channel site="example2.com" lang="en" xmltv_id="Channel3.us@Wrong" site_id="150">Channel 3</channel>
|
||||
<channel site="example2.com" lang="en" xmltv_id="Channel4.us@HD" site_id="152">Channel 4</channel>
|
||||
<channel site="example2.com" lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels>
|
||||
<channel site="example.com" lang="en" xmltv_id="Channel1.us" site_id="140">Custom Channel 1</channel>
|
||||
<channel site="example.com" lang="en" xmltv_id="Channel2.us" site_id="142" logo="https://i.imgur.com/qmRnD0M.png">Custom Channel 2</channel>
|
||||
<channel site="example.com" lang="fr" xmltv_id="" site_id="140">Channel 1</channel>
|
||||
<channel site="example2.com" lang="en" xmltv_id="Channel3.us@Wrong" site_id="150">Channel 3</channel>
|
||||
<channel site="example2.com" lang="en" xmltv_id="Channel4.us@HD" site_id="152">Channel 4</channel>
|
||||
<channel site="example2.com" lang="fr" xmltv_id="Channel1.us" site_id="140">Channel 1</channel>
|
||||
</channels>
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels site="example.com">
|
||||
<channel lang="en" xmltv_id="Channel1.us@HD" site_id="140">Channel 1</channel>
|
||||
<channel lang="en" xmltv_id="Channel2.us" site_id="142" logo="https://i.imgur.com/qmRnD0M.png" lcn="36">Channel 2</channel>
|
||||
<channel lang="fr" xmltv_id="" site_id="140">Channel 1</channel>
|
||||
<channel lang="it" xmltv_id="Channel3.us" site_id="143">Channel 3</channel>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels site="example.com">
|
||||
<channel lang="en" xmltv_id="Channel1.us@HD" site_id="140">Channel 1</channel>
|
||||
<channel lang="en" xmltv_id="Channel2.us" site_id="142" logo="https://i.imgur.com/qmRnD0M.png" lcn="36">Channel 2</channel>
|
||||
<channel lang="fr" xmltv_id="" site_id="140">Channel 1</channel>
|
||||
<channel lang="it" xmltv_id="Channel3.us" site_id="143">Channel 3</channel>
|
||||
</channels>
|
||||
@@ -1,28 +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.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:31:00.000Z`,
|
||||
stop: `${date.format('YYYY-MM-DD')}T07:10:00.000Z`
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
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.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:31:00.000Z`,
|
||||
stop: `${date.format('YYYY-MM-DD')}T07:10:00.000Z`
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels site="example.com">
|
||||
<channel lang="en" xmltv_id="Channel1.us@SD" 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@HD" site_id="140">Channel 1</channel>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels site="example.com">
|
||||
<channel lang="en" xmltv_id="Channel1.us@SD" 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@HD" site_id="140">Channel 1</channel>
|
||||
</channels>
|
||||
@@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels site="example2.com">
|
||||
<channel lang="en" xmltv_id="Channel3.us@HD" 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>
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<channels site="example2.com">
|
||||
<channel lang="en" xmltv_id="Channel3.us@HD" 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>
|
||||
File diff suppressed because it is too large.
Load diff
@@ -1,30 +1,30 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221003">
|
||||
<channel id="ANT1Europe.gr@SD"><display-name>ANT1 Europe</display-name><icon src="https://i.imgur.com/DTfwJGM.png"/><url>https://antennaeurope.gr</url></channel>
|
||||
<programme start="20260212040000 +0000" stop="20260212070000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΚΑΛΗΜΕΡΑ ΕΛΛΑΔΑ</title></programme>
|
||||
<programme start="20260212070000 +0000" stop="20260212103000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
<programme start="20260212103000 +0000" stop="20260212113000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260212113000 +0000" stop="20260212141500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΑΠΟΚΑΛΥΨΕΙΣ</title></programme>
|
||||
<programme start="20260212141500 +0000" stop="20260212153000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΡΟΥΚ ΖΟΥΚ</title></programme>
|
||||
<programme start="20260212153000 +0000" stop="20260212164500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260212164500 +0000" stop="20260212180000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260212180000 +0000" stop="20260212190000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΠΟΙΟΣ ΘΕΛΕΙ ΝΑ ΓΙΝΕΙ ΕΚΑΤΟΜΜΥΡΙΟΥΧΟΣ</title></programme>
|
||||
<programme start="20260212190000 +0000" stop="20260212200000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">GRAND HOTEL</title></programme>
|
||||
<programme start="20260212200000 +0000" stop="20260212210000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΓΙΑΤΙ ΡΕ ΠΑΤΕΡΑ ;</title></programme>
|
||||
<programme start="20260212210000 +0000" stop="20260212220000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">THE ROADSHOW - BEST OF</title></programme>
|
||||
<programme start="20260212220000 +0000" stop="20260213000000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΕΝΩΠΙΟΣ ΕΝΩΠΙΩ</title></programme>
|
||||
<programme start="20260213000000 +0000" stop="20260213010000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260213010000 +0000" stop="20260213013000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
<programme start="20260213040000 +0000" stop="20260213070000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΚΑΛΗΜΕΡΑ ΕΛΛΑΔΑ</title></programme>
|
||||
<programme start="20260213070000 +0000" stop="20260213103000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
<programme start="20260213103000 +0000" stop="20260213113000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260213113000 +0000" stop="20260213141500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΑΠΟΚΑΛΥΨΕΙΣ</title></programme>
|
||||
<programme start="20260213141500 +0000" stop="20260213153000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΡΟΥΚ ΖΟΥΚ</title></programme>
|
||||
<programme start="20260213153000 +0000" stop="20260213164500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260213164500 +0000" stop="20260213180000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260213180000 +0000" stop="20260213190000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΠΟΙΟΣ ΘΕΛΕΙ ΝΑ ΓΙΝΕΙ ΕΚΑΤΟΜΜΥΡΙΟΥΧΟΣ</title></programme>
|
||||
<programme start="20260213190000 +0000" stop="20260213200000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">DON'T FORGET THE LYRICS</title></programme>
|
||||
<programme start="20260213200000 +0000" stop="20260213220000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">VIΠ</title></programme>
|
||||
<programme start="20260213220000 +0000" stop="20260214000000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΠΕΦΤΕΙ Η ΝΥΧΤΑ ΜΕ... ΡΥΘΜΟ</title></programme>
|
||||
<programme start="20260214000000 +0000" stop="20260214010000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260214010000 +0000" stop="20260214013000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
<?xml version="1.0" encoding="UTF-8" ?><tv date="20221003">
|
||||
<channel id="ANT1Europe.gr@SD"><display-name>ANT1 Europe</display-name><icon src="https://i.imgur.com/DTfwJGM.png"/><url>https://antennaeurope.gr</url></channel>
|
||||
<programme start="20260212040000 +0000" stop="20260212070000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΚΑΛΗΜΕΡΑ ΕΛΛΑΔΑ</title></programme>
|
||||
<programme start="20260212070000 +0000" stop="20260212103000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
<programme start="20260212103000 +0000" stop="20260212113000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260212113000 +0000" stop="20260212141500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΑΠΟΚΑΛΥΨΕΙΣ</title></programme>
|
||||
<programme start="20260212141500 +0000" stop="20260212153000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΡΟΥΚ ΖΟΥΚ</title></programme>
|
||||
<programme start="20260212153000 +0000" stop="20260212164500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260212164500 +0000" stop="20260212180000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260212180000 +0000" stop="20260212190000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΠΟΙΟΣ ΘΕΛΕΙ ΝΑ ΓΙΝΕΙ ΕΚΑΤΟΜΜΥΡΙΟΥΧΟΣ</title></programme>
|
||||
<programme start="20260212190000 +0000" stop="20260212200000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">GRAND HOTEL</title></programme>
|
||||
<programme start="20260212200000 +0000" stop="20260212210000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΓΙΑΤΙ ΡΕ ΠΑΤΕΡΑ ;</title></programme>
|
||||
<programme start="20260212210000 +0000" stop="20260212220000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">THE ROADSHOW - BEST OF</title></programme>
|
||||
<programme start="20260212220000 +0000" stop="20260213000000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΕΝΩΠΙΟΣ ΕΝΩΠΙΩ</title></programme>
|
||||
<programme start="20260213000000 +0000" stop="20260213010000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260213010000 +0000" stop="20260213013000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
<programme start="20260213040000 +0000" stop="20260213070000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΚΑΛΗΜΕΡΑ ΕΛΛΑΔΑ</title></programme>
|
||||
<programme start="20260213070000 +0000" stop="20260213103000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
<programme start="20260213103000 +0000" stop="20260213113000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260213113000 +0000" stop="20260213141500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΑΠΟΚΑΛΥΨΕΙΣ</title></programme>
|
||||
<programme start="20260213141500 +0000" stop="20260213153000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΡΟΥΚ ΖΟΥΚ</title></programme>
|
||||
<programme start="20260213153000 +0000" stop="20260213164500 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260213164500 +0000" stop="20260213180000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ANT1 NEWS</title></programme>
|
||||
<programme start="20260213180000 +0000" stop="20260213190000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΠΟΙΟΣ ΘΕΛΕΙ ΝΑ ΓΙΝΕΙ ΕΚΑΤΟΜΜΥΡΙΟΥΧΟΣ</title></programme>
|
||||
<programme start="20260213190000 +0000" stop="20260213200000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">DON'T FORGET THE LYRICS</title></programme>
|
||||
<programme start="20260213200000 +0000" stop="20260213220000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">VIΠ</title></programme>
|
||||
<programme start="20260213220000 +0000" stop="20260214000000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΠΕΦΤΕΙ Η ΝΥΧΤΑ ΜΕ... ΡΥΘΜΟ</title></programme>
|
||||
<programme start="20260214000000 +0000" stop="20260214010000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">5 X 5</title></programme>
|
||||
<programme start="20260214010000 +0000" stop="20260214013000 +0000" channel="ANT1Europe.gr@SD"><title lang="el">ΤΟ ΠΡΩΙΝΟ</title></programme>
|
||||
</tv>
|
||||
@@ -1,2 +1,2 @@
|
||||
example.com
|
||||
example.com
|
||||
worker-9dd4.onrender.com
|
||||
@@ -1,36 +1,36 @@
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync(
|
||||
'tests/__data__/input/channels_edit/example.com.channels.xml',
|
||||
'tests/__data__/output/channels.xml'
|
||||
)
|
||||
})
|
||||
|
||||
describe('channels:edit', () => {
|
||||
it('shows list of options for a channel', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:edit --- tests/__data__/output/channels.xml`
|
||||
try {
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
checkStdout(stdout)
|
||||
} catch (error: unknown) {
|
||||
// NOTE: for Windows only
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, error)
|
||||
if (error && typeof error === 'object' && 'stdout' in error) {
|
||||
checkStdout(error.stdout as string)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function checkStdout(stdout: string) {
|
||||
expect(stdout).toContain('CNNInternational.us (CNN International, CNN, CNN Int)')
|
||||
expect(stdout).toContain('Type...')
|
||||
expect(stdout).toContain('Skip')
|
||||
expect(stdout).toContain("File 'tests/__data__/output/channels.xml' successfully saved")
|
||||
}
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync(
|
||||
'tests/__data__/input/channels_edit/example.com.channels.xml',
|
||||
'tests/__data__/output/channels.xml'
|
||||
)
|
||||
})
|
||||
|
||||
describe('channels:edit', () => {
|
||||
it('shows list of options for a channel', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:edit --- tests/__data__/output/channels.xml`
|
||||
try {
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
checkStdout(stdout)
|
||||
} catch (error: unknown) {
|
||||
// NOTE: for Windows only
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, error)
|
||||
if (error && typeof error === 'object' && 'stdout' in error) {
|
||||
checkStdout(error.stdout as string)
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
||||
function checkStdout(stdout: string) {
|
||||
expect(stdout).toContain('CNNInternational.us (CNN International, CNN, CNN Int)')
|
||||
expect(stdout).toContain('Type...')
|
||||
expect(stdout).toContain('Skip')
|
||||
expect(stdout).toContain("File 'tests/__data__/output/channels.xml' successfully saved")
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
import { execSync } from 'child_process'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync(
|
||||
'tests/__data__/input/channels_format/example.com.channels.xml',
|
||||
'tests/__data__/output/example.com.channels.xml'
|
||||
)
|
||||
})
|
||||
|
||||
describe('channels:format', () => {
|
||||
it('can format *.channels.xml files', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:format --- tests/__data__/output/example.com.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/example.com.channels.xml')).toEqual(
|
||||
content('tests/__data__/expected/channels_format/example.com.channels.xml')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
return fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
}
|
||||
import { execSync } from 'child_process'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync(
|
||||
'tests/__data__/input/channels_format/example.com.channels.xml',
|
||||
'tests/__data__/output/example.com.channels.xml'
|
||||
)
|
||||
})
|
||||
|
||||
describe('channels:format', () => {
|
||||
it('can format *.channels.xml files', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:format --- tests/__data__/output/example.com.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/example.com.channels.xml')).toEqual(
|
||||
content('tests/__data__/expected/channels_format/example.com.channels.xml')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
return fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
}
|
||||
@@ -1,58 +1,58 @@
|
||||
import { execSync } from 'child_process'
|
||||
|
||||
interface ExecError {
|
||||
status: number
|
||||
stdout: string
|
||||
}
|
||||
|
||||
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
describe('channels:validate', () => {
|
||||
it('will show a message if the file contains a duplicate', () => {
|
||||
try {
|
||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/duplicate.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
process.exit(1)
|
||||
} catch (error) {
|
||||
expect((error as ExecError).status).toBe(1)
|
||||
expect((error as ExecError).stdout).toContain(`
|
||||
┌─────────┬─────────────┬──────┬─────────────────┬─────────┬─────────┐
|
||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||
├─────────┼─────────────┼──────┼─────────────────┼─────────┼─────────┤
|
||||
│ 0 │ 'duplicate' │ 'en' │ 'Bravo.us@East' │ '140' │ 'Bravo' │
|
||||
└─────────┴─────────────┴──────┴─────────────────┴─────────┴─────────┘
|
||||
|
||||
1 problems (1 errors, 0 warnings) in 1 file(s)
|
||||
`)
|
||||
}
|
||||
})
|
||||
|
||||
it('will show a message if the file contains a channel with wrong channel id', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_channel_id.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
expect(stdout).toContain(`
|
||||
┌─────────┬────────────────────┬──────┬────────────────────┬─────────┬─────────────────────┐
|
||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||
├─────────┼────────────────────┼──────┼────────────────────┼─────────┼─────────────────────┤
|
||||
│ 0 │ 'wrong_channel_id' │ 'en' │ 'CNNInternational' │ '140' │ 'CNN International' │
|
||||
└─────────┴────────────────────┴──────┴────────────────────┴─────────┴─────────────────────┘
|
||||
|
||||
1 problems (0 errors, 1 warnings) in 1 file(s)
|
||||
`)
|
||||
})
|
||||
|
||||
it('will show a message if the file contains a channel with wrong feed id', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_feed_id.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
expect(stdout).toContain(`
|
||||
┌─────────┬─────────────────┬──────┬─────────────────┬─────────┬─────────┐
|
||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||
├─────────┼─────────────────┼──────┼─────────────────┼─────────┼─────────┤
|
||||
│ 0 │ 'wrong_feed_id' │ 'en' │ 'Bravo.us@West' │ '150' │ 'Bravo' │
|
||||
└─────────┴─────────────────┴──────┴─────────────────┴─────────┴─────────┘
|
||||
|
||||
1 problems (0 errors, 1 warnings) in 1 file(s)
|
||||
`)
|
||||
})
|
||||
})
|
||||
import { execSync } from 'child_process'
|
||||
|
||||
interface ExecError {
|
||||
status: number
|
||||
stdout: string
|
||||
}
|
||||
|
||||
const ENV_VAR = 'cross-env DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
describe('channels:validate', () => {
|
||||
it('will show a message if the file contains a duplicate', () => {
|
||||
try {
|
||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/duplicate.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
process.exit(1)
|
||||
} catch (error) {
|
||||
expect((error as ExecError).status).toBe(1)
|
||||
expect((error as ExecError).stdout).toContain(`
|
||||
┌─────────┬─────────────┬──────┬─────────────────┬─────────┬─────────┐
|
||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||
├─────────┼─────────────┼──────┼─────────────────┼─────────┼─────────┤
|
||||
│ 0 │ 'duplicate' │ 'en' │ 'Bravo.us@East' │ '140' │ 'Bravo' │
|
||||
└─────────┴─────────────┴──────┴─────────────────┴─────────┴─────────┘
|
||||
|
||||
1 problems (1 errors, 0 warnings) in 1 file(s)
|
||||
`)
|
||||
}
|
||||
})
|
||||
|
||||
it('will show a message if the file contains a channel with wrong channel id', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_channel_id.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
expect(stdout).toContain(`
|
||||
┌─────────┬────────────────────┬──────┬────────────────────┬─────────┬─────────────────────┐
|
||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||
├─────────┼────────────────────┼──────┼────────────────────┼─────────┼─────────────────────┤
|
||||
│ 0 │ 'wrong_channel_id' │ 'en' │ 'CNNInternational' │ '140' │ 'CNN International' │
|
||||
└─────────┴────────────────────┴──────┴────────────────────┴─────────┴─────────────────────┘
|
||||
|
||||
1 problems (0 errors, 1 warnings) in 1 file(s)
|
||||
`)
|
||||
})
|
||||
|
||||
it('will show a message if the file contains a channel with wrong feed id', () => {
|
||||
const cmd = `${ENV_VAR} npm run channels:validate --- tests/__data__/input/channels_validate/wrong_feed_id.channels.xml`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
expect(stdout).toContain(`
|
||||
┌─────────┬─────────────────┬──────┬─────────────────┬─────────┬─────────┐
|
||||
│ (index) │ type │ lang │ xmltv_id │ site_id │ name │
|
||||
├─────────┼─────────────────┼──────┼─────────────────┼─────────┼─────────┤
|
||||
│ 0 │ 'wrong_feed_id' │ 'en' │ 'Bravo.us@West' │ '150' │ 'Bravo' │
|
||||
└─────────┴─────────────────┴──────┴─────────────────┴─────────┴─────────┘
|
||||
|
||||
1 problems (0 errors, 1 warnings) in 1 file(s)
|
||||
`)
|
||||
})
|
||||
})
|
||||
+207
-207
@@ -1,207 +1,207 @@
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import path from 'path'
|
||||
import pako from 'pako'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env SITES_DIR=tests/__data__/input/epg_grab/sites CURR_DATE=2022-10-20 DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
describe('epg:grab', () => {
|
||||
it('can grab epg by site name', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --sites=example.com --output="${path.resolve(
|
||||
'tests/__data__/output/guides/base.guide.xml'
|
||||
)}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/base.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/base.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with curl option', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --sites=example.com --curl --output="${path.resolve(
|
||||
'tests/__data__/output/guides/curl.guide.xml'
|
||||
)}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(stdout).toContain('curl https://example.com')
|
||||
})
|
||||
|
||||
it('can grab epg with wildcard as output', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels="tests/__data__/input/epg_grab/sites/example.com/example.com.channels.xml" --output="tests/__data__/output/guides/wildcard/{site}/{lang}/guide.xml"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/wildcard/example.com/en/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/wildcard/example.com/en/guide.xml')
|
||||
)
|
||||
|
||||
expect(content('tests/__data__/output/guides/wildcard/example.com/fr/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/wildcard/example.com/fr/guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg then language filter enabled', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example.com/example.com.channels.xml --output=tests/__data__/output/guides/lang/{lang}/guide.xml --lang=fr`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/lang/fr/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/lang/fr/guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg then using a multi-language filter', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example.com/example.com.channels.xml --output=tests/__data__/output/guides/multilang.guide.xml --lang=fr,it`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/multilang.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/multilang.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg using custom channels list', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/custom.channels.xml --output=tests/__data__/output/guides/custom_channels.guide.xml --days=2`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/custom_channels.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/custom_channels.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with multiple channels.xml files', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/**/*.channels.xml --output=tests/__data__/output/guides/multiple_channels.guide.xml --days=2`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/multiple_channels.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/multiple_channels.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with gzip option enabled', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --gzip`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/gzip/guide.xml')
|
||||
)
|
||||
|
||||
const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), {
|
||||
toText: true
|
||||
})
|
||||
const expectedString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
|
||||
{ toText: true }
|
||||
)
|
||||
|
||||
const output = new Set(outputString.split('\r\n'))
|
||||
const expected = new Set(expectedString.split('\r\n'))
|
||||
|
||||
expect(output).toEqual(expected)
|
||||
})
|
||||
|
||||
it('can grab epg with GZIP environment variable', () => {
|
||||
const cmd = `${ENV_VAR} GZIP=true npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/gzip/guide.xml')
|
||||
)
|
||||
|
||||
const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), {
|
||||
toText: true
|
||||
})
|
||||
const expectedString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
|
||||
{ toText: true }
|
||||
)
|
||||
|
||||
const output = new Set(outputString.split('\r\n'))
|
||||
const expected = new Set(expectedString.split('\r\n'))
|
||||
|
||||
expect(output).toEqual(expected)
|
||||
})
|
||||
|
||||
it('can grab epg with gzip path', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --gzip="${path.resolve('tests/__data__/output/guides/custom.xml.gz')}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/gzip/guide.xml')
|
||||
)
|
||||
|
||||
const outputString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/output/guides/custom.xml.gz'),
|
||||
{
|
||||
toText: true
|
||||
}
|
||||
)
|
||||
const expectedString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
|
||||
{ toText: true }
|
||||
)
|
||||
|
||||
const output = new Set(outputString.split('\r\n'))
|
||||
const expected = new Set(expectedString.split('\r\n'))
|
||||
|
||||
expect(output).toEqual(expected)
|
||||
})
|
||||
|
||||
it('can grab epg with json option enabled', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --json`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.xml')
|
||||
)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.json')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.json')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with json path', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.relative(
|
||||
process.cwd(),
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --json="${path.relative(process.cwd(), 'tests/__data__/output/guides/custom.json')}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.xml')
|
||||
)
|
||||
|
||||
expect(content('tests/__data__/output/guides/custom.json')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.json')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const string = fs.readFileSync(pathToFileURL(filepath), 'utf8')
|
||||
|
||||
return new Set(string.split('\r\n'))
|
||||
}
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import path from 'path'
|
||||
import pako from 'pako'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env SITES_DIR=tests/__data__/input/epg_grab/sites CURR_DATE=2022-10-20 DATA_DIR=tests/__data__/input/data'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
describe('epg:grab', () => {
|
||||
it('can grab epg by site name', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --sites=example.com --output="${path.resolve(
|
||||
'tests/__data__/output/guides/base.guide.xml'
|
||||
)}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/base.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/base.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with curl option', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --sites=example.com --curl --output="${path.resolve(
|
||||
'tests/__data__/output/guides/curl.guide.xml'
|
||||
)}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(stdout).toContain('curl https://example.com')
|
||||
})
|
||||
|
||||
it('can grab epg with wildcard as output', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels="tests/__data__/input/epg_grab/sites/example.com/example.com.channels.xml" --output="tests/__data__/output/guides/wildcard/{site}/{lang}/guide.xml"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/wildcard/example.com/en/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/wildcard/example.com/en/guide.xml')
|
||||
)
|
||||
|
||||
expect(content('tests/__data__/output/guides/wildcard/example.com/fr/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/wildcard/example.com/fr/guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg then language filter enabled', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example.com/example.com.channels.xml --output=tests/__data__/output/guides/lang/{lang}/guide.xml --lang=fr`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/lang/fr/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/lang/fr/guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg then using a multi-language filter', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example.com/example.com.channels.xml --output=tests/__data__/output/guides/multilang.guide.xml --lang=fr,it`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/multilang.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/multilang.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg using custom channels list', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/custom.channels.xml --output=tests/__data__/output/guides/custom_channels.guide.xml --days=2`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/custom_channels.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/custom_channels.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with multiple channels.xml files', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/**/*.channels.xml --output=tests/__data__/output/guides/multiple_channels.guide.xml --days=2`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/multiple_channels.guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/multiple_channels.guide.xml')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with gzip option enabled', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --gzip`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/gzip/guide.xml')
|
||||
)
|
||||
|
||||
const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), {
|
||||
toText: true
|
||||
})
|
||||
const expectedString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
|
||||
{ toText: true }
|
||||
)
|
||||
|
||||
const output = new Set(outputString.split('\r\n'))
|
||||
const expected = new Set(expectedString.split('\r\n'))
|
||||
|
||||
expect(output).toEqual(expected)
|
||||
})
|
||||
|
||||
it('can grab epg with GZIP environment variable', () => {
|
||||
const cmd = `${ENV_VAR} GZIP=true npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/gzip/guide.xml')
|
||||
)
|
||||
|
||||
const outputString = pako.ungzip(fs.readFileSync('tests/__data__/output/guides/guide.xml.gz'), {
|
||||
toText: true
|
||||
})
|
||||
const expectedString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
|
||||
{ toText: true }
|
||||
)
|
||||
|
||||
const output = new Set(outputString.split('\r\n'))
|
||||
const expected = new Set(expectedString.split('\r\n'))
|
||||
|
||||
expect(output).toEqual(expected)
|
||||
})
|
||||
|
||||
it('can grab epg with gzip path', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --gzip="${path.resolve('tests/__data__/output/guides/custom.xml.gz')}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/gzip/guide.xml')
|
||||
)
|
||||
|
||||
const outputString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/output/guides/custom.xml.gz'),
|
||||
{
|
||||
toText: true
|
||||
}
|
||||
)
|
||||
const expectedString = pako.ungzip(
|
||||
fs.readFileSync('tests/__data__/expected/epg_grab/gzip/guide.xml.gz'),
|
||||
{ toText: true }
|
||||
)
|
||||
|
||||
const output = new Set(outputString.split('\r\n'))
|
||||
const expected = new Set(expectedString.split('\r\n'))
|
||||
|
||||
expect(output).toEqual(expected)
|
||||
})
|
||||
|
||||
it('can grab epg with json option enabled', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.resolve(
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --json`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.xml')
|
||||
)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.json')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.json')
|
||||
)
|
||||
})
|
||||
|
||||
it('can grab epg with json path', () => {
|
||||
const cmd = `${ENV_VAR} npm run grab --- --channels=tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml --output="${path.relative(
|
||||
process.cwd(),
|
||||
'tests/__data__/output/guides/guide.xml'
|
||||
)}" --json="${path.relative(process.cwd(), 'tests/__data__/output/guides/custom.json')}"`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides/guide.xml')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.xml')
|
||||
)
|
||||
|
||||
expect(content('tests/__data__/output/guides/custom.json')).toEqual(
|
||||
content('tests/__data__/expected/epg_grab/json/guide.json')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const string = fs.readFileSync(pathToFileURL(filepath), 'utf8')
|
||||
|
||||
return new Set(string.split('\r\n'))
|
||||
}
|
||||
@@ -1,28 +1,28 @@
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env SITES_DIR=tests/__data__/input/guides_export/sites DATA_DIR=tests/__data__/input/data API_DIR=tests/__data__/output'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
describe('guides:export', () => {
|
||||
it('can generate guides.json', () => {
|
||||
const cmd = `${ENV_VAR} npm run guides:export`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides.json')).toEqual(
|
||||
content('tests/__data__/expected/guides_export/guides.json')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
return fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
}
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env SITES_DIR=tests/__data__/input/guides_export/sites DATA_DIR=tests/__data__/input/data API_DIR=tests/__data__/output'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
describe('guides:export', () => {
|
||||
it('can generate guides.json', () => {
|
||||
const cmd = `${ENV_VAR} npm run guides:export`
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/guides.json')).toEqual(
|
||||
content('tests/__data__/expected/guides_export/guides.json')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
return fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
}
|
||||
@@ -1,31 +1,31 @@
|
||||
import { execSync } from 'child_process'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env CURR_DATE=2022-10-04 ROOT_DIR=tests/__data__/output DATA_DIR=tests/__data__/input/guides_update'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
describe('guides:update', () => {
|
||||
it('can update GUIDES.md', () => {
|
||||
const cmd = `${ENV_VAR} npm run guides:update`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/GUIDES.md')).toEqual(
|
||||
content('tests/__data__/expected/guides_update/GUIDES.md')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const data = fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
|
||||
return JSON.stringify(data)
|
||||
}
|
||||
import { execSync } from 'child_process'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env CURR_DATE=2022-10-04 ROOT_DIR=tests/__data__/output DATA_DIR=tests/__data__/input/guides_update'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
describe('guides:update', () => {
|
||||
it('can update GUIDES.md', () => {
|
||||
const cmd = `${ENV_VAR} npm run guides:update`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/GUIDES.md')).toEqual(
|
||||
content('tests/__data__/expected/guides_update/GUIDES.md')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const data = fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
|
||||
return JSON.stringify(data)
|
||||
}
|
||||
@@ -1,47 +1,47 @@
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
|
||||
const ENV_VAR = 'cross-env SITES_DIR=tests/__data__/output/sites'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.mkdirSync('tests/__data__/output/sites')
|
||||
})
|
||||
|
||||
it('can create new site config from template', () => {
|
||||
const cmd = `${ENV_VAR} npm run sites:init --- example.com`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(exists('tests/__data__/output/sites/example.com')).toBe(true)
|
||||
expect(exists('tests/__data__/output/sites/example.com/example.com.test.js')).toBe(true)
|
||||
expect(exists('tests/__data__/output/sites/example.com/example.com.config.js')).toBe(true)
|
||||
expect(exists('tests/__data__/output/sites/example.com/readme.md')).toBe(true)
|
||||
expect(content('tests/__data__/output/sites/example.com/example.com.test.js')).toEqual(
|
||||
content('tests/__data__/expected/sites_init/example.com.test.js')
|
||||
)
|
||||
expect(content('tests/__data__/output/sites/example.com/example.com.config.js')).toEqual(
|
||||
content('tests/__data__/expected/sites_init/example.com.config.js')
|
||||
)
|
||||
expect(content('tests/__data__/output/sites/example.com/readme.md')).toEqual(
|
||||
content('tests/__data__/expected/sites_init/readme.md')
|
||||
)
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
return normalizeLineEndings(
|
||||
fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
function normalizeLineEndings(data: string) {
|
||||
return data.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
|
||||
}
|
||||
|
||||
function exists(filepath: string) {
|
||||
return fs.existsSync(pathToFileURL(filepath))
|
||||
}
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
|
||||
const ENV_VAR = 'cross-env SITES_DIR=tests/__data__/output/sites'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.mkdirSync('tests/__data__/output/sites')
|
||||
})
|
||||
|
||||
it('can create new site config from template', () => {
|
||||
const cmd = `${ENV_VAR} npm run sites:init --- example.com`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(exists('tests/__data__/output/sites/example.com')).toBe(true)
|
||||
expect(exists('tests/__data__/output/sites/example.com/example.com.test.js')).toBe(true)
|
||||
expect(exists('tests/__data__/output/sites/example.com/example.com.config.js')).toBe(true)
|
||||
expect(exists('tests/__data__/output/sites/example.com/readme.md')).toBe(true)
|
||||
expect(content('tests/__data__/output/sites/example.com/example.com.test.js')).toEqual(
|
||||
content('tests/__data__/expected/sites_init/example.com.test.js')
|
||||
)
|
||||
expect(content('tests/__data__/output/sites/example.com/example.com.config.js')).toEqual(
|
||||
content('tests/__data__/expected/sites_init/example.com.config.js')
|
||||
)
|
||||
expect(content('tests/__data__/output/sites/example.com/readme.md')).toEqual(
|
||||
content('tests/__data__/expected/sites_init/readme.md')
|
||||
)
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
return normalizeLineEndings(
|
||||
fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
function normalizeLineEndings(data: string) {
|
||||
return data.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
|
||||
}
|
||||
|
||||
function exists(filepath: string) {
|
||||
return fs.existsSync(pathToFileURL(filepath))
|
||||
}
|
||||
@@ -1,32 +1,32 @@
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
|
||||
const ENV_VAR = 'cross-env SITES_DIR=tests/__data__/input/sites_update/sites ROOT_DIR=tests/__data__/output'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
it('can update SITES.md', () => {
|
||||
const cmd = `${ENV_VAR} npm run sites:update`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/SITES.md')).toEqual(
|
||||
content('tests/__data__/expected/sites_update/SITES.md')
|
||||
)
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const data = fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
|
||||
return JSON.stringify(normalizeLineEndings(data))
|
||||
}
|
||||
|
||||
function normalizeLineEndings(data: string) {
|
||||
return data.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
|
||||
}
|
||||
import { execSync } from 'child_process'
|
||||
import fs from 'fs-extra'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
|
||||
const ENV_VAR = 'cross-env SITES_DIR=tests/__data__/input/sites_update/sites ROOT_DIR=tests/__data__/output'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
})
|
||||
|
||||
it('can update SITES.md', () => {
|
||||
const cmd = `${ENV_VAR} npm run sites:update`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/SITES.md')).toEqual(
|
||||
content('tests/__data__/expected/sites_update/SITES.md')
|
||||
)
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const data = fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
|
||||
return JSON.stringify(normalizeLineEndings(data))
|
||||
}
|
||||
|
||||
function normalizeLineEndings(data: string) {
|
||||
return data.replace(/\r\n/g, '\n').replace(/\r/g, '\n')
|
||||
}
|
||||
@@ -1,32 +1,32 @@
|
||||
import { execSync } from 'child_process'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env CURR_DATE=2022-10-04 ROOT_DIR=tests/__data__/output DATA_DIR=tests/__data__/output/'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync('tests/__data__/input/workers_load/workers.txt', 'tests/__data__/output/workers.txt')
|
||||
})
|
||||
|
||||
describe('workers:load', () => {
|
||||
it('can create workers.json', () => {
|
||||
const cmd = `${ENV_VAR} npm run workers:load`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/workers.json')).toEqual(
|
||||
content('tests/__data__/expected/workers_load/workers.json')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const data = fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
|
||||
return JSON.stringify(data)
|
||||
}
|
||||
import { execSync } from 'child_process'
|
||||
import { pathToFileURL } from 'node:url'
|
||||
import fs from 'fs-extra'
|
||||
|
||||
const ENV_VAR =
|
||||
'cross-env CURR_DATE=2022-10-04 ROOT_DIR=tests/__data__/output DATA_DIR=tests/__data__/output/'
|
||||
|
||||
beforeEach(() => {
|
||||
fs.emptyDirSync('tests/__data__/output')
|
||||
fs.copySync('tests/__data__/input/workers_load/workers.txt', 'tests/__data__/output/workers.txt')
|
||||
})
|
||||
|
||||
describe('workers:load', () => {
|
||||
it('can create workers.json', () => {
|
||||
const cmd = `${ENV_VAR} npm run workers:load`
|
||||
|
||||
const stdout = execSync(cmd, { encoding: 'utf8' })
|
||||
if (process.env.DEBUG === 'true') console.log(cmd, stdout)
|
||||
|
||||
expect(content('tests/__data__/output/workers.json')).toEqual(
|
||||
content('tests/__data__/expected/workers_load/workers.json')
|
||||
)
|
||||
})
|
||||
})
|
||||
|
||||
function content(filepath: string) {
|
||||
const data = fs.readFileSync(pathToFileURL(filepath), {
|
||||
encoding: 'utf8'
|
||||
})
|
||||
|
||||
return JSON.stringify(data)
|
||||
}
|
||||
Reference in new issue
Block a user