feat:local source
This commit is contained in:
parent
20bdfbed68
commit
e845ec307d
105
README.md
105
README.md
@ -105,57 +105,60 @@ https://cdn.jsdelivr.net/gh/Guovin/iptv-api@gd/source.json
|
||||
|
||||
## 配置
|
||||
|
||||
| 配置项 | 描述 | 默认值 |
|
||||
|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | 开启浏览器运行,若更新无数据可开启此模式,较消耗性能 | False |
|
||||
| open_empty_category | 开启无结果频道分类,自动归类至底部 | False |
|
||||
| open_filter_resolution | 开启分辨率过滤,低于最小分辨率(min_resolution)的接口将会被过滤,GUI用户需要手动安装FFmpeg,程序会自动调用FFmpeg获取接口分辨率,推荐开启,虽然会增加测速阶段耗时,但能更有效地区分是否可播放的接口 | True |
|
||||
| open_filter_speed | 开启速率过滤,低于最小速率(min_speed)的接口将会被过滤 | True |
|
||||
| open_hotel | 开启酒店源功能,关闭后所有酒店源工作模式都将关闭 | True |
|
||||
| open_hotel_foodie | 开启 Foodie 酒店源工作模式 | True |
|
||||
| open_hotel_fofa | 开启 FOFA、ZoomEye 酒店源工作模式 | True |
|
||||
| open_keep_all | 开启保留所有检索结果,会保留非模板频道名称的结果,推荐手动维护时开启 | False |
|
||||
| open_m3u_result | 开启转换生成 m3u 文件类型结果链接,支持显示频道图标 | True |
|
||||
| open_multicast | 开启组播源功能,关闭后所有组播源工作模式都将关闭 | True |
|
||||
| open_multicast_foodie | 开启 Foodie 组播源工作模式 | True |
|
||||
| open_multicast_fofa | 开启 FOFA 组播源工作模式 | True |
|
||||
| open_online_search | 开启关键字搜索源功能 | False |
|
||||
| open_proxy | 开启代理,自动获取免费可用代理,若更新无数据可开启此模式 | False |
|
||||
| open_request | 开启查询请求,数据来源于网络(仅针对酒店源与组播源) | False |
|
||||
| open_service | 开启页面服务,用于控制是否启动结果页面服务;如果使用青龙等平台部署,有专门设定的定时任务,需要更新完成后停止运行,可以关闭该功能 | True |
|
||||
| open_sort | 开启排序功能(响应速度、日期、分辨率) | True |
|
||||
| open_subscribe | 开启订阅源功能 | False |
|
||||
| open_update | 开启更新,用于控制是否更新接口,若关闭则所有工作模式(获取接口和测速)均停止 | True |
|
||||
| open_update_time | 开启显示更新时间 | True |
|
||||
| open_url_info | 开启显示接口说明信息,用于控制是否显示接口来源、分辨率、协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述,若部分播放器(如PotPlayer)不支持解析导致无法播放可关闭 | False |
|
||||
| open_use_cache | 开启使用本地缓存数据,适用于查询请求失败场景(仅针对酒店源与组播源) | True |
|
||||
| open_use_old_result | 开启使用历史更新结果(包含模板与结果文件的接口),合并至本次更新中 | True |
|
||||
| app_port | 页面服务端口,用于控制页面服务的端口号 | 8000 |
|
||||
| final_file | 生成结果文件路径 | output/result.txt |
|
||||
| hotel_num | 结果中偏好的酒店源接口数量 | 10 |
|
||||
| hotel_page_num | 酒店地区获取分页数量 | 1 |
|
||||
| hotel_region_list | 酒店源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| ipv4_num | 结果中偏好的 IPv4 接口数量 | 5 |
|
||||
| ipv6_num | 结果中偏好的 IPv6 接口数量 | 5 |
|
||||
| ipv6_support | 强制认为当前网络支持IPv6,跳过检测 | False |
|
||||
| ipv_type | 生成结果中接口的协议类型,可选值:ipv4、ipv6、全部、all | 全部 |
|
||||
| ipv_type_prefer | 接口协议类型偏好,优先将该类型的接口排在结果前面,可选值:ipv4、ipv6、自动、auto | 自动 |
|
||||
| min_resolution | 接口最小分辨率,需要开启 open_filter_resolution 才能生效 | 1920x1080 |
|
||||
| min_speed | 接口最小速率(单位M/s),需要开启 open_filter_speed 才能生效 | 0.2 |
|
||||
| multicast_num | 结果中偏好的组播源接口数量 | 10 |
|
||||
| multicast_page_num | 组播地区获取分页数量 | 1 |
|
||||
| multicast_region_list | 组播源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| online_search_num | 结果中偏好的关键字搜索接口数量 | 0 |
|
||||
| online_search_page_num | 关键字搜索频道获取分页数量 | 1 |
|
||||
| origin_type_prefer | 结果偏好的接口来源,结果优先按该顺序进行排序,逗号分隔,例如:hotel,multicast,subscribe,online_search;hotel:酒店源,multicast:组播源,subscribe:订阅源,online_search:关键字搜索;不填写则表示不指定来源,按照接口速率排序 | |
|
||||
| recent_days | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 | 30 |
|
||||
| request_timeout | 查询请求超时时长,单位秒(s),用于控制查询接口文本链接的超时时长以及重试时长,调整此值能优化更新时间 | 10 |
|
||||
| sort_timeout | 单个接口测速超时时长,单位秒(s);数值越大测速所属时间越长,能提高获取接口数量,但质量会有所下降;数值越小测速所需时间越短,能获取低延时的接口,质量较好;调整此值能优化更新时间 | 10 |
|
||||
| source_file | 模板文件路径 | config/demo.txt |
|
||||
| subscribe_num | 结果中偏好的订阅源接口数量 | 10 |
|
||||
| time_zone | 时区,可用于控制更新时间显示的时区,可选值:Asia/Shanghai 或其它时区编码 | Asia/Shanghai |
|
||||
| urls_limit | 单个频道接口数量 | 10 |
|
||||
| update_time_position | 更新时间显示位置,需要开启 open_update_time 才能生效,可选值:top、bottom,top: 显示于结果顶部,bottom: 显示于结果底部 | top |
|
||||
| 配置项 | 描述 | 默认值 |
|
||||
|:-----------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | 开启浏览器运行,若更新无数据可开启此模式,较消耗性能 | False |
|
||||
| open_empty_category | 开启无结果频道分类,自动归类至底部 | False |
|
||||
| open_filter_resolution | 开启分辨率过滤,低于最小分辨率(min_resolution)的接口将会被过滤,GUI用户需要手动安装FFmpeg,程序会自动调用FFmpeg获取接口分辨率,推荐开启,虽然会增加测速阶段耗时,但能更有效地区分是否可播放的接口 | True |
|
||||
| open_filter_speed | 开启速率过滤,低于最小速率(min_speed)的接口将会被过滤 | True |
|
||||
| open_hotel | 开启酒店源功能,关闭后所有酒店源工作模式都将关闭 | True |
|
||||
| open_hotel_foodie | 开启 Foodie 酒店源工作模式 | True |
|
||||
| open_hotel_fofa | 开启 FOFA、ZoomEye 酒店源工作模式 | True |
|
||||
| open_keep_all | 开启保留所有检索结果,会保留非模板频道名称的结果,推荐手动维护时开启 | False |
|
||||
| open_local | 开启本地源功能,将使用模板文件与本地源文件中的数据 | True |
|
||||
| open_m3u_result | 开启转换生成 m3u 文件类型结果链接,支持显示频道图标 | True |
|
||||
| open_multicast | 开启组播源功能,关闭后所有组播源工作模式都将关闭 | True |
|
||||
| open_multicast_foodie | 开启 Foodie 组播源工作模式 | True |
|
||||
| open_multicast_fofa | 开启 FOFA 组播源工作模式 | True |
|
||||
| open_online_search | 开启关键字搜索源功能 | False |
|
||||
| open_proxy | 开启代理,自动获取免费可用代理,若更新无数据可开启此模式 | False |
|
||||
| open_request | 开启查询请求,数据来源于网络(仅针对酒店源与组播源) | False |
|
||||
| open_service | 开启页面服务,用于控制是否启动结果页面服务;如果使用青龙等平台部署,有专门设定的定时任务,需要更新完成后停止运行,可以关闭该功能 | True |
|
||||
| open_sort | 开启排序功能(响应速度、日期、分辨率) | True |
|
||||
| open_subscribe | 开启订阅源功能 | False |
|
||||
| open_update | 开启更新,用于控制是否更新接口,若关闭则所有工作模式(获取接口和测速)均停止 | True |
|
||||
| open_update_time | 开启显示更新时间 | True |
|
||||
| open_url_info | 开启显示接口说明信息,用于控制是否显示接口来源、分辨率、协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述,若部分播放器(如PotPlayer)不支持解析导致无法播放可关闭 | False |
|
||||
| open_use_cache | 开启使用本地缓存数据,适用于查询请求失败场景(仅针对酒店源与组播源) | True |
|
||||
| open_use_old_result | 开启使用历史更新结果(包含模板与结果文件的接口),合并至本次更新中 | True |
|
||||
| app_port | 页面服务端口,用于控制页面服务的端口号 | 8000 |
|
||||
| final_file | 生成结果文件路径 | output/result.txt |
|
||||
| hotel_num | 结果中偏好的酒店源接口数量 | 10 |
|
||||
| hotel_page_num | 酒店地区获取分页数量 | 1 |
|
||||
| hotel_region_list | 酒店源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| ipv4_num | 结果中偏好的 IPv4 接口数量 | 5 |
|
||||
| ipv6_num | 结果中偏好的 IPv6 接口数量 | 5 |
|
||||
| ipv6_support | 强制认为当前网络支持IPv6,跳过检测 | False |
|
||||
| ipv_type | 生成结果中接口的协议类型,可选值:ipv4、ipv6、全部、all | 全部 |
|
||||
| ipv_type_prefer | 接口协议类型偏好,优先将该类型的接口排在结果前面,可选值:ipv4、ipv6、自动、auto | 自动 |
|
||||
| local_file | 本地源文件路径 | config/local.txt |
|
||||
| local_num | 结果中偏好的本地源接口数量 | 10 |
|
||||
| min_resolution | 接口最小分辨率,需要开启 open_filter_resolution 才能生效 | 1920x1080 |
|
||||
| min_speed | 接口最小速率(单位M/s),需要开启 open_filter_speed 才能生效 | 0.2 |
|
||||
| multicast_num | 结果中偏好的组播源接口数量 | 10 |
|
||||
| multicast_page_num | 组播地区获取分页数量 | 1 |
|
||||
| multicast_region_list | 组播源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| online_search_num | 结果中偏好的关键字搜索接口数量 | 0 |
|
||||
| online_search_page_num | 关键字搜索频道获取分页数量 | 1 |
|
||||
| origin_type_prefer | 结果偏好的接口来源,结果优先按该顺序进行排序,逗号分隔,例如:local,hotel,multicast,subscribe,online_search;local:本地源,hotel:酒店源,multicast:组播源,subscribe:订阅源,online_search:关键字搜索;不填写则表示不指定来源,按照接口速率排序 | |
|
||||
| recent_days | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 | 30 |
|
||||
| request_timeout | 查询请求超时时长,单位秒(s),用于控制查询接口文本链接的超时时长以及重试时长,调整此值能优化更新时间 | 10 |
|
||||
| sort_timeout | 单个接口测速超时时长,单位秒(s);数值越大测速所属时间越长,能提高获取接口数量,但质量会有所下降;数值越小测速所需时间越短,能获取低延时的接口,质量较好;调整此值能优化更新时间 | 10 |
|
||||
| source_file | 模板文件路径 | config/demo.txt |
|
||||
| subscribe_num | 结果中偏好的订阅源接口数量 | 10 |
|
||||
| time_zone | 时区,可用于控制更新时间显示的时区,可选值:Asia/Shanghai 或其它时区编码 | Asia/Shanghai |
|
||||
| urls_limit | 单个频道接口数量 | 10 |
|
||||
| update_time_position | 更新时间显示位置,需要开启 open_update_time 才能生效,可选值:top、bottom,top: 显示于结果顶部,bottom: 显示于结果底部 | top |
|
||||
|
||||
## 快速上手
|
||||
|
||||
|
105
README_en.md
105
README_en.md
@ -105,57 +105,60 @@ https://cdn.jsdelivr.net/gh/Guovin/iptv-api@gd/source.json
|
||||
|
||||
## Config
|
||||
|
||||
| Configuration Item | Description | Default Value |
|
||||
|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | Enable browser execution, If there are no updates, this mode can be enabled, which consumes more performance | False |
|
||||
| open_empty_category | Enable the No Results Channel Category, which will automatically categorize channels without results to the bottom | False |
|
||||
| open_filter_resolution | Enable resolution filtering, interfaces below the minimum resolution (min_resolution) will be filtered, GUI users need to manually install FFmpeg, the program will automatically call FFmpeg to obtain the interface resolution, it is recommended to enable, although it will increase the time-consuming of the speed measurement stage, but it can more effectively distinguish whether the interface can be played | True |
|
||||
| open_filter_speed | Enable speed filtering, interfaces with speed lower than the minimum speed (min_speed) will be filtered | True |
|
||||
| open_hotel | Enable the hotel source function, after closing it all hotel source working modes will be disabled | True |
|
||||
| open_hotel_foodie | Enable Foodie hotel source work mode | True |
|
||||
| open_hotel_fofa | Enable FOFA、ZoomEye hotel source work mode | True |
|
||||
| open_keep_all | Enable retain all search results, retain results with non-template channel names, recommended to be turned on when manually maintaining | False |
|
||||
| open_m3u_result | Enable the conversion to generate m3u file type result links, supporting the display of channel icons | True |
|
||||
| open_multicast | Enable the multicast source function, after disabling it all multicast sources will stop working | True |
|
||||
| open_multicast_foodie | Enable Foodie multicast source work mode | True |
|
||||
| open_multicast_fofa | Enable FOFA multicast source work mode | True |
|
||||
| open_online_search | Enable keyword search source feature | False |
|
||||
| open_proxy | Enable proxy, automatically obtains free available proxies, If there are no updates, this mode can be enabled | False |
|
||||
| open_request | Enable query request, the data is obtained from the network (only for hotel sources and multicast sources) | False |
|
||||
| open_service | Enable page service, used to control whether to start the result page service; if deployed on platforms like Qinglong with dedicated scheduled tasks, the function can be turned off after updates are completed and the task is stopped | True |
|
||||
| open_sort | Enable the sorting function (response speed, date, resolution) | True |
|
||||
| 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 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 | False |
|
||||
| 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 |
|
||||
| final_file | Generated result file path | output/result.txt |
|
||||
| hotel_num | The number of preferred hotel source interfaces in the results | 10 |
|
||||
| hotel_page_num | Number of pages to retrieve for hotel regions | 1 |
|
||||
| hotel_region_list | List of hotel source regions, 'all' indicates all regions | all |
|
||||
| ipv4_num | The preferred number of IPv4 interfaces in the result | 5 |
|
||||
| ipv6_num | The preferred number of IPv6 interfaces in the result | 5 |
|
||||
| ipv6_support | It is forced to consider that the current network supports IPv6 and skip the check | False |
|
||||
| ipv_type | The protocol type of interface in the generated result, optional values: ipv4, ipv6, all | all |
|
||||
| ipv_type_prefer | Interface protocol type preference, prioritize interfaces of this type in the results, optional values: ipv4, ipv6, auto | auto |
|
||||
| min_resolution | Minimum interface resolution, requires enabling open_filter_resolution to take effect | 1920x1080 |
|
||||
| min_speed | Minimum interface speed (M/s), requires enabling open_filter_speed to take effect | 0.2 |
|
||||
| multicast_num | The number of preferred multicast source interfaces in the results | 10 |
|
||||
| multicast_page_num | Number of pages to retrieve for multicast regions | 1 |
|
||||
| multicast_region_list | Multicast source region list, 'all' indicates all regions | all |
|
||||
| online_search_num | The number of preferred keyword search interfaces in the results | 0 |
|
||||
| online_search_page_num | Page retrieval quantity for keyword search channels | 1 |
|
||||
| origin_type_prefer | Preferred interface source of the result, the result is sorted according to this order, separated by commas, for example: hotel, multicast, subscribe, online_search; hotel: hotel source, multicast: multicast source, subscribe: subscription source, online_search: keyword search; If not filled in, it means that the source is not specified, and it is sorted according to the interface rate | |
|
||||
| recent_days | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues | 30 |
|
||||
| request_timeout | Query request timeout duration, in seconds (s), used to control the timeout and retry duration for querying interface text links. Adjusting this value can optimize update time. | 10 |
|
||||
| sort_timeout | The timeout duration for speed testing of a single interface, in seconds (s). A larger value means a longer testing period, which can increase the number of interfaces obtained but may decrease their quality. A smaller value means a shorter testing time, which can obtain low-latency interfaces with better quality. Adjusting this value can optimize the update time. | 10 |
|
||||
| source_file | Template file path | config/demo.txt |
|
||||
| subscribe_num | The number of preferred subscribe source interfaces in the results | 10 |
|
||||
| time_zone | Time zone, can be used to control the time zone displayed by the update time, optional values: Asia/Shanghai or other time zone codes | Asia/Shanghai |
|
||||
| urls_limit | Number of interfaces per channel | 10 |
|
||||
| update_time_position | Update time display position, need to enable open_update_time to take effect, optional values: top, bottom, top: display at the top of the result, bottom: display at the bottom of the result | top |
|
||||
| Configuration Item | Description | Default Value |
|
||||
|:-----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | Enable browser execution, If there are no updates, this mode can be enabled, which consumes more performance | False |
|
||||
| open_empty_category | Enable the No Results Channel Category, which will automatically categorize channels without results to the bottom | False |
|
||||
| open_filter_resolution | Enable resolution filtering, interfaces below the minimum resolution (min_resolution) will be filtered, GUI users need to manually install FFmpeg, the program will automatically call FFmpeg to obtain the interface resolution, it is recommended to enable, although it will increase the time-consuming of the speed measurement stage, but it can more effectively distinguish whether the interface can be played | True |
|
||||
| open_filter_speed | Enable speed filtering, interfaces with speed lower than the minimum speed (min_speed) will be filtered | True |
|
||||
| open_hotel | Enable the hotel source function, after closing it all hotel source working modes will be disabled | True |
|
||||
| open_hotel_foodie | Enable Foodie hotel source work mode | True |
|
||||
| open_hotel_fofa | Enable FOFA、ZoomEye hotel source work mode | True |
|
||||
| open_keep_all | Enable retain all search results, retain results with non-template channel names, recommended to be turned on when manually maintaining | False |
|
||||
| open_local | Enable local source function, will use the data in the template file and the local source file | True |
|
||||
| open_m3u_result | Enable the conversion to generate m3u file type result links, supporting the display of channel icons | True |
|
||||
| open_multicast | Enable the multicast source function, after disabling it all multicast sources will stop working | True |
|
||||
| open_multicast_foodie | Enable Foodie multicast source work mode | True |
|
||||
| open_multicast_fofa | Enable FOFA multicast source work mode | True |
|
||||
| open_online_search | Enable keyword search source feature | False |
|
||||
| open_proxy | Enable proxy, automatically obtains free available proxies, If there are no updates, this mode can be enabled | False |
|
||||
| open_request | Enable query request, the data is obtained from the network (only for hotel sources and multicast sources) | False |
|
||||
| open_service | Enable page service, used to control whether to start the result page service; if deployed on platforms like Qinglong with dedicated scheduled tasks, the function can be turned off after updates are completed and the task is stopped | True |
|
||||
| open_sort | Enable the sorting function (response speed, date, resolution) | True |
|
||||
| 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 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 | False |
|
||||
| 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 |
|
||||
| final_file | Generated result file path | output/result.txt |
|
||||
| hotel_num | The number of preferred hotel source interfaces in the results | 10 |
|
||||
| hotel_page_num | Number of pages to retrieve for hotel regions | 1 |
|
||||
| hotel_region_list | List of hotel source regions, 'all' indicates all regions | all |
|
||||
| ipv4_num | The preferred number of IPv4 interfaces in the result | 5 |
|
||||
| ipv6_num | The preferred number of IPv6 interfaces in the result | 5 |
|
||||
| ipv6_support | It is forced to consider that the current network supports IPv6 and skip the check | False |
|
||||
| ipv_type | The protocol type of interface in the generated result, optional values: ipv4, ipv6, all | all |
|
||||
| ipv_type_prefer | Interface protocol type preference, prioritize interfaces of this type in the results, optional values: ipv4, ipv6, auto | auto |
|
||||
| local_file | Local source file path | config/local.txt |
|
||||
| local_num | Preferred number of local source interfaces in the result | 10 |
|
||||
| min_resolution | Minimum interface resolution, requires enabling open_filter_resolution to take effect | 1920x1080 |
|
||||
| min_speed | Minimum interface speed (M/s), requires enabling open_filter_speed to take effect | 0.2 |
|
||||
| multicast_num | The number of preferred multicast source interfaces in the results | 10 |
|
||||
| multicast_page_num | Number of pages to retrieve for multicast regions | 1 |
|
||||
| multicast_region_list | Multicast source region list, 'all' indicates all regions | all |
|
||||
| online_search_num | The number of preferred keyword search interfaces in the results | 0 |
|
||||
| online_search_page_num | Page retrieval quantity for keyword search channels | 1 |
|
||||
| origin_type_prefer | Preferred interface source of the result, the result is sorted according to this order, separated by commas, for example: local, hotel, multicast, subscribe, online_search; local: local source, hotel: hotel source, multicast: multicast source, subscribe: subscription source, online_search: keyword search; If not filled in, it means that the source is not specified, and it is sorted according to the interface rate | |
|
||||
| recent_days | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues | 30 |
|
||||
| request_timeout | Query request timeout duration, in seconds (s), used to control the timeout and retry duration for querying interface text links. Adjusting this value can optimize update time. | 10 |
|
||||
| sort_timeout | The timeout duration for speed testing of a single interface, in seconds (s). A larger value means a longer testing period, which can increase the number of interfaces obtained but may decrease their quality. A smaller value means a shorter testing time, which can obtain low-latency interfaces with better quality. Adjusting this value can optimize the update time. | 10 |
|
||||
| source_file | Template file path | config/demo.txt |
|
||||
| subscribe_num | The number of preferred subscribe source interfaces in the results | 10 |
|
||||
| time_zone | Time zone, can be used to control the time zone displayed by the update time, optional values: Asia/Shanghai or other time zone codes | Asia/Shanghai |
|
||||
| urls_limit | Number of interfaces per channel | 10 |
|
||||
| update_time_position | Update time display position, need to enable open_update_time to take effect, optional values: top, bottom, top: display at the top of the result, bottom: display at the bottom of the result | top |
|
||||
|
||||
## Quick Start
|
||||
|
||||
|
@ -15,6 +15,8 @@ open_hotel_foodie = True
|
||||
open_hotel_fofa = True
|
||||
# 开启保留所有检索结果,会保留非模板频道名称的结果,推荐手动维护时开启; 可选值: True, False | Enable to keep all search results, will keep the results of non-template channel names, it is recommended to enable when manually maintaining; Optional values: True, False
|
||||
open_keep_all = False
|
||||
# 开启本地源功能,将使用模板文件与本地源文件(local.txt)中的数据;可选值: True, False | Enable local source function, will use the data in the template file and the local source file (local.txt); Optional values: True, False
|
||||
open_local = True
|
||||
# 开启转换生成 m3u 文件类型结果链接,支持显示频道图标; 可选值: True, False | Enable to convert and generate m3u file type result links, support display channel icons; Optional values: True, False
|
||||
open_m3u_result = True
|
||||
# 开启组播源功能,关闭后所有组播源工作模式都将关闭; 可选值: True, False | Enable multicast source function, after closing, all multicast source working modes will be closed; Optional values: True, False
|
||||
@ -67,6 +69,10 @@ ipv6_support = False
|
||||
ipv_type = 全部
|
||||
# 接口协议类型偏好,优先将该类型的接口排在结果前面,可选值:ipv4、ipv6、自动、auto | Interface protocol type preference, prefer to put this type of interface in front of the result, optional values: ipv4, ipv6, 自动, auto
|
||||
ipv_type_prefer = 自动
|
||||
# 本地源文件路径,默认值: config/local.txt | Local source file path, Default value: config/local.txt
|
||||
local_file = config/local.txt
|
||||
# 结果中偏好的本地源接口数量 | Preferred number of local source interfaces in the result
|
||||
local_num = 10
|
||||
# 接口最小分辨率,需要开启 open_filter_resolution 才能生效 | Minimum resolution of the interface, need to enable open_filter_resolution to take effect
|
||||
min_resolution = 1920x1080
|
||||
# 接口最小速率(单位M/s),需要开启 open_filter_speed 才能生效 | Minimum rate of the interface (unit M/s), need to enable open_filter_speed to take effect
|
||||
@ -81,7 +87,7 @@ multicast_region_list = 全部
|
||||
online_search_num = 0
|
||||
# 关键字搜索频道获取分页数量 | Number of keyword search channel acquisition pages
|
||||
online_search_page_num = 1
|
||||
# 结果偏好的接口来源,结果优先按该顺序进行排序,逗号分隔,例如:hotel,multicast,subscribe,online_search;hotel:酒店源,multicast:组播源,subscribe:订阅源,online_search:关键字搜索;不填写则表示不指定来源,按照接口速率排序 | Preferred interface source of the result, the result is sorted according to this order, separated by commas, for example: hotel, multicast, subscribe, online_search; hotel: hotel source, multicast: multicast source, subscribe: subscription source, online_search: keyword search; If not filled in, it means that the source is not specified, and it is sorted according to the interface rate
|
||||
# 结果偏好的接口来源,结果优先按该顺序进行排序,逗号分隔,例如:local,hotel,multicast,subscribe,online_search;local:本地源,hotel:酒店源,multicast:组播源,subscribe:订阅源,online_search:关键字搜索;不填写则表示不指定来源,按照接口速率排序 | Preferred interface source of the result, the result is sorted according to this order, separated by commas, for example: local, hotel, multicast, subscribe, online_search; local: local source, hotel: hotel source, multicast: multicast source, subscribe: subscription source, online_search: keyword search; If not filled in, it means that the source is not specified, and it is sorted according to the interface rate
|
||||
origin_type_prefer =
|
||||
# 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 | Get the interface updated within the recent time range (unit day), appropriately reducing can avoid matching problems
|
||||
recent_days = 30
|
||||
|
4
config/local.txt
Normal file
4
config/local.txt
Normal file
@ -0,0 +1,4 @@
|
||||
# 这是本地源列表,一行一个源,格式为:频道名称,接口地址
|
||||
# 支持设置白名单:接口后添加$!
|
||||
# The local source list, one line per source, format: channel name, interface address
|
||||
# Support setting whitelist: add $! after the interface
|
105
docs/config.md
105
docs/config.md
@ -1,51 +1,54 @@
|
||||
| 配置项 | 描述 | 默认值 |
|
||||
|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | 开启浏览器运行,若更新无数据可开启此模式,较消耗性能 | False |
|
||||
| open_empty_category | 开启无结果频道分类,自动归类至底部 | False |
|
||||
| open_filter_resolution | 开启分辨率过滤,低于最小分辨率(min_resolution)的接口将会被过滤,GUI用户需要手动安装FFmpeg,程序会自动调用FFmpeg获取接口分辨率,推荐开启,虽然会增加测速阶段耗时,但能更有效地区分是否可播放的接口 | True |
|
||||
| open_filter_speed | 开启速率过滤,低于最小速率(min_speed)的接口将会被过滤 | True |
|
||||
| open_hotel | 开启酒店源功能,关闭后所有酒店源工作模式都将关闭 | True |
|
||||
| open_hotel_foodie | 开启 Foodie 酒店源工作模式 | True |
|
||||
| open_hotel_fofa | 开启 FOFA、ZoomEye 酒店源工作模式 | True |
|
||||
| open_keep_all | 开启保留所有检索结果,会保留非模板频道名称的结果,推荐手动维护时开启 | False |
|
||||
| open_m3u_result | 开启转换生成 m3u 文件类型结果链接,支持显示频道图标 | True |
|
||||
| open_multicast | 开启组播源功能,关闭后所有组播源工作模式都将关闭 | True |
|
||||
| open_multicast_foodie | 开启 Foodie 组播源工作模式 | True |
|
||||
| open_multicast_fofa | 开启 FOFA 组播源工作模式 | True |
|
||||
| open_online_search | 开启关键字搜索源功能 | False |
|
||||
| open_proxy | 开启代理,自动获取免费可用代理,若更新无数据可开启此模式 | False |
|
||||
| open_request | 开启查询请求,数据来源于网络(仅针对酒店源与组播源) | False |
|
||||
| open_service | 开启页面服务,用于控制是否启动结果页面服务;如果使用青龙等平台部署,有专门设定的定时任务,需要更新完成后停止运行,可以关闭该功能 | True |
|
||||
| open_sort | 开启排序功能(响应速度、日期、分辨率) | True |
|
||||
| open_subscribe | 开启订阅源功能 | False |
|
||||
| open_update | 开启更新,用于控制是否更新接口,若关闭则所有工作模式(获取接口和测速)均停止 | True |
|
||||
| open_update_time | 开启显示更新时间 | True |
|
||||
| open_url_info | 开启显示接口说明信息,用于控制是否显示接口来源、分辨率、协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述,若部分播放器(如PotPlayer)不支持解析导致无法播放可关闭 | False |
|
||||
| open_use_cache | 开启使用本地缓存数据,适用于查询请求失败场景(仅针对酒店源与组播源) | True |
|
||||
| open_use_old_result | 开启使用历史更新结果(包含模板与结果文件的接口),合并至本次更新中 | True |
|
||||
| app_port | 页面服务端口,用于控制页面服务的端口号 | 8000 |
|
||||
| final_file | 生成结果文件路径 | output/result.txt |
|
||||
| hotel_num | 结果中偏好的酒店源接口数量 | 10 |
|
||||
| hotel_page_num | 酒店地区获取分页数量 | 1 |
|
||||
| hotel_region_list | 酒店源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| ipv4_num | 结果中偏好的 IPv4 接口数量 | 5 |
|
||||
| ipv6_num | 结果中偏好的 IPv6 接口数量 | 5 |
|
||||
| ipv6_support | 强制认为当前网络支持IPv6,跳过检测 | False |
|
||||
| ipv_type | 生成结果中接口的协议类型,可选值:ipv4、ipv6、全部、all | 全部 |
|
||||
| ipv_type_prefer | 接口协议类型偏好,优先将该类型的接口排在结果前面,可选值:ipv4、ipv6、自动、auto | 自动 |
|
||||
| min_resolution | 接口最小分辨率,需要开启 open_filter_resolution 才能生效 | 1920x1080 |
|
||||
| min_speed | 接口最小速率(单位M/s),需要开启 open_filter_speed 才能生效 | 0.2 |
|
||||
| multicast_num | 结果中偏好的组播源接口数量 | 10 |
|
||||
| multicast_page_num | 组播地区获取分页数量 | 1 |
|
||||
| multicast_region_list | 组播源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| online_search_num | 结果中偏好的关键字搜索接口数量 | 0 |
|
||||
| online_search_page_num | 关键字搜索频道获取分页数量 | 1 |
|
||||
| origin_type_prefer | 结果偏好的接口来源,结果优先按该顺序进行排序,逗号分隔,例如:hotel,multicast,subscribe,online_search;hotel:酒店源,multicast:组播源,subscribe:订阅源,online_search:关键字搜索;不填写则表示不指定来源,按照接口速率排序 | |
|
||||
| recent_days | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 | 30 |
|
||||
| request_timeout | 查询请求超时时长,单位秒(s),用于控制查询接口文本链接的超时时长以及重试时长,调整此值能优化更新时间 | 10 |
|
||||
| sort_timeout | 单个接口测速超时时长,单位秒(s);数值越大测速所属时间越长,能提高获取接口数量,但质量会有所下降;数值越小测速所需时间越短,能获取低延时的接口,质量较好;调整此值能优化更新时间 | 10 |
|
||||
| source_file | 模板文件路径 | config/demo.txt |
|
||||
| subscribe_num | 结果中偏好的订阅源接口数量 | 10 |
|
||||
| time_zone | 时区,可用于控制更新时间显示的时区,可选值:Asia/Shanghai 或其它时区编码 | Asia/Shanghai |
|
||||
| urls_limit | 单个频道接口数量 | 10 |
|
||||
| update_time_position | 更新时间显示位置,需要开启 open_update_time 才能生效,可选值:top、bottom,top: 显示于结果顶部,bottom: 显示于结果底部 | top |
|
||||
| 配置项 | 描述 | 默认值 |
|
||||
|:-----------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | 开启浏览器运行,若更新无数据可开启此模式,较消耗性能 | False |
|
||||
| open_empty_category | 开启无结果频道分类,自动归类至底部 | False |
|
||||
| open_filter_resolution | 开启分辨率过滤,低于最小分辨率(min_resolution)的接口将会被过滤,GUI用户需要手动安装FFmpeg,程序会自动调用FFmpeg获取接口分辨率,推荐开启,虽然会增加测速阶段耗时,但能更有效地区分是否可播放的接口 | True |
|
||||
| open_filter_speed | 开启速率过滤,低于最小速率(min_speed)的接口将会被过滤 | True |
|
||||
| open_hotel | 开启酒店源功能,关闭后所有酒店源工作模式都将关闭 | True |
|
||||
| open_hotel_foodie | 开启 Foodie 酒店源工作模式 | True |
|
||||
| open_hotel_fofa | 开启 FOFA、ZoomEye 酒店源工作模式 | True |
|
||||
| open_keep_all | 开启保留所有检索结果,会保留非模板频道名称的结果,推荐手动维护时开启 | False |
|
||||
| open_local | 开启本地源功能,将使用模板文件与本地源文件中的数据 | True |
|
||||
| open_m3u_result | 开启转换生成 m3u 文件类型结果链接,支持显示频道图标 | True |
|
||||
| open_multicast | 开启组播源功能,关闭后所有组播源工作模式都将关闭 | True |
|
||||
| open_multicast_foodie | 开启 Foodie 组播源工作模式 | True |
|
||||
| open_multicast_fofa | 开启 FOFA 组播源工作模式 | True |
|
||||
| open_online_search | 开启关键字搜索源功能 | False |
|
||||
| open_proxy | 开启代理,自动获取免费可用代理,若更新无数据可开启此模式 | False |
|
||||
| open_request | 开启查询请求,数据来源于网络(仅针对酒店源与组播源) | False |
|
||||
| open_service | 开启页面服务,用于控制是否启动结果页面服务;如果使用青龙等平台部署,有专门设定的定时任务,需要更新完成后停止运行,可以关闭该功能 | True |
|
||||
| open_sort | 开启排序功能(响应速度、日期、分辨率) | True |
|
||||
| open_subscribe | 开启订阅源功能 | False |
|
||||
| open_update | 开启更新,用于控制是否更新接口,若关闭则所有工作模式(获取接口和测速)均停止 | True |
|
||||
| open_update_time | 开启显示更新时间 | True |
|
||||
| open_url_info | 开启显示接口说明信息,用于控制是否显示接口来源、分辨率、协议类型等信息,为$符号后的内容,播放软件使用该信息对接口进行描述,若部分播放器(如PotPlayer)不支持解析导致无法播放可关闭 | False |
|
||||
| open_use_cache | 开启使用本地缓存数据,适用于查询请求失败场景(仅针对酒店源与组播源) | True |
|
||||
| open_use_old_result | 开启使用历史更新结果(包含模板与结果文件的接口),合并至本次更新中 | True |
|
||||
| app_port | 页面服务端口,用于控制页面服务的端口号 | 8000 |
|
||||
| final_file | 生成结果文件路径 | output/result.txt |
|
||||
| hotel_num | 结果中偏好的酒店源接口数量 | 10 |
|
||||
| hotel_page_num | 酒店地区获取分页数量 | 1 |
|
||||
| hotel_region_list | 酒店源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| ipv4_num | 结果中偏好的 IPv4 接口数量 | 5 |
|
||||
| ipv6_num | 结果中偏好的 IPv6 接口数量 | 5 |
|
||||
| ipv6_support | 强制认为当前网络支持IPv6,跳过检测 | False |
|
||||
| ipv_type | 生成结果中接口的协议类型,可选值:ipv4、ipv6、全部、all | 全部 |
|
||||
| ipv_type_prefer | 接口协议类型偏好,优先将该类型的接口排在结果前面,可选值:ipv4、ipv6、自动、auto | 自动 |
|
||||
| local_file | 本地源文件路径 | config/local.txt |
|
||||
| local_num | 结果中偏好的本地源接口数量 | 10 |
|
||||
| min_resolution | 接口最小分辨率,需要开启 open_filter_resolution 才能生效 | 1920x1080 |
|
||||
| min_speed | 接口最小速率(单位M/s),需要开启 open_filter_speed 才能生效 | 0.2 |
|
||||
| multicast_num | 结果中偏好的组播源接口数量 | 10 |
|
||||
| multicast_page_num | 组播地区获取分页数量 | 1 |
|
||||
| multicast_region_list | 组播源地区列表,"全部"表示所有地区 | 全部 |
|
||||
| online_search_num | 结果中偏好的关键字搜索接口数量 | 0 |
|
||||
| online_search_page_num | 关键字搜索频道获取分页数量 | 1 |
|
||||
| origin_type_prefer | 结果偏好的接口来源,结果优先按该顺序进行排序,逗号分隔,例如:local,hotel,multicast,subscribe,online_search;local:本地源,hotel:酒店源,multicast:组播源,subscribe:订阅源,online_search:关键字搜索;不填写则表示不指定来源,按照接口速率排序 | |
|
||||
| recent_days | 获取最近时间范围内更新的接口(单位天),适当减小可避免出现匹配问题 | 30 |
|
||||
| request_timeout | 查询请求超时时长,单位秒(s),用于控制查询接口文本链接的超时时长以及重试时长,调整此值能优化更新时间 | 10 |
|
||||
| sort_timeout | 单个接口测速超时时长,单位秒(s);数值越大测速所属时间越长,能提高获取接口数量,但质量会有所下降;数值越小测速所需时间越短,能获取低延时的接口,质量较好;调整此值能优化更新时间 | 10 |
|
||||
| source_file | 模板文件路径 | config/demo.txt |
|
||||
| subscribe_num | 结果中偏好的订阅源接口数量 | 10 |
|
||||
| time_zone | 时区,可用于控制更新时间显示的时区,可选值:Asia/Shanghai 或其它时区编码 | Asia/Shanghai |
|
||||
| urls_limit | 单个频道接口数量 | 10 |
|
||||
| update_time_position | 更新时间显示位置,需要开启 open_update_time 才能生效,可选值:top、bottom,top: 显示于结果顶部,bottom: 显示于结果底部 | top |
|
@ -1,51 +1,54 @@
|
||||
| Configuration Item | Description | Default Value |
|
||||
|:-----------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | Enable browser execution, If there are no updates, this mode can be enabled, which consumes more performance | False |
|
||||
| open_empty_category | Enable the No Results Channel Category, which will automatically categorize channels without results to the bottom | False |
|
||||
| open_filter_resolution | Enable resolution filtering, interfaces below the minimum resolution (min_resolution) will be filtered, GUI users need to manually install FFmpeg, the program will automatically call FFmpeg to obtain the interface resolution, it is recommended to enable, although it will increase the time-consuming of the speed measurement stage, but it can more effectively distinguish whether the interface can be played | True |
|
||||
| open_filter_speed | Enable speed filtering, interfaces with speed lower than the minimum speed (min_speed) will be filtered | True |
|
||||
| open_hotel | Enable the hotel source function, after closing it all hotel source working modes will be disabled | True |
|
||||
| open_hotel_foodie | Enable Foodie hotel source work mode | True |
|
||||
| open_hotel_fofa | Enable FOFA、ZoomEye hotel source work mode | True |
|
||||
| open_keep_all | Enable retain all search results, retain results with non-template channel names, recommended to be turned on when manually maintaining | False |
|
||||
| open_m3u_result | Enable the conversion to generate m3u file type result links, supporting the display of channel icons | True |
|
||||
| open_multicast | Enable the multicast source function, after disabling it all multicast sources will stop working | True |
|
||||
| open_multicast_foodie | Enable Foodie multicast source work mode | True |
|
||||
| open_multicast_fofa | Enable FOFA multicast source work mode | True |
|
||||
| open_online_search | Enable keyword search source feature | False |
|
||||
| open_proxy | Enable proxy, automatically obtains free available proxies, If there are no updates, this mode can be enabled | False |
|
||||
| open_request | Enable query request, the data is obtained from the network (only for hotel sources and multicast sources) | False |
|
||||
| open_service | Enable page service, used to control whether to start the result page service; if deployed on platforms like Qinglong with dedicated scheduled tasks, the function can be turned off after updates are completed and the task is stopped | True |
|
||||
| open_sort | Enable the sorting function (response speed, date, resolution) | True |
|
||||
| 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 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 | False |
|
||||
| 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 |
|
||||
| final_file | Generated result file path | output/result.txt |
|
||||
| hotel_num | The number of preferred hotel source interfaces in the results | 10 |
|
||||
| hotel_page_num | Number of pages to retrieve for hotel regions | 1 |
|
||||
| hotel_region_list | List of hotel source regions, 'all' indicates all regions | all |
|
||||
| ipv4_num | The preferred number of IPv4 interfaces in the result | 5 |
|
||||
| ipv6_num | The preferred number of IPv6 interfaces in the result | 5 |
|
||||
| ipv6_support | It is forced to consider that the current network supports IPv6 and skip the check | False |
|
||||
| ipv_type | The protocol type of interface in the generated result, optional values: ipv4, ipv6, all | all |
|
||||
| ipv_type_prefer | Interface protocol type preference, prioritize interfaces of this type in the results, optional values: ipv4, ipv6, auto | auto |
|
||||
| min_resolution | Minimum interface resolution, requires enabling open_filter_resolution to take effect | 1920x1080 |
|
||||
| min_speed | Minimum interface speed (M/s), requires enabling open_filter_speed to take effect | 0.2 |
|
||||
| multicast_num | The number of preferred multicast source interfaces in the results | 10 |
|
||||
| multicast_page_num | Number of pages to retrieve for multicast regions | 1 |
|
||||
| multicast_region_list | Multicast source region list, 'all' indicates all regions | all |
|
||||
| online_search_num | The number of preferred keyword search interfaces in the results | 0 |
|
||||
| online_search_page_num | Page retrieval quantity for keyword search channels | 1 |
|
||||
| origin_type_prefer | Preferred interface source of the result, the result is sorted according to this order, separated by commas, for example: hotel, multicast, subscribe, online_search; hotel: hotel source, multicast: multicast source, subscribe: subscription source, online_search: keyword search; If not filled in, it means that the source is not specified, and it is sorted according to the interface rate | |
|
||||
| recent_days | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues | 30 |
|
||||
| request_timeout | Query request timeout duration, in seconds (s), used to control the timeout and retry duration for querying interface text links. Adjusting this value can optimize update time. | 10 |
|
||||
| sort_timeout | The timeout duration for speed testing of a single interface, in seconds (s). A larger value means a longer testing period, which can increase the number of interfaces obtained but may decrease their quality. A smaller value means a shorter testing time, which can obtain low-latency interfaces with better quality. Adjusting this value can optimize the update time. | 10 |
|
||||
| source_file | Template file path | config/demo.txt |
|
||||
| subscribe_num | The number of preferred subscribe source interfaces in the results | 10 |
|
||||
| time_zone | Time zone, can be used to control the time zone displayed by the update time, optional values: Asia/Shanghai or other time zone codes | Asia/Shanghai |
|
||||
| urls_limit | Number of interfaces per channel | 10 |
|
||||
| update_time_position | Update time display position, need to enable open_update_time to take effect, optional values: top, bottom, top: display at the top of the result, bottom: display at the bottom of the result | top |
|
||||
| Configuration Item | Description | Default Value |
|
||||
|:-----------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
|
||||
| open_driver | Enable browser execution, If there are no updates, this mode can be enabled, which consumes more performance | False |
|
||||
| open_empty_category | Enable the No Results Channel Category, which will automatically categorize channels without results to the bottom | False |
|
||||
| open_filter_resolution | Enable resolution filtering, interfaces below the minimum resolution (min_resolution) will be filtered, GUI users need to manually install FFmpeg, the program will automatically call FFmpeg to obtain the interface resolution, it is recommended to enable, although it will increase the time-consuming of the speed measurement stage, but it can more effectively distinguish whether the interface can be played | True |
|
||||
| open_filter_speed | Enable speed filtering, interfaces with speed lower than the minimum speed (min_speed) will be filtered | True |
|
||||
| open_hotel | Enable the hotel source function, after closing it all hotel source working modes will be disabled | True |
|
||||
| open_hotel_foodie | Enable Foodie hotel source work mode | True |
|
||||
| open_hotel_fofa | Enable FOFA、ZoomEye hotel source work mode | True |
|
||||
| open_keep_all | Enable retain all search results, retain results with non-template channel names, recommended to be turned on when manually maintaining | False |
|
||||
| open_local | Enable local source function, will use the data in the template file and the local source file | True |
|
||||
| open_m3u_result | Enable the conversion to generate m3u file type result links, supporting the display of channel icons | True |
|
||||
| open_multicast | Enable the multicast source function, after disabling it all multicast sources will stop working | True |
|
||||
| open_multicast_foodie | Enable Foodie multicast source work mode | True |
|
||||
| open_multicast_fofa | Enable FOFA multicast source work mode | True |
|
||||
| open_online_search | Enable keyword search source feature | False |
|
||||
| open_proxy | Enable proxy, automatically obtains free available proxies, If there are no updates, this mode can be enabled | False |
|
||||
| open_request | Enable query request, the data is obtained from the network (only for hotel sources and multicast sources) | False |
|
||||
| open_service | Enable page service, used to control whether to start the result page service; if deployed on platforms like Qinglong with dedicated scheduled tasks, the function can be turned off after updates are completed and the task is stopped | True |
|
||||
| open_sort | Enable the sorting function (response speed, date, resolution) | True |
|
||||
| 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 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 | False |
|
||||
| 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 |
|
||||
| final_file | Generated result file path | output/result.txt |
|
||||
| hotel_num | The number of preferred hotel source interfaces in the results | 10 |
|
||||
| hotel_page_num | Number of pages to retrieve for hotel regions | 1 |
|
||||
| hotel_region_list | List of hotel source regions, 'all' indicates all regions | all |
|
||||
| ipv4_num | The preferred number of IPv4 interfaces in the result | 5 |
|
||||
| ipv6_num | The preferred number of IPv6 interfaces in the result | 5 |
|
||||
| ipv6_support | It is forced to consider that the current network supports IPv6 and skip the check | False |
|
||||
| ipv_type | The protocol type of interface in the generated result, optional values: ipv4, ipv6, all | all |
|
||||
| ipv_type_prefer | Interface protocol type preference, prioritize interfaces of this type in the results, optional values: ipv4, ipv6, auto | auto |
|
||||
| local_file | Local source file path | config/local.txt |
|
||||
| local_num | Preferred number of local source interfaces in the result | 10 |
|
||||
| min_resolution | Minimum interface resolution, requires enabling open_filter_resolution to take effect | 1920x1080 |
|
||||
| min_speed | Minimum interface speed (M/s), requires enabling open_filter_speed to take effect | 0.2 |
|
||||
| multicast_num | The number of preferred multicast source interfaces in the results | 10 |
|
||||
| multicast_page_num | Number of pages to retrieve for multicast regions | 1 |
|
||||
| multicast_region_list | Multicast source region list, 'all' indicates all regions | all |
|
||||
| online_search_num | The number of preferred keyword search interfaces in the results | 0 |
|
||||
| online_search_page_num | Page retrieval quantity for keyword search channels | 1 |
|
||||
| origin_type_prefer | Preferred interface source of the result, the result is sorted according to this order, separated by commas, for example: local, hotel, multicast, subscribe, online_search; local: local source, hotel: hotel source, multicast: multicast source, subscribe: subscription source, online_search: keyword search; If not filled in, it means that the source is not specified, and it is sorted according to the interface rate | |
|
||||
| recent_days | Retrieve interfaces updated within a recent time range (in days), reducing appropriately can avoid matching issues | 30 |
|
||||
| request_timeout | Query request timeout duration, in seconds (s), used to control the timeout and retry duration for querying interface text links. Adjusting this value can optimize update time. | 10 |
|
||||
| sort_timeout | The timeout duration for speed testing of a single interface, in seconds (s). A larger value means a longer testing period, which can increase the number of interfaces obtained but may decrease their quality. A smaller value means a shorter testing time, which can obtain low-latency interfaces with better quality. Adjusting this value can optimize the update time. | 10 |
|
||||
| source_file | Template file path | config/demo.txt |
|
||||
| subscribe_num | The number of preferred subscribe source interfaces in the results | 10 |
|
||||
| time_zone | Time zone, can be used to control the time zone displayed by the update time, optional values: Asia/Shanghai or other time zone codes | Asia/Shanghai |
|
||||
| urls_limit | Number of interfaces per channel | 10 |
|
||||
| update_time_position | Update time display position, need to enable open_update_time to take effect, optional values: top, bottom, top: display at the top of the result, bottom: display at the bottom of the result | top |
|
@ -1,6 +1,7 @@
|
||||
import os
|
||||
import tkinter as tk
|
||||
from tkinter import filedialog
|
||||
from tkinter import messagebox
|
||||
from tkinter import ttk
|
||||
|
||||
import utils.constants as constants
|
||||
@ -36,6 +37,42 @@ class DefaultUI:
|
||||
)
|
||||
self.source_file_button.pack(side=tk.LEFT, padx=4, pady=0)
|
||||
|
||||
self.source_file_edit_button = tk.ttk.Button(
|
||||
frame_default_source_file_column2,
|
||||
text="编辑",
|
||||
command=lambda: self.edit_file(config.source_file),
|
||||
)
|
||||
self.source_file_edit_button.pack(side=tk.LEFT, padx=4, pady=0)
|
||||
|
||||
frame_default_local_file = tk.Frame(root)
|
||||
frame_default_local_file.pack(fill=tk.X)
|
||||
frame_default_local_file_column1 = tk.Frame(frame_default_local_file)
|
||||
frame_default_local_file_column1.pack(side=tk.LEFT, fill=tk.BOTH, expand=True)
|
||||
frame_default_local_file_column2 = tk.Frame(frame_default_local_file)
|
||||
frame_default_local_file_column2.pack(side=tk.RIGHT, fill=tk.Y)
|
||||
|
||||
self.local_file_label = tk.Label(
|
||||
frame_default_local_file_column1, text="本地源文件:", width=8
|
||||
)
|
||||
self.local_file_entry = tk.Entry(frame_default_local_file_column1)
|
||||
self.local_file_label.pack(side=tk.LEFT, padx=4, pady=8)
|
||||
self.local_file_entry.pack(fill=tk.X, padx=4, expand=True)
|
||||
self.local_file_entry.insert(0, config.local_file)
|
||||
|
||||
self.local_file_button = tk.ttk.Button(
|
||||
frame_default_local_file_column2,
|
||||
text="选择文件",
|
||||
command=self.select_local_file,
|
||||
)
|
||||
self.local_file_button.pack(side=tk.LEFT, padx=4, pady=0)
|
||||
|
||||
self.local_file_edit_button = tk.ttk.Button(
|
||||
frame_default_local_file_column2,
|
||||
text="编辑",
|
||||
command=lambda: self.edit_file(config.local_file),
|
||||
)
|
||||
self.local_file_edit_button.pack(side=tk.LEFT, padx=4, pady=0)
|
||||
|
||||
frame_default_final_file = tk.Frame(root)
|
||||
frame_default_final_file.pack(fill=tk.X)
|
||||
frame_default_final_file_column1 = tk.Frame(frame_default_final_file)
|
||||
@ -58,6 +95,13 @@ class DefaultUI:
|
||||
)
|
||||
self.final_file_button.pack(side=tk.LEFT, padx=4, pady=0)
|
||||
|
||||
self.final_file_edit_button = tk.ttk.Button(
|
||||
frame_default_final_file_column2,
|
||||
text="编辑",
|
||||
command=lambda: self.edit_file(config.final_file),
|
||||
)
|
||||
self.final_file_edit_button.pack(side=tk.LEFT, padx=4, pady=0)
|
||||
|
||||
frame_default_open_update = tk.Frame(root)
|
||||
frame_default_open_update.pack(fill=tk.X)
|
||||
frame_default_open_update_column1 = tk.Frame(frame_default_open_update)
|
||||
@ -109,13 +153,27 @@ class DefaultUI:
|
||||
frame_default_open_cache_column2 = tk.Frame(frame_default_open_cache)
|
||||
frame_default_open_cache_column2.pack(side=tk.RIGHT, fill=tk.Y)
|
||||
|
||||
self.open_local_label = tk.Label(
|
||||
frame_default_open_cache_column1, text="开启本地源:", width=12
|
||||
)
|
||||
self.open_local_label.pack(side=tk.LEFT, padx=4, pady=8)
|
||||
self.open_local_var = tk.BooleanVar(value=config.open_local)
|
||||
self.open_local_checkbutton = ttk.Checkbutton(
|
||||
frame_default_open_cache_column1,
|
||||
variable=self.open_local_var,
|
||||
onvalue=True,
|
||||
offvalue=False,
|
||||
command=self.update_open_local,
|
||||
)
|
||||
self.open_local_checkbutton.pack(side=tk.LEFT, padx=4, pady=8)
|
||||
|
||||
self.open_use_old_result_label = tk.Label(
|
||||
frame_default_open_cache_column1, text="使用历史结果:", width=12
|
||||
frame_default_open_cache_column2, text="使用历史结果:", width=12
|
||||
)
|
||||
self.open_use_old_result_label.pack(side=tk.LEFT, padx=4, pady=8)
|
||||
self.open_use_old_result_var = tk.BooleanVar(value=config.open_use_old_result)
|
||||
self.open_use_old_result_checkbutton = ttk.Checkbutton(
|
||||
frame_default_open_cache_column1,
|
||||
frame_default_open_cache_column2,
|
||||
variable=self.open_use_old_result_var,
|
||||
onvalue=True,
|
||||
offvalue=False,
|
||||
@ -407,6 +465,11 @@ class DefaultUI:
|
||||
def update_app_port(self, event):
|
||||
config.set("Settings", "app_port", self.app_port_entry.get())
|
||||
|
||||
def update_open_local(self):
|
||||
config.set(
|
||||
"Settings", "open_local", str(self.open_local_var.get())
|
||||
)
|
||||
|
||||
def update_open_use_old_result(self):
|
||||
config.set(
|
||||
"Settings", "open_use_old_result", str(self.open_use_old_result_var.get())
|
||||
@ -426,6 +489,15 @@ class DefaultUI:
|
||||
self.source_file_entry.insert(0, filepath)
|
||||
config.set("Settings", "source_file", filepath)
|
||||
|
||||
def select_local_file(self):
|
||||
filepath = filedialog.askopenfilename(
|
||||
initialdir=os.getcwd(), title="选择本地源文件", filetypes=[("txt", "*.txt")]
|
||||
)
|
||||
if filepath:
|
||||
self.local_file_entry.delete(0, tk.END)
|
||||
self.local_file_entry.insert(0, filepath)
|
||||
config.set("Settings", "local_file", filepath)
|
||||
|
||||
def select_final_file(self):
|
||||
filepath = filedialog.askopenfilename(
|
||||
initialdir=os.getcwd(), title="选择结果文件", filetypes=[("txt", "*.txt")]
|
||||
@ -482,21 +554,25 @@ class DefaultUI:
|
||||
config.set("Settings", "update_time_position",
|
||||
'bottom' if self.update_time_position_combo.get() == '底部' else 'top')
|
||||
|
||||
def edit_whitelist_file(self):
|
||||
path = resource_path(constants.whitelist_path)
|
||||
if os.path.exists(path):
|
||||
def edit_file(self, path):
|
||||
if os.path.exists(resource_path(path)):
|
||||
os.system(f'notepad.exe {path}')
|
||||
else:
|
||||
print(f"File {path} not found!")
|
||||
messagebox.showerror("Error", f"File {path} not found!")
|
||||
|
||||
def edit_whitelist_file(self):
|
||||
self.edit_file(constants.whitelist_path)
|
||||
|
||||
def edit_blacklist_file(self):
|
||||
path = resource_path(constants.blacklist_path)
|
||||
if os.path.exists(path):
|
||||
os.system(f'notepad.exe {path}')
|
||||
self.edit_file(constants.blacklist_path)
|
||||
|
||||
def change_entry_state(self, state):
|
||||
for entry in [
|
||||
"open_update_checkbutton",
|
||||
"open_service_checkbutton",
|
||||
"app_port_entry",
|
||||
"open_local_checkbutton",
|
||||
"open_use_old_result_checkbutton",
|
||||
"open_use_cache_checkbutton",
|
||||
"open_request_checkbutton",
|
||||
@ -505,9 +581,14 @@ class DefaultUI:
|
||||
"request_timeout_entry",
|
||||
"source_file_entry",
|
||||
"source_file_button",
|
||||
"source_file_edit_button",
|
||||
"time_zone_entry",
|
||||
"final_file_entry",
|
||||
"final_file_button",
|
||||
"final_file_edit_button",
|
||||
"local_file_entry",
|
||||
"local_file_button",
|
||||
"local_file_edit_button",
|
||||
"open_keep_all_checkbutton",
|
||||
"open_m3u_result_checkbutton",
|
||||
"urls_limit_entry",
|
||||
|
@ -14,11 +14,11 @@ class PreferUI:
|
||||
for i, value in enumerate(self.get_origin_type_prefer_index(config.origin_type_prefer))
|
||||
]
|
||||
self.origin_type_prefer_options = []
|
||||
for config_option in config_options:
|
||||
for i, config_option in enumerate(config_options):
|
||||
option = ConfigOption(root, **config_option)
|
||||
option.combo_box.bind(
|
||||
"<<ComboboxSelected>>",
|
||||
option.update_select,
|
||||
lambda event, opt=option, index=i: opt.update_select(event, index),
|
||||
)
|
||||
option.entry.bind("<KeyRelease>", option.update_input)
|
||||
self.origin_type_prefer_options.append(option)
|
||||
@ -65,12 +65,13 @@ class PreferUI:
|
||||
self.open_supply_checkbutton.pack(side=tk.LEFT, padx=4, pady=8)
|
||||
|
||||
def get_origin_type_prefer_index(self, origin_type_prefer):
|
||||
index_list = [None, None, None, None]
|
||||
index_list = [None, None, None, None, None]
|
||||
origin_type_prefer_obj = {
|
||||
"hotel": 0,
|
||||
"multicast": 1,
|
||||
"subscribe": 2,
|
||||
"online_search": 3,
|
||||
"local": 0,
|
||||
"hotel": 1,
|
||||
"multicast": 2,
|
||||
"subscribe": 3,
|
||||
"online_search": 4,
|
||||
}
|
||||
for i, item in enumerate(origin_type_prefer):
|
||||
index_list[i] = origin_type_prefer_obj[item]
|
||||
@ -147,6 +148,7 @@ class ConfigOption:
|
||||
|
||||
self.combo_box = ttk.Combobox(self.column1)
|
||||
self.origin_type_prefer_obj = {
|
||||
"本地源": "local",
|
||||
"酒店源": "hotel",
|
||||
"组播源": "multicast",
|
||||
"订阅源": "subscribe",
|
||||
@ -172,15 +174,26 @@ class ConfigOption:
|
||||
)
|
||||
self.entry.pack(side=tk.LEFT, padx=4, pady=8)
|
||||
|
||||
def update_select(self, key):
|
||||
origin_type_prefer_list = [item.lower() for item in config.origin_type_prefer]
|
||||
def update_select(self, event, index):
|
||||
origin_type_prefer_list = [''] * 5
|
||||
prefer_list = [
|
||||
origin.strip().lower()
|
||||
for origin in config.get(
|
||||
"Settings",
|
||||
"origin_type_prefer",
|
||||
fallback="",
|
||||
).split(",")
|
||||
]
|
||||
for i, value in enumerate(prefer_list):
|
||||
origin_type_prefer_list[i] = value
|
||||
select_value = self.origin_type_prefer_obj[
|
||||
self.combo_box.get()
|
||||
]
|
||||
if self.combo_box_value < len(origin_type_prefer_list):
|
||||
origin_type_prefer_list[self.combo_box_value] = select_value
|
||||
else:
|
||||
origin_type_prefer_list.append(select_value)
|
||||
origin_type_prefer_list[index] = select_value
|
||||
self.entry.insert(
|
||||
0,
|
||||
config.source_limits[self.origin_type_prefer_obj[self.combo_box.get()]],
|
||||
)
|
||||
config.set(
|
||||
"Settings",
|
||||
"origin_type_prefer",
|
||||
|
@ -232,7 +232,7 @@ def get_root_location(root):
|
||||
screen_width = root.winfo_screenwidth()
|
||||
screen_height = root.winfo_screenheight()
|
||||
width = 500
|
||||
height = 650
|
||||
height = 700
|
||||
x = (screen_width / 2) - (width / 2)
|
||||
y = (screen_height / 2) - (height / 2)
|
||||
return (width, height, x, y)
|
||||
|
@ -34,7 +34,17 @@ from utils.tools import (
|
||||
)
|
||||
|
||||
|
||||
def get_channel_data_from_file(channels, file, use_old, whitelist):
|
||||
def format_channel_data(url: str, origin: str = None) -> tuple:
|
||||
"""
|
||||
Format the channel data
|
||||
"""
|
||||
info = url.partition("$")[2]
|
||||
url_origin = "whitelist" if info and info.startswith("!") else origin
|
||||
url = format_url_with_cache(url) if url_origin == origin else url
|
||||
return url, None, None, url_origin
|
||||
|
||||
|
||||
def get_channel_data_from_file(channels, file, whitelist, open_local=config.open_local, local_data=None):
|
||||
"""
|
||||
Get the channel data from the file
|
||||
"""
|
||||
@ -57,13 +67,15 @@ def get_channel_data_from_file(channels, file, use_old, whitelist):
|
||||
if name in whitelist:
|
||||
for whitelist_url in whitelist[name]:
|
||||
category_dict[name].append((whitelist_url, None, None, "whitelist"))
|
||||
if use_old and url:
|
||||
info = url.partition("$")[2]
|
||||
origin = "whitelist" if info and info.startswith("!") else "local"
|
||||
url = format_url_with_cache(url) if origin == "local" else url
|
||||
data = (url, None, None, origin)
|
||||
if open_local and url:
|
||||
data = format_channel_data(url, "local")
|
||||
if data not in category_dict[name]:
|
||||
category_dict[name].append(data)
|
||||
if local_data and name in local_data:
|
||||
for local_url in local_data[name]:
|
||||
local_channel_data = format_channel_data(local_url, "local")
|
||||
if local_channel_data not in category_dict[name]:
|
||||
category_dict[name].append(local_channel_data)
|
||||
return channels
|
||||
|
||||
|
||||
@ -73,6 +85,7 @@ def get_channel_items():
|
||||
"""
|
||||
user_source_file = resource_path(config.source_file)
|
||||
channels = defaultdict(lambda: defaultdict(list))
|
||||
local_data = get_name_urls_from_file(resource_path(config.local_file))
|
||||
whitelist = get_name_urls_from_file(constants.whitelist_path)
|
||||
whitelist_urls = get_urls_from_file(constants.whitelist_path)
|
||||
whitelist_len = len(list(whitelist.keys()))
|
||||
@ -82,7 +95,7 @@ def get_channel_items():
|
||||
if os.path.exists(user_source_file):
|
||||
with open(user_source_file, "r", encoding="utf-8") as file:
|
||||
channels = get_channel_data_from_file(
|
||||
channels, file, config.open_use_old_result, whitelist
|
||||
channels, file, whitelist, config.open_local, local_data
|
||||
)
|
||||
|
||||
if config.open_use_old_result:
|
||||
|
@ -140,6 +140,7 @@ class ConfigManager:
|
||||
@property
|
||||
def source_limits(self):
|
||||
return {
|
||||
"local": self.local_num,
|
||||
"hotel": self.hotel_num,
|
||||
"multicast": self.multicast_num,
|
||||
"subscribe": self.subscribe_num,
|
||||
@ -315,6 +316,18 @@ class ConfigManager:
|
||||
def time_zone(self):
|
||||
return self.config.get("Settings", "time_zone", fallback="Asia/Shanghai")
|
||||
|
||||
@property
|
||||
def open_local(self):
|
||||
return self.config.getboolean("Settings", "open_local", fallback=True)
|
||||
|
||||
@property
|
||||
def local_file(self):
|
||||
return self.config.get("Settings", "local_file", fallback="config/local.txt")
|
||||
|
||||
@property
|
||||
def local_num(self):
|
||||
return self.config.getint("Settings", "local_num", fallback=10)
|
||||
|
||||
def load(self):
|
||||
"""
|
||||
Load the config
|
||||
|
Loading…
x
Reference in New Issue
Block a user