summaryrefslogtreecommitdiffstats
path: root/feed/feed.go
diff options
context:
space:
mode:
Diffstat (limited to 'feed/feed.go')
-rw-r--r--feed/feed.go9
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)