[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

@@ -4,9 +4,12 @@ import (
"cmp"
"context"
"goBlack/common"
"goBlack/pkg/arr"
"goBlack/pkg/debrid"
"goBlack/pkg/proxy"
"goBlack/pkg/qbit"
"goBlack/pkg/repair"
"log"
"sync"
)
@@ -14,6 +17,7 @@ func Start(ctx context.Context, config *common.Config) error {
maxCacheSize := cmp.Or(config.MaxCacheSize, 1000)
deb := debrid.NewDebrid(config.Debrids, maxCacheSize)
arrs := arr.NewStorage(config.Arrs)
var wg sync.WaitGroup
errChan := make(chan error, 2)
@@ -31,12 +35,22 @@ func Start(ctx context.Context, config *common.Config) error {
wg.Add(1)
go func() {
defer wg.Done()
if err := qbit.Start(ctx, config, deb); err != nil {
if err := qbit.Start(ctx, config, deb, arrs); err != nil {
errChan <- err
}
}()
}
if config.Repair.Enabled {
wg.Add(1)
go func() {
defer wg.Done()
if err := repair.Start(ctx, config, arrs); err != nil {
log.Printf("Error during repair: %v", err)
}
}()
}
go func() {
wg.Wait()
close(errChan)