util

package
v0.0.0-...-20e4cb9 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddVideoToCSV

func AddVideoToCSV(video myYoutube.Video, filename string) error

AddVideoToCSV appends a single video to the end of a CSV file.

func LoadDownloadedVideos

func LoadDownloadedVideos(filename string) (map[string]struct{}, error)

LoadDownloadedVideos loads the history of downloaded videos from a CSV file.

Types

type VideoQueue

type VideoQueue struct {
	Videos []youtube.Video
}

VideoQueue represents a queue of videos to be downloaded.

func NewVideoQueue

func NewVideoQueue() *VideoQueue

NewVideoQueue creates a new VideoQueue.

func (*VideoQueue) AddVideo

func (vq *VideoQueue) AddVideo(video youtube.Video)

AddVideo adds a new video to the queue if it hasn't been downloaded.

func (*VideoQueue) IsDownloaded

func (vq *VideoQueue) IsDownloaded(videoID string) bool

IsDownloaded checks if a video has been downloaded by looking it up in the downloaded_videos.csv file.

Jump to

Keyboard shortcuts

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