meta

package
v0.2.13 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Audio

type Audio struct {
	Url          string `json:"url"`
	BitRate      int    `json:"bit_rate"` // kbps
	NotAvailable bool   `json:"not_available"`
}

type IProcessor

type IProcessor interface {
	FetchMetaAndResourceInfo() (mediaMeta *MediaMeta, err error)
	SearchSong() (searchItems []*SearchSongItem, err error)
	Domains() []string
	GetSourceName() string
	IsMusicPlatform() bool
}

type MediaMeta

type MediaMeta struct {
	Title             string `json:"title"`
	Description       string `json:"description"`
	Artist            string `json:"artist"`
	Album             string `json:"album"`
	Duration          int    `json:"duration"` // second
	CoverUrl          string `json:"cover_url"`
	PublicTime        int64  `json:"public_time"`
	IsTrial           bool   `json:"is_trial"`
	ResourceForbidden bool   `json:"resource_forbidden"`
	FromMusicPlatform bool   `json:"from_music_platform"`
	Source            string `json:"source"`

	Headers map[string]string `json:"-"`

	ResourceType string `json:"resource_type"`

	Audios []Audio `json:"audios"`
	Videos []Video `json:"videos"`
}

type SearchSongItem added in v0.2.0

type SearchSongItem struct {
	Name              string
	Artist            string
	Album             string
	Duration          int
	Url               string
	ResourceForbidden bool
	Source            string
	FromMusicPlatform bool

	Score float64
}

type Video

type Video struct {
	Url            string `json:"url"`
	Width          int    `json:"width"`
	Height         int    `json:"height"`
	Ratio          string `json:"ratio"`
	NeedExtraAudio bool   `json:"need_extra_audio"`
	NotAvailable   bool   `json:"not_available"`
}

Jump to

Keyboard shortcuts

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