diff --git a/config/config.ini b/config/config.ini index 4b31bc3885..200f29bdd9 100644 --- a/config/config.ini +++ b/config/config.ini @@ -43,4 +43,5 @@ origin_type_prefer = hotel,multicast,subscribe,online_search hotel_num = 10 multicast_num = 10 subscribe_num = 10 -online_search_num = 10 \ No newline at end of file +online_search_num = 10 +open_url_info = True \ No newline at end of file diff --git a/docs/config.md b/docs/config.md index a76a2592b3..fdbc51863b 100644 --- a/docs/config.md +++ b/docs/config.md @@ -44,3 +44,4 @@ | multicast_num | 10 | 结果中偏好的组播源接口数量 | | subscribe_num | 10 | 结果中偏好的订阅源接口数量 | | online_search_num | 10 | 结果中偏好的在线搜索接口数量 | +| open_url_info | True | 开启显示接口说明信息,用于控制是否显示分辨率、接口协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述 | diff --git a/docs/config_en.md b/docs/config_en.md index 766fedaa23..a57085937d 100644 --- a/docs/config_en.md +++ b/docs/config_en.md @@ -44,3 +44,4 @@ | multicast_num | 10 | The number of preferred multicast source interfaces in the results | | subscribe_num | 10 | The number of preferred subscribe source interfaces in the results | | online_search_num | 10 | The number of preferred online search interfaces in the results | +| open_url_info | True | 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 | diff --git a/utils/tools.py b/utils/tools.py index 51ab890741..0eb34441a5 100644 --- a/utils/tools.py +++ b/utils/tools.py @@ -192,7 +192,13 @@ def get_total_urls_from_info_list(infoList): if len(total_urls) >= urls_limit: break - return list(dict.fromkeys(total_urls))[:urls_limit] + total_urls = list(dict.fromkeys(total_urls))[:urls_limit] + + open_url_info = config.getboolean("Settings", "open_url_info", fallback=True) + if not open_url_info: + return [url.split("$", 1)[0] for url in total_urls] + else: + return total_urls def get_total_urls_from_sorted_data(data):