Fix rewrites
This commit is contained in:
@@ -68,7 +68,7 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
RepairKillSwitch: make(chan struct{}, 1),
|
||||
RemountTrigger: make(chan struct{}, 1),
|
||||
|
||||
latestState: &LibraryState{},
|
||||
latestState: &LibraryState{log: log},
|
||||
}
|
||||
|
||||
t.fixers = t.readFixersFromFile()
|
||||
@@ -200,10 +200,7 @@ func (t *TorrentManager) readTorrentFromFile(hash string) *Torrent {
|
||||
|
||||
func (t *TorrentManager) deleteTorrentFile(hash string) {
|
||||
filePath := "data/" + hash + ".torrent_zurg"
|
||||
err := os.Remove(filePath)
|
||||
if err != nil {
|
||||
t.log.Warnf("Cannot delete file %s: %v", filePath, err)
|
||||
}
|
||||
_ = os.Remove(filePath)
|
||||
}
|
||||
|
||||
/// end torrent functions
|
||||
@@ -265,10 +262,7 @@ func (t *TorrentManager) readInfoFromFile(torrentID string) *realdebrid.TorrentI
|
||||
|
||||
func (t *TorrentManager) deleteInfoFile(torrentID string) {
|
||||
filePath := "data/" + torrentID + ".info_zurg"
|
||||
err := os.Remove(filePath)
|
||||
if err != nil {
|
||||
t.log.Warnf("Cannot delete info file %s: %v", filePath, err)
|
||||
}
|
||||
_ = os.Remove(filePath)
|
||||
}
|
||||
|
||||
/// end info functions
|
||||
|
||||
Reference in New Issue
Block a user