Add basic auth and fix repair issues
This commit is contained in:
@@ -151,7 +151,7 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Premium</td>
|
||||
<td>%d seconds</td>
|
||||
<td>%d days</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Expiration</td>
|
||||
@@ -267,28 +267,28 @@ func (zr *Handlers) handleHome(resp http.ResponseWriter, req *http.Request) {
|
||||
response.UserInfo.Points,
|
||||
response.UserInfo.Locale,
|
||||
response.UserInfo.Type,
|
||||
response.UserInfo.Premium,
|
||||
response.UserInfo.Expiration,
|
||||
response.UserInfo.Premium/86400,
|
||||
strings.Replace(response.UserInfo.Expiration, "Z", "+01:00", 1),
|
||||
response.Config.Version,
|
||||
strings.Replace(response.Config.Token, response.Config.Token[len(response.Config.Token)-48:], "*****", 1),
|
||||
response.Config.Host,
|
||||
response.Config.Port,
|
||||
response.Config.NumOfWorkers,
|
||||
response.Config.RefreshEverySeconds,
|
||||
response.Config.RetainRDTorrentName,
|
||||
response.Config.RetainFolderNameExtension,
|
||||
response.Config.CanRepair,
|
||||
response.Config.DeleteRarFiles,
|
||||
response.Config.RealDebridTimeout,
|
||||
response.Config.UseDownloadCache,
|
||||
response.Config.RateLimitSleepSeconds,
|
||||
response.Config.RetriesUntilFailed,
|
||||
response.Config.GetHost(),
|
||||
response.Config.GetPort(),
|
||||
response.Config.GetNumOfWorkers(),
|
||||
response.Config.GetRefreshEverySeconds(),
|
||||
response.Config.EnableRetainRDTorrentName(),
|
||||
response.Config.EnableRetainFolderNameExtension(),
|
||||
response.Config.EnableRepair(),
|
||||
response.Config.ShouldDeleteRarFiles(),
|
||||
response.Config.GetRealDebridTimeout(),
|
||||
response.Config.EnableDownloadCache(),
|
||||
response.Config.GetRateLimitSleepSeconds(),
|
||||
response.Config.GetRetriesUntilFailed(),
|
||||
strings.Join(response.Config.PreferredHosts, ", "),
|
||||
response.Config.NetworkBufferSize,
|
||||
response.Config.ServeFromRclone,
|
||||
response.Config.VerifyDownloadLink,
|
||||
response.Config.ForceIPv6,
|
||||
response.Config.OnLibraryUpdate,
|
||||
response.Config.GetNetworkBufferSize(),
|
||||
response.Config.ShouldServeFromRclone(),
|
||||
response.Config.ShouldVerifyDownloadLink(),
|
||||
response.Config.ShouldForceIPv6(),
|
||||
response.Config.GetOnLibraryUpdate(),
|
||||
)
|
||||
|
||||
fmt.Fprint(resp, out)
|
||||
|
||||
Reference in New Issue
Block a user