Update README + add screenshot

This commit is contained in:
Johnnybegood90
2026-03-09 14:43:02 +01:00
parent 4879f8d89b
commit 360145686f
+54 -64
View File
@@ -1,6 +1,6 @@
# 📺 GridTV
> Guide TV IPTV en temps réel, pensé pour [Tunarr](https://github.com/chrisbenincasa/tunarr) et toute source XMLTV/M3U.
> 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)
![Nginx](https://img.shields.io/badge/Nginx-ready-009639?style=flat-square&logo=nginx&logoColor=white)
@@ -8,70 +8,60 @@
---
## ✨ Fonctionnalités
- 🎛️ **Grille timeline** — vue horizontale façon guide TV classique, avec ligne "maintenant" en temps réel
- 📱 **Responsive** — vue liste optimisée sur mobile
- ⏱️ **Barre de progression** en direct sur le programme en cours
- 🕶️ **Programmes passés** atténués automatiquement
- 📋 **Tooltip** au survol — titre, synopsis, saison/épisode, horaires, durée
- 🔗 **Boutons copie** EPG & M3U en un clic dans la topbar
- ⚙️ **Setup guidé** au premier lancement — zéro fichier à éditer à la main
- 🔄 **Rechargement automatique** de l'EPG toutes les 30 minutes
- 0️⃣ **Zéro dépendance** — PHP vanilla + nginx, c'est tout
![GridTV Preview](assets/preview.png)
---
## 📸 Aperçu
## ✨ Features
```
┌─────────────────────────────────────────────────────────────────┐
│ MonGroupe / GridTV Lun 09 Mar 14:32:18 ◀1h Maintenant 1h▶ EPG M3U ● LIVE │
├──────────┬────────────────────────┬──────────────────┬──────────┤
│ 1 Action │ ██████ Terminator ████ │ Die Hard │ ... │
│ 2 Legend │ Bio de Jimi Hendrix │ ████████████████ │ ... │
│ 3 Séries │ Sopranos S02E07 ████ │ ... │ │
└──────────┴────────────────────────┴──────────────────┴──────────┘
```
- 🎛️ **Timeline grid** — horizontal EPG-style view with a live "now" indicator
- 📱 **Responsive** — optimized list view on mobile
- ⏱️ **Live progress bar** on the currently airing program
- 🕶️ **Past programs** automatically dimmed
- 📋 **Hover tooltip** — title, synopsis, season/episode, schedule, duration
- 🔗 **One-click copy** buttons for EPG & M3U URLs in the topbar
- ⚙️ **Guided setup** on first launch — no config files to edit manually
- 🔄 **Auto-reload** EPG every 30 minutes
- 0️⃣ **Zero dependencies** — vanilla PHP + nginx, that's it
---
## 🚀 Installation
### Prérequis
### Requirements
- Serveur web avec **PHP 8.0+** et **php-fpm**
- **Nginx** (ou Apache)
- Une source **EPG au format XMLTV** (ex: Tunarr, Jellyfin, xTeVe...)
- *(Optionnel)* Une playlist **M3U**
- A web server running **PHP 8.0+** with **php-fpm**
- **Nginx** (or Apache)
- An **EPG source in XMLTV format** (e.g. Tunarr, Jellyfin, xTeVe...)
- *(Optional)* An **M3U playlist**
---
### 1. Cloner le repo
### 1. Clone the repo
```bash
git clone https://github.com/Johnnybegood90/gridtv.git /var/www/gridtv
git clone https://github.com/Johnnybegood90/GridTV.git /var/www/gridtv
cd /var/www/gridtv
```
---
### 2. Permissions
### 2. Set permissions
```bash
# Le serveur web doit pouvoir écrire config.json lors du setup
# The web server needs write access to create config.json during setup
chmod 775 /var/www/gridtv
chown -R www-data:www-data /var/www/gridtv
```
---
### 3. Configurer Nginx
### 3. Configure Nginx
```nginx
server {
listen 80;
server_name guide.ton-domaine.fr;
server_name guide.your-domain.com;
root /var/www/gridtv;
index index.php;
@@ -87,7 +77,7 @@ server {
}
```
> 💡 Adapte la version de PHP (`php8.2-fpm`) à celle installée sur ton serveur.
> 💡 Adjust the PHP version (`php8.2-fpm`) to match the one installed on your server.
```bash
nginx -t && systemctl reload nginx
@@ -95,23 +85,23 @@ nginx -t && systemctl reload nginx
---
### 4. Premier lancement — Setup
### 4. First launch — Setup
Ouvre ton navigateur sur `http://guide.ton-domaine.fr`.
Open your browser at `http://guide.your-domain.com`.
GridTV détecte l'absence de config et te redirige automatiquement vers la page de setup :
GridTV detects the missing config and automatically redirects you to the setup page:
| Champ | Description |
| Field | Description |
|---|---|
| **Nom du groupe** | S'affiche en haut à gauche (ex: *JohnnyBeGood*, *MaTV*...) |
| **URL EPG (XMLTV)** | L'URL de ton guide électronique des programmes |
| **URL M3U** *(optionnel)* | Ta playlist IPTV, pour copie rapide depuis la topbar |
| **Group name** | Displayed top-left in the topbar (e.g. *MyTV*, *FamilyTV*...) |
| **EPG URL (XMLTV)** | Your electronic program guide URL |
| **M3U URL** *(optional)* | Your IPTV playlist, for quick copy from the topbar |
Une fois validé, le fichier `config.json` est créé sur le serveur. **La page setup devient inaccessible.**
Once submitted, `config.json` is created on the server. **The setup page becomes inaccessible.**
---
### 5. Modifier la config plus tard
### 5. Editing the config later
```bash
# Via SSH
@@ -120,7 +110,7 @@ nano /var/www/gridtv/config.json
```json
{
"group_name": "MonGroupe TV",
"group_name": "MyGroup TV",
"epg_url": "http://192.168.0.3:8000/api/xmltv.xml",
"m3u_url": "http://192.168.0.3:8000/api/channels.m3u"
}
@@ -128,51 +118,51 @@ nano /var/www/gridtv/config.json
---
## 📁 Structure du projet
## 📁 Project structure
```
gridtv/
├── index.php # Le guide TV (redirige vers setup si pas de config)
├── setup.php # Page de configuration initiale
├── config.example.json # Template de config (à copier → config.json)
├── .gitignore # config.json exclu du repo
├── index.php # The TV guide (redirects to setup if no config found)
├── setup.php # First-launch configuration page
├── config.example.json # Config template (copy to config.json and fill in)
├── .gitignore # config.json excluded from the repo
└── README.md
```
> `config.json` est dans le `.gitignore` — tes URLs privées ne seront jamais poussées sur GitHub.
> `config.json` is listed in `.gitignore` — your private URLs will never be pushed to GitHub.
---
## ⚙️ Configuration avancée
## ⚙️ Advanced configuration
Les constantes suivantes sont modifiables directement dans `index.php` :
The following constants can be tweaked directly in `index.php`:
```js
const PX_PER_MIN = 5; // Zoom horizontal (pixels par minute)
const HOURS_BEFORE = 1; // Heures passées visibles dans la grille
const HOURS_AFTER = 3; // Heures futures visibles
const ROW_H = 80; // Hauteur d'une ligne chaîne (px)
const PX_PER_MIN = 5; // Horizontal zoom (pixels per minute)
const HOURS_BEFORE = 1; // Past hours visible in the grid
const HOURS_AFTER = 3; // Future hours visible in the grid
const ROW_H = 80; // Channel row height (px)
```
---
## 🧩 Compatibilité EPG
## 🧩 EPG Compatibility
GridTV parse le format **XMLTV standard**. Testé avec :
GridTV parses the standard **XMLTV format**. Tested with:
- ✅ [Tunarr](https://github.com/chrisbenincasa/tunarr)
- ✅ [xTeVe](https://github.com/xteve-project/xTeVe)
- ✅ [Jellyfin](https://jellyfin.org/) (via plugin LiveTV)
-Tout fichier XMLTV conforme à la spec
- ✅ [Jellyfin](https://jellyfin.org/) (via LiveTV plugin)
-Any XMLTV-compliant file
---
## 🤝 Contribuer
## 🤝 Contributing
Les PRs sont les bienvenues ! Si t'as une idée, une correction, ou une feature — ouvre une issue ou envoie direct une PR.
PRs are welcome! Got an idea, a fix, or a feature request — open an issue or send a PR directly.
---
## 📄 Licence
## 📄 License
MIT — fais-en ce que tu veux.
MIT — do whatever you want with it.