mirror of
https://github.com/sot-tech/mochi.git
synced 2026-06-19 02:49:44 -07:00
rename back to chihaya
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@ package middleware
|
||||
import (
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/jzelinskie/trakr/bittorrent"
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
)
|
||||
|
||||
// Hook abstracts the concept of anything that needs to interact with a
|
||||
|
||||
@@ -8,9 +8,9 @@ import (
|
||||
|
||||
"golang.org/x/net/context"
|
||||
|
||||
"github.com/jzelinskie/trakr/bittorrent"
|
||||
"github.com/jzelinskie/trakr/frontend"
|
||||
"github.com/jzelinskie/trakr/storage"
|
||||
"github.com/chihaya/chihaya/bittorrent"
|
||||
"github.com/chihaya/chihaya/frontend"
|
||||
"github.com/chihaya/chihaya/storage"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
@@ -78,7 +78,7 @@ func (l *Logic) HandleAnnounce(ctx context.Context, req *bittorrent.AnnounceRequ
|
||||
func (l *Logic) AfterAnnounce(ctx context.Context, req *bittorrent.AnnounceRequest, resp *bittorrent.AnnounceResponse) {
|
||||
for _, h := range l.announcePostHooks {
|
||||
if err := h.HandleAnnounce(ctx, req, resp); err != nil {
|
||||
log.Println("trakr: post-announce hooks failed:", err.Error())
|
||||
log.Println("chihaya: post-announce hooks failed:", err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
@@ -103,7 +103,7 @@ func (l *Logic) HandleScrape(ctx context.Context, req *bittorrent.ScrapeRequest)
|
||||
func (l *Logic) AfterScrape(ctx context.Context, req *bittorrent.ScrapeRequest, resp *bittorrent.ScrapeResponse) {
|
||||
for _, h := range l.scrapePostHooks {
|
||||
if err := h.HandleScrape(ctx, req, resp); err != nil {
|
||||
log.Println("trakr: post-scrape hooks failed:", err.Error())
|
||||
log.Println("chihaya: post-scrape hooks failed:", err.Error())
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user