videos

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: May 7, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheAge

func CacheAge(cacheDir, packID, sourceID string) time.Duration

CacheAge returns the age of the cache file, or -1 if it doesn't exist.

func FilterVideos

func FilterVideos(vids []content.Video, query string) []content.Video

FilterVideos returns all videos whose title, description, or tags contain query (case-insensitive).

func FindVideo

func FindVideo(vids []content.Video, id string) *content.Video

FindVideo returns a pointer to the first video with the given composite ID, or nil if not found.

func LoadCache

func LoadCache(cacheDir, packID, sourceID string) ([]content.Video, error)

LoadCache reads cached videos for a given pack and source.

func ResolveAll

func ResolveAll(sources []content.YouTubeSource, cacheDir string) ([]content.Video, error)

ResolveAll loads all cached videos for the given sources from cacheDir. Sources that have no cache file are silently skipped.

func SaveCache

func SaveCache(cacheDir, packID, sourceID string, vids []content.Video) error

SaveCache writes videos to the cache file for a given pack and source.

Types

This section is empty.

Jump to

Keyboard shortcuts

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