A modern web application for viewing, filtering, and managing M3U playlist files. Built with React and FastAPI, featuring a responsive dark-themed interface.
- 📁 Upload and parse M3U/M3U8 playlist files
- 🔍 Real-time search and filtering capabilities
- 📋 Multi-select channels for export
- ⚡ Fast and responsive interface
- 🌗 Dark theme interface
- 📱 Responsive design
- 🔄 Sort by name, group, or ID
- 💾 Export selected channels to new M3U file
- 🏷️ Group-based filtering
- 🖼️ Channel logo display
Before you begin, ensure you have the following installed:
- Python 3.8 or higher
- Node.js 14 or higher
- npm or yarn package manager
- Clone the repository:
git clone https://github.com/yourusername/m3u-viewer.git
cd m3u-viewer- Set up the backend:
# Create and activate virtual environment
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
# Install backend dependencies
cd backend
pip install fastapi uvicorn python-multipart- Set up the frontend:
cd frontend
npm install- Start the backend server (from the backend directory):
uvicorn main:app --reloadThe backend will be available at http://localhost:8000
- Start the frontend development server (from the frontend directory):
npm run devThe application will be available at http://localhost:5173
-
Upload a Playlist
- Click the "Upload M3U" button
- Select your M3U/M3U8 file
- The file will be parsed and displayed in the table
-
Filter Channels
- Use the search box under "Name" to filter by channel name
- Use the dropdown under "Group" to filter by channel group
- Use the search box under "ID" to filter by channel ID
-
Sort Channels
- Click on column headers to sort by that column
- Click again to reverse sort order
-
Export Selected Channels
- Select channels using the checkboxes
- Click "Export" button
- Enter a filename in the dialog
- Click "Export" to save the new M3U file
m3u-viewer/
├── backend/
│ └── main.py # FastAPI backend server
└── frontend/
├── src/
│ ├── components/
│ │ └── M3UViewer.jsx
│ ├── App.jsx
│ └── main.jsx
├── index.html
└── package.json
- FastAPI
- Python
- uvicorn
- python-multipart
- React
- PrimeReact
- Tailwind CSS
- Vite
To contribute to this project:
- Fork the repository
- Create a feature branch
git checkout -b feature/AmazingFeature- Commit your changes
git commit -m 'Add some AmazingFeature'- Push to the branch
git push origin feature/AmazingFeature- Open a Pull Request
The backend provides the following endpoints:
POST /parse- Upload and parse M3U filePOST /export- Export selected channels to new M3U file
-
CORS Errors
- Ensure both backend and frontend servers are running
- Check that the backend CORS settings match your frontend URL
-
File Upload Issues
- Verify file format is .m3u or .m3u8
- Check file size and content format
-
Export Issues
- Ensure at least one channel is selected
- Verify you have write permissions in the download directory
- ???
This project is licensed under the MIT License - see the LICENSE file for details.
- PrimeReact for the UI components
- FastAPI for the backend framework
- The IPTV community for inspiration
Your Name - @yourusername
Project Link: https://github.com/yourusername/m3u-viewer
