model

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type M3U8Spec

type M3U8Spec struct {
	Filename string `json:"filename"`
	KeyName  string `json:"keyName"`
	RawQuery string `json:"rawQuery"`
}

M3U8Spec declares the information of m3u8 playlist, presents m3u8 filename and crypto key filename

type TSLink struct {
	Link        string `json:"link"`
	BaseUrl     string `json:"baseUrl"`
	QueryString string `json:"queryString"`
	Filename    string `json:"filename"`
}

TSLink declares the information of ts file in m3u8 playlist, presents link, base url, query string and the most important filename

func NewTSLink(link string) *TSLink

NewTSLink returns an object which contains the information of ts file

type Task

type Task struct {
	Prefix  string    `json:"prefix"`
	SaveTo  string    `json:"saveTo"`
	PageUrl string    `json:"pageUrl"`
	Spec    *M3U8Spec `json:"spec"`
}

Task declares the download task

func (*Task) KeyUrl

func (t *Task) KeyUrl() string

KeyUrl assembles the download link of m3u8 crypto key, returns empty string if key is not defined

func (*Task) M3U8Url

func (t *Task) M3U8Url() string

M3U8Url assembles the download link of m3u8 playlist file

Jump to

Keyboard shortcuts

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