From e3916528bc1849a3c04f70d49fa5c7d90fdbc281 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 29 May 2021 15:11:29 +0300 Subject: [PATCH 1/7] Create tv.lv.config.js --- sites/tv.lv.config.js | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 sites/tv.lv.config.js diff --git a/sites/tv.lv.config.js b/sites/tv.lv.config.js new file mode 100644 index 00000000..0faf560d --- /dev/null +++ b/sites/tv.lv.config.js @@ -0,0 +1,42 @@ +const dayjs = require('dayjs') + +module.exports = { + lang: 'lv', + site: 'tv.lv', + channels: 'tv.lv.channels.xml', + output: '.gh-pages/guides/tv.lv.guide.xml', + url: function ({ date, channel }) { + return `https://www.tv.lv/programme/listing/none/${date.format( + 'DD-MM-YYYY' + )}?filter=channel&subslug=${channel.site_id}` + }, + logo: function ({ content }) { + const data = JSON.parse(content) + const logo = data.schedule.programme.length ? data.schedule.programme[0].channel.logo_64 : null + + return logo ? `https://cdn.tvstart.com/img/channel/${logo}` : null + }, + parser: function ({ content }) { + const programs = [] + const data = JSON.parse(content) + const items = data.schedule.programme + if (!items.length) return programs + + items.forEach(item => { + if (item.title && item.start_unix && item.stop_unix) { + const start = dayjs.unix(item.start_unix) + const stop = dayjs.unix(item.stop_unix) + programs.push({ + title: item.title, + description: item.description_long, + category: item.categorystring, + icon: item.image, + start: start.toString(), + stop: stop.toString() + }) + } + }) + + return programs + } +} From e021c5b0de28bd6a1ce89ceeea879482b0f41654 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 29 May 2021 15:11:38 +0300 Subject: [PATCH 2/7] Create tv.lv.channels.xml --- sites/tv.lv.channels.xml | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100755 sites/tv.lv.channels.xml diff --git a/sites/tv.lv.channels.xml b/sites/tv.lv.channels.xml new file mode 100755 index 00000000..02eec9c6 --- /dev/null +++ b/sites/tv.lv.channels.xml @@ -0,0 +1,6 @@ + + + + 3+ + + \ No newline at end of file From 45879a02764614fcfe8be6d346f0f8b80c938371 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 29 May 2021 17:03:00 +0300 Subject: [PATCH 3/7] Update tvgid.ua.channels.xml --- sites/tvgid.ua.channels.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tvgid.ua.channels.xml b/sites/tvgid.ua.channels.xml index 1eac8a97..abed2bbe 100755 --- a/sites/tvgid.ua.channels.xml +++ b/sites/tvgid.ua.channels.xml @@ -128,7 +128,7 @@ TV1000 Action East TV-4 TV5 (Запорожье) - TV XXI + TV XXI TVP1 TVP2 Ю From 20fe341887d95567fc6a8badc34e0828c3382917 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 29 May 2021 17:03:03 +0300 Subject: [PATCH 4/7] Update tv.yandex.ru.channels.xml --- sites/tv.yandex.ru.channels.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/tv.yandex.ru.channels.xml b/sites/tv.yandex.ru.channels.xml index c455b41c..d4f210d4 100755 --- a/sites/tv.yandex.ru.channels.xml +++ b/sites/tv.yandex.ru.channels.xml @@ -396,7 +396,7 @@ ТВ-3 TV BRICS Russian ТВ Центр - TV XXI + TV XXI TV1000 TV1000 Action TV1000 Русское кино From 3647d98c51ac051bb198aa5b548501b64e4bb486 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 29 May 2021 17:03:34 +0300 Subject: [PATCH 5/7] Update tv.lv.channels.xml --- sites/tv.lv.channels.xml | 42 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/sites/tv.lv.channels.xml b/sites/tv.lv.channels.xml index 02eec9c6..b3a4e755 100755 --- a/sites/tv.lv.channels.xml +++ b/sites/tv.lv.channels.xml @@ -2,5 +2,47 @@ 3+ + Duo 3 + Duo 6 + Epic Drama + Eurosport 1 + Eurosport 2 + Filmzone + Filmzone+ + Fox Life Latvia + History Europe + KidZone TV + Kidzone+ + Lolo TV + LTV1 + LTV7 + MVK + National Geographic Latvija + Nickelodeon Latvia + Re:TV + REN TV Baltic + Rīga TV24 + Smartzone + Sport1 + Sportacentrs.com + TV Kurzeme + TV XXI + TV1000 Action CEE + TV1000 CEE + TV1000 Русское кино + TV3 + TV3 Film + TV3 Life + TV3 Mini + TV3 Sport + TV3 Sport 2 + TV6 + Viasat Explore East + Viasat History + Viasat Nature East + Первый канал + РТР-Планета + РТР-Планета Балтия + СТС Балтия \ No newline at end of file From 911d955f632262c40016973b8809fc1d94fe3f9a Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 29 May 2021 17:09:30 +0300 Subject: [PATCH 6/7] Update auto-update.yml --- .github/workflows/auto-update.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index aa61e868..5d0fb960 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -33,7 +33,8 @@ jobs: ontvtonight.com, tv.yandex.ru, tvtv.ca, - tvtv.us + tvtv.us, + tv.lv ] steps: - name: Checkout From 2e25052cd331e476e883c0d8517556f118eb2519 Mon Sep 17 00:00:00 2001 From: Aleksandr Statciuk Date: Sat, 29 May 2021 17:10:37 +0300 Subject: [PATCH 7/7] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 15b2d8f0..ac42a3a8 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,7 @@ To load a program guide, all you need to do is copy the link to one of the guide 🇮🇹 Italyhttps://iptv-org.github.io/epg/guides/guidatv.sky.it.guide.xml 🇮🇪 Irelandhttps://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml 🇰🇿 Kazakhstanhttps://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml + 🇱🇻 Latviahttps://iptv-org.github.io/epg/guides/tv.lv.guide.xml 🇲🇾 Malaysiahttps://iptv-org.github.io/epg/guides/astro.com.my.guide.xml 🇲🇽 Mexicohttps://iptv-org.github.io/epg/guides/mi.tv.guide.xml 🇵🇾 Paraguayhttps://iptv-org.github.io/epg/guides/mi.tv.guide.xml