Small repairs on logic
This commit is contained in:
@@ -46,8 +46,7 @@ type TorrentManager struct {
|
||||
DumpTrigger chan struct{}
|
||||
AnalyzeTrigger chan struct{}
|
||||
|
||||
latestState *LibraryState
|
||||
inProgressHashes mapset.Set[string]
|
||||
latestState *LibraryState
|
||||
|
||||
repairChan chan *Torrent
|
||||
RepairQueue mapset.Set[*Torrent]
|
||||
@@ -85,6 +84,9 @@ func NewTorrentManager(cfg config.ConfigInterface, api *realdebrid.RealDebrid, w
|
||||
AnalyzeTrigger: make(chan struct{}, 1),
|
||||
|
||||
latestState: &LibraryState{log: log},
|
||||
|
||||
ImmediateBin: mapset.NewSet[string](),
|
||||
OnceDoneBin: mapset.NewSet[string](),
|
||||
}
|
||||
|
||||
t.initializeBins()
|
||||
@@ -236,6 +238,7 @@ func (t *TorrentManager) applyMediaInfoDetails(torrent *Torrent) {
|
||||
unrestrict := t.UnrestrictFileUntilOk(file, true)
|
||||
if unrestrict == nil {
|
||||
file.State.Event(context.Background(), "break_file")
|
||||
t.EnqueueForRepair(torrent)
|
||||
changesApplied = true
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user