release: bump version to 0.26.0

This commit is contained in:
rayd1o
2026-04-12 04:36:38 +08:00
parent a359d94127
commit 812c825dc6
22 changed files with 2153 additions and 7 deletions

View File

@@ -29,6 +29,30 @@ Released: 2026-04-11
- Fixed [frontend/public/earth/css/info-panel.css](/home/ray/dev/linkong/planet/frontend/public/earth/css/info-panel.css) so the Earth brand area now uses consistent `earth-brand` component selectors and English-specific typography hooks, avoiding the earlier one-off `brand-banner` naming drift and duplicated title styles.
## 0.26.0
Released: 2026-04-12
### Highlights
- Added an operator-facing TV live module to Earth, including backend-configurable live sources, a draggable/resizable live-news HUD window, default global news channels, and a dedicated settings workflow so the Earth page can open real news playback instead of only static telemetry.
### Added
- Added [backend/app/api/v1/tv.py](/home/ray/dev/linkong/planet/backend/app/api/v1/tv.py), [backend/app/services/tv_streams.py](/home/ray/dev/linkong/planet/backend/app/services/tv_streams.py), and [backend/app/services/collectors/news_live_streams.py](/home/ray/dev/linkong/planet/backend/app/services/collectors/news_live_streams.py) to provide TV source configuration, public stream payloads, a guarded HLS proxy path, and a collector entry point for future world-news live-source ingestion.
- Added the Earth TV HUD workspace through [frontend/public/earth/index.html](/home/ray/dev/linkong/planet/frontend/public/earth/index.html), [frontend/public/earth/js/tv.js](/home/ray/dev/linkong/planet/frontend/public/earth/js/tv.js), and [frontend/public/earth/css/tv-panel.css](/home/ray/dev/linkong/planet/frontend/public/earth/css/tv-panel.css), including toolbar access, draggable/closable behavior, resize support, direct video/HLS playback, iframe fallback, and per-channel external-open handling.
- Added [docs/earth-tv-live-module-plan.md](/home/ray/dev/linkong/planet/docs/earth-tv-live-module-plan.md) and [docs/news-live-streams-collector-format.md](/home/ray/dev/linkong/planet/docs/news-live-streams-collector-format.md) to document the TV module rollout plan and the expected collector payload format for future curated live-channel ingestion.
### Improved
- Improved [frontend/src/pages/Settings/Settings.tsx](/home/ray/dev/linkong/planet/frontend/src/pages/Settings/Settings.tsx), [backend/app/api/v1/settings.py](/home/ray/dev/linkong/planet/backend/app/api/v1/settings.py), and [backend/app/core/datasource_defaults.py](/home/ray/dev/linkong/planet/backend/app/core/datasource_defaults.py) by adding TV source administration to system settings and registering the `news_live_streams` datasource as a first-class configurable collector.
- Improved [backend/app/services/tv_streams.py](/home/ray/dev/linkong/planet/backend/app/services/tv_streams.py) by seeding a curated first-pass news channel catalog that now defaults to `CGTN English` YouTube playback while keeping `CCTV-4` as a built-in fallback and exposing additional Reuters, CGTN, DW, Al Jazeera, Arirang, ABP, and SABC entries for operator testing.
### Fixed
- Fixed [frontend/public/earth/js/tv.js](/home/ray/dev/linkong/planet/frontend/public/earth/js/tv.js) and [frontend/public/earth/index.html](/home/ray/dev/linkong/planet/frontend/public/earth/index.html) so HLS/video playback now actively attempts autoplay in the TV panel instead of only loading metadata and leaving the player visually idle.
- Fixed [frontend/public/earth/css/tv-panel.css](/home/ray/dev/linkong/planet/frontend/public/earth/css/tv-panel.css) so the TV source selector and action controls better match the Earth HUD dark theme instead of falling back to a bright native dropdown presentation.
## 0.25.2
Released: 2026-04-10

View File

@@ -0,0 +1,117 @@
# Earth 电视直播模块计划
## 目标
`Earth` 页面增加一个可配置、可扩展、可拖拽的电视直播模块:
- 后台可配置新闻直播源
- 默认兜底源为央视 `CCTV-4`
- 未来可通过采集器接入世界各地新闻直播源
- Earth 工具栏 `显示控制` 子菜单新增电视按钮
- 点击后打开一个与其他 HUD 一致的可拖拽/可关闭窗口
- 窗口内部可播放或承载新闻直播页面
## 设计原则
- 第一阶段先交付“后台可配 + Earth 可用 + 默认可回退”的版本
- 公开读取接口与后台管理接口分离
- 手工配置源与采集器源共用统一的前端消费结构
- Earth 里的电视窗口必须复用现有 HUD 拖拽、关闭、布局最大化逻辑
- 小屏下优先保证窗口完整显示,超出部分在窗口内部滚动
## 分阶段实现
### Phase 1后端配置与公开读取
- 在系统设置中新增 `tv` 分类
- 定义直播源配置结构:
- `default_source_id`
- `auto_fallback`
- `sources[]`
- 每个直播源至少包含:
- `id`
- `name`
- `provider`
- `region`
- `language`
- `source_type`
- `embed_url`
- `stream_url`
- `homepage_url`
- `is_enabled`
- `is_fallback`
- `sort_order`
- `collector_source`
- `notes`
- 默认兜底源使用央视官网 `CCTV-4` 直播页
- 新增公开读取接口,供 Earth 页面无登录态读取直播源配置
### Phase 2采集器扩展位
- 新增 `news_live_streams` collector 占位
- 规范采集器入库数据结构,使其能与后台手工配置源合并
- TV 公开接口支持合并:
- 后台手工配置源
- 采集器入库源
- 保持手工配置源优先级更高,避免采集器覆盖人工兜底配置
### Phase 3后台配置界面
- 在系统配置页新增 `电视直播` tab
- 支持:
- 查看当前默认源
- 开关自动回退
- 新增直播源
- 编辑直播源
- 删除直播源
- 启用/禁用直播源
- 将某个直播源设为默认源
- 明确区分:
- 手工配置源
- 采集器来源
### Phase 4Earth HUD 集成
-`显示控制` 子菜单加入电视按钮
- 新增 TV HUD 面板:
- 可拖拽
- 可关闭
- 支持显示/隐藏状态同步
- 参与布局最大化与恢复布局
- 面板内容至少包含:
- 当前频道标题
- 源切换下拉菜单
- 刷新按钮
- 打开官网按钮
- 播放区域
### Phase 5播放策略
- 第一版优先支持 `iframe`/嵌入页类直播源
- 为未来扩展保留:
- `hls`
- `video`
- `external`
- 如果默认源不可用:
- 优先回退到标记为 `is_fallback=true` 的源
- 若无明确回退源,则回退到第一个可用源
- 面板内要有清晰的加载、错误、回退提示
### Phase 6打磨与清理
- 统一 HUD 风格
- 小屏下限制窗口尺寸并启用内部滚动
- 避免窗口超出屏幕
- 补最小验证
- 清理临时代码、重复样式和无用资源
## 首版交付定义
当以下条件满足时,认为首版可用:
- 后台可以配置新闻直播源
- Earth 可以读取并显示默认直播源
- 工具栏可打开电视窗口
- 电视窗口可拖拽、可关闭
- 央视 `CCTV-4` 作为默认兜底源可被使用
- 代码结构已为后续采集器接入预留统一接口

View File

@@ -0,0 +1,97 @@
# News Live Streams Collector Format
`news_live_streams` 采集器面向“频道目录 JSON”输入而不是直接抓网页。
这样做的目标是:
- 让后台能够稳定接入世界各地新闻直播源
-`Earth` 页面电视模块始终消费统一结构
- 便于后续接入类似 `worldmonitor` 那种 YouTube / HLS / iframe 混合频道目录
## 推荐 JSON 结构
```json
{
"sources": [
{
"id": "bbc-world-news",
"name": "BBC World News",
"provider": "BBC",
"region": "UK",
"language": "en",
"source_type": "youtube",
"youtube_video_id": "dQw4w9WgXcQ",
"youtube_channel": "https://www.youtube.com/@BBCNews",
"embed_url": "",
"stream_url": "",
"homepage_url": "https://www.youtube.com/@BBCNews/live",
"poster_url": "",
"sort_order": 220,
"is_enabled": true,
"notes": "Primary English global news channel"
},
{
"id": "france24-en",
"name": "France 24 English",
"provider": "France 24",
"region": "France",
"language": "en",
"source_type": "hls",
"stream_url": "https://example.com/live.m3u8",
"homepage_url": "https://www.france24.com/en/live",
"sort_order": 230,
"is_enabled": true
},
{
"id": "cctv4-page",
"name": "CCTV-4 中文国际",
"provider": "CCTV",
"region": "China",
"language": "zh-CN",
"source_type": "iframe",
"embed_url": "https://tv.cctv.com/live/cctv4/",
"homepage_url": "https://tv.cctv.com/live/cctv4/",
"sort_order": 10,
"is_enabled": true
}
]
}
```
## 字段约定
- `id`: 唯一标识,建议稳定不变
- `name`: 频道显示名
- `provider`: 提供方
- `region`: 国家或地区
- `language`: 语言代码
- `source_type`: `iframe` / `hls` / `video` / `external` / `youtube`
- `embed_url`: 适合 iframe 内嵌的页面
- `stream_url`: 直接视频流地址
- `homepage_url`: 官网或频道页
- `youtube_video_id`: YouTube 直播视频 ID
- `youtube_channel`: YouTube 频道 handle 或频道 URL
- `poster_url`: 封面图,可选
- `sort_order`: 排序值,越小越靠前
- `is_enabled`: 是否启用
- `notes`: 简短备注
## 面板行为约定
- `youtube`
- 优先使用 `youtube_video_id`
- 无法内嵌时至少保留 `youtube_channel``homepage_url` 供外部打开
- `hls` / `video`
- 优先走 `stream_url`
- `iframe`
- 优先走 `embed_url`
- `external`
- 不尝试内嵌,只保留外部打开
## 当前实现状态
- 后台设置页可以手工维护频道目录
- `Earth` 电视模块会合并:
- 手工配置源
- `news_live_streams` 采集器采集源
- 当前默认兜底源为 `CCTV-4 中文国际`

View File

@@ -16,7 +16,7 @@
## Current Version
- `main` 当前主线历史推导到:`0.16.5`
- `dev` 当前开发分支历史推导到:`0.25.3`
- `dev` 当前开发分支历史推导到:`0.26.0`
## Timeline
@@ -85,6 +85,7 @@
| `0.25.1` | bugfix | `dev` | `pending` | clean duplicated Playground flow code, add reusable code-hygiene rules, and fix first-level sidebar menu expansion behavior across route navigation and refresh |
| `0.25.2` | bugfix | `dev` | `pending` | refine Earth settings modal sizing, eliminate first-frame HUD scale flicker, and make dragged HUD panels animate cleanly through maximized layout transitions |
| `0.25.3` | bugfix | `dev` | `pending` | refactor the Earth HUD visual system, extract the top-left Earth brand into a reusable language-driven component, and consolidate duplicated brand assets into a single canonical set |
| `0.26.0` | feature | `dev` | `pending` | add the Earth TV live module with backend-configurable sources, a draggable/resizable TV HUD window, a first curated news channel catalog, and TV source management hooks in system settings |
## Maintenance Commits Not Counted as Version Bumps