yt

package
v0.0.0-...-0a9172b Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIsNotModified = errors.New("not modified")

Functions

func AddLivestreamSearchEtag

func AddLivestreamSearchEtag(config *config.Config, etag string) error

func AddPlaylistEtag

func AddPlaylistEtag(config *config.Config, etag string) error

func CalculateEndTime

func CalculateEndTime(endtime string, starttime string) (string, error)

func GetLivestreamID

func GetLivestreamID(config *config.Config, etag string) ([]*youtube.Video, string, error)

func GetLivestreamInfo

func GetLivestreamInfo(config *config.Config, id string, etag string) ([]*youtube.Video, string, error)

func GetLivestreamSearchEtag

func GetLivestreamSearchEtag(config *config.Config) (string, error)

func GetPlaylistEtag

func GetPlaylistEtag(config *config.Config) (string, error)

func GetPlaylistVideos

func GetPlaylistVideos(config *config.Config, etag string) ([]*youtube.PlaylistItem, string, error)

func GetVideoInfo

func GetVideoInfo(config *config.Config, id string, etag string) ([]*youtube.Video, string, error)

func LoopApiLivestream

func LoopApiLivestream(config *config.Config, api chan []*youtube.Video) error

func LoopPlaylist

func LoopPlaylist(config *config.Config, api chan []*youtube.Video, scraped chan []*youtube.Video) error

func LoopScrapedLivestream

func LoopScrapedLivestream(config *config.Config, scraped chan []*youtube.Video) error

func ScrapeLivestreamID

func ScrapeLivestreamID(config *config.Config) string

func UpdateEverythingPlaylist

func UpdateEverythingPlaylist(config *config.Config, playlistElement *youtube.PlaylistItem, vod YTVod) error

func UpdateEverythingVideo

func UpdateEverythingVideo(config *config.Config, video *youtube.Video, vod YTVod) error

func UpdatePlaylistInfo

func UpdatePlaylistInfo(config *config.Config, playlist []*youtube.PlaylistItem, vods []YTVod) error

func VODIndex

func VODIndex(vods []YTVod, id string) int

func WrapWithYTError

func WrapWithYTError(err error, module string, message string) error

Types

type YTErrorWrapper

type YTErrorWrapper struct {
	Message string
	Module  string
	Err     error
}

func (*YTErrorWrapper) Error

func (err *YTErrorWrapper) Error() string

func (*YTErrorWrapper) Unwrap

func (err *YTErrorWrapper) Unwrap() error

type YTVod

type YTVod struct {
	ID             string
	PubTime        string
	Title          string
	StartTime      string
	EndTime        string
	Thumbnail      string
	LivestreamEtag string
	Hash           string
}

func GetVideosInDB

func GetVideosInDB(config *config.Config) ([]YTVod, error)

Jump to

Keyboard shortcuts

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