cmd/streamdata: format youtube title

Useful for uploading VODs to youtube.

Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
2026-03-19 01:22:45 +09:00
parent 90c8b7c849
commit 4a1dec2252

View File

@@ -8,9 +8,14 @@ import (
// printVOD prints a text representation of [streamdata.VOD] to stdout.
func printVOD(v *streamdata.VOD) {
fmt.Println("Title :", v.Title)
fmt.Println("Date :", v.Date.Format("2006-01-02"))
date := v.Date.Format("2006-01-02")
fmt.Println("Title :", v.Title)
fmt.Println("Date :", date)
if v.Category != "" {
fmt.Println("Category:", v.Category)
fmt.Println("Category :", v.Category)
fmt.Printf("YouTube : %s | %s | %s\n", v.Title, v.Category, date)
} else {
fmt.Printf("YouTube : %s | %s\n", v.Title, date)
}
}