service

package
v0.0.0-...-0792a65 Latest Latest
Warning

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

Go to latest
Published: Jul 25, 2024 License: GPL-3.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Unknown = iota
	Ok
	Warning
	Error
	Expired
)
View Source
const DefaultUserAgent string = "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/122.0.0.0 Safari/537.36"
View Source
const MaxRetryCount = 5
View Source
const SALT string = "LiVeTv"

Variables

This section is empty.

Functions

func DeleteChannel

func DeleteChannel(id uint) error

func DeleteStatus

func DeleteStatus(url any)

func GetAllChannel

func GetAllChannel() (channels []model.Channel, err error)

func GetChannel

func GetChannel(channelNumber uint) (channel model.Channel, err error)

func GetChannelLiveStream

func GetChannelLiveStream(channelName string) (string, error)

func GetLiveM3U8

func GetLiveM3U8(youtubeURL string, proxyUrl string, Parser string) (*model.LiveInfo, error)

func GetM3U8Content

func GetM3U8Content(ChannelURL string, liveM3U8 string, ProxyUrl string, Parser string, flags ...bool) (string, string, error)

returns: content, updated m3u8url (if needed), error

func GetVideoDuration

func GetVideoDuration(url string) (float64, error)

func GetYouTubeChannelID

func GetYouTubeChannelID(url string) string

func LoadChannelCache

func LoadChannelCache()

func M3U8Process

func M3U8Process(playlistUrl string, data string, prefixURL string, proxyToken string, proxy bool, fnTransform func(raw string, ts string) string) string

func M3UGenerate

func M3UGenerate() (string, error)

func PlaceHolderHLS

func PlaceHolderHLS() string

func RealLiveM3U8

func RealLiveM3U8(liveUrl string, proxyUrl string, Parser string) (*model.LiveInfo, error)

func SaveChannel

func SaveChannel(channel model.Channel) error

func UpdateStatus

func UpdateStatus(url any, status int, msg string)

func UpdateURLCache

func UpdateURLCache()

func UpdateURLCacheSingle

func UpdateURLCacheSingle(Url string, proxyUrl string, Parser string, bUpdateStatus bool) (*model.LiveInfo, error)

Types

type Dialer

type Dialer interface {
	// Dial connects to the given address via the proxy.
	Dial(network, addr string) (c net.Conn, err error)
}

A Dialer is a means to establish a connection. Custom dialers should also implement ContextDialer.

type StatusInfo

type StatusInfo struct {
	Time               time.Time
	CoolDownMultiplier int
	RetryCount         int
	Status             int
	Msg                string
}

func GetStatus

func GetStatus(url any) *StatusInfo

Jump to

Keyboard shortcuts

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