Fix timeout in grab; remove pprof

This commit is contained in:
Mukhtar Akere
2025-05-20 18:47:05 +01:00
parent 5aa1c67544
commit 57ccd67c83
5 changed files with 33 additions and 38 deletions
+1 -1
View File
@@ -151,7 +151,7 @@ func (ui *Handler) handleGetTorrents(w http.ResponseWriter, r *http.Request) {
func (ui *Handler) handleDeleteTorrent(w http.ResponseWriter, r *http.Request) {
hash := chi.URLParam(r, "hash")
category := r.URL.Query().Get("category")
category := chi.URLParam(r, "category")
removeFromDebrid := r.URL.Query().Get("removeFromDebrid") == "true"
if hash == "" {
http.Error(w, "No hash provided", http.StatusBadRequest)
+9 -2
View File
@@ -200,8 +200,15 @@
window.urlBase = "{{.URLBase}}";
function joinURL(...segments) {
return segments.join('/').replace(/[/]+/g, '/').replace(/^(.+):\//, '$1://').replace(/^file:/, 'file:/').replace(/\/(?=[?&#])/g, '').replace(/\?/g, '&');
function joinURL(base, path) {
if (!base.endsWith('/')) {
base += '/';
}
if (path.startsWith('/')) {
path = path.substring(1);
}
return base + path;
}
function fetcher(endpoint, options = {}) {