[BETA] Changelog 0.3.4 (#14)

- Add repair worker
- Fix AllDebrid bugs with single movies/series
- Fix Torbox bugs
This commit is contained in:
Mukhtar Akere
2025-01-11 16:21:49 +01:00
committed by GitHub
parent 28e5342c66
commit c39eebea0d
23 changed files with 795 additions and 242 deletions

View File

@@ -38,12 +38,26 @@ type QBitTorrentConfig struct {
RefreshInterval int `json:"refresh_interval"`
}
type ArrConfig struct {
Name string `json:"name"`
Host string `json:"host"`
Token string `json:"token"`
}
type RepairConfig struct {
Enabled bool `json:"enabled"`
Interval string `json:"interval"`
RunOnStart bool `json:"run_on_start"`
}
type Config struct {
Debrid DebridConfig `json:"debrid"`
Debrids []DebridConfig `json:"debrids"`
Proxy ProxyConfig `json:"proxy"`
MaxCacheSize int `json:"max_cache_size"`
QBitTorrent QBitTorrentConfig `json:"qbittorrent"`
Arrs []ArrConfig `json:"arrs"`
Repair RepairConfig `json:"repair"`
}
func validateDebrids(debrids []DebridConfig) error {

View File

@@ -13,7 +13,6 @@ import (
"net/http"
"net/url"
"os"
"path"
"path/filepath"
"regexp"
"strings"
@@ -251,17 +250,22 @@ func GetInfohashFromURL(url string) (string, error) {
}
func JoinURL(base string, paths ...string) (string, error) {
// Parse the base URL
u, err := url.Parse(base)
// Split the last path component to separate query parameters
lastPath := paths[len(paths)-1]
parts := strings.Split(lastPath, "?")
paths[len(paths)-1] = parts[0]
joined, err := url.JoinPath(base, paths...)
if err != nil {
return "", err
}
// Join the path components
u.Path = path.Join(u.Path, path.Join(paths...))
// Add back query parameters if they exist
if len(parts) > 1 {
return joined + "?" + parts[1], nil
}
// Return the resulting URL as a string
return u.String(), nil
return joined, nil
}
func FileReady(path string) bool {