Documentation
¶
Index ¶
- func ConvertVideoToAudio(video *Video, dstDir string, results chan<- ChannelMessage)
- func FetchMetadata(video *Video, results chan<- ChannelMessage)
- func FetchPlaybackURL(link string, results chan<- ChannelMessage)
- func FetchVideo(video *Video, results chan<- ChannelMessage)
- func ValidateLinks(links []string) []error
- type ChannelMessage
- type ErrorBadLink
- type ErrorFetchPlaybackURL
- type PBReader
- type Video
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertVideoToAudio ¶
func ConvertVideoToAudio(video *Video, dstDir string, results chan<- ChannelMessage)
ConvertVideoToAudio converts video to mp3 and saves in dstDir.
func FetchMetadata ¶
func FetchMetadata(video *Video, results chan<- ChannelMessage)
FetchMetadata fetches metadata for video using python port of youtube-dl.
func FetchPlaybackURL ¶
func FetchPlaybackURL(link string, results chan<- ChannelMessage)
FetchPlaybackURL gets playback stream: - If video is not well-protected get stream url using regex. - If video is well-protected get stream url using python port of youtube-dl.
func FetchVideo ¶
func FetchVideo(video *Video, results chan<- ChannelMessage)
FetchVideo downloads video and saves it in a temp file.
Types ¶
type ChannelMessage ¶
ChannelMessage used to exchange between a main thread and goroutines.
func (ChannelMessage) String ¶
func (msg ChannelMessage) String() string
type ErrorBadLink ¶
type ErrorBadLink struct {
// contains filtered or unexported fields
}
ErrorBadLink link is not valid.
func (*ErrorBadLink) Error ¶
func (e *ErrorBadLink) Error() string
type ErrorFetchPlaybackURL ¶
type ErrorFetchPlaybackURL struct {
// contains filtered or unexported fields
}
ErrorFetchPlaybackURL video stream URL can't be fetched/found.
func (*ErrorFetchPlaybackURL) Error ¶
func (e *ErrorFetchPlaybackURL) Error() string
Click to show internal directories.
Click to hide internal directories.