AI 生成: 一个生成 M3U 播放列表文件的项目,包含多个可订阅的 M3U 文件和一个简单的 Flask Web 界面用于预览和下载。

This commit is contained in:
admin
2026-09-29 05:43:20 +08:00
commit 26021ab21e
9 changed files with 363 additions and 0 deletions
+71
View File
@@ -0,0 +1,71 @@
# M3U Playlist Generator
一个简单实用的 M3U 播放列表生成器,提供多个可订阅的 M3U 文件,并附带一个基于 Flask 的 Web 界面用于浏览和下载。
## 功能特性
- 提供多个分类的 M3U 播放列表文件(新闻、音乐、电影、体育等)
- 支持通过 HTTP 订阅播放列表
- 提供 Flask Web 界面,方便浏览和下载
- 使用相对路径,便于部署
## 目录结构
```
m3u-playlist-generator/
├── README.md
├── app.py # Flask 应用入口
├── requirements.txt # Python 依赖
├── playlists/ # M3U 播放列表文件目录
│ ├── news.m3u
│ ├── music.m3u
│ ├── movies.m3u
│ └── sports.m3u
├── templates/ # HTML 模板
│ └── index.html
└── static/
└── style.css
```
## 快速开始
### 1. 安装依赖
```bash
pip install -r requirements.txt
```
### 2. 启动服务
```bash
python app.py
```
### 3. 访问
打开浏览器访问 http://127.0.0.1:5000
### 4. 订阅播放列表
在播放器(如 VLC、PotPlayer、Kodi 等)中添加以下订阅地址:
- http://127.0.0.1:5000/playlists/news.m3u
- http://127.0.0.1:5000/playlists/music.m3u
- http://127.0.0.1:5000/playlists/movies.m3u
- http://127.0.0.1:5000/playlists/sports.m3u
## 自定义
直接编辑 `playlists/` 目录下的 `.m3u` 文件即可添加或修改频道。
M3U 文件格式示例:
```
#EXTM3U
#EXTINF:-1 tvg-id="channel1" tvg-logo="https://example.com/logo.png" group-title="News",Channel 1
https://example.com/stream1.m3u8
```
## 许可证
MIT