Skip to content

Commit 07bf6b8

Browse files
committed
refactor: rename OrQuery to QueryOr
1 parent e9ff04b commit 07bf6b8

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

integrations/nyaa/types.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import (
1212
type (
1313
SourceType int
1414
Query string
15-
OrQuery []string
15+
QueryOr []string
1616
Category string
1717
User string
1818
)
@@ -49,7 +49,7 @@ func quote(entries string) string {
4949
return fmt.Sprintf("\"%s\"", entries)
5050
}
5151

52-
func (entries OrQuery) Apply(req *http.Request) {
52+
func (entries QueryOr) Apply(req *http.Request) {
5353
query := req.URL.Query()
5454
prevQuery := query.Get("q")
5555

internal/discovery/run.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,9 @@ func (c *Controller) NyaaSearch(ctx context.Context, entry animelist.Entry) ([]n
9595
// Build search query for Nyaa.
9696
// For title we filter for english and original titles.
9797
strippedTitles := utils.Map(entry.Titles, parser.TitleStrip)
98-
titleQuery := nyaa.OrQuery(strippedTitles)
99-
sourceQuery := nyaa.OrQuery(c.dep.Config.Sources)
100-
qualityQuery := nyaa.OrQuery(c.dep.Config.Qualitites)
98+
titleQuery := nyaa.QueryOr(strippedTitles)
99+
sourceQuery := nyaa.QueryOr(c.dep.Config.Sources)
100+
qualityQuery := nyaa.QueryOr(c.dep.Config.Qualitites)
101101
entries, err := c.dep.NYAA.List(ctx, titleQuery, sourceQuery, qualityQuery)
102102
log.Debug().Str("entry", entry.Titles[0]).Msgf("found %d torrents", len(entries))
103103
if err != nil {

0 commit comments

Comments
 (0)