diff --git a/tests/__data__/expected/epg_grab/guide_2.xml b/tests/__data__/expected/epg_grab/base.guide.xml similarity index 89% rename from tests/__data__/expected/epg_grab/guide_2.xml rename to tests/__data__/expected/epg_grab/base.guide.xml index 3180449c..09471f36 100644 --- a/tests/__data__/expected/epg_grab/guide_2.xml +++ b/tests/__data__/expected/epg_grab/base.guide.xml @@ -1,6 +1,7 @@ Channel 2https://example.com36 Channel 1https://example.com +Channel 1https://example.com Programme1 (example.com) Program1 (example.com) Programme1 (example.com) diff --git a/tests/__data__/expected/epg_grab/guide_3.xml b/tests/__data__/expected/epg_grab/custom_channels.guide.xml similarity index 67% rename from tests/__data__/expected/epg_grab/guide_3.xml rename to tests/__data__/expected/epg_grab/custom_channels.guide.xml index b51e1e1d..e2c7bf4c 100644 --- a/tests/__data__/expected/epg_grab/guide_3.xml +++ b/tests/__data__/expected/epg_grab/custom_channels.guide.xml @@ -1,14 +1,15 @@ Custom Channel 1https://example.com Custom Channel 2https://example.com -Channel 3https://example2.com -Channel 4https://example2.com +Channel 1https://example.com +Channel 3https://example2.com +Channel 4https://example2.com Channel 1https://example2.com Programme1 (example.com) Program1 (example.com) Programme1 (example2.com) Programme1 (example.com) Program1 (example.com) -Program1 (example2.com) -Program1 (example2.com) +Program1 (example2.com) +Program1 (example2.com) \ No newline at end of file diff --git a/tests/__data__/expected/epg_grab/guide.xml.gz b/tests/__data__/expected/epg_grab/guide.xml.gz deleted file mode 100644 index 7f27c6b1..00000000 --- a/tests/__data__/expected/epg_grab/guide.xml.gz +++ /dev/null @@ -1,4 +0,0 @@ -xœ]K0ChTBNk mi6翷ۘvsx=}8)N+l -I!6sE -z 9  SH1S FZSx}Ѹ*Ya$K2=SY -G!5B*R(sG{q6/TR˦F`:<3<0Fm)p7Oc\j'C)#s%" TeS8[>'BKB1ݞ>O/ͪ |X/I1Q|\ Ȋ6:jPAKEzNCkɲ  L%Xɟϋ@Fq{IZI`XWr.& e9< \ No newline at end of file diff --git a/tests/__data__/expected/epg_grab/guide_4.xml b/tests/__data__/expected/epg_grab/lang.guide.xml similarity index 100% rename from tests/__data__/expected/epg_grab/guide_4.xml rename to tests/__data__/expected/epg_grab/lang.guide.xml diff --git a/tests/__data__/expected/epg_grab/proxy.guide.xml b/tests/__data__/expected/epg_grab/proxy.guide.xml new file mode 100644 index 00000000..09471f36 --- /dev/null +++ b/tests/__data__/expected/epg_grab/proxy.guide.xml @@ -0,0 +1,9 @@ + +Channel 2https://example.com36 +Channel 1https://example.com +Channel 1https://example.com +Programme1 (example.com) +Program1 (example.com) +Programme1 (example.com) +Program1 (example.com) + \ No newline at end of file diff --git a/tests/__data__/expected/epg_grab/guide.xml b/tests/__data__/expected/epg_grab/template.guide.xml similarity index 81% rename from tests/__data__/expected/epg_grab/guide.xml rename to tests/__data__/expected/epg_grab/template.guide.xml index fb7736c7..cd54510c 100644 --- a/tests/__data__/expected/epg_grab/guide.xml +++ b/tests/__data__/expected/epg_grab/template.guide.xml @@ -1,8 +1,9 @@ Channel 2https://example.com36 Channel 1https://example.com +Channel 1https://example.com Channel 3https://example2.com -Channel 4https://example2.com +Channel 4https://example2.com Channel 1https://example2.com Programme1 (example.com) Program1 (example.com) @@ -10,5 +11,5 @@ Programme1 (example.com) Program1 (example.com) Program1 (example2.com) -Program1 (example2.com) +Program1 (example2.com) \ No newline at end of file diff --git a/tests/__data__/expected/epg_grab/template.guide.xml.gz b/tests/__data__/expected/epg_grab/template.guide.xml.gz new file mode 100644 index 00000000..126b426d Binary files /dev/null and b/tests/__data__/expected/epg_grab/template.guide.xml.gz differ diff --git a/tests/__data__/input/__data__/channels.json b/tests/__data__/input/__data__/channels.json index 90f9cc9d..d838427f 100644 --- a/tests/__data__/input/__data__/channels.json +++ b/tests/__data__/input/__data__/channels.json @@ -9,8 +9,7 @@ "categories": [], "is_nsfw": false, "closed": "2020-01-01", - "replaced_by": "R6.co", - "logo": "https://www.directv.com/images/logos/channels/dark/large/579.png" + "replaced_by": "R6.co" }, { "id": "Bravos.us", @@ -20,8 +19,7 @@ "subdivision": null, "city": null, "categories": [], - "is_nsfw": false, - "logo": "https://www.directv.com/images/logos/channels/dark/large/579.png" + "is_nsfw": false }, { "id": "CNNInternational.us", @@ -34,8 +32,7 @@ "categories": [ "news" ], - "is_nsfw": false, - "logo": "https://i.imgur.com/2BXCg0x.jpg" + "is_nsfw": false }, { "id": "MNetMovies2.za", @@ -45,11 +42,10 @@ "subdivision": null, "city": null, "categories": [], - "is_nsfw": false, - "logo": "https://rndcdn.dstv.com/dstvcms/2020/08/31/M-Net_Movies_2_Logo_4-3_lightbackground_xlrg.png" + "is_nsfw": false }, - {"id":"6eren.dk","name":"6'eren","alt_names":[],"network":null,"owners":["Warner Bros. Discovery EMEA"],"country":"DK","subdivision":null,"city":null,"broadcast_area":["c/DK"],"languages":["dan"],"categories":[],"is_nsfw":false,"launched":"2009-01-01","closed":null,"replaced_by":null,"website":"http://www.6-eren.dk/","logo":"https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"}, - {"id":"BBCNews.uk","name":"BBC News","alt_names":[],"network":null,"owners":[],"country":"UK","subdivision":null,"city":null,"broadcast_area":["c/UK"],"languages":["eng"],"categories":["news"],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"http://news.bbc.co.uk/","logo":"https://i.imgur.com/rPzH88J.png"}, + {"id":"6eren.dk","name":"6'eren","alt_names":[],"network":null,"owners":["Warner Bros. Discovery EMEA"],"country":"DK","subdivision":null,"city":null,"broadcast_area":["c/DK"],"languages":["dan"],"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","subdivision":null,"city":null,"broadcast_area":["c/UK"],"languages":["eng"],"categories":["news"],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"http://news.bbc.co.uk/"}, { "id": "CNN.us", "name": "CNN", @@ -58,9 +54,8 @@ "subdivision": null, "city": null, "categories": [], - "is_nsfw": false, - "logo": "https://www.directv.com/images/logos/channels/dark/large/579.png" + "is_nsfw": false }, - {"id":"Channel2.us","name":"Channel 2 [API]","alt_names":[],"network":null,"owners":[],"country":"UK","subdivision":null,"city":null,"broadcast_area":["c/US"],"languages":["eng"],"categories":[],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"","logo":"https://i.imgur.com/rPzH88J.png"}, - {"id":"Channel3.us","name":"Channel 3 [API]","alt_names":[],"network":null,"owners":[],"country":"UK","subdivision":null,"city":null,"broadcast_area":["c/US"],"languages":["eng"],"categories":[],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":"","logo":"https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png"} + {"id":"Channel2.us","name":"Channel 2 [API]","alt_names":[],"network":null,"owners":[],"country":"UK","subdivision":null,"city":null,"broadcast_area":["c/US"],"languages":["eng"],"categories":[],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":""}, + {"id":"Channel3.us","name":"Channel 3 [API]","alt_names":[],"network":null,"owners":[],"country":"UK","subdivision":null,"city":null,"broadcast_area":["c/US"],"languages":["eng"],"categories":[],"is_nsfw":false,"launched":null,"closed":null,"replaced_by":null,"website":""} ] \ No newline at end of file diff --git a/tests/__data__/input/__data__/feeds.json b/tests/__data__/input/__data__/feeds.json index 9e82fa2b..875f7723 100644 --- a/tests/__data__/input/__data__/feeds.json +++ b/tests/__data__/input/__data__/feeds.json @@ -40,5 +40,19 @@ ], "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" } ] \ No newline at end of file diff --git a/tests/__data__/input/__data__/logos.json b/tests/__data__/input/__data__/logos.json new file mode 100644 index 00000000..4aa0a9a9 --- /dev/null +++ b/tests/__data__/input/__data__/logos.json @@ -0,0 +1,4 @@ +[ + {"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"} +] \ No newline at end of file diff --git a/tests/__data__/input/epg_grab/custom.channels.xml b/tests/__data__/input/epg_grab/custom.channels.xml index 9b78a7ae..e107685e 100644 --- a/tests/__data__/input/epg_grab/custom.channels.xml +++ b/tests/__data__/input/epg_grab/custom.channels.xml @@ -3,7 +3,7 @@ Custom Channel 1 Custom Channel 2 Channel 1 - Channel 3 - Channel 4 + Channel 3 + Channel 4 Channel 1 \ No newline at end of file diff --git a/tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml b/tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml index 821bd29c..612a6a49 100644 --- a/tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml +++ b/tests/__data__/input/epg_grab/sites/example2.com/example2.com.channels.xml @@ -1,6 +1,6 @@ Channel 3 - Channel 4 + Channel 4 Channel 1 \ No newline at end of file