Initial Commit

This commit is contained in:
2023-09-10 21:48:48 +02:00
commit 227cca7d31
791 changed files with 165200 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<site site="telkussa.fi">
<channels>
<channel lang="fi" xmltv_id="AlfaTV.fi" site_id="117">AlfaTV</channel>
<channel lang="fi" xmltv_id="AnimalPlanetFinland.fi" site_id="9">Animal Planet</channel>
<channel lang="fi" xmltv_id="AVA.fi" site_id="60">AVA</channel>
<channel lang="fi" xmltv_id="CMoreFirst.se" site_id="17">C More First</channel>
<channel lang="fi" xmltv_id="CMoreHits.se" site_id="18">C More Hits</channel>
<channel lang="fi" xmltv_id="CMoreJuniori.fi" site_id="74">C More Juniori</channel>
<channel lang="fi" xmltv_id="CMoreMax.fi" site_id="30">C More Max</channel>
<channel lang="fi" xmltv_id="CMoreSeries.se" site_id="57">C More Series</channel>
<channel lang="fi" xmltv_id="CMoreSport1.fi" site_id="105">C More Sport 1</channel>
<channel lang="fi" xmltv_id="CMoreSport2.fi" site_id="106">C More Sport 2</channel>
<channel lang="fi" xmltv_id="CMoreStars.se" site_id="122">C More Stars</channel>
<channel lang="fi" xmltv_id="DiscoveryChannelFinland.fi" site_id="6">Discovery Channel Finland</channel>
<channel lang="fi" xmltv_id="DisneyChannelScandinavia.uk" site_id="46">Disney Channel Scandinavia</channel>
<!-- <channel lang="fi" xmltv_id="" site_id="49">Eurosport 1 Finland</channel> -->
<!-- <channel lang="fi" xmltv_id="" site_id="50">Eurosport 1 Sverige</channel> -->
<channel lang="fi" xmltv_id="FoxFinland.fi" site_id="77">Fox</channel>
<channel lang="fi" xmltv_id="Frii.fi" site_id="104">Frii</channel>
<channel lang="fi" xmltv_id="Hero.fi" site_id="103">Hero</channel>
<channel lang="fi" xmltv_id="Jim.fi" site_id="56">Jim</channel>
<channel lang="fi" xmltv_id="Kutonen.fi" site_id="64">Kutonen</channel>
<channel lang="fi" xmltv_id="Liv.fi" site_id="63">Liv</channel>
<channel lang="fi" xmltv_id="MTV3.fi" site_id="3">MTV 3</channel>
<channel lang="fi" xmltv_id="MTVGlobal.uk" site_id="32">MTV Nordic</channel>
<channel lang="fi" xmltv_id="NationalGeographicFinland.fi" site_id="47">National Geographic Scandinavia</channel>
<channel lang="fi" xmltv_id="Nelonen.fi" site_id="4">Nelonen</channel>
<channel lang="fi" xmltv_id="ParamountNetworkSweden.se" site_id="121">Paramount Network Sverige</channel>
<channel lang="fi" xmltv_id="SFkanalen.se" site_id="116">SF-kanalen</channel>
<channel lang="fi" xmltv_id="Sjuan.se" site_id="27">Sjuan</channel>
<channel lang="fi" xmltv_id="Sub.fi" site_id="5">Sub</channel>
<channel lang="fi" xmltv_id="TaivasTV7.fi" site_id="65">Taivas TV7</channel>
<channel lang="fi" xmltv_id="TLCFinland.fi" site_id="12">TLC</channel>
<channel lang="fi" xmltv_id="TV4.se" site_id="26">TV 4</channel>
<channel lang="fi" xmltv_id="TV5.fi" site_id="88">TV 5</channel>
<channel lang="fi" xmltv_id="VFilmAction.se" site_id="35">V Film Action</channel>
<channel lang="fi" xmltv_id="VFilmFamily.se" site_id="36">V Film Family</channel>
<channel lang="fi" xmltv_id="VFilmHits.se" site_id="114">V Film Hits</channel>
<channel lang="fi" xmltv_id="VFilmPremiere.se" site_id="33">V Film Premiere</channel>
<channel lang="fi" xmltv_id="VSportFootball.se" site_id="113">V Sport Football</channel>
<channel lang="fi" xmltv_id="VSportGolf.se" site_id="83">V Sport Golf</channel>
<channel lang="fi" xmltv_id="VSportHockey.se" site_id="102">V Sport Hockey</channel>
<channel lang="fi" xmltv_id="YleTeemaFem.fi" site_id="13">YLE Teema Fem</channel>
<channel lang="fi" xmltv_id="YleTV1.fi" site_id="1">YLE TV 1</channel>
<channel lang="fi" xmltv_id="YleTV2.fi" site_id="2">YLE TV 2</channel>
</channels>
</site>

View File

@@ -0,0 +1,30 @@
const dayjs = require('dayjs')
module.exports = {
site: 'telkussa.fi',
days: 2,
url: function ({ date, channel }) {
return `https://telkussa.fi/API/Channel/${channel.site_id}/${date.format('YYYYMMDD')}`
},
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
}
}