Reformat config for bins
This commit is contained in:
@@ -10,7 +10,6 @@ import (
|
||||
"github.com/debridmediamanager/zurg/internal/config"
|
||||
"github.com/debridmediamanager/zurg/internal/version"
|
||||
"github.com/debridmediamanager/zurg/pkg/realdebrid"
|
||||
mapset "github.com/deckarep/golang-set/v2"
|
||||
)
|
||||
|
||||
type SponsorResponse struct {
|
||||
@@ -34,8 +33,8 @@ type RootResponse struct {
|
||||
PID int `json:"pid"` // Process ID
|
||||
Sponsor SponsorResponse `json:"sponsor_zurg"` // Sponsorship links
|
||||
Config config.ZurgConfig `json:"config"`
|
||||
ImmediateBin mapset.Set[string] `json:"immediate_bin"`
|
||||
OnceDoneBin mapset.Set[string] `json:"once_done_bin"`
|
||||
ImmediateBin []string `json:"immediate_bin"`
|
||||
OnceDoneBin []string `json:"once_done_bin"`
|
||||
}
|
||||
|
||||
func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
||||
@@ -68,8 +67,8 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
||||
Paypal: "https://paypal.me/yowmamasita",
|
||||
},
|
||||
Config: zr.cfg.GetConfig(),
|
||||
ImmediateBin: zr.torMgr.ImmediateBin,
|
||||
OnceDoneBin: zr.torMgr.OnceDoneBin,
|
||||
ImmediateBin: zr.torMgr.ImmediateBin.ToSlice(),
|
||||
OnceDoneBin: zr.torMgr.OnceDoneBin.ToSlice(),
|
||||
}
|
||||
|
||||
out := `<table border="1px">
|
||||
@@ -257,11 +256,11 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Immediate Bin</td>
|
||||
<td colspan="2">%s</td>
|
||||
<td colspan="2">%v</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Once Done Bin</td>
|
||||
<td colspan="2">%s</td>
|
||||
<td colspan="2">%v</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Utilities</td>
|
||||
@@ -345,8 +344,8 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
||||
response.Config.ShouldServeFromRclone(),
|
||||
response.Config.ShouldForceIPv6(),
|
||||
response.Config.GetOnLibraryUpdate(),
|
||||
response.ImmediateBin.String(),
|
||||
response.OnceDoneBin.String(),
|
||||
response.ImmediateBin,
|
||||
response.OnceDoneBin,
|
||||
)
|
||||
|
||||
fmt.Fprint(resp, out)
|
||||
|
||||
Reference in New Issue
Block a user