From 85ca1ebc7de98da7db308309edbcccee85281520 Mon Sep 17 00:00:00 2001 From: siddharth ravikumar Date: Wed, 1 Apr 2026 21:11:08 -0400 Subject: feed: update `Feed.Process` Add handling to ignore shorts. --- feed/feed.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'feed') diff --git a/feed/feed.go b/feed/feed.go index 75143c5..cc7ffc6 100644 --- a/feed/feed.go +++ b/feed/feed.go @@ -25,6 +25,7 @@ type Feed struct { Schema string Last int TitleContains string `json:"title-contains"` + IgnoreShorts bool `json:"ignore-shorts"` YDLPath string DumpDir string Entries []schema.Entry @@ -169,6 +170,14 @@ func (feed *Feed) Process(pState *state.ProcessState) { continue } + // Ignore entry if it is a short video and feed is configured to + // ignore shorts. + if feed.IgnoreShorts && e.ShortMedia { + fmt.Printf("[%s][%s]: Skipping short '%s'\n", + feed.Id, e.Id, e.Title) + continue + } + // Process entry only if it was not downloaded before. if !pState.DB.Exists(feed.Id, e.Id) { go feed.processEntry(e, erChan, eSem) -- cgit v1.2.3