Fix issues with dir-cache-time, umask and wrongly set gid,uid, add extra vfs options

This commit is contained in:
Mukhtar Akere
2025-09-05 16:11:22 +01:00
parent 85cd37f29b
commit 76f5b85313
8 changed files with 36 additions and 32 deletions

View File

@@ -3,13 +3,14 @@ package store
import (
"context"
"fmt"
"github.com/sirrobot01/decypharr/pkg/debrid/types"
"io"
"net/http"
"os"
"strings"
"sync"
"time"
"github.com/sirrobot01/decypharr/pkg/debrid/types"
)
type fileInfo struct {
@@ -120,7 +121,7 @@ func (c *Cache) refreshTorrents(ctx context.Context) {
close(workChan)
wg.Wait()
c.listingDebouncer.Call(false)
c.listingDebouncer.Call(true)
c.logger.Debug().Msgf("Processed %d new torrents", counter)
}

View File

@@ -1,10 +1,11 @@
package types
import (
"github.com/sirrobot01/decypharr/internal/config"
"slices"
"sync"
"sync/atomic"
"github.com/sirrobot01/decypharr/internal/config"
)
type Accounts struct {
@@ -35,7 +36,6 @@ type Account struct {
Debrid string // e.g., "realdebrid", "torbox", etc.
Order int
Disabled bool
InUse bool
Token string `json:"token"`
links map[string]*DownloadLink
mu sync.RWMutex
@@ -103,16 +103,6 @@ func (a *Accounts) setCurrent(account *Account) {
if account == nil {
return
}
// Set every account InUse to false
a.accounts.Range(func(key, value interface{}) bool {
acc, ok := value.(*Account)
if ok {
acc.InUse = false
a.accounts.Store(key, acc)
}
return true
})
account.InUse = true
a.current.Store(account)
}