diff options
| author | siddharth ravikumar <s@ricketyspace.net> | 2026-04-01 21:11:08 -0400 |
|---|---|---|
| committer | siddharth ravikumar <s@ricketyspace.net> | 2026-04-01 21:11:08 -0400 |
| commit | 85ca1ebc7de98da7db308309edbcccee85281520 (patch) | |
| tree | 521b29e1b9d8017d0878dc396bc85dce442ddd48 /feed | |
| parent | 364180427f2d69da9814e170e241715ed328ff40 (diff) | |
feed: update `Feed.Process`
Add handling to ignore shorts.
Diffstat (limited to 'feed')
| -rw-r--r-- | feed/feed.go | 9 |
1 files changed, 9 insertions, 0 deletions
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) |
