diff --git a/internal/router/router.go b/internal/router/router.go index 989468e..5b5d2b8 100644 --- a/internal/router/router.go +++ b/internal/router/router.go @@ -177,6 +177,11 @@ func (zr *ZurgRouter) headFileHandler(resp http.ResponseWriter, req *http.Reques universal.HandleHeadRequest(directory, torrentName, fileName, resp, req, zr.torMgr, zr.log) } +type SponsorResponse struct { + Patreon string `json:"patreon"` + Github string `json:"github"` + Paypal string `json:"paypal"` +} type RootResponse struct { Version string `json:"version"` BuiltAt string `json:"built_at"` @@ -184,12 +189,13 @@ type RootResponse struct { GoVersion string `json:"go_version"` Dav string `json:"dav"` Html string `json:"html"` - UserInfo *realdebrid.User `json:"user_info"` // Replace UserInfoType with the actual type - MemAlloc uint64 `json:"mem_alloc"` // Memory allocation in MB - TotalAlloc uint64 `json:"total_alloc"` // Total memory allocated in MB - Sys uint64 `json:"sys"` // System memory in MB - NumGC uint32 `json:"num_gc"` // Number of completed GC cycles - PID int `json:"pid"` // Process ID + UserInfo *realdebrid.User `json:"user_info"` // Replace UserInfoType with the actual type + MemAlloc uint64 `json:"mem_alloc"` // Memory allocation in MB + TotalAlloc uint64 `json:"total_alloc"` // Total memory allocated in MB + Sys uint64 `json:"sys"` // System memory in MB + NumGC uint32 `json:"num_gc"` // Number of completed GC cycles + PID int `json:"pid"` // Process ID + Sponsor SponsorResponse `json:"sponsor_this_project"` // Process ID } func (zr *ZurgRouter) rootHandler(resp http.ResponseWriter, req *http.Request, params httprouter.Params) { @@ -215,6 +221,11 @@ func (zr *ZurgRouter) rootHandler(resp http.ResponseWriter, req *http.Request, p Sys: bToMb(mem.Sys), NumGC: mem.NumGC, PID: os.Getpid(), + Sponsor: SponsorResponse{ + Patreon: "https://www.patreon.com/debridmediamanager", + Github: "https://github.com/sponsors/debridmediamanager", + Paypal: "https://paypal.me/yowmamasita", + }, } if err := json.NewEncoder(resp).Encode(response); err != nil {