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 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 diff --git a/sites/tv.lv.channels.xml b/sites/tv.lv.channels.xml new file mode 100755 index 00000000..b3a4e755 --- /dev/null +++ b/sites/tv.lv.channels.xml @@ -0,0 +1,48 @@ + + + + 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 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 + } +} 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 Русское кино 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 Ю