Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,34 @@ This project follows [Semantic Versioning](https://semver.org/).

---

## [3.0.0] - 2025-10-03
### Added
- **Windows Support**:
- New `install_windows.ps1` and `install.bat` for automated setup.
- New `uninstall_windows.ps1` and `uninstall.bat` for clean removal.
- NSSM service created to run `venv\Scripts\python.exe app.py` automatically.
- Windows installer bootstraps Chocolatey, installs `python`, `git`, and `nssm`.
- Windows uninstaller removes the service, deletes firewall rule for port 5000, and lists remaining Chocolatey packages (with option to remove all).
- **Cross-platform Installer Enhancements**:
- `install.sh` improved to detect Linux, WSL, or Git Bash environments.
- Added pip upgrade check instead of always forcing upgrade.
- Unified handling of venv paths for Linux (`bin/`) and Windows (`Scripts/`).
- **bump_version.py**:
- Now also updates `install_windows.ps1`, `uninstall_windows.ps1`, and `uninstall.sh`.
- Automatically inserts `APP_VERSION`/`VERSION` if missing.

### Changed
- **Documentation**:
- Updated `README.md` with Windows one-liner install.
- Updated `INSTALL.md` with new Windows instructions and update steps.
- **Uninstall Scripts**:
- Windows uninstall output cleaned to avoid duplicate Chocolatey lists.
- Linux/WSL uninstall script improved to fully remove `iptv-server` systemd service and venv.

### Fixed
- Consistent logging of user agreement and installer actions.
- Ensured firewall rule removal on Windows during uninstall.

## [2.3.2] - 2025-09-26
### Added
- Introduced unified **Themes submenu** (Light, Dark, AOL/CompuServe, TV Guide Magazine) across all admin and user pages.
Expand Down
119 changes: 79 additions & 40 deletions INSTALL.md
Original file line number Diff line number Diff line change
@@ -1,44 +1,71 @@
# Installation Guide

## Requirements
- Python 3.10+
- Linux (Debian/Ubuntu with systemd) **or** Windows (Git Bash with Python 3.12+)
- Python 3.10+ (Linux) / Python 3.12+ (Windows)
- **Linux (Debian/Ubuntu with systemd)** or **Windows 10/11**
- Administrative privileges:
- **Linux/WSL:** run install/uninstall with `sudo`
- **Windows (Git Bash):** run from an Administrator shell
- **Windows:** run from an Administrator **PowerShell** session

---

## Installation

Clone the repository and run the installer (choose one, no need to do both below)
Clone the repository and run the installer. Choose the command based on your OS.

### Option 1: One-liner (quick setup)
### Linux / WSL

#### Option 1: One-liner (quick setup)
```bash
git clone https://github.com/thehack904/RetroIPTVGuide.git && cd RetroIPTVGuide && sudo chmod +x install.sh && sudo ./install.sh
```
or

### Option 2: Multi-line (step-by-step)
#### Option 2: Multi-line (step-by-step)
```bash
git clone https://github.com/thehack904/RetroIPTVGuide.git
cd RetroIPTVGuide
sudo chmod +x install.sh
sudo ./install.sh
```

### What the installer does
- Detects environment (Linux, WSL, or Git Bash on Windows)
- Creates a system user `iptv` and sets up systemd service (Linux/WSL only)
- Installs into `/home/iptv/iptv-server` (Linux/WSL) or local project folder (Windows)
- Creates Python virtual environment + installs dependencies
- Logs the full install process to `install_YYYY-MM-DD_HH-MM-SS.log`
**What the installer does (Linux/WSL):**
- Detects Linux/WSL environment
- Ensures script is run with sudo
- Creates a system user `iptv`
- Installs into `/home/iptv/iptv-server`
- Ensures `python3-venv` is installed
- Creates Python virtual environment and installs dependencies
- Creates and enables the `iptv-server` systemd service
- Starts the service
- Logs the install to `install_YYYY-MM-DD_HH-MM-SS.log`

---

### Windows 10/11

Run this one-liner from an **Administrator PowerShell** prompt:

```powershell
Invoke-WebRequest https://github.com/thehack904/RetroIPTVGuide/archive/refs/heads/main.zip -OutFile RetroIPTVGuide.zip ; tar -xf RetroIPTVGuide.zip ; cd RetroIPTVGuide-windows ; .\install.bat
```

**What the installer does (Windows):**
- Bootstraps Chocolatey (if missing)
- Installs dependencies: `python`, `git`, `nssm`
- Registers Windows App Paths for `python` / `python3`
- Adds Python to Git Bash (`~/.bashrc`)
- Clones RetroIPTVGuide and runs `install.sh` under Git Bash to set up venv + requirements
- Creates an NSSM service to run `venv\Scripts\python.exe app.py`
- Opens Windows Firewall port 5000
- Starts the RetroIPTVGuide service
- Logs the install to `install_YYYY-MM-DD_HH-MM-SS.log`

---

## Access

Once installed, access the guide in your browser:
Once installed, open your browser:

```
http://<server-ip>:5000
Expand All @@ -48,17 +75,17 @@ Default login: **admin / strongpassword123**

---

## Updating
## 🔄 Updating

### Linux/WSL
### Linux / WSL

#### Option 1: One-liner (quick update)
#### Quick update (one-liner)
```bash
sudo -u iptv bash -H -c "cd /home/iptv/iptv-server && git fetch --all && git reset --hard origin/main" && sudo systemctl restart iptv-server.service
```
or

#### Option 2: Step-by-step
#### Step-by-step
```bash
sudo -u iptv bash -H
cd /home/iptv/iptv-server
Expand All @@ -70,47 +97,59 @@ sudo systemctl restart iptv-server.service

---

### Windows (Git Bash)
### Windows 10/11

Run these from the folder where you cloned the repo:
From an **Administrator PowerShell** prompt, go to your RetroIPTVGuide folder and run:

#### Option 1: One-liner
```bash
git fetch --all && git reset --hard origin/main && ./venv/Scripts/python app.py
```powershell
git fetch --all ; git reset --hard origin/main ; Restart-Service RetroIPTVGuide
```

or

#### Option 2: Step-by-step
```bash
#### Step-by-step
```powershell
git fetch --all
git reset --hard origin/main
./venv/Scripts/python app.py
Restart-Service RetroIPTVGuide
```

This will:
- Fetch the latest code from GitHub
- Reset your repo to the latest `windows` branch
- Restart the RetroIPTVGuide service (installed via NSSM)

---

## Uninstallation

Run the included `uninstall.sh`:

### Linux / WSL
```bash
sudo chmod +x uninstall.sh
sudo ./uninstall.sh
```

### What the uninstaller does
- **Linux/WSL:**
- Stops and disables the systemd service
- Removes the systemd unit file
- Deletes the `iptv` system user and related logs
- Removes the Python virtual environment
- **Windows (Git Bash):**
- Stops any running `python app.py` process
- Removes the Python virtual environment
- Leaves the project folder in place

⚠️ To completely remove the project, **manually delete the project folder** after running `uninstall.sh`.
**What the uninstaller does (Linux/WSL):**
- Stops and disables the systemd service
- Removes the systemd unit file
- Deletes the `iptv` system user and related logs
- Removes the Python virtual environment

---

### Windows
From an Administrator PowerShell prompt:
```powershell
.\uninstall_windows.ps1
```

**What the uninstaller does (Windows):**
- Stops and removes the NSSM service
- Removes the Python virtual environment
- Deletes the Windows Firewall rule (port 5000)
- Lists remaining Chocolatey packages
- Prompts whether to uninstall **all Chocolatey packages (including Chocolatey itself)**

⚠️ To completely remove the project, manually delete the project folder after uninstalling.

---

Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# RetroIPTVGuide

![Version](https://img.shields.io/badge/version-v2.3.2-blue)
![Version](https://img.shields.io/badge/version-v3.0.0-blue)

RetroIPTVGuide is an IPTV Web Interface inspired by 90s/2000s cable TV guides.
It is designed to work with [ErsatzTV](https://ersatztv.org/) [(GitRepo)](https://github.com/ErsatzTV/ErsatzTV/tree/main) but should support any `.m3u` and `.xml` IPTV source.

⚠️ **Note:** This is an initial BETA release. It is not recommended for direct Internet/public-facing deployments.
⚠️ **Note:** This is still a BETA release. It is not recommended for direct Internet/public-facing deployments.

- [Installation / Uninstall Guide](INSTALL.md)
- [Changelog](CHANGELOG.md)
- [Roadmap](ROADMAP.md)
- [License](LICENSE)

## ✨ Features (v2.3.2)
## ✨ Features (v3.0.0)
- 🔑 **User Authentication**
- Login/logout system with hashed passwords.
- Admin and regular user accounts.
Expand Down Expand Up @@ -41,15 +41,16 @@ It is designed to work with [ErsatzTV](https://ersatztv.org/) [(GitRepo)](https:
- AOL/CompuServe
- TV Guide Magazine
- Theme persistence stored in browser localStorage, applied instantly across all pages.
- **New About Page under Settings menu (v2.3.1)** — shows version, Python, OS, uptime, paths.
- **About Page under Settings menu** — shows version, Python, OS, uptime, paths.
- ⚙️ **System**
- Automatic initialization of `users.db` and `tuners.db` on first run.
- SQLite databases use WAL mode for better concurrency.
- Preloads tuner/channel/guide data from DB on startup.
- **Cross-platform installer (Linux/Windows) (v2.3.0)**.
- **Uninstaller script (v2.3.0)**.
- **Automated version bump tool (`bump_version.py`) (v2.3.1)**.
- **Cross-platform installers (Linux/Windows)**.
- **Uninstaller scripts (Linux/Windows)**.
- **Automated version bump tool (`bump_version.py`)**.

---

## 🌐 Browser Compatibility
This project is designed to work with **all major browsers**.
Expand All @@ -64,11 +65,16 @@ The web interface has been tested on:
- **Ubuntu (desktop/server)**
- **iOS (mobile/tablet)**
- **Android (Samsung Mobile Phone)**
- **macOS**
- **Windows 10/11**
- **MacOS**
- **Windows**

## 🛠️ Installation Platform
The backend server should be installed on a **Debian/Ubuntu machine** for best compatibility.
- **Debian Based Linux (desktop/server)**
- **Windows 10/11**

## 📺 Screenshots

## 📺 Guide Page
![Guide Screenshot](docs/screenshots/guide.png)
Expand Down
12 changes: 10 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@ These are **not yet implemented**, but provide a development path for future rel
### 6. Cross-platform
- [ ] Create installable container.
- [ ] Create MacOS install/executable.
- [x] Create Microsoft Windows install/executable (basic support via Git Bash + PowerShell bootstrap) (v2.3.0)
- [x] Create Microsoft Windows install/executable (full support via PowerShell + NSSM service) (v3.0.0)
- [x] Add uninstall_windows.ps1 and uninstall.bat (v3.0.0)
- [x] Windows installer now bootstraps Chocolatey, installs Python, Git, NSSM, and configures service (v3.0.0)
- [x] Windows uninstaller cleans service, firewall rule, and optionally removes Chocolatey (v3.0.0)
- [ ] Validate/test installer fully on Windows environments

### 7. New Features
Expand Down Expand Up @@ -74,7 +77,7 @@ These are **not yet implemented**, but provide a development path for future rel
## 📅 Priority Suggestions
- Short term: (none — unified UI headers already completed in v2.0.0).
- Medium term: log filtering (still pending).
- Medium term: Validate installer/uninstaller on Windows (pending).
- Medium term: Test and harden installer/uninstaller on mixed Windows environments (v3.0.0 complete, further refinements planned).
- Long term: .m3u8 support, DB logs, recording functionality.

---
Expand All @@ -92,3 +95,8 @@ These are **not yet implemented**, but provide a development path for future rel
- [x] Cross-platform `uninstall.sh` with sudo/admin checks and safe cleanup (v2.3.0).
- [x] Basic Windows installer support (Git Bash + PowerShell bootstrap) (v2.3.0).



## ✅ Completed (v3.0.0)
- [x] Full Windows installer/uninstaller support with NSSM service, firewall rule, and Chocolatey integration (v3.0.0).
- [x] Documentation updates (README.md, INSTALL.md) to reflect Windows support (v3.0.0).
2 changes: 1 addition & 1 deletion app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_VERSION = "v2.3.2"
APP_VERSION = "v3.0.0"
APP_RELEASE_DATE = "2025-09-26"

from flask import Flask, render_template, request, redirect, url_for, flash
Expand Down
Loading