mirror of
https://github.com/iptv-org/epg.git
synced 2025-05-09 16:40:07 -04:00
Move sites into a folders
This commit is contained in:
parent
b92feaf2b6
commit
6955909ee4
97 changed files with 0 additions and 0 deletions
51
sites/tv.lv/tv.lv.config.js
Normal file
51
sites/tv.lv/tv.lv.config.js
Normal file
|
@ -0,0 +1,51 @@
|
|||
const dayjs = require('dayjs')
|
||||
|
||||
module.exports = {
|
||||
site: 'tv.lv',
|
||||
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 && 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 items = parseItems(content)
|
||||
items.forEach(item => {
|
||||
const start = parseStart(item)
|
||||
const stop = parseStop(item)
|
||||
programs.push({
|
||||
title: item.title,
|
||||
description: item.description_long,
|
||||
category: item.categorystring,
|
||||
icon: item.image,
|
||||
start,
|
||||
stop
|
||||
})
|
||||
})
|
||||
|
||||
return programs
|
||||
}
|
||||
}
|
||||
|
||||
function parseStart(item) {
|
||||
return item.start_unix ? dayjs.unix(item.start_unix) : null
|
||||
}
|
||||
|
||||
function parseStop(item) {
|
||||
return item.stop_unix ? dayjs.unix(item.stop_unix) : null
|
||||
}
|
||||
|
||||
function parseItems(content) {
|
||||
const data = JSON.parse(content)
|
||||
|
||||
return data.schedule.programme || []
|
||||
}
|
26
sites/tv.lv/tv.lv_lv.channels.xml
Normal file
26
sites/tv.lv/tv.lv_lv.channels.xml
Normal file
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<site site="tv.lv">
|
||||
<channels>
|
||||
<channel lang="lv" xmltv_id="3PlusLatvija.lv" site_id="3-1">3+ Latvija</channel>
|
||||
<channel lang="lv" xmltv_id="EpicDrama.se" site_id="epic-drama-cee">Epic Drama</channel>
|
||||
<channel lang="lv" xmltv_id="Eurosport1.fr" site_id="eurosport-1">Eurosport 1</channel>
|
||||
<channel lang="lv" xmltv_id="Eurosport2.fr" site_id="eurosport-2">Eurosport 2</channel>
|
||||
<channel lang="lv" xmltv_id="HistoryEurope.us" site_id="history-europe">History Europe</channel>
|
||||
<channel lang="lv" xmltv_id="LTV1.lv" site_id="ltv1">LTV 1</channel>
|
||||
<channel lang="lv" xmltv_id="LTV7.lv" site_id="ltv7">LTV 7</channel>
|
||||
<channel lang="lv" xmltv_id="PerviykanalEuropa.ru" site_id="pbk-1">Perviy kanal Europa</channel>
|
||||
<channel lang="lv" xmltv_id="RENTVBaltic.ru" site_id="rentv-baltic">REN TV Baltic</channel>
|
||||
<channel lang="lv" xmltv_id="TV1000East.se" site_id="tv1000-cee">TV 1000 East</channel>
|
||||
<channel lang="lv" xmltv_id="TV1000RusskoeKino.se" site_id="tv1000-kino">TV 1000 Russkoe Kino</channel>
|
||||
<channel lang="lv" xmltv_id="TV3Film.lv" site_id="tv3-film">TV 3 Film</channel>
|
||||
<channel lang="lv" xmltv_id="TV3Latvija.lv" site_id="tv3-1">TV 3 Latvija</channel>
|
||||
<channel lang="lv" xmltv_id="TV3Life.lv" site_id="tv3-life">TV 3 Life</channel>
|
||||
<channel lang="lv" xmltv_id="TV3Mini.lv" site_id="tv3-mini">TV 3 Mini</channel>
|
||||
<channel lang="lv" xmltv_id="TV3Sport.lv" site_id="tv3-sport">TV 3 Sport</channel>
|
||||
<channel lang="lv" xmltv_id="TV3Sport2.lv" site_id="tv3-sport-2">TV 3 Sport 2</channel>
|
||||
<channel lang="lv" xmltv_id="TV6Latvija.lv" site_id="tv6-1">TV 6 Latvija</channel>
|
||||
<channel lang="lv" xmltv_id="ViasatExploreEast.se" site_id="viasat-explore-nordic">Viasat Explore East</channel>
|
||||
<channel lang="lv" xmltv_id="ViasatHistory.se" site_id="viasat-history-cee">Viasat History</channel>
|
||||
<channel lang="lv" xmltv_id="ViasatNatureEast.se" site_id="viasat-nature-cee">Viasat Nature East</channel>
|
||||
</channels>
|
||||
</site>
|
Loading…
Add table
Add a link
Reference in a new issue