provider

package
v1.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2019 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NetEaseMusic = iota
	QQMusic
	MiguMusic
	KugouMusic
	KuwoMusic
)

Variables

This section is empty.

Functions

func Client

func Client(platform int) *sreq.Client

Types

type DownloadTask

type DownloadTask struct {
	MP3    *MP3
	Status int
}

type MP3

type MP3 struct {
	FileName    string
	SavePath    string
	Playable    bool
	DownloadURL string
	Provider    int
}

func (*MP3) ConcurrentDownload

func (m *MP3) ConcurrentDownload(taskList chan DownloadTask, c *concurrency.C)

func (*MP3) SingleDownload

func (m *MP3) SingleDownload() (status int)

type MusicRequest

type MusicRequest interface {
	// 是否需要登录
	RequireLogin() bool
	// 发起登录请求
	Login() error
	// 发起API请求
	Do() error
	// 解析API响应获取音源
	Prepare() ([]*MP3, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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