feat: restructure code; add size and ext checks (#39)

- Refractor code
- Add file size and extension checkers
- Change repair workflow to use zurg
This commit is contained in:
Mukhtar Akere
2025-02-04 11:07:19 +01:00
committed by GitHub
parent 8ca3cb32f3
commit 16c825d5ba
38 changed files with 1138 additions and 769 deletions

12
main.go
View File

@@ -4,7 +4,7 @@ import (
"context"
"flag"
"github.com/sirrobot01/debrid-blackhole/cmd"
"github.com/sirrobot01/debrid-blackhole/common"
"github.com/sirrobot01/debrid-blackhole/internal/config"
"log"
)
@@ -13,14 +13,10 @@ func main() {
flag.StringVar(&configPath, "config", "config.json", "path to the config file")
flag.Parse()
// Load the config file
conf, err := common.LoadConfig(configPath)
common.CONFIG = conf
if err != nil {
log.Fatal(err)
}
config.SetConfigPath(configPath)
config.GetConfig()
ctx := context.Background()
if err := cmd.Start(ctx, conf); err != nil {
if err := cmd.Start(ctx); err != nil {
log.Fatal(err)
}