Remove tests
This commit is contained in:
@@ -30,7 +30,7 @@ type TorrentManager struct {
|
||||
// and store them in-memory
|
||||
func NewTorrentManager(config config.ConfigInterface, cache *expirable.LRU[string, string]) *TorrentManager {
|
||||
t := &TorrentManager{
|
||||
requiredVersion: "v2",
|
||||
requiredVersion: "24.10.2023",
|
||||
config: config,
|
||||
cache: cache,
|
||||
workerPool: make(chan bool, config.GetNumOfWorkers()),
|
||||
@@ -95,11 +95,11 @@ func (t *TorrentManager) GetByDirectory(directory string) []Torrent {
|
||||
}
|
||||
|
||||
// HideTheFile marks a file as deleted
|
||||
func (t *TorrentManager) HideTheFile(torrent *Torrent, file *File) {
|
||||
file.Link = ""
|
||||
t.writeToFile(torrent)
|
||||
t.repair(torrent.ID, []File{*file}, false)
|
||||
}
|
||||
// func (t *TorrentManager) HideTheFile(torrent *Torrent, file *File) {
|
||||
// file.Link = ""
|
||||
// t.writeToFile(torrent)
|
||||
// t.repair(torrent.ID, []File{*file}, false)
|
||||
// }
|
||||
|
||||
// FindAllTorrentsWithName finds all torrents in a given directory with a given name
|
||||
func (t *TorrentManager) FindAllTorrentsWithName(directory, torrentName string) []Torrent {
|
||||
@@ -253,16 +253,11 @@ func (t *TorrentManager) addMoreInfo(torrent *Torrent) {
|
||||
// file cache
|
||||
torrentFromFile := t.readFromFile(torrent.ID)
|
||||
if torrentFromFile != nil {
|
||||
fmt.Println("from file!")
|
||||
// see if api data and file data still match
|
||||
// then it means data is still usable
|
||||
if len(torrentFromFile.Links) == len(torrent.Links) {
|
||||
torrent.ForRepair = torrentFromFile.ForRepair
|
||||
torrent.SelectedFiles = torrentFromFile.SelectedFiles[:]
|
||||
if torrentFromFile.ID == "ABUNEKZP3UPMU" || torrentFromFile.ID == "TAA5WUJ6BVEAE" {
|
||||
fmt.Println(">>>>>>>>>>>>>>>>", torrentFromFile.ID, len(torrentFromFile.Links), len(torrent.Links), len(torrent.SelectedFiles[0].Link))
|
||||
torrent.Version = "v2"
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user