Skip to content

Commit

Permalink
Merge pull request #763 from Guovin/dev
Browse files Browse the repository at this point in the history
Release v1.5.8
  • Loading branch information
Guovin authored Dec 30, 2024
2 parents ab157be + 688d32e commit 2fafb38
Show file tree
Hide file tree
Showing 12 changed files with 60 additions and 14 deletions.
34 changes: 34 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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调整输出偏好
- 🪄 更新部分配置参数说明

<details>
<summary>English</summary>

- ✨ 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

</details>

## v1.5.7

### 2024/12/23
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion README_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion config/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion config/subscribe.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion docs/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
2 changes: 1 addition & 1 deletion docs/config_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand Down
6 changes: 6 additions & 0 deletions tkinter_ui/tkinter_ui.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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():
Expand Down
5 changes: 3 additions & 2 deletions utils/channel.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from utils.speed import (
get_speed,
sort_urls,
check_ffmpeg_installed_status
)
from utils.tools import (
get_name_url,
Expand Down Expand Up @@ -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="!")
Expand All @@ -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,
)
Expand All @@ -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():
Expand Down
11 changes: 8 additions & 3 deletions utils/speed.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
4 changes: 2 additions & 2 deletions utils/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion version.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{
"version": "1.5.7",
"version": "1.5.8",
"name": "IPTV-API"
}

0 comments on commit 2fafb38

Please sign in to comment.