Files
TVGuide/app/public/index.php
T
2026-07-06 20:31:04 +02:00

31 lines
632 B
PHP

<?php
require_once '/var/www/vendor/autoload.php';
use TVGuide\Config;
use TVGuide\XmlTv;
use TVGuide\View;
$config = new Config(
'/var/www/config/config.json',
'/var/www/config/channels.json'
);
$xmltv = new XmlTv(
'/var/www/epg/guide.xml',
$config->get('timezone', 'Europe/Vienna')
);
$xmltv->synchronizeChannels($config);
[$channels, $programmes] = $xmltv->load($config);
$contentTemplate = '/var/www/templates/home.php';
View::render('layout', [
'title' => $config->get('title', 'TVGuide'),
'channels' => $channels,
'programmes' => $programmes,
'contentTemplate' => $contentTemplate,
]);