summaryrefslogtreecommitdiffstats
path: root/schema
diff options
context:
space:
mode:
Diffstat (limited to 'schema')
-rw-r--r--schema/schema.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/schema/schema.go b/schema/schema.go
index 55e215a..c114fb1 100644
--- a/schema/schema.go
+++ b/schema/schema.go
@@ -1,10 +1,11 @@
// SPDX-License-Identifier: ISC
-// Copyright © 2021 siddharth <s@ricketyspace.net>
+// Copyright © 2022 siddharth <s@ricketyspace.net>
package schema
import (
"encoding/xml"
+ "strings"
"time"
)
@@ -59,3 +60,7 @@ type YouTubeFeed struct {
XMLName xml.Name `xml:"feed"`
Entries []YouTubeEntry `xml:"entry"`
}
+
+func (e Entry) TitleContains(contains string) bool {
+ return strings.Contains(strings.ToLower(e.Title), strings.ToLower(contains))
+}