Mise à jour du README.

This commit is contained in:
Johnnybegood90
2026-03-11 19:00:45 +01:00
parent 0354b25f47
commit ea8edb1b80
+88 -13
View File
@@ -3,6 +3,7 @@
> A real-time IPTV TV guide, built for [Tunarr](https://github.com/chrisbenincasa/tunarr) and any XMLTV/M3U source. > A real-time IPTV TV guide, built for [Tunarr](https://github.com/chrisbenincasa/tunarr) and any XMLTV/M3U source.
![PHP](https://img.shields.io/badge/PHP-8.0+-777BB4?style=flat-square&logo=php&logoColor=white) ![PHP](https://img.shields.io/badge/PHP-8.0+-777BB4?style=flat-square&logo=php&logoColor=white)
![Apache](https://img.shields.io/badge/Apache-ready-D22128?style=flat-square&logo=apache&logoColor=white)
![Nginx](https://img.shields.io/badge/Nginx-ready-009639?style=flat-square&logo=nginx&logoColor=white) ![Nginx](https://img.shields.io/badge/Nginx-ready-009639?style=flat-square&logo=nginx&logoColor=white)
![License](https://img.shields.io/badge/license-AGPLv3-blue?style=flat-square) ![License](https://img.shields.io/badge/license-AGPLv3-blue?style=flat-square)
@@ -30,9 +31,12 @@ This demo runs with a sample XMLTV feed and fake channels to showcase the interf
- 🕶️ **Past programs** automatically dimmed - 🕶️ **Past programs** automatically dimmed
- 📋 **Hover tooltip** — title, synopsis, season/episode, schedule, duration - 📋 **Hover tooltip** — title, synopsis, season/episode, schedule, duration
- 🔗 **One-click copy** buttons for EPG & M3U URLs in the topbar - 🔗 **One-click copy** buttons for EPG & M3U URLs in the topbar
- ▶️ **Built-in HLS player** — click any channel or live program to watch in a PiP overlay
- 🔀 **HTTP→HTTPS proxy** — streams Tunarr over HTTP transparently from an HTTPS page
- 🎨 **Theme system** — drop a CSS file in `themes/` and it appears in the menu automatically
- ⚙️ **Guided setup** on first launch — no config files to edit manually - ⚙️ **Guided setup** on first launch — no config files to edit manually
- 🔄 **Auto-reload** EPG every 30 minutes - 🔄 **Auto-reload** EPG every 30 minutes
- 0️⃣ **Zero dependencies** — vanilla PHP + nginx, that's it - 0️⃣ **Zero JS dependencies** — vanilla PHP, hls.js loaded from CDN
--- ---
@@ -40,10 +44,10 @@ This demo runs with a sample XMLTV feed and fake channels to showcase the interf
### Requirements ### Requirements
- A web server running **PHP 8.0+** with **php-fpm** - A web server running **PHP 8.0+** with **php-curl** extension
- **Nginx** (or Apache) - **Apache** or **Nginx**
- An **EPG source in XMLTV format** (e.g. Tunarr, Jellyfin, xTeVe...) - An **EPG source in XMLTV format** (e.g. Tunarr, Jellyfin, xTeVe...)
- *(Optional)* An **M3U playlist** - *(Optional)* An **M3U playlist** — required for the built-in player
--- ---
@@ -59,14 +63,13 @@ cd /var/www/gridtv
### 2. Set permissions ### 2. Set permissions
```bash ```bash
# The web server needs write access to create config.json during setup
chmod 775 /var/www/gridtv chmod 775 /var/www/gridtv
chown -R www-data:www-data /var/www/gridtv chown -R www-data:www-data /var/www/gridtv
``` ```
--- ---
### 3. Configure Nginx ### 3a. Configure Nginx
```nginx ```nginx
server { server {
@@ -95,7 +98,42 @@ nginx -t && systemctl reload nginx
--- ---
### 4. First launch — Setup ### 3b. Configure Apache
```apache
<VirtualHost *:80>
ServerName guide.your-domain.com
DocumentRoot /var/www/gridtv
<Directory /var/www/gridtv>
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
```
```bash
a2enmod php8.4 rewrite
systemctl reload apache2
```
---
### 4. Install php-curl
The built-in player uses `proxy.php` to relay HTTP streams over HTTPS. This requires the **php-curl** extension:
```bash
# Debian/Ubuntu — adjust version to match your PHP
apt install php8.4-curl
# Then reload the web server
systemctl reload apache2 # or: systemctl reload nginx
```
---
### 5. First launch — Setup
Open your browser at `http://guide.your-domain.com`. Open your browser at `http://guide.your-domain.com`.
@@ -105,16 +143,15 @@ GridTV detects the missing config and automatically redirects you to the setup p
|---|---| |---|---|
| **Group name** | Displayed top-left in the topbar (e.g. *MyTV*, *FamilyTV*...) | | **Group name** | Displayed top-left in the topbar (e.g. *MyTV*, *FamilyTV*...) |
| **EPG URL (XMLTV)** | Your electronic program guide URL | | **EPG URL (XMLTV)** | Your electronic program guide URL |
| **M3U URL** *(optional)* | Your IPTV playlist, for quick copy from the topbar | | **M3U URL** *(optional)* | Your IPTV playlist — used by the built-in player to match channels to streams |
Once submitted, `config.json` is created on the server. **The setup page becomes inaccessible.** Once submitted, `config.json` is created on the server. **The setup page becomes inaccessible.**
--- ---
### 5. Editing the config later ### 6. Editing the config later
```bash ```bash
# Via SSH
nano /var/www/gridtv/config.json nano /var/www/gridtv/config.json
``` ```
@@ -134,8 +171,14 @@ nano /var/www/gridtv/config.json
gridtv/ gridtv/
├── index.php # The TV guide (redirects to setup if no config found) ├── index.php # The TV guide (redirects to setup if no config found)
├── setup.php # First-launch configuration page ├── setup.php # First-launch configuration page
├── config.example.json # Config template (copy to config.json and fill in) ├── proxy.php # HTTP→HTTPS stream proxy (required for the player)
├── config.example.json # Config template
├── .gitignore # config.json excluded from the repo ├── .gitignore # config.json excluded from the repo
├── themes/ # CSS theme files
│ ├── default.css # Dark studio (default)
│ ├── magazine.css # Vintage newspaper
│ ├── cyberpunk.css # Neon on black
│ └── steampunk.css # Victorian copper
└── README.md └── README.md
``` ```
@@ -143,14 +186,46 @@ gridtv/
--- ---
## 🎨 Themes
GridTV ships with 4 built-in themes. To add your own, create a CSS file in `themes/` with these metadata comments at the top:
```css
/*
* @name My Theme
* @emoji 🌙
*/
:root {
--bg: #0a0b0d;
--accent: #e8c842;
/* ... */
}
```
Drop it in `themes/` — it appears in the theme selector automatically, no code changes needed.
---
## ▶️ Built-in Player
Click on any **channel name** or **currently airing program** to open a PiP (picture-in-picture) player in the bottom-right corner.
The player requires:
- An **M3U URL** configured in setup (used to match channel names to stream URLs)
- The **php-curl** extension installed on the server
If your stream source (e.g. Tunarr) serves streams over HTTP while GridTV runs on HTTPS, `proxy.php` handles the relay transparently — no browser mixed-content errors.
---
## ⚙️ Advanced configuration ## ⚙️ Advanced configuration
The following constants can be tweaked directly in `index.php`: The following constants can be tweaked directly in `index.php`:
```js ```js
const PX_PER_MIN = 5; // Horizontal zoom (pixels per minute) const PX_PER_MIN = 5; // Horizontal zoom (pixels per minute)
const HOURS_BEFORE = 1; // Past hours visible in the grid const GRID_HOURS = 72; // Total timeline duration (hours)
const HOURS_AFTER = 3; // Future hours visible in the grid
const ROW_H = 80; // Channel row height (px) const ROW_H = 80; // Channel row height (px)
``` ```