Improvements:

- An improvised caching for stats; using metadata on ls
- Integrated into the downloading system
- Fix minor bugs noticed
- Still experiemental, sike
This commit is contained in:
Mukhtar Akere
2025-03-20 10:42:51 +01:00
parent 50c775ca74
commit 0c68364a6a
26 changed files with 715 additions and 636 deletions

View File

@@ -2,8 +2,7 @@ package service
import (
"github.com/sirrobot01/debrid-blackhole/pkg/arr"
"github.com/sirrobot01/debrid-blackhole/pkg/debrid"
"github.com/sirrobot01/debrid-blackhole/pkg/debrid/engine"
"github.com/sirrobot01/debrid-blackhole/pkg/debrid/debrid"
"github.com/sirrobot01/debrid-blackhole/pkg/repair"
"sync"
)
@@ -11,7 +10,7 @@ import (
type Service struct {
Repair *repair.Repair
Arr *arr.Storage
Debrid *engine.Engine
Debrid *debrid.Engine
}
var (
@@ -22,7 +21,7 @@ var (
func New() *Service {
once.Do(func() {
arrs := arr.NewStorage()
deb := debrid.New()
deb := debrid.NewEngine()
instance = &Service{
Repair: repair.New(arrs),
Arr: arrs,
@@ -42,7 +41,7 @@ func GetService() *Service {
func Update() *Service {
arrs := arr.NewStorage()
deb := debrid.New()
deb := debrid.NewEngine()
instance = &Service{
Repair: repair.New(arrs),
Arr: arrs,
@@ -51,6 +50,6 @@ func Update() *Service {
return instance
}
func GetDebrid() *engine.Engine {
func GetDebrid() *debrid.Engine {
return GetService().Debrid
}