feat(discovery): persist video duration_s instead of discarding it (ADR-028)
ADR-023's filterLowValue already fetches each candidate's duration via the cheap videos.list quota call to drop Shorts/live, then threw it away — the videos.duration_s column (migration 001) was never written. Carry it onto the kept domain.Video and have UpsertVideo persist it, COALESCE-preserving a known value so an unknown (0) re-upsert never clobbers it (the channel_title backfill stance, migration 014). This is the enabling change for length-aware burst selection. No new migration — the column already exists.
This commit is contained in:
@@ -77,6 +77,11 @@ type Video struct {
|
||||
URL string
|
||||
PublishedAt time.Time
|
||||
SeenAt time.Time
|
||||
// DurationSeconds is the video length in seconds, when known (fetched by the
|
||||
// ADR-023 videos.list enrichment at discovery). 0 means unknown — the store
|
||||
// preserves a previously-known value rather than overwriting it with 0, and
|
||||
// the onboarding burst (ADR-028) treats unknown as degrade-open (kept).
|
||||
DurationSeconds int
|
||||
}
|
||||
|
||||
// Transcript is the text of a video (or a record that none was available).
|
||||
|
||||
Reference in New Issue
Block a user