utils

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CalcSizeInByte

func CalcSizeInByte(number float64, unit string) int64

CalcSizeInByte func

func GetFileExt

func GetFileExt(str string) string

GetFileExt from simple string

func GetH1

func GetH1(htmlString *string, idx int) string

GetH1 of html - file idx -1 = last h1 found - if index out of range set to last h1

func GetLastItemString

func GetLastItemString(slice []string) string

GetLastItemString of slice

func GetMediaType

func GetMediaType(t string) static.DataType

GetMediaType e.g. put in png get image, mp4 -> video

func GetMeta

func GetMeta(htmlString *string, property string) string

GetMeta of html file

func NeedDownloadList

func NeedDownloadList(length int) []int

NeedDownloadList return the indices of gallery that need download

func ParseHLSMaster added in v1.2.4

func ParseHLSMaster(master *string) ([]*static.Stream, error)

ParseHLSMaster into static.Stream to prefill the structure returns a pre filled structure where URLs[0].URL is the media stream URI

func RemoveAdjDuplicates

func RemoveAdjDuplicates(slice []string) []string

RemoveAdjDuplicates of string slice

func Wrap

func Wrap(err error, ctx string) error

Wrap error with context

Types

This section is empty.

Jump to

Keyboard shortcuts

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