diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 1f45b039c6..30bc7c81a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,10 +50,6 @@ jobs: except: open_ffmpeg = False print(open_ffmpeg)')" >> $GITHUB_ENV - - name: Install Selenium - if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true' - run: | - sudo pip3 install selenium - name: Set up Chrome if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true' uses: browser-actions/setup-chrome@latest @@ -62,12 +58,6 @@ jobs: - name: Download chrome driver if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true' uses: nanasess/setup-chromedriver@master - - name: Launch chrome driver - if: env.OPEN_DRIVER == 'True' || env.OPEN_DRIVER == 'true' - run: | - export DISPLAY=:99 - chromedriver --url-base=/wd/hub & - sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional - name: Install FFmpeg if: env.OPEN_FFMPEG == 'True' || env.OPEN_FFMPEG == 'true' run: sudo apt-get update && sudo apt-get install -y ffmpeg diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0e38581bb0..9a9a5960c1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,10 +15,11 @@ jobs: uses: actions/setup-python@v4 with: python-version: '3.8' + update-environment: true cache: 'pipenv' - name: Install pipenv - run: pip install pipenv + run: pip3 install --user pipenv - name: Install dependencies with pipenv run: pipenv --python 3.8 && pipenv install diff --git a/CHANGELOG.md b/CHANGELOG.md index 43dc9ffd6b..46c90752b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,25 @@ # 更新日志(Changelog) +## v1.4.9 + +### 2024/10/11 + +- 新增支持 docker arm64 镜像(#369) +- 新增分辨率过滤功能(相关配置:open_filter_resolution,min_resolution) +- 新增显示更新时间(相关配置:open_update_time) +- 优化测速效率(#359) +- 调整默认模板,增加默认订阅源 +- 移除央视台球部分错误组播地址 +- 更新使用教程 + +- Add support for Docker ARM64 images (#369) +- Add resolution filtering feature (related configurations: open_filter_resolution, min_resolution) +- Add display of update time (related configuration: open_update_time) +- Optimize speed testing efficiency (#359) +- Adjust the default template and add default subscription sources +- Remove the incorrect multicast addresses for the CCTV Snooker section +- Update usage guide + ## v1.4.8 ### 2024/09/27 diff --git a/README.md b/README.md index 115025be02..f1e2d73e96 100644 --- a/README.md +++ b/README.md @@ -4,29 +4,29 @@
diff --git a/README_en.md b/README_en.md index 5a56329882..13b9475d58 100644 --- a/README_en.md +++ b/README_en.md @@ -4,29 +4,29 @@
diff --git a/config/demo.txt b/config/demo.txt
index f78613d0e1..626c7ba706 100644
--- a/config/demo.txt
+++ b/config/demo.txt
@@ -1,21 +1,3 @@
-广东频道,#genre#
-广东珠江
-广东体育
-广东新闻
-广东卫视
-大湾区卫视
-广州影视
-广州竞赛
-江门综合
-江门侨乡生活
-佛山综合
-深圳卫视
-汕头综合
-汕头经济
-汕头文旅
-茂名综合
-茂名公共
-
📺央视频道,#genre#
CCTV-1
CCTV-2
@@ -40,7 +22,7 @@ CETV2
CETV4
CETV5
-央视付费频道,#genre#
+💰央视付费频道,#genre#
文化精品
央视台球
风云音乐
@@ -90,7 +72,25 @@ CETV5
新疆卫视
云南卫视
-港·澳·台,#genre#
+🏠广东频道,#genre#
+广东珠江
+广东体育
+广东新闻
+广东卫视
+大湾区卫视
+广州影视
+广州竞赛
+江门综合
+江门侨乡生活
+佛山综合
+深圳卫视
+汕头综合
+汕头经济
+汕头文旅
+茂名综合
+茂名公共
+
+🌊港·澳·台,#genre#
翡翠台
明珠台
凤凰中文
@@ -141,7 +141,7 @@ IPTV经典电影
东森洋片
东森超视
-咪咕直播,#genre#
+🎥咪咕直播,#genre#
咪咕直播1
咪咕直播2
咪咕直播3
diff --git a/docs/config.md b/docs/config.md
index ef841ec0a2..5eb7145af1 100644
--- a/docs/config.md
+++ b/docs/config.md
@@ -13,6 +13,8 @@
| open_sort | True | 开启排序功能(响应速度、日期、分辨率) |
| open_ffmpeg | True | 开启使用 FFmpeg 进行测速,获取更准确的速度与分辨率信息,需要提前手动安装 |
| open_m3u_result | True | 开启转换生成 m3u 文件类型结果链接,支持显示频道图标 |
+| open_filter_resolution | True | 开启分辨率过滤,低于最小分辨率(min_resolution)的接口将会被过滤 |
+| min_resolution | 1920x1080 | 接口最小分辨率,需要开启 open_filter_resolution 才能生效 |
| response_time_weight | 0.5 | 响应时间权重值(所有权重值总和应为 1) |
| resolution_weight | 0.5 | 分辨率权重值 (所有权重值总和应为 1) |
| recent_days | 30 | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 |
@@ -21,12 +23,12 @@
| url_keywords_blacklist | | 接口关键字黑名单,用于过滤含特定字符的接口 |
| open_subscribe | False | 开启订阅源功能 |
| subscribe_urls | https://m3u.ibert.me/txt/fmml_dv6.txt,
https://m3u.ibert.me/txt/o_cn.txt,
https://m3u.ibert.me/txt/j_iptv.txt,
https://github.moeyy.xyz/https://raw.githubusercontent.com/PizazzGY/TVBox/main/live.txt | 订阅源列表 |
-| open_multicast | True | 开启组播源功能 |
+| open_multicast | True | 开启组播源功能,关闭后所有组播源工作模式都将关闭 |
| open_multicast_tonkiang | True | 开启 Tonkiang 组播源工作模式 |
| open_multicast_fofa | True | 开启 FOFA 组播源工作模式 |
| multicast_region_list | 全部 | 组播源地区列表,[更多地区](../updates/multicast/multicast_map.json),"全部"表示所有地区 |
| multicast_page_num | 3 | 组播地区获取分页数量 |
-| open_hotel | True | 开启酒店源功能 |
+| open_hotel | True | 开启酒店源功能,关闭后所有酒店源工作模式都将关闭 |
| open_hotel_tonkiang | False | 开启 Tonkiang 酒店源工作模式 |
| open_hotel_fofa | True | 开启 FOFA、ZoomEye 酒店源工作模式 |
| hotel_region_list | 全部 | 酒店源地区列表,[更多地区](../updates/fofa/fofa_map.py),"全部"表示所有地区 |
diff --git a/docs/config_en.md b/docs/config_en.md
index 7b9a11ed12..f1218327db 100644
--- a/docs/config_en.md
+++ b/docs/config_en.md
@@ -13,6 +13,8 @@
| open_sort | True | Enable the sorting function (response speed, date, resolution) |
| open_ffmpeg | True | Enable speed testing using FFmpeg to obtain more accurate speed and resolution information. Manual installation is required in advance. |
| open_m3u_result | True | Enable the conversion to generate m3u file type result links, supporting the display of channel icons |
+| open_filter_resolution | True | Enable resolution filtering, interfaces with resolution lower than the minimum resolution (min_resolution) will be filtered |
+| min_resolution | 1920x1080 | Minimum interface resolution, requires enabling open_filter_resolution to take effect |
| response_time_weight | 0.5 | Response time weight value (the sum of all weight values should be 1) |
| resolution_weight | 0.5 | Resolution weight value (the sum of all weight values should be 1) |
| recent_days | 30 | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues |
@@ -21,12 +23,12 @@
| url_keywords_blacklist | | Interface keyword blacklist, used to filter out interfaces containing specific characters |
| open_subscribe | False | Enable subscription source feature |
| subscribe_urls | https://m3u.ibert.me/txt/fmml_dv6.txt,
https://m3u.ibert.me/txt/o_cn.txt,
https://m3u.ibert.me/txt/j_iptv.txt,
https://github.moeyy.xyz/https://raw.githubusercontent.com/PizazzGY/TVBox/main/live.txt | Subscription source list |
-| open_multicast | True | Enable multicast source function |
+| open_multicast | True | Enable the multicast source function, after disabling it all multicast sources will stop working |
| open_multicast_tonkiang | True | Enable Tonkiang multicast source work mode |
| open_multicast_fofa | True | Enable FOFA multicast source work mode |
| multicast_region_list | all | Multicast source region list, [more regions](../updates/multicast/multicast_map.json, all means all regions) |
| multicast_page_num | 3 | Number of pages to retrieve for multicast regions |
-| open_hotel | True | Enable hotel source feature |
+| open_hotel | True | Enable the hotel source function, after closing it all hotel source working modes will be disabled |
| open_hotel_tonkiang | False | Enable Tonkiang hotel source work mode |
| open_hotel_fofa | True | Enable FOFA、ZoomEye hotel source work mode |
| hotel_region_list | all | List of hotel source regions, [more regions](../updates/fofa/fofa_map.py), 'all' indicates all regions |
diff --git a/main.py b/main.py
index f2da175ec9..9ccc347dd9 100644
--- a/main.py
+++ b/main.py
@@ -157,13 +157,15 @@ async def main(self):
self.subscribe_result,
self.online_search_result,
)
+ urls_total = self.get_urls_len()
channel_data_cache = copy.deepcopy(self.channel_data)
open_sort = config.getboolean("Settings", "open_sort")
if open_sort:
self.total = self.get_urls_len(filter=True)
+ print(f"Total urls: {urls_total}, need to sort: {self.total}")
sort_callback = lambda: self.pbar_update(name="测速")
self.update_progress(
- f"正在测速排序, 共{self.total}个接口",
+ f"正在测速排序, 共{urls_total}个接口, {self.total}个接口需要进行测速",
0,
)
self.start_time = time()
diff --git a/utils/channel.py b/utils/channel.py
index 236eb6b257..7980461247 100644
--- a/utils/channel.py
+++ b/utils/channel.py
@@ -738,7 +738,10 @@ def write_channel_to_file(items, data, callback=None):
"""
open_update_time = config.getboolean("Settings", "open_update_time")
if open_update_time:
- update_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S")
+ now = datetime.datetime.now()
+ if os.environ.get("GITHUB_ACTIONS"):
+ now += datetime.timedelta(hours=8)
+ update_time = now.strftime("%Y-%m-%d %H:%M:%S")
update_channel_urls_txt("更新时间", f"{update_time}", ["url"])
for cate, channel_obj in items:
print(f"\n{cate}:", end=" ")
diff --git a/utils/speed.py b/utils/speed.py
index c274655d3c..d7ac898bf0 100644
--- a/utils/speed.py
+++ b/utils/speed.py
@@ -45,7 +45,7 @@ def is_ffmpeg_installed():
return False
-async def ffmpeg_url(url):
+async def ffmpeg_url(url, timeout=timeout):
"""
Get url info by ffmpeg
"""
diff --git a/version.json b/version.json
index 9550c6d4c0..5884f47b0e 100644
--- a/version.json
+++ b/version.json
@@ -1,4 +1,4 @@
{
- "version": "1.4.8",
+ "version": "1.4.9",
"name": "电视直播源更新工具"
}
\ No newline at end of file