helper

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func BuildPathIfNotExist

func BuildPathIfNotExist(path string) error

func BytesReverse

func BytesReverse(b []byte) []byte

func ExistsPath

func ExistsPath(path string) (bool, error)

func HtmlTitle

func HtmlTitle(text string) string

func M3u8ToMp4

func M3u8ToMp4(file string) (string, error)

func MayStringToInt64

func MayStringToInt64(s string) int64

func Rename

func Rename(old, new string) error

func ResolveDirOrCurrent

func ResolveDirOrCurrent(dir string) (string, error)

func RunJsCode

func RunJsCode(code string) (string, error)

func TrimFileExt

func TrimFileExt(s string) string

func TrimInvalidFilePathChars

func TrimInvalidFilePathChars(path string) string

func UpdateMp3Tag

func UpdateMp3Tag(mp3 *MP3, tag *Tag, file string) error

Types

type MP3

type MP3 struct {
	FileName    string
	SavePath    string
	Playable    bool
	DownloadUrl string
	Tag         Tag
	Origin      int
}

type ProgressReader

type ProgressReader struct {
	io.ReadCloser
	// contains filtered or unexported fields
}

func NewProgressReaderClose

func NewProgressReaderClose(prefix string, length int64, lengthGen func() int64, body io.Reader, chapter bool) *ProgressReader

func (*ProgressReader) SetTotal

func (r *ProgressReader) SetTotal(n int64, complete bool)

type Tag

type Tag struct {
	Title      string
	Artist     string
	Album      string
	Year       string
	Track      string
	CoverImage string
}

Jump to

Keyboard shortcuts

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