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:
@@ -1,8 +1,8 @@
|
||||
package shared
|
||||
|
||||
import (
|
||||
"github.com/sirrobot01/debrid-blackhole/common"
|
||||
"github.com/sirrobot01/debrid-blackhole/pkg/debrid"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"sync"
|
||||
"time"
|
||||
@@ -16,7 +16,8 @@ func checkFileLoop(wg *sync.WaitGroup, dir string, file debrid.TorrentFile, read
|
||||
for {
|
||||
select {
|
||||
case <-ticker.C:
|
||||
if common.FileReady(path) {
|
||||
_, err := os.Stat(path)
|
||||
if !os.IsNotExist(err) {
|
||||
ready <- file
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user