Update returned error codes
This commit is contained in:
@@ -198,6 +198,10 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
||||
}
|
||||
efficiency := response.ServedMB * 100 / denominator
|
||||
|
||||
if zr.initialTraffic > response.TrafficLogged {
|
||||
zr.initialTraffic = response.TrafficLogged
|
||||
}
|
||||
|
||||
out += fmt.Sprintf(`
|
||||
<tr>
|
||||
<td>Library Size</td>
|
||||
|
||||
@@ -26,7 +26,7 @@ type Handlers struct {
|
||||
api *realdebrid.RealDebrid
|
||||
workerPool *ants.Pool
|
||||
hosts []string
|
||||
initialTraffic int64
|
||||
initialTraffic uint64
|
||||
log *logutil.Logger
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ func AttachHandlers(router *chi.Mux, downloader *universal.Downloader, torMgr *t
|
||||
}
|
||||
hs.initialTraffic = 0
|
||||
if _, ok := trafficDetails["real-debrid.com"]; ok {
|
||||
hs.initialTraffic = trafficDetails["real-debrid.com"]
|
||||
hs.initialTraffic = uint64(trafficDetails["real-debrid.com"])
|
||||
}
|
||||
|
||||
if cfg.GetUsername() != "" {
|
||||
|
||||
Reference in New Issue
Block a user