fix(releases): max downloads per hour (#883)

* fix(releases): max downloads per hour

* refactor: release processing

* compare apples to apples (#884)

* from rocketships back to apples

* Update internal/database/filter.go

* cast me to the

* keep your eye on the case

---------

Co-authored-by: Kyle Sanderson <kyle.leet@gmail.com>
This commit is contained in:
ze0s 2023-04-29 21:52:49 +02:00 committed by GitHub
parent da5492febb
commit ef3445cbed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 139 additions and 107 deletions

View file

@ -19,7 +19,7 @@ https://autodl-community.github.io/autodl-irssi/configuration/filter/
type FilterRepo interface {
FindByID(ctx context.Context, filterID int) (*Filter, error)
FindByIndexerIdentifier(indexer string) ([]Filter, error)
FindByIndexerIdentifier(ctx context.Context, indexer string) ([]Filter, error)
Find(ctx context.Context, params FilterQueryParams) ([]Filter, error)
ListFilters(ctx context.Context) ([]Filter, error)
Store(ctx context.Context, filter Filter) (*Filter, error)
@ -30,6 +30,7 @@ type FilterRepo interface {
StoreIndexerConnection(ctx context.Context, filterID int, indexerID int) error
StoreIndexerConnections(ctx context.Context, filterID int, indexers []Indexer) error
DeleteIndexerConnections(ctx context.Context, filterID int) error
GetDownloadsByFilterId(ctx context.Context, filterID int) (*FilterDownloads, error)
}
type FilterDownloads struct {