Skip to content

Commit a3e1e51

Browse files
committed
自动保存channel.txt
1 parent 61a98ae commit a3e1e51

File tree

7 files changed

+3
-297
lines changed

7 files changed

+3
-297
lines changed

cmd/iptv/cmds/serve.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ type HttpConfig struct {
2525
func NewServeCLI() *cobra.Command {
2626
serveCmd := &cobra.Command{
2727
Use: "serve",
28-
Short: "启动HTTP服务,提供直播源、EPG等查询接口。",
28+
Short: "启动HTTP服务,提供直播源等查询接口。",
2929
RunE: func(cmd *cobra.Command, args []string) error {
3030
// 读取直播配置
3131
if httpConfig.LiveFile != "" {

config.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -88,9 +88,4 @@ hwctc:
8888
userField:
8989
softwareVersion:
9090
isSmartStb:
91-
vip:
92-
93-
# 获取EPG信息的API
94-
# 目前支持3种:"liveplay_30","gdhdpublic"或"vsp"
95-
# 未设置时,将自动进行尝试。
96-
channelProgramAPI:
91+
vip:

internal/app/iptv/hwctc/hwctc_config.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import (
77
type Config struct {
88
InterfaceName string `json:"interfaceName" yaml:"interfaceName"` // 网络接口的名称。若配置则生成Authenticator时,优先使用该接口对应的IPv4地址,而不使用`ip`字段的值。
99
// 以下信息均可通过抓包获取
10-
IP string `json:"ip" yaml:"ip"` // 生成Authenticator所需的IP地址。可随便一个地址,或者通过配置`interfaceName`动态获取
11-
ChannelProgramAPI string `json:"channelProgramAPI,omitempty" yaml:"channelProgramAPI,omitempty"` // 请求频道节目信息(EPG)的API接口,目前只支持两种:liveplay_30或者gdhdpublic。
10+
IP string `json:"ip" yaml:"ip"` // 生成Authenticator所需的IP地址。可随便一个地址,或者通过配置`interfaceName`动态获取
1211
// 以下信息均可通过抓包请求ValidAuthenticationHWCTC.jsp的参数拿到
1312
UserID string `json:"userID" yaml:"userID"`
1413
Lang string `json:"lang,omitempty" yaml:"lang,omitempty"` // 如果没有可以不填

internal/app/router/config_controller.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ type Live struct {
1515
Name string `json:"name"` // 配置名称
1616
Boot bool `json:"boot"` // 是否自启动
1717
Url string `json:"url"` // 直播源地址
18-
Epg string `json:"epg,omitempty"` // 节目地址
1918
Logo string `json:"logo,omitempty"` // 台标地址
2019
Pass bool `json:"pass,omitempty"` // 是否免密码
2120
Ua string `json:"ua,omitempty"` // 用户代理

internal/app/router/epg_controller.go

Lines changed: 0 additions & 277 deletions
This file was deleted.

internal/app/router/router.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,6 @@ func initData(ctx context.Context, iptvClient iptv.Client) error {
7878
if err := updateChannelsWithRetry(ctx, iptvClient, 3); err != nil {
7979
return err
8080
}
81-
82-
// 更新节目单
83-
if err := updateEPG(ctx, iptvClient); err != nil {
84-
return err
85-
}
8681
return nil
8782
}
8883

internal/app/router/scheduler.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,6 @@ func Schedule(ctx context.Context, iptvClient iptv.Client, duration time.Duratio
2828
logger.Error("Failed to update channel list.", zap.Error(err))
2929
}
3030

31-
// 更新节目单数据
32-
if err := updateEPG(ctx, iptvClient); err != nil {
33-
logger.Error("Failed to update EPG.", zap.Error(err))
34-
}
35-
3631
logger.Info("The scheduling task has been completed.")
3732
}
3833
}

0 commit comments

Comments
 (0)