Final bug fixes

This commit is contained in:
Mukhtar Akere
2025-08-09 19:57:32 +01:00
parent 3aeb806033
commit 0dd1efb07c
10 changed files with 21 additions and 42 deletions
@@ -511,7 +511,7 @@ func (r *RealDebrid) CheckStatus(t *types.Torrent) (*types.Torrent, error) {
if status == "waiting_files_selection" {
t.Files = r.getTorrentFiles(t, data)
if len(t.Files) == 0 {
return t, fmt.Errorf("no video files found")
return t, fmt.Errorf("no valid files found")
}
filesId := make([]string, 0)
for _, f := range t.Files {
+1 -3
View File
@@ -3,7 +3,6 @@ package store
import (
"errors"
"fmt"
"github.com/sirrobot01/decypharr/internal/utils"
"github.com/sirrobot01/decypharr/pkg/debrid/types"
)
@@ -103,10 +102,8 @@ func (c *Cache) fetchDownloadLink(torrentName, filename, fileLink string) (*type
}
c.logger.Trace().Msgf("Getting download link for %s(%s)", filename, file.Link)
downloadLink, err := c.client.GetDownloadLink(ct.Torrent, &file)
if err != nil {
if errors.Is(err, utils.HosterUnavailableError) {
c.logger.Trace().
Str("filename", filename).
@@ -130,6 +127,7 @@ func (c *Cache) fetchDownloadLink(torrentName, filename, fileLink string) (*type
if downloadLink == nil {
return nil, fmt.Errorf("download link is empty after retry")
}
return nil, nil
} else if errors.Is(err, utils.TrafficExceededError) {
// This is likely a fair usage limit error
return nil, err
-6
View File
@@ -29,12 +29,6 @@ func (fi *fileInfo) IsDir() bool { return fi.isDir }
func (fi *fileInfo) ID() string { return fi.id }
func (fi *fileInfo) Sys() interface{} { return nil }
type RcloneRC struct {
URL string
User string
Pass string
}
func (c *Cache) RefreshListings(refreshRclone bool) {
// Copy the torrents to a string|time map
c.torrents.refreshListing() // refresh torrent listings