m3uparser

package
v0.0.0-...-58d64dd Latest Latest
Warning

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

Go to latest
Published: May 27, 2023 License: MIT Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Get

func Get(URL string, userAgent string, timeout time.Duration) (*http.Response, error)

Get - requests

Types

type Channel

type Channel map[string]interface{}

Channel - Map containing streams information.

type M3uParser

type M3uParser struct {
	Timeout   int
	UserAgent string
	CheckLive bool
	// contains filtered or unexported fields
}

M3uParser - A parser for m3u files.

func (*M3uParser) FilterBy

func (p *M3uParser) FilterBy(key string, filters []string, retrieve bool)

FilterBy - Filter streams infomation.

func (*M3uParser) GetRandomStream

func (p *M3uParser) GetRandomStream(shuffle bool) Channel

GetRandomStream - Return a random stream information.

func (*M3uParser) GetStreamsJSON

func (p *M3uParser) GetStreamsJSON() string

GetStreamsJSON - Get the streams information as json.

func (*M3uParser) GetStreamsSlice

func (p *M3uParser) GetStreamsSlice() []Channel

GetStreamsSlice - Get the parsed streams information slice.

func (*M3uParser) ParseM3u

func (p *M3uParser) ParseM3u(path string, checkLive bool, enforceSchema bool)

ParseM3u - Parses the content of local file/URL.

func (*M3uParser) RemoveByCategory

func (p *M3uParser) RemoveByCategory(category []string)

RemoveByCategory - Removes streams information with category containing a certain filter word/s.

func (*M3uParser) RemoveByExtension

func (p *M3uParser) RemoveByExtension(extension []string)

RemoveByExtension - Remove stream information with certain extension/s.

func (*M3uParser) ResetOperations

func (p *M3uParser) ResetOperations()

ResetOperations - Reset the stream information list to initial state before various operations.

func (*M3uParser) RetrieveByCategory

func (p *M3uParser) RetrieveByCategory(category []string)

RetrieveByCategory - Retrieve only streams information that contains a certain filter word/s.

func (*M3uParser) RetrieveByExtension

func (p *M3uParser) RetrieveByExtension(extension []string)

RetrieveByExtension - Select only streams information with a certain extension/s.

func (*M3uParser) SortBy

func (p *M3uParser) SortBy(key string, asc bool)

SortBy - Sort streams information.

func (*M3uParser) ToFile

func (p *M3uParser) ToFile(fileName string)

Jump to

Keyboard shortcuts

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