Changelog 0.3.0

This commit is contained in:
Mukhtar Akere
2024-11-30 15:46:58 +01:00
parent df2aa4e361
commit a51364d150
53 changed files with 2019 additions and 679 deletions

View File

@@ -40,13 +40,13 @@ func GetTorrentFiles(data structs.RealDebridTorrentInfo) []TorrentFile {
continue
}
fileId := f.ID
file := &TorrentFile{
file := TorrentFile{
Name: name,
Path: name,
Size: int64(f.Bytes),
Size: f.Bytes,
Id: strconv.Itoa(fileId),
}
files = append(files, *file)
files = append(files, file)
}
return files
}
@@ -185,7 +185,7 @@ func (r *RealDebrid) CheckStatus(torrent *Torrent, isSymlink bool) (*Torrent, er
files := GetTorrentFiles(data)
torrent.Files = files
if len(files) == 0 {
r.DeleteTorrent(torrent)
go torrent.Delete()
return torrent, fmt.Errorf("no video files found")
}
filesId := make([]string, 0)
@@ -214,7 +214,7 @@ func (r *RealDebrid) CheckStatus(torrent *Torrent, isSymlink bool) (*Torrent, er
break
} else if status == "downloading" {
if !r.DownloadUncached {
go r.DeleteTorrent(torrent)
go torrent.Delete()
return torrent, fmt.Errorf("torrent: %s not cached", torrent.Name)
}
// Break out of the loop if the torrent is downloading.