diff --git a/.github/workflows/auto-update.yml b/.github/workflows/auto-update.yml index 0d8a6f9b..eb5be33d 100644 --- a/.github/workflows/auto-update.yml +++ b/.github/workflows/auto-update.yml @@ -4,6 +4,23 @@ on: schedule: - cron: '0 0 * * *' jobs: + telkussa_fi: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Install Dependencies + run: npm install + - name: Run EPG Grabber + run: npx epg-grabber --config=sites/telkussa.fi.config.js + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@4.1.1 + with: + branch: gh-pages + folder: .gh-pages + clean: false andorradifusio_ad: runs-on: ubuntu-latest steps: diff --git a/README.md b/README.md index cea3ec42..b144c91a 100644 --- a/README.md +++ b/README.md @@ -23,6 +23,7 @@ To load a program guide, all you need to do is copy the link to one of the guide ๐Ÿ‡จ๐Ÿ‡ด Colombiahttps://iptv-org.github.io/epg/guides/mi.tv.guide.xml ๐Ÿ‡จ๐Ÿ‡ฟ Czechiahttps://iptv-org.github.io/epg/guides/m.tv.sms.cz.guide.xml ๐Ÿ‡ธ๐Ÿ‡ป El Salvadorhttps://iptv-org.github.io/epg/guides/mi.tv.guide.xml + ๐Ÿ‡ซ๐Ÿ‡ฎ Finlandhttps://iptv-org.github.io/epg/guides/telkussa.fi.guide.xml ๐Ÿ‡ซ๐Ÿ‡ท Francehttps://iptv-org.github.io/epg/guides/programme-tv.net.guide.xml ๐Ÿ‡ฉ๐Ÿ‡ช Germanyhttps://iptv-org.github.io/epg/guides/hd-plus.de.guide.xml ๐Ÿ‡ฌ๐Ÿ‡ท Greecehttps://iptv-org.github.io/epg/guides/cosmote.gr.guide.xml @@ -40,6 +41,7 @@ To load a program guide, all you need to do is copy the link to one of the guide ๐Ÿ‡ท๐Ÿ‡ด Romaniahttps://iptv-org.github.io/epg/guides/programetv.ro.guide.xml ๐Ÿ‡ท๐Ÿ‡บ Russiahttps://iptv-org.github.io/epg/guides/tv.yandex.ru.guide.xml ๐Ÿ‡ช๐Ÿ‡ธ Spainhttps://iptv-org.github.io/epg/guides/programacion-tv.elpais.com.guide.xml + ๐Ÿ‡ธ๐Ÿ‡ช Swedenhttps://iptv-org.github.io/epg/guides/telkussa.fi.guide.xml ๐Ÿ‡น๐Ÿ‡ท Turkeyhttps://iptv-org.github.io/epg/guides/digiturk.com.tr.guide.xml ๐Ÿ‡บ๐Ÿ‡ฆ Ukrainehttps://iptv-org.github.io/epg/guides/tvgid.ua.guide.xml ๐Ÿ‡ฌ๐Ÿ‡ง United Kingdomhttps://iptv-org.github.io/epg/guides/ontvtonight.com.guide.xml diff --git a/sites/telkussa.fi.channels.xml b/sites/telkussa.fi.channels.xml new file mode 100755 index 00000000..c14627d6 --- /dev/null +++ b/sites/telkussa.fi.channels.xml @@ -0,0 +1,55 @@ +๏ปฟ + + + AlfaTV + Animal Planet Europe + AVA + BBC Earth Nordic + BBC Entertainment Europe + C More First + C More Hits + C More Juniori + C More Max + C More Series + C More Sport 1 + C More Sport 2 + C More Stars + Discovery Channel Finland + Disney Channel Scandinavia + Eurosport 1 Finland + Eurosport 2 Sverige + Fox Finland + Frii + Hero + Jim + Kutonen + Liv + MTV Nordic + MTV3 + National Geographic Scandinavia + Nelonen + Paramount Network Finland + SF-kanalen + Sjuan + Sub + TLC Finland + TV Finland + TV4 + TV5 + TV7 + V Film Action + V Film Family + V Film Hits + V Film Premiere + V Sport + V Sport Football + V Sport Golf + V Sport Hockey + V Sport Jalkapallo + V Sport Jรครคkiekko + Viasat Sport HD + Yle Teema & Fem + Yle TV1 + Yle TV2 + + \ No newline at end of file diff --git a/sites/telkussa.fi.config.js b/sites/telkussa.fi.config.js new file mode 100644 index 00000000..c4ad64ab --- /dev/null +++ b/sites/telkussa.fi.config.js @@ -0,0 +1,35 @@ +const dayjs = require('dayjs') + +module.exports = { + lang: 'fi', + site: 'telkussa.fi', + channels: 'telkussa.fi.channels.xml', + output: '.gh-pages/guides/telkussa.fi.guide.xml', + url: function ({ date, channel }) { + return `https://telkussa.fi/API/Channel/${channel.site_id}/${date.format('YYYYMMDD')}` + }, + logo: function ({ channel }) { + return `https://telkussa.fi/images/chan${channel.site_id}@3x.png` + }, + parser: function ({ content, date, channel }) { + const programs = [] + const items = JSON.parse(content) + if (!items.length) return programs + + items.forEach(item => { + if (item.name && item.start && item.stop) { + const start = dayjs.unix(parseInt(item.start) * 60) + const stop = dayjs.unix(parseInt(item.stop) * 60) + + programs.push({ + title: item.name, + description: item.description, + start: start.toString(), + stop: stop.toString() + }) + } + }) + + return programs + } +}