Skip to content

Commit

Permalink
fix live type for tvbox
Browse files Browse the repository at this point in the history
  • Loading branch information
sec-an committed Jan 20, 2023
1 parent 89d6020 commit edb55c8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions configs/config/default.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@

{
"subscribe": [{
// "url": "https://hutool.ml/tang",
"url": "http://刚刚.live/猫",
"url": "https://hutool.ml/tang",
// "url": "http://刚刚.live/猫",
"multi-jar": false
}],
"lives": [],
Expand Down
3 changes: 2 additions & 1 deletion configs/config/sample.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,15 @@
"lives": [
{
"name": "直播",
// txt为0,json为1(仅影视支持json)
"type": 1,
// 可以在live文件夹中添加本地直播文件
// 格式为:http://你的ip:16214/live/文件名.后缀
// 示例:http://你的ip:16214/live/IPTV.m3u
"url": "https://gh-proxy.com/https://raw.githubusercontent.com/FongMi/CatVodSpider/main/json/live.json",
"epg": "http://epg.51zmt.top:8000/api/diyp/?ch={epg}&date={date}",
"logo": "http://epg.51zmt.top:8000/{logo}",
// 是否自动开启
// 是否自动开启(仅影视支持)
"boot": true,
// 播放器,1:IJK,2:EXO
"playerType": 1
Expand Down
4 changes: 2 additions & 2 deletions internal/common/live.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
)

type Live struct {
Type int `json:"type,omitempty"`
Type int `json:"type"`
Boot bool `json:"boot,omitempty"`
Name string `json:"name,omitempty"`
Group string `json:"group,omitempty"`
Expand All @@ -29,7 +29,7 @@ func (l *Live) UnmarshalJSON(data []byte) error {
type TempLive Live
lr := struct {
*TempLive
Type interface{} `json:"type,omitempty"`
Type interface{} `json:"type"`
PlayerType interface{} `json:"playerType,omitempty"`
Boot interface{} `json:"boot,omitempty"`
}{
Expand Down

0 comments on commit edb55c8

Please sign in to comment.