MCPcopy
hub / github.com/autobrr/qui / isTransientTorrentStateForOrphanScan

Function isTransientTorrentStateForOrphanScan

internal/services/orphanscan/service.go:1106–1118  ·  view source on GitHub ↗

nolint:exhaustive // Only transient torrent states belong here; all others are non-transient.

(state qbt.TorrentState)

Source from the content-addressed store, hash-verified

1104
1105//nolint:exhaustive // Only transient torrent states belong here; all others are non-transient.
1106func 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
1120func sortedRoots(roots map[string]struct{}) []string {
1121 items := make([]string, 0, len(roots))

Calls

no outgoing calls

Tested by 1