cmd/streamdata: format vod metadata for stdout

This is useful for a show command.

Signed-off-by: Yonah <contrib@gensokyo.uk>
This commit is contained in:
2026-03-19 01:08:06 +09:00
parent 2879d9d186
commit 49931c6e75

16
cmd/streamdata/format.go Normal file
View File

@@ -0,0 +1,16 @@
package main
import (
"fmt"
"git.gensokyo.uk/yonah/streamdata"
)
// 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"))
if v.Category != "" {
fmt.Println("Category:", v.Category)
}
}