diff --git a/tests/__data__/expected/_readme.md b/tests/__data__/expected/_readme.md index 4a0ea3ff..a0e36cfc 100644 --- a/tests/__data__/expected/_readme.md +++ b/tests/__data__/expected/_readme.md @@ -10,19 +10,44 @@ To load a program guide, all you need to do is copy the link to one or more of t ## Guides +All guides also have a compressed and JSON version. To load them just change the extension from `.xml` to `.xml.gz` or `.json` respectively. + +### Danish + - - - +
SiteChannelsEPGStatus                                                   
allente.se1https://iptv-org.github.io/epg/guides/allente.se.xmlallente.se
sky.com1https://iptv-org.github.io/epg/guides/sky.com.xmlsky.com
virginmedia.com1https://iptv-org.github.io/epg/guides/virginmedia.com.xmlvirginmedia.com
allente.se1https://iptv-org.github.io/epg/guides/da/allente.se.xmlallente.se
-All guides also have a compressed and JSON version. To download them, simply change the extension from `.xml` to `.xml.gz` or `.json` respectively. +### English + + + + + + + + + +
SiteChannelsEPGStatus                                                   
sky.com1https://iptv-org.github.io/epg/guides/en/sky.com.xmlsky.com
virginmedia.com1https://iptv-org.github.io/epg/guides/en/virginmedia.com.xmlvirginmedia.com
+ +### French + + + + + + + + +
SiteChannelsEPGStatus                                                   
sky.com2https://iptv-org.github.io/epg/guides/fr/sky.com.xmlsky.com
+ + ## Contribution diff --git a/tests/__data__/expected/api/guides.json b/tests/__data__/expected/api/guides.json index a25bcba9..458eaf5e 100644 --- a/tests/__data__/expected/api/guides.json +++ b/tests/__data__/expected/api/guides.json @@ -1 +1 @@ -[{"channel":"6eren.dk","site":"allente.se","lang":"en","url":"https://iptv-org.github.io/epg/guides/allente.se.xml"},{"channel":"6eren.dk","site":"allente.se","lang":"da","url":"https://iptv-org.github.io/epg/guides/allente.se.xml"},{"channel":"BBCNews.uk","site":"virginmedia.com","lang":"en","url":"https://iptv-org.github.io/epg/guides/virginmedia.com.xml"},{"channel":"BBCNews.uk","site":"sky.com","lang":"en","url":"https://iptv-org.github.io/epg/guides/sky.com.xml"},{"channel":"BBCNews.uk","site":"sky.com","lang":"fr","url":"https://iptv-org.github.io/epg/guides/sky.com.xml"}] \ No newline at end of file +[{"channel":"6eren.dk","site":"allente.se","lang":"da","days":2,"url":"https://iptv-org.github.io/epg/guides/da/allente.se.xml"},{"channel":"BBCNews.uk","site":"virginmedia.com","lang":"en","days":2,"url":"https://iptv-org.github.io/epg/guides/en/virginmedia.com.xml"},{"channel":"BBCNews.uk","site":"sky.com","lang":"fr","days":2,"url":"https://iptv-org.github.io/epg/guides/fr/sky.com.xml"},{"channel":"BBCNews.uk","site":"sky.com","lang":"en","days":2,"url":"https://iptv-org.github.io/epg/guides/en/sky.com.xml"},{"channel":"CNN.us","site":"sky.com","lang":"fr","days":2,"url":"https://iptv-org.github.io/epg/guides/fr/sky.com.xml"}] \ No newline at end of file diff --git a/tests/__data__/expected/guides/allente.se.json b/tests/__data__/expected/guides/da/allente.se.json similarity index 97% rename from tests/__data__/expected/guides/allente.se.json rename to tests/__data__/expected/guides/da/allente.se.json index 37dcb8ba..1b04e3f4 100644 --- a/tests/__data__/expected/guides/allente.se.json +++ b/tests/__data__/expected/guides/da/allente.se.json @@ -1 +1 @@ -{"channels":[{"id":"6eren.dk","name":"6'eren","site":"allente.se","lang":"da","logo":"https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png","url":"https://allente.se"}],"programs":[{"site":"allente.se","channel":"6eren.dk","titles":[{"value":"Diners, Drive-Ins and Dives","lang":"da"}],"sub_titles":[],"descriptions":[{"value":"Underholdning","lang":"da"}],"icon":{"src":"https://viasatps.api.comspace.se/PS/channeldate/image/viasat.ps/487/2022-10-24/se.cs.6eren.event.B_0254194276971024040000.jpg?size=2560x1440"},"episodeNumbers":[{"system":"xmltv_ns","value":"23.5.0/1"},{"system":"onscreen","value":"S24E06"}],"date":null,"start":1666584000000,"stop":1666585500000,"urls":[],"ratings":[],"categories":[{"value":"series","lang":"da"}],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]}]} \ No newline at end of file +{"channels":[{"id":"6eren.dk","name":"6'eren","site":"allente.se","lang":"da","logo":"https://upload.wikimedia.org/wikipedia/commons/6/64/6%27eren_2015.png","url":"https://allente.se"}],"programs":[{"site":"allente.se","channel":"6eren.dk","titles":[{"value":"Diners, Drive-Ins and Dives","lang":"da"}],"sub_titles":[],"descriptions":[{"value":"Underholdning","lang":"da"}],"icon":{"src":"https://viasatps.api.comspace.se/PS/channeldate/image/viasat.ps/487/2022-10-24/se.cs.6eren.event.B_0254194276971024040000.jpg?size=2560x1440"},"episodeNumbers":[{"system":"xmltv_ns","value":"23.5.0/1"},{"system":"onscreen","value":"S24E06"}],"date":null,"start":1666584000000,"stop":1666585500000,"urls":[],"ratings":[],"categories":[{"value":"series","lang":"da"}],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]}],"date":"2022-10-20"} \ No newline at end of file diff --git a/tests/__data__/expected/guides/allente.se.xml b/tests/__data__/expected/guides/da/allente.se.xml similarity index 100% rename from tests/__data__/expected/guides/allente.se.xml rename to tests/__data__/expected/guides/da/allente.se.xml diff --git a/tests/__data__/expected/guides/allente.se.xml.gz b/tests/__data__/expected/guides/da/allente.se.xml.gz similarity index 100% rename from tests/__data__/expected/guides/allente.se.xml.gz rename to tests/__data__/expected/guides/da/allente.se.xml.gz diff --git a/tests/__data__/expected/guides/en/sky.com.json b/tests/__data__/expected/guides/en/sky.com.json new file mode 100644 index 00000000..4a49b379 --- /dev/null +++ b/tests/__data__/expected/guides/en/sky.com.json @@ -0,0 +1 @@ +{"channels":[{"id":"BBCNews.uk","name":"BBC News","site":"sky.com","lang":"en","logo":"https://i.imgur.com/rPzH88J.png","url":"https://sky.com"}],"programs":[{"site":"sky.com","channel":"BBCNews.uk","titles":[{"value":"BBC News at One","lang":"en"}],"sub_titles":[],"descriptions":[{"value":"The latest national and international news from the BBC. [S,SL]","lang":"en"}],"icon":{"src":"http://epgstatic.sky.com/epgdata/1.0/paimage/46/1/lisa/5.2.2/linear/channel/ca247bc8-6be0-48f9-88d1-865f87f7680e/2011"},"episodeNumbers":[],"date":null,"start":1666872000000,"stop":1666873800000,"urls":[],"ratings":[],"categories":[],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]}],"date":"2022-10-20"} \ No newline at end of file diff --git a/tests/__data__/expected/guides/en/sky.com.xml b/tests/__data__/expected/guides/en/sky.com.xml new file mode 100644 index 00000000..1eeac223 --- /dev/null +++ b/tests/__data__/expected/guides/en/sky.com.xml @@ -0,0 +1,4 @@ + +BBC Newshttps://sky.com +BBC News at OneThe latest national and international news from the BBC. [S,SL] + \ No newline at end of file diff --git a/tests/__data__/expected/guides/en/sky.com.xml.gz b/tests/__data__/expected/guides/en/sky.com.xml.gz new file mode 100644 index 00000000..c3f1f279 Binary files /dev/null and b/tests/__data__/expected/guides/en/sky.com.xml.gz differ diff --git a/tests/__data__/expected/guides/virginmedia.com.json b/tests/__data__/expected/guides/en/virginmedia.com.json similarity index 92% rename from tests/__data__/expected/guides/virginmedia.com.json rename to tests/__data__/expected/guides/en/virginmedia.com.json index 5ff6b490..85e4504f 100644 --- a/tests/__data__/expected/guides/virginmedia.com.json +++ b/tests/__data__/expected/guides/en/virginmedia.com.json @@ -1 +1 @@ -{"channels":[{"id":"BBCNews.uk","name":"BBC News","site":"virginmedia.com","lang":"en","logo":"https://i.imgur.com/rPzH88J.png","url":"https://virginmedia.com"}],"programs":[{"site":"virginmedia.com","channel":"BBCNews.uk","titles":[{"value":"BBC News at One","lang":"en"}],"sub_titles":[],"descriptions":[{"value":"The latest national and international news, followed by weather.","lang":"en"}],"icon":{"src":""},"episodeNumbers":[{"system":"xmltv_ns","value":"96839999.145799123.0/1"},{"system":"onscreen","value":"S96840000E145799124"}],"date":null,"start":1666872000000,"stop":1666873800000,"urls":[],"ratings":[],"categories":[{"value":"News","lang":"en"}],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]}]} \ No newline at end of file +{"channels":[{"id":"BBCNews.uk","name":"BBC News","site":"virginmedia.com","lang":"en","logo":"https://i.imgur.com/rPzH88J.png","url":"https://virginmedia.com"}],"programs":[{"site":"virginmedia.com","channel":"BBCNews.uk","titles":[{"value":"BBC News at One","lang":"en"}],"sub_titles":[],"descriptions":[{"value":"The latest national and international news, followed by weather.","lang":"en"}],"icon":{"src":""},"episodeNumbers":[{"system":"xmltv_ns","value":"96839999.145799123.0/1"},{"system":"onscreen","value":"S96840000E145799124"}],"date":null,"start":1666872000000,"stop":1666873800000,"urls":[],"ratings":[],"categories":[{"value":"News","lang":"en"}],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]}],"date":"2022-10-20"} \ No newline at end of file diff --git a/tests/__data__/expected/guides/virginmedia.com.xml b/tests/__data__/expected/guides/en/virginmedia.com.xml similarity index 100% rename from tests/__data__/expected/guides/virginmedia.com.xml rename to tests/__data__/expected/guides/en/virginmedia.com.xml diff --git a/tests/__data__/expected/guides/virginmedia.com.xml.gz b/tests/__data__/expected/guides/en/virginmedia.com.xml.gz similarity index 100% rename from tests/__data__/expected/guides/virginmedia.com.xml.gz rename to tests/__data__/expected/guides/en/virginmedia.com.xml.gz diff --git a/tests/__data__/expected/guides/sky.com.json b/tests/__data__/expected/guides/fr/sky.com.json similarity index 79% rename from tests/__data__/expected/guides/sky.com.json rename to tests/__data__/expected/guides/fr/sky.com.json index 6aba8984..e6e8888e 100644 --- a/tests/__data__/expected/guides/sky.com.json +++ b/tests/__data__/expected/guides/fr/sky.com.json @@ -1 +1 @@ -{"channels":[{"id":"BBCNews.uk","name":"BBC News","site":"sky.com","lang":"en","logo":"https://i.imgur.com/rPzH88J.png","url":"https://sky.com"},{"id":"CNN.us","name":"CNN","site":"sky.com","lang":"fr","logo":"https://www.directv.com/images/logos/channels/dark/large/579.png","url":"https://sky.com"}],"programs":[{"site":"sky.com","channel":"BBCNews.uk","titles":[{"value":"BBC News at One","lang":"en"},{"value":"BBC News at One","lang":"fr"}],"sub_titles":[],"descriptions":[{"value":"The latest national and international news from the BBC. [S,SL]","lang":"en"},{"value":"Les dernières nouvelles nationales et internationales de la BBC. [S,SL]","lang":"fr"}],"icon":{"src":"http://epgstatic.sky.com/epgdata/1.0/paimage/46/1/lisa/5.2.2/linear/channel/ca247bc8-6be0-48f9-88d1-865f87f7680e/2011"},"episodeNumbers":[],"date":null,"start":1666872000000,"stop":1666873800000,"urls":[],"ratings":[],"categories":[],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]},{"site":"sky.com","channel":"CNN.us","titles":[{"value":"French title","lang":"fr"}],"sub_titles":[],"descriptions":[],"icon":{"src":""},"episodeNumbers":[],"date":null,"start":1666872000000,"stop":1666873800000,"urls":[],"ratings":[],"categories":[],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]}]} \ No newline at end of file +{"channels":[{"id":"BBCNews.uk","name":"BBC News","site":"sky.com","lang":"fr","logo":"https://i.imgur.com/rPzH88J.png","url":"https://sky.com"},{"id":"CNN.us","name":"CNN","site":"sky.com","lang":"fr","logo":"https://www.directv.com/images/logos/channels/dark/large/579.png","url":"https://sky.com"}],"programs":[{"site":"sky.com","channel":"BBCNews.uk","titles":[{"value":"BBC News at One","lang":"fr"}],"sub_titles":[],"descriptions":[{"value":"Les dernières nouvelles nationales et internationales de la BBC. [S,SL]","lang":"fr"}],"icon":{"src":"http://epgstatic.sky.com/epgdata/1.0/paimage/46/1/lisa/5.2.2/linear/channel/ca247bc8-6be0-48f9-88d1-865f87f7680e/2011"},"episodeNumbers":[],"date":null,"start":1666872000000,"stop":1666873800000,"urls":[],"ratings":[],"categories":[],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]},{"site":"sky.com","channel":"CNN.us","titles":[{"value":"French title","lang":"fr"}],"sub_titles":[],"descriptions":[],"icon":{"src":""},"episodeNumbers":[],"date":null,"start":1666872000000,"stop":1666873800000,"urls":[],"ratings":[],"categories":[],"directors":[],"actors":[],"writers":[],"adapters":[],"producers":[],"composers":[],"editors":[],"presenters":[],"commentators":[],"guests":[]}],"date":"2022-10-20"} \ No newline at end of file diff --git a/tests/__data__/expected/guides/sky.com.xml b/tests/__data__/expected/guides/fr/sky.com.xml similarity index 56% rename from tests/__data__/expected/guides/sky.com.xml rename to tests/__data__/expected/guides/fr/sky.com.xml index 454db214..d04dc456 100644 --- a/tests/__data__/expected/guides/sky.com.xml +++ b/tests/__data__/expected/guides/fr/sky.com.xml @@ -1,6 +1,6 @@ BBC Newshttps://sky.com CNNhttps://sky.com -BBC News at OneBBC News at OneThe latest national and international news from the BBC. [S,SL]Les dernières nouvelles nationales et internationales de la BBC. [S,SL] +BBC News at OneLes dernières nouvelles nationales et internationales de la BBC. [S,SL] French title \ No newline at end of file diff --git a/tests/__data__/expected/guides/fr/sky.com.xml.gz b/tests/__data__/expected/guides/fr/sky.com.xml.gz new file mode 100644 index 00000000..ededb1dd Binary files /dev/null and b/tests/__data__/expected/guides/fr/sky.com.xml.gz differ diff --git a/tests/__data__/expected/guides/sky.com.xml.gz b/tests/__data__/expected/guides/sky.com.xml.gz deleted file mode 100644 index d2255843..00000000 Binary files a/tests/__data__/expected/guides/sky.com.xml.gz and /dev/null differ diff --git a/tests/__data__/expected/logs/guides/update.log b/tests/__data__/expected/logs/guides/update.log index a1fd872d..bf20652e 100644 --- a/tests/__data__/expected/logs/guides/update.log +++ b/tests/__data__/expected/logs/guides/update.log @@ -1,5 +1,5 @@ -{"lang":"da","site":"allente.se","channel":"6eren.dk","filename":"allente.se"} -{"lang":"en","site":"virginmedia.com","channel":"BBCNews.uk","filename":"virginmedia.com"} -{"lang":"en","site":"sky.com","channel":"BBCNews.uk","filename":"sky.com"} -{"lang":"fr","site":"sky.com","channel":"BBCNews.uk","filename":"sky.com"} -{"lang":"fr","site":"sky.com","channel":"CNN.us","filename":"sky.com"} \ No newline at end of file +{"site":"allente.se","lang":"da","days":2,"channel":"6eren.dk","filename":"da/allente.se"} +{"site":"virginmedia.com","lang":"en","days":2,"channel":"BBCNews.uk","filename":"en/virginmedia.com"} +{"site":"sky.com","lang":"fr","days":2,"channel":"BBCNews.uk","filename":"fr/sky.com"} +{"site":"sky.com","lang":"fr","days":2,"channel":"CNN.us","filename":"fr/sky.com"} +{"site":"sky.com","lang":"en","days":2,"channel":"BBCNews.uk","filename":"en/sky.com"} \ No newline at end of file diff --git a/tests/__data__/input/logs/guides/update.log b/tests/__data__/input/logs/guides/update.log index 1e9a9cc3..bf20652e 100644 --- a/tests/__data__/input/logs/guides/update.log +++ b/tests/__data__/input/logs/guides/update.log @@ -1,5 +1,5 @@ -{"lang":"en","site":"allente.se","channel":"6eren.dk","filename":"allente.se"} -{"lang":"da","site":"allente.se","channel":"6eren.dk","filename":"allente.se"} -{"lang":"en","site":"virginmedia.com","channel":"BBCNews.uk","filename":"virginmedia.com"} -{"lang":"en","site":"sky.com","channel":"BBCNews.uk","filename":"sky.com"} -{"lang":"fr","site":"sky.com","channel":"BBCNews.uk","filename":"sky.com"} +{"site":"allente.se","lang":"da","days":2,"channel":"6eren.dk","filename":"da/allente.se"} +{"site":"virginmedia.com","lang":"en","days":2,"channel":"BBCNews.uk","filename":"en/virginmedia.com"} +{"site":"sky.com","lang":"fr","days":2,"channel":"BBCNews.uk","filename":"fr/sky.com"} +{"site":"sky.com","lang":"fr","days":2,"channel":"CNN.us","filename":"fr/sky.com"} +{"site":"sky.com","lang":"en","days":2,"channel":"BBCNews.uk","filename":"en/sky.com"} \ No newline at end of file diff --git a/tests/__data__/input/sites/example.com.config.js b/tests/__data__/input/sites/example.com.config.js index 20384029..e420f308 100644 --- a/tests/__data__/input/sites/example.com.config.js +++ b/tests/__data__/input/sites/example.com.config.js @@ -1,5 +1,6 @@ module.exports = { site: 'example.com', + days: 2, url() { return `https://example.com` },