From 3a5667de764ac64451cdf77055fc304ad9d28d8d Mon Sep 17 00:00:00 2001 From: "guorong.zheng" <360996299@qq.com> Date: Mon, 30 Dec 2024 10:22:20 +0800 Subject: [PATCH 1/4] fix:domain(#762) --- config/subscribe.txt | 2 +- utils/tools.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config/subscribe.txt b/config/subscribe.txt index 8cd2fe6e0c..7ceb6f25b9 100644 --- a/config/subscribe.txt +++ b/config/subscribe.txt @@ -4,7 +4,7 @@ https://iptv.b2og.com/txt/fmml_ipv6.txt https://ghgo.xyz/raw.githubusercontent.com/suxuang/myIPTV/main/ipv6.m3u https://live.zbds.top/tv/iptv6.txt https://live.zbds.top/tv/iptv4.txt -https://live.fanmingming.com/tv/m3u/ipv6.m3u +https://live.fanmingming.cn/tv/m3u/ipv6.m3u https://ghgo.xyz/raw.githubusercontent.com/joevess/IPTV/main/home.m3u8 https://aktv.top/live.txt http://175.178.251.183:6689/live.txt diff --git a/utils/tools.py b/utils/tools.py index 136f2443f4..26a0a5797a 100644 --- a/utils/tools.py +++ b/utils/tools.py @@ -356,7 +356,7 @@ def convert_to_m3u(): user_final_file = resource_path(config.final_file) if os.path.exists(user_final_file): with open(user_final_file, "r", encoding="utf-8") as file: - m3u_output = '#EXTM3U x-tvg-url="https://live.fanmingming.com/e.xml"\n' + m3u_output = '#EXTM3U x-tvg-url="https://live.fanmingming.cn/e.xml"\n' current_group = None for line in file: trimmed_line = line.strip() @@ -376,7 +376,7 @@ def convert_to_m3u(): + ("+" if m.group(3) else ""), original_channel_name, ) - m3u_output += f'#EXTINF:-1 tvg-name="{processed_channel_name}" tvg-logo="https://live.fanmingming.com/tv/{processed_channel_name}.png"' + m3u_output += f'#EXTINF:-1 tvg-name="{processed_channel_name}" tvg-logo="https://live.fanmingming.cn/tv/{processed_channel_name}.png"' if current_group: m3u_output += f' group-title="{current_group}"' m3u_output += f",{original_channel_name}\n{channel_link}\n" From d4cf26b900bf0bf1dfda7edb7f629612f19de25b Mon Sep 17 00:00:00 2001 From: "guorong.zheng" <360996299@qq.com> Date: Mon, 30 Dec 2024 10:41:47 +0800 Subject: [PATCH 2/4] chore:update open_url_info desc --- README.md | 2 +- README_en.md | 2 +- config/config.ini | 2 +- docs/config.md | 2 +- docs/config_en.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d8d50e6ed6..c24320353a 100644 --- a/README.md +++ b/README.md @@ -164,7 +164,7 @@ https://cdn.jsdelivr.net/gh/Guovin/iptv-api@gd/source.json | open_subscribe | 开启订阅源功能 | False | | open_update | 开启更新,用于控制是否更新接口,若关闭则所有工作模式(获取接口和测速)均停止 | True | | open_update_time | 开启显示更新时间 | True | -| open_url_info | 开启显示接口说明信息,用于控制是否显示分辨率、接口协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述 | True | +| open_url_info | 开启显示接口说明信息,用于控制是否显示接口来源、分辨率、协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述,若部分播放器(如PotPlayer)不支持解析导致无法播放可关闭 | True | | open_use_cache | 开启使用本地缓存数据,适用于查询请求失败场景(仅针对酒店源与组播源) | True | | open_use_old_result | 开启使用历史更新结果(包含模板与结果文件的接口),合并至本次更新中 | True | | app_port | 页面服务端口,用于控制页面服务的端口号 | 8000 | diff --git a/README_en.md b/README_en.md index f0136ae349..90bb3699b8 100644 --- a/README_en.md +++ b/README_en.md @@ -164,7 +164,7 @@ https://cdn.jsdelivr.net/gh/Guovin/iptv-api@gd/source.json | open_subscribe | Enable subscription source feature | True | | open_update | Enable updates, if disabled then only the result page service is run | True | | open_update_time | Enable show update time | True | -| open_url_info | Enable display of API description information, used to control whether to show resolution, API protocol type, etc., the content after the $ symbol, playback software uses this information to describe the API | True | +| open_url_info | Enable to display interface description information, used to control whether to display interface source, resolution, protocol type and other information, the content after the $ symbol, the playback software uses this information to describe the interface, if some players (such as PotPlayer) do not support parsing and cannot play, you can turn it off | True | | open_use_cache | Enable the use of local cache data, applicable to the query request failure scenario (only for hotel sources and multicast sources) | True | | open_use_old_result | Enable the use of historical update results (including the interface for template and result files) and merge them into the current update | True | | app_port | Page service port, used to control the port number of the page service | 8000 | diff --git a/config/config.ini b/config/config.ini index 59ca3e983c..45fbe85375 100644 --- a/config/config.ini +++ b/config/config.ini @@ -41,7 +41,7 @@ open_supply = True open_update = True # 开启显示更新时间; 可选值: True, False | Enable display update time; Optional values: True, False open_update_time = True -# 开启显示接口说明信息,用于控制是否显示分辨率、接口协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述; 可选值: True, False | Enable display interface description information, used to control whether to display resolution, interface protocol type and other information, the information after the $ symbol, the playback software uses this information to describe the interface; Optional values: True, False +# 开启显示接口说明信息,用于控制是否显示接口来源、分辨率、协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述,若部分播放器(如PotPlayer)不支持解析导致无法播放可关闭; 可选值: True, False | Enable to display interface description information, used to control whether to display interface source, resolution, protocol type and other information, the content after the $ symbol, the playback software uses this information to describe the interface, if some players (such as PotPlayer) do not support parsing and cannot play, you can turn it off; Optional values: True, False open_url_info = True # 开启使用本地缓存数据,适用于查询请求失败场景(仅针对酒店源与组播源); 可选值: True, False | Enable to use local cached data, suitable for query request failure scenarios (only for hotel source and multicast source); Optional values: True, False open_use_cache = True diff --git a/docs/config.md b/docs/config.md index 70ab4e9b49..519c292149 100644 --- a/docs/config.md +++ b/docs/config.md @@ -20,7 +20,7 @@ | open_subscribe | 开启订阅源功能 | False | | open_update | 开启更新,用于控制是否更新接口,若关闭则所有工作模式(获取接口和测速)均停止 | True | | open_update_time | 开启显示更新时间 | True | -| open_url_info | 开启显示接口说明信息,用于控制是否显示分辨率、接口协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述 | True | +| open_url_info | 开启显示接口说明信息,用于控制是否显示接口来源、分辨率、协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述,若部分播放器(如PotPlayer)不支持解析导致无法播放可关闭 | True | | open_use_cache | 开启使用本地缓存数据,适用于查询请求失败场景(仅针对酒店源与组播源) | True | | open_use_old_result | 开启使用历史更新结果(包含模板与结果文件的接口),合并至本次更新中 | True | | app_port | 页面服务端口,用于控制页面服务的端口号 | 8000 | diff --git a/docs/config_en.md b/docs/config_en.md index f998d8c450..d98ff35ece 100644 --- a/docs/config_en.md +++ b/docs/config_en.md @@ -20,7 +20,7 @@ | open_subscribe | Enable subscription source feature | True | | open_update | Enable updates, if disabled then only the result page service is run | True | | open_update_time | Enable show update time | True | -| open_url_info | Enable display of API description information, used to control whether to show resolution, API protocol type, etc., the content after the $ symbol, playback software uses this information to describe the API | True | +| open_url_info | Enable to display interface description information, used to control whether to display interface source, resolution, protocol type and other information, the content after the $ symbol, the playback software uses this information to describe the interface, if some players (such as PotPlayer) do not support parsing and cannot play, you can turn it off | True | | open_use_cache | Enable the use of local cache data, applicable to the query request failure scenario (only for hotel sources and multicast sources) | True | | open_use_old_result | Enable the use of historical update results (including the interface for template and result files) and merge them into the current update | True | | app_port | Page service port, used to control the port number of the page service | 8000 | From dd3b38a096d52507733479c1a24c54d110d86def Mon Sep 17 00:00:00 2001 From: "guorong.zheng" <360996299@qq.com> Date: Mon, 30 Dec 2024 13:56:00 +0800 Subject: [PATCH 3/4] feat:check_ffmpeg_installed_status --- tkinter_ui/tkinter_ui.py | 6 ++++++ utils/channel.py | 5 +++-- utils/speed.py | 11 ++++++++--- 3 files changed, 17 insertions(+), 5 deletions(-) diff --git a/tkinter_ui/tkinter_ui.py b/tkinter_ui/tkinter_ui.py index 1171ed80fa..d57e3fba86 100644 --- a/tkinter_ui/tkinter_ui.py +++ b/tkinter_ui/tkinter_ui.py @@ -20,6 +20,7 @@ from subscribe import SubscribeUI from online_search import OnlineSearchUI import json +from utils.speed import check_ffmpeg_installed_status class TkinterUI: @@ -117,6 +118,11 @@ async def run_update(self): self.progress_label.pack_forget() def on_run_update(self): + if not self.update_running and config.open_filter_resolution and not check_ffmpeg_installed_status(): + if messagebox.askyesno("提示", + "使用分辨率相关功能需要安装FFmpeg,为了实现更佳的观看体验,\n是否前往官网下载?"): + return webbrowser.open("https://ffmpeg.org") + loop = asyncio.new_event_loop() def run_loop(): diff --git a/utils/channel.py b/utils/channel.py index 0ce80940c4..c33b4d9d20 100644 --- a/utils/channel.py +++ b/utils/channel.py @@ -16,6 +16,7 @@ from utils.speed import ( get_speed, sort_urls, + check_ffmpeg_installed_status ) from utils.tools import ( get_name_url, @@ -572,6 +573,7 @@ async def process_sort_channel_list(data, ipv6=False, callback=None): """ ipv6_proxy = None if (not config.open_ipv6 or ipv6) else constants.ipv6_proxy open_filter_resolution = config.open_filter_resolution + get_resolution = open_filter_resolution and check_ffmpeg_installed_status() sort_timeout = config.sort_timeout need_sort_data = copy.deepcopy(data) process_nested_dict(need_sort_data, seen=set(), flag=r"cache:(.*)", force_str="!") @@ -588,7 +590,7 @@ async def limited_get_speed(info, ipv6_proxy, filter_resolution, timeout, callba limited_get_speed( info, ipv6_proxy=ipv6_proxy, - filter_resolution=open_filter_resolution, + filter_resolution=get_resolution, timeout=sort_timeout, callback=callback, ) @@ -601,7 +603,6 @@ async def limited_get_speed(info, ipv6_proxy, filter_resolution, timeout, callba logger = get_logger(constants.sort_log_path, level=INFO, init=True) open_supply = config.open_supply open_filter_speed = config.open_filter_speed - open_filter_resolution = config.open_filter_resolution min_speed = config.min_speed min_resolution = config.min_resolution_value for cate, obj in data.items(): diff --git a/utils/speed.py b/utils/speed.py index 1a486ff184..90b5ad318b 100644 --- a/utils/speed.py +++ b/utils/speed.py @@ -152,17 +152,22 @@ async def get_delay_requests(url, timeout=config.sort_timeout, proxy=None): return int(round((end - start) * 1000)) if end else float("inf") -def is_ffmpeg_installed(): +def check_ffmpeg_installed_status(): """ Check ffmpeg is installed """ + status = False try: result = subprocess.run( ["ffmpeg", "-version"], stdout=subprocess.PIPE, stderr=subprocess.PIPE ) - return result.returncode == 0 + status = result.returncode == 0 except FileNotFoundError: - return False + status = False + except Exception as e: + print(e) + finally: + return status async def ffmpeg_url(url, timeout=config.sort_timeout): From 688d32e8f1f946db4d8e1e533553037e3aa8936d Mon Sep 17 00:00:00 2001 From: "guorong.zheng" <360996299@qq.com> Date: Mon, 30 Dec 2024 14:02:07 +0800 Subject: [PATCH 4/4] release:v1.5.8 --- CHANGELOG.md | 34 ++++++++++++++++++++++++++++++++++ version.json | 2 +- 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 506e91211f..21e6705b30 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,39 @@ # 更新日志(Changelog) +## v1.5.8 + +### 2024/12/30 + +- ✨ 推荐本次更新,实测可实现秒播级的观看体验,不可播放的情况明显减少 +- ✨ 支持获取分辨率,GUI用户需要手动安装FFmpeg(#608) +- ✨ 支持text/plain结果输出,解决部分播放器显示问题(#736) +- ✨ 增加默认订阅源 +- 🐛 修复IPv6接口测速输出的速率结果异常(#739) +- 🐛 修复GUI出现的错误输出(#743) +- 🐛 修复分辨率数值比较异常(#744) +- 🐛 修复台标无法显示(#762) +- 🪄 优化接口测速方法,兼容多种m3u8接口类型 +- 🪄 调整Github工作流执行结果IPv类型为自动,即根据网络环境自动选择IPv4或IPv6,若有需要可手动设置ipv_type_prefer调整输出偏好 +- 🪄 更新部分配置参数说明 + +
+ English + +- ✨ Recommended update, tested to achieve instant playback experience, significantly reducing playback failures +- ✨ Support for obtaining resolution, GUI users need to manually install FFmpeg (#608) +- ✨ Support for text/plain result output, solving display issues in some players (#736) +- ✨ Added default subscription sources +- 🐛 Fixed abnormal speed results for IPv6 interface speed tests (#739) +- 🐛 Fixed error output in GUI (#743) +- 🐛 Fixed abnormal resolution value comparison (#744) +- 🐛 Fixed logo display issue (#762) +- 🪄 Optimized interface speed test method, compatible with various m3u8 interface types +- 🪄 Adjusted GitHub workflow execution result IPv type to automatic, selecting IPv4 or IPv6 based on network + environment, with manual setting option for ipv_type_prefer +- 🪄 Updated some configuration parameter descriptions + +
+ ## v1.5.7 ### 2024/12/23 diff --git a/version.json b/version.json index f06c8b10e7..d348031dd3 100644 --- a/version.json +++ b/version.json @@ -1,4 +1,4 @@ { - "version": "1.5.7", + "version": "1.5.8", "name": "IPTV-API" } \ No newline at end of file