nolint:exhaustive // Only transient torrent states belong here; all others are non-transient.
(state qbt.TorrentState)
| 1104 | |
| 1105 | //nolint:exhaustive // Only transient torrent states belong here; all others are non-transient. |
| 1106 | func isTransientTorrentStateForOrphanScan(state qbt.TorrentState) bool { |
| 1107 | switch state { |
| 1108 | case qbt.TorrentStateMetaDl, |
| 1109 | qbt.TorrentStateCheckingResumeData, |
| 1110 | qbt.TorrentStateCheckingDl, |
| 1111 | qbt.TorrentStateCheckingUp, |
| 1112 | qbt.TorrentStateAllocating, |
| 1113 | qbt.TorrentStateMoving: |
| 1114 | return true |
| 1115 | default: |
| 1116 | return false |
| 1117 | } |
| 1118 | } |
| 1119 | |
| 1120 | func sortedRoots(roots map[string]struct{}) []string { |
| 1121 | items := make([]string, 0, len(roots)) |
no outgoing calls