Finalize v0.4.0
Some checks failed
Release / goreleaser (push) Failing after 2m18s

This commit is contained in:
Mukhtar Akere
2025-01-25 11:40:30 +01:00
parent fc5c6e2869
commit bba90cb89a
4 changed files with 16 additions and 20 deletions

View File

@@ -123,4 +123,8 @@
- Logging
- Add a more robust logging system
- Add logging to a file
- Add logging to the UI
- Add logging to the UI
- Qbittorrent
- Add support for tags(creating, deleting, listing)
- Add support for categories(creating, deleting, listing)
- Fix issues with arr sending torrents using a different content type.

View File

@@ -174,7 +174,7 @@ This is the default config file. You can create a `config.json` file in the root
}
],
"repair": {
"enabled": true,
"enabled": false,
"interval": "12h",
"run_on_start": false
},
@@ -233,7 +233,9 @@ This is particularly useful if you want to use the Repair tool without using Qbi
### Proxy
The proxy is useful in filtering out un-cached Real Debrid torrents.
**Note**: Proxy has stopped working for Real Debrid, Debrid Link, and All Debrid. It still works for Torbox. This is due to the changes in the API of the Debrid Providers.
The proxy is useful in filtering out un-cached Debrid torrents.
The proxy is a simple HTTP proxy that requires basic authentication. The proxy can be enabled by setting the `proxy.enabled` to `true` in the config file.
The proxy listens on the port `8181` by default. The username and password can be set in the config file.
@@ -252,11 +254,11 @@ The repair worker is a simple worker that checks for missing files in the Arrs(S
### TODO
- [ ] A proper name!!!!
- [x] A proper name!!!!
- [x] Debrid
- [x] Add more Debrid Providers
- [ ] Qbittorrent
- [ ] Add more Qbittorrent features
- [x] Qbittorrent
- [x] Add more Qbittorrent features
- [x] Persist torrents on restart/server crash
- [ ] Add tests

View File

@@ -1,7 +1,6 @@
package server
import (
"bytes"
"context"
"encoding/base64"
"github.com/go-chi/chi/v5"
@@ -9,7 +8,6 @@ import (
"github.com/sirrobot01/debrid-blackhole/common"
"github.com/sirrobot01/debrid-blackhole/pkg/arr"
"github.com/sirrobot01/debrid-blackhole/pkg/qbit/shared"
"io"
"net/http"
"path/filepath"
"strings"
@@ -149,10 +147,6 @@ func (q *qbitHandler) handleTorrentsInfo(w http.ResponseWriter, r *http.Request)
func (q *qbitHandler) handleTorrentsAdd(w http.ResponseWriter, r *http.Request) {
ctx := r.Context()
body, _ := io.ReadAll(r.Body)
q.logger.Debug().Msgf("Raw request body: %s", string(body))
r.Body = io.NopCloser(bytes.NewBuffer(body))
// Parse form based on content type
contentType := r.Header.Get("Content-Type")
if strings.Contains(contentType, "multipart/form-data") {
@@ -172,13 +166,10 @@ func (q *qbitHandler) handleTorrentsAdd(w http.ResponseWriter, r *http.Request)
return
}
q.logger.Debug().Msgf("All form values: %+v", r.Form)
q.logger.Debug().Msgf("URLs value: %q", r.FormValue("urls"))
q.logger.Debug().Msgf("Content-Type: %s", r.Header.Get("Content-Type"))
isSymlink := strings.ToLower(r.FormValue("sequentialDownload")) != "true"
category := r.FormValue("category")
atleastOne := false
ctx = context.WithValue(ctx, "isSymlink", isSymlink)
// Handle magnet URLs
if urls := r.FormValue("urls"); urls != "" {
@@ -186,8 +177,6 @@ func (q *qbitHandler) handleTorrentsAdd(w http.ResponseWriter, r *http.Request)
for _, u := range strings.Split(urls, "\n") {
urlList = append(urlList, strings.TrimSpace(u))
}
ctx = context.WithValue(ctx, "isSymlink", isSymlink)
for _, url := range urlList {
if err := q.qbit.AddMagnet(ctx, url, category); err != nil {
q.logger.Info().Msgf("Error adding magnet: %v", err)

View File

@@ -122,8 +122,9 @@
const versionBadge = document.getElementById('version-badge');
const channelBadge = document.getElementById('channel-badge');
versionBadge.textContent = data.version;
channelBadge.textContent = data.channel;
// Add url to version badge
versionBadge.innerHTML = `<a href="https://github.com/sirrobot01/debrid-blackhole/releases/tag/${data.version}" target="_blank" class="text-white">${data.version}</a>`;
channelBadge.textContent = data.channel.charAt(0).toUpperCase() + data.channel.slice(1);
if (data.channel === 'beta') {
channelBadge.classList.add('beta');