diff --git a/internal/app.go b/internal/app.go index 4db8aad..7ee8280 100644 --- a/internal/app.go +++ b/internal/app.go @@ -5,7 +5,7 @@ import ( netHttp "net/http" "os" - _ "net/http/pprof" // Register pprof + // _ "net/http/pprof" // Register pprof "github.com/debridmediamanager/zurg/internal/config" "github.com/debridmediamanager/zurg/internal/router" @@ -65,12 +65,12 @@ func MainApp(configPath string) { handler.RedirectFixedPath = true router.ApplyRouteTable(handler, getfile, torrentMgr, config, rd, log.Named("router")) - go func() { - if err := netHttp.ListenAndServe(":6060", nil); err != nil && err != netHttp.ErrServerClosed { - zurglog.Errorf("Failed to start pprof: %v", err) - os.Exit(1) - } - }() + // go func() { + // if err := netHttp.ListenAndServe(":6060", nil); err != nil && err != netHttp.ErrServerClosed { + // zurglog.Errorf("Failed to start pprof: %v", err) + // os.Exit(1) + // } + // }() addr := fmt.Sprintf("%s:%s", config.GetHost(), config.GetPort()) zurglog.Infof("Starting server on %s", addr) diff --git a/internal/torrent/manager.go b/internal/torrent/manager.go index 8820c2a..7dee8ed 100644 --- a/internal/torrent/manager.go +++ b/internal/torrent/manager.go @@ -571,7 +571,7 @@ func (t *TorrentManager) Delete(accessKey string, deleteInRD bool, updateDirecto func (t *TorrentManager) repair(torrent *Torrent) { if torrent.AllInProgress() { - t.log.Infof("Torrent %s is in progress, cannot repair", torrent.AccessKey) + t.log.Infof("Torrent %s is in progress, skipping repair until download is done", torrent.AccessKey) return } @@ -743,7 +743,7 @@ func (t *TorrentManager) RepairAll() { func (t *TorrentManager) Repair(torrent *Torrent) { _ = t.repairWorker.Submit(func() { - t.log.Info("repairing torrent %s", torrent.AccessKey) + t.log.Info("Repairing torrent %s", torrent.AccessKey) t.repair(torrent) t.log.Info("Finished repairing torrent %s", torrent.AccessKey) })