subm3u

package
v1.22.10 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 11, 2025 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxCacheSize = 10 // 内存中维护的订阅列表的最大个数
)

Variables

View Source
var (
	TvgIdReg      = regexp.MustCompile(`tvg-id="([^"]*)"`)
	TvgNameReg    = regexp.MustCompile(`tvg-name="([^"]*)"`)
	TvgLogoReg    = regexp.MustCompile(`tvg-logo="([^"]*)"`)
	GroupTitleReg = regexp.MustCompile(`group-title="([^"]*)"`)
	CustomNameReg = regexp.MustCompile(`,\s*([^,]*)$`)
)

Functions

func ReadContent

func ReadContent(content string) (map[string][]Info, error)

ReadContent 将 m3u8 原始文件整理成 Info 信息

Types

type Info

type Info struct {
	TvgName    string // 电视台名称
	TvgId      string // 电视台 Id
	GroupTitle string // 分类
	CustomName string // 自定义的电台名称
	Url        string // 直播源地址
}

Info m3u 格式电视直播的电视台信息封装

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL